Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
committer Bernie Innocenti <bernie@codewiz.org>2010-05-03 21:53:47 (GMT)
commit1030dc837b10a03a02a85d5504cbeec168ce49e2 (patch)
tree698eefa87ac437deaf36a4141b326f8ce7986692
Import XaoS r489 (trunk after version 3.5)
-rw-r--r--AUTHORS130
-rw-r--r--COPYING339
-rw-r--r--ChangeLog2372
-rw-r--r--ChangeLog.old1082
-rw-r--r--Doxyfile1356
-rw-r--r--INSTALL339
-rw-r--r--Makefile.in88
-rw-r--r--NEWS453
-rw-r--r--README110
-rw-r--r--TODO66
-rw-r--r--aclocal.m42394
-rw-r--r--catalogs/README11
-rw-r--r--catalogs/README.i18n14
-rw-r--r--catalogs/cesky.cat952
-rw-r--r--catalogs/deutsch.cat1067
-rw-r--r--catalogs/english.cat1078
-rw-r--r--catalogs/espanhol.cat1048
-rw-r--r--catalogs/francais.cat1074
-rw-r--r--catalogs/italiano.cat1105
-rw-r--r--catalogs/magyar.cat1183
-rw-r--r--catalogs/portuguese.cat1103
-rw-r--r--catalogs/romanian.cat1140
-rwxr-xr-xconfig.guess1516
-rwxr-xr-xconfig.rpath571
-rwxr-xr-xconfig.sub1622
-rwxr-xr-xconfigure15385
-rw-r--r--configure.in551
-rw-r--r--configure.scan74
-rw-r--r--doc/Makefile.in36
-rw-r--r--doc/XaoS.lsm27
-rwxr-xr-xdoc/mkauthors13
-rwxr-xr-xdoc/mktexi5
-rwxr-xr-xdoc/texi2rest.py593
-rw-r--r--doc/xaos.614
-rw-r--r--doc/xaos.geninfo283
-rw-r--r--doc/xaos.info3818
-rw-r--r--doc/xaos.texinfo3468
-rw-r--r--doc/xaosdev.info2862
-rw-r--r--doc/xaosdev.texinfo2842
-rw-r--r--examples/0rfelyus/0rfel1.xpf11
-rw-r--r--examples/0rfelyus/0rfel2.xpf11
-rw-r--r--examples/Hubicka/2spirals.xpf9
-rw-r--r--examples/Hubicka/3d1.xpf15
-rw-r--r--examples/Hubicka/3d2.xpf13
-rw-r--r--examples/Hubicka/3d3.xpf13
-rw-r--r--examples/Hubicka/3d4.xpf13
-rw-r--r--examples/Hubicka/3d5.xpf12
-rw-r--r--examples/Hubicka/3d6.xpf10
-rw-r--r--examples/Hubicka/3d7.xpf10
-rw-r--r--examples/Hubicka/3d8.xpf10
-rw-r--r--examples/Hubicka/3d9.xpf11
-rw-r--r--examples/Hubicka/axe.xpf11
-rw-r--r--examples/Hubicka/barnsl1.xpf11
-rw-r--r--examples/Hubicka/barnsl2.xpf11
-rw-r--r--examples/Hubicka/barnsl3.xpf13
-rw-r--r--examples/Hubicka/barnsl4.xpf13
-rw-r--r--examples/Hubicka/barnsl5.xpf13
-rw-r--r--examples/Hubicka/barnsl6.xpf11
-rw-r--r--examples/Hubicka/barnsl7.xpf12
-rw-r--r--examples/Hubicka/barnsl8.xpf12
-rw-r--r--examples/Hubicka/barnsl9.xpf13
-rw-r--r--examples/Hubicka/beatle.xpf12
-rw-r--r--examples/Hubicka/beatle2.xpf12
-rw-r--r--examples/Hubicka/brown.xpf8
-rw-r--r--examples/Hubicka/checker.xpf12
-rw-r--r--examples/Hubicka/crone.xpf11
-rw-r--r--examples/Hubicka/dblspira.xpf10
-rw-r--r--examples/Hubicka/dragons.xpf10
-rw-r--r--examples/Hubicka/dragons2.xpf11
-rw-r--r--examples/Hubicka/edge.xpf10
-rw-r--r--examples/Hubicka/edge2.xpf11
-rw-r--r--examples/Hubicka/edge3.xpf10
-rw-r--r--examples/Hubicka/eifell.xpf12
-rw-r--r--examples/Hubicka/galaxy.xpf10
-rw-r--r--examples/Hubicka/goldrive.xpf12
-rw-r--r--examples/Hubicka/head.xpf13
-rw-r--r--examples/Hubicka/head2.xpf11
-rw-r--r--examples/Hubicka/head3.xpf14
-rw-r--r--examples/Hubicka/incolor1.xpf12
-rw-r--r--examples/Hubicka/incolor2.xpf13
-rw-r--r--examples/Hubicka/incolor3.xpf11
-rw-r--r--examples/Hubicka/incolor4.xpf17
-rw-r--r--examples/Hubicka/incolor5.xpf12
-rw-r--r--examples/Hubicka/julia.xpf12
-rw-r--r--examples/Hubicka/julia2.xpf11
-rw-r--r--examples/Hubicka/julia3.xpf11
-rw-r--r--examples/Hubicka/julia4.xpf13
-rw-r--r--examples/Hubicka/julia5.xpf14
-rw-r--r--examples/Hubicka/juliaanim.xaf29
-rw-r--r--examples/Hubicka/lemon.xpf10
-rw-r--r--examples/Hubicka/light.xpf12
-rw-r--r--examples/Hubicka/magnet.xpf9
-rw-r--r--examples/Hubicka/magnet1.xpf9
-rw-r--r--examples/Hubicka/magnet2.xpf10
-rw-r--r--examples/Hubicka/magnet3.xpf10
-rw-r--r--examples/Hubicka/magnet4.xpf10
-rw-r--r--examples/Hubicka/mand1.xpf10
-rw-r--r--examples/Hubicka/mand2.xpf11
-rw-r--r--examples/Hubicka/mand3.xpf10
-rw-r--r--examples/Hubicka/mand4.xpf9
-rw-r--r--examples/Hubicka/mand5.xpf10
-rw-r--r--examples/Hubicka/mand7.xpf12
-rw-r--r--examples/Hubicka/mand8.xpf11
-rw-r--r--examples/Hubicka/mandanim.xaf12
-rw-r--r--examples/Hubicka/minibrot.xpf9
-rw-r--r--examples/Hubicka/newton.xaf19
-rw-r--r--examples/Hubicka/newton.xpf12
-rw-r--r--examples/Hubicka/newton2.xpf11
-rw-r--r--examples/Hubicka/newton3.xpf12
-rw-r--r--examples/Hubicka/octo.xpf10
-rw-r--r--examples/Hubicka/palace.xpf13
-rw-r--r--examples/Hubicka/perb1.xpf11
-rw-r--r--examples/Hubicka/perb2.xpf10
-rw-r--r--examples/Hubicka/perb3.xpf10
-rw-r--r--examples/Hubicka/perb4.xpf14
-rw-r--r--examples/Hubicka/perb5.xpf12
-rw-r--r--examples/Hubicka/phoenix1.xpf11
-rw-r--r--examples/Hubicka/phoenix2.xpf11
-rw-r--r--examples/Hubicka/redjulia.xpf12
-rw-r--r--examples/Hubicka/redmand.xpf9
-rw-r--r--examples/Hubicka/redmand2.xpf10
-rw-r--r--examples/Hubicka/rocks.xpf11
-rw-r--r--examples/Hubicka/shell.xpf11
-rw-r--r--examples/Hubicka/something.xpf12
-rw-r--r--examples/Hubicka/spiral.xpf13
-rw-r--r--examples/Hubicka/spiral2.xpf8
-rw-r--r--examples/Hubicka/spiral3.xpf9
-rw-r--r--examples/Hubicka/spiral4.xpf14
-rw-r--r--examples/Hubicka/sprial.xpf12
-rw-r--r--examples/Hubicka/sun.xpf12
-rw-r--r--examples/Hubicka/thebug.xpf11
-rw-r--r--examples/Hubicka/tower.xpf11
-rw-r--r--examples/Hubicka/tree.xpf11
-rw-r--r--examples/Hubicka/triangle.xpf10
-rw-r--r--examples/Hubicka/truecol1.xpf17
-rw-r--r--examples/Hubicka/truecol2.xpf14
-rw-r--r--examples/Hubicka/truecol3.xpf16
-rw-r--r--examples/Hubicka/truecol4.xpf14
-rw-r--r--examples/Hubicka/truecol5.xpf14
-rw-r--r--examples/Hubicka/truecol6.xpf15
-rw-r--r--examples/Hubicka/truecol7.xpf15
-rw-r--r--examples/Hubicka/ufo.xpf12
-rw-r--r--examples/Langston/animal.xpf12
-rw-r--r--examples/Langston/butterfly-langston.xpf11
-rw-r--r--examples/Langston/eye.xpf12
-rw-r--r--examples/Langston/newcolor.xpf12
-rw-r--r--examples/Langston/newt.xpf11
-rw-r--r--examples/Langston/newt2.xpf11
-rw-r--r--examples/Langston/paisleypillow.xpf12
-rw-r--r--examples/Langston/paramecium.xpf10
-rw-r--r--examples/Langston/pretty.xpf11
-rw-r--r--examples/Langston/pretty2.xpf11
-rw-r--r--examples/Langston/royal.xpf11
-rw-r--r--examples/Langston/rpg.xpf12
-rw-r--r--examples/Langston/whisp.xpf13
-rw-r--r--examples/Malczak/alien.xpf15
-rw-r--r--examples/Malczak/burnship.xpf11
-rw-r--r--examples/Malczak/butterfly.xpf11
-rw-r--r--examples/Malczak/circle.xpf14
-rw-r--r--examples/Malczak/dark.xpf12
-rw-r--r--examples/Malczak/eyes.xpf15
-rw-r--r--examples/Malczak/heart.xpf16
-rw-r--r--examples/Malczak/helloween.xpf16
-rw-r--r--examples/Malczak/pentafrac.xpf12
-rw-r--r--examples/Malczak/skullfrm.xpf11
-rw-r--r--examples/Malczak/warriormask.xpf16
-rw-r--r--examples/README154
-rw-r--r--examples/ZKovacs/fract0.xpf10
-rw-r--r--examples/ZKovacs/fract1.xpf11
-rw-r--r--examples/ZKovacs/hornflake1.xpf11
-rw-r--r--examples/ZKovacs/hornflake2.xpf10
-rw-r--r--examples/ZKovacs/mand9.xpf10
-rw-r--r--examples/ZsKovacs/bolygo.xpf9
-rw-r--r--examples/ZsKovacs/csiga2.xpf10
-rw-r--r--examples/ZsKovacs/csiga3.xpf10
-rw-r--r--examples/ZsKovacs/csiga4.xpf10
-rw-r--r--examples/ZsKovacs/csiga5.xpf10
-rw-r--r--examples/ZsKovacs/gamma.xpf11
-rw-r--r--examples/ZsKovacs/golden.xpf10
-rw-r--r--examples/ZsKovacs/impulzus.xpf12
-rw-r--r--examples/ZsKovacs/kovzsi10.2.xpf12
-rw-r--r--examples/ZsKovacs/kovzsi12.xpf8
-rw-r--r--examples/ZsKovacs/kovzsi14.xpf10
-rw-r--r--examples/ZsKovacs/kovzsi15.xpf12
-rw-r--r--examples/ZsKovacs/kovzsi16.xpf10
-rw-r--r--examples/ZsKovacs/kovzsi17.xpf9
-rw-r--r--examples/ZsKovacs/kovzsi2.1.xpf11
-rw-r--r--examples/ZsKovacs/kovzsi2.xpf11
-rw-r--r--examples/ZsKovacs/kovzsi3.1.xpf11
-rw-r--r--examples/ZsKovacs/kovzsi3.2.xpf11
-rw-r--r--examples/ZsKovacs/kovzsi4.xpf11
-rw-r--r--examples/ZsKovacs/kovzsi6.1.xpf8
-rw-r--r--examples/ZsKovacs/kovzsi6.2.xpf8
-rw-r--r--examples/ZsKovacs/kovzsi6.xpf8
-rw-r--r--examples/ZsKovacs/kovzsi7.1.xpf8
-rw-r--r--examples/ZsKovacs/kovzsi7.2.xpf8
-rw-r--r--examples/ZsKovacs/kovzsi7.3.xpf8
-rw-r--r--examples/ZsKovacs/kovzsi7.4.xpf8
-rw-r--r--examples/ZsKovacs/kovzsi7.5.xpf8
-rw-r--r--examples/ZsKovacs/kovzsi8.xpf14
-rw-r--r--examples/ZsKovacs/kovzsi9.2.xpf11
-rw-r--r--examples/ZsKovacs/kovzsi9.xpf11
-rw-r--r--examples/ZsKovacs/light-kovzsi.xpf12
-rw-r--r--examples/ZsKovacs/lighting.xpf12
-rw-r--r--examples/ZsKovacs/nap.xpf10
-rw-r--r--examples/ZsKovacs/orveny.xpf10
-rw-r--r--examples/ZsKovacs/pavaszem.xpf12
-rw-r--r--examples/ZsKovacs/pavaszem2.xpf12
-rw-r--r--examples/ZsKovacs/pepita.xpf12
-rw-r--r--examples/ZsKovacs/zsigapro.xpf14
-rwxr-xr-xexamples/nametest.sh4
-rw-r--r--help/Makefile.in14
-rw-r--r--help/README29
-rwxr-xr-xhelp/applehelpconv77
-rwxr-xr-xhelp/conv118
-rwxr-xr-xhelp/dokuwikiconv82
-rw-r--r--help/help.jpgbin0 -> 14989 bytes
-rwxr-xr-xhelp/hlp2rtf74
-rwxr-xr-xhelp/htmlconv60
-rwxr-xr-xhelp/multfix37
-rw-r--r--help/rest/Makefile88
-rw-r--r--help/rest/X11.txt31
-rw-r--r--help/rest/aa.txt68
-rw-r--r--help/rest/about.txt164
-rw-r--r--help/rest/addformula.txt82
-rw-r--r--help/rest/animateview.txt18
-rw-r--r--help/rest/animf.txt28
-rw-r--r--help/rest/animroot.txt17
-rw-r--r--help/rest/anti.txt23
-rw-r--r--help/rest/autopilot.txt24
-rw-r--r--help/rest/background.txt49
-rw-r--r--help/rest/bailout.txt30
-rw-r--r--help/rest/barnsley.txt14
-rw-r--r--help/rest/blur.txt18
-rw-r--r--help/rest/calc.txt21
-rw-r--r--help/rest/clearline.txt13
-rw-r--r--help/rest/clearlines.txt14
-rw-r--r--help/rest/clearscreen.txt15
-rw-r--r--help/rest/cocoa.txt95
-rw-r--r--help/rest/color.txt17
-rw-r--r--help/rest/command.txt15
-rw-r--r--help/rest/conf.py194
-rw-r--r--help/rest/controls.txt55
-rw-r--r--help/rest/copy.txt13
-rw-r--r--help/rest/cycling.txt41
-rw-r--r--help/rest/dX-fullscreen.txt30
-rw-r--r--help/rest/dX-window.txt30
-rw-r--r--help/rest/defpalette.txt20
-rw-r--r--help/rest/devel.txt20
-rw-r--r--help/rest/display.txt15
-rw-r--r--help/rest/drivers.txt19
-rw-r--r--help/rest/dynamic.txt36
-rw-r--r--help/rest/edge.txt20
-rw-r--r--help/rest/edge2.txt20
-rw-r--r--help/rest/edit.txt16
-rw-r--r--help/rest/emboss.txt17
-rw-r--r--help/rest/fastjulia.txt23
-rw-r--r--help/rest/file.txt18
-rw-r--r--help/rest/filter.txt54
-rw-r--r--help/rest/format.txt136
-rw-r--r--help/rest/formula.txt53
-rw-r--r--help/rest/fractal.txt24
-rw-r--r--help/rest/gpl.txt349
-rw-r--r--help/rest/helpmenu.txt9
-rw-r--r--help/rest/incoloring.txt87
-rw-r--r--help/rest/index.txt42
-rw-r--r--help/rest/initstate.txt18
-rw-r--r--help/rest/interlace.txt17
-rw-r--r--help/rest/interrupt.txt16
-rw-r--r--help/rest/letterspersec.txt17
-rw-r--r--help/rest/line.txt16
-rw-r--r--help/rest/linekey.txt13
-rw-r--r--help/rest/linemenu.txt49
-rw-r--r--help/rest/load.txt15
-rw-r--r--help/rest/loadexample.txt16
-rw-r--r--help/rest/loadpos.txt13
-rw-r--r--help/rest/magnet.txt15
-rw-r--r--help/rest/mandel.txt14
-rw-r--r--help/rest/mandel3.txt33
-rw-r--r--help/rest/maxiter.txt30
-rw-r--r--help/rest/menus.txt17
-rw-r--r--help/rest/message.txt17
-rw-r--r--help/rest/mfilter.txt27
-rw-r--r--help/rest/mformula.txt20
-rw-r--r--help/rest/ministatus.txt17
-rw-r--r--help/rest/misc.txt22
-rw-r--r--help/rest/morphangle.txt24
-rw-r--r--help/rest/morphjulia.txt19
-rw-r--r--help/rest/morphlastline.txt16
-rw-r--r--help/rest/morphline.txt16
-rw-r--r--help/rest/morphview.txt33
-rw-r--r--help/rest/moveview.txt13
-rw-r--r--help/rest/newton.txt19
-rw-r--r--help/rest/nogui.txt17
-rw-r--r--help/rest/octal.txt15
-rw-r--r--help/rest/outcoloring.txt92
-rw-r--r--help/rest/palette.txt39
-rw-r--r--help/rest/palettef.txt21
-rw-r--r--help/rest/palettemenu.txt18
-rw-r--r--help/rest/paste.txt13
-rw-r--r--help/rest/periodicity.txt44
-rw-r--r--help/rest/phoenix.txt13
-rw-r--r--help/rest/plane.txt83
-rw-r--r--help/rest/play.txt12
-rw-r--r--help/rest/plc.txt17
-rw-r--r--help/rest/quit.txt17
-rw-r--r--help/rest/randompalette.txt20
-rw-r--r--help/rest/range.txt32
-rw-r--r--help/rest/recalculate.txt17
-rw-r--r--help/rest/record.txt20
-rw-r--r--help/rest/redo.txt11
-rw-r--r--help/rest/renderanim.txt12
-rw-r--r--help/rest/rest.pri134
-rw-r--r--help/rest/root.txt22
-rw-r--r--help/rest/rotate.txt57
-rw-r--r--help/rest/savecfg.txt17
-rw-r--r--help/rest/saveimg.txt21
-rw-r--r--help/rest/savepos.txt18
-rw-r--r--help/rest/sffe.txt79
-rw-r--r--help/rest/shiftpalette.txt25
-rw-r--r--help/rest/smoothmorph.txt32
-rw-r--r--help/rest/speed.txt39
-rw-r--r--help/rest/starfield.txt17
-rw-r--r--help/rest/start.txt27
-rw-r--r--help/rest/status.txt18
-rw-r--r--help/rest/stereogram.txt109
-rw-r--r--help/rest/stopreplay.txt11
-rw-r--r--help/rest/support.txt70
-rw-r--r--help/rest/tcolor.txt108
-rw-r--r--help/rest/text.txt28
-rw-r--r--help/rest/textposition.txt19
-rw-r--r--help/rest/textsleep.txt18
-rw-r--r--help/rest/time.txt18
-rw-r--r--help/rest/truecolor.txt21
-rw-r--r--help/rest/tutorial.txt254
-rw-r--r--help/rest/ui.txt22
-rw-r--r--help/rest/uimandelbrot.txt48
-rw-r--r--help/rest/uiperturbation.txt37
-rw-r--r--help/rest/uiview.txt56
-rw-r--r--help/rest/undo.txt13
-rw-r--r--help/rest/usleep.txt16
-rw-r--r--help/rest/video.txt99
-rw-r--r--help/rest/volunteer.txt36
-rw-r--r--help/rest/wait.txt20
-rw-r--r--help/rest/win32.txt42
-rw-r--r--help/rest/writehelp.txt63
-rw-r--r--help/rest/xaosspecific.py4
-rw-r--r--help/rest/xtextcenter.txt11
-rw-r--r--help/rest/xtexteight.txt11
-rw-r--r--help/rest/xtextleft.txt11
-rw-r--r--help/rest/xtextpos.txt16
-rw-r--r--help/rest/ytextbottom.txt11
-rw-r--r--help/rest/ytextmiddle.txt11
-rw-r--r--help/rest/ytextpos.txt16
-rw-r--r--help/rest/ytextup.txt11
-rw-r--r--help/rest/zoom.txt37
-rwxr-xr-xhelp/restconv68
-rwxr-xr-xhelp/rtfconv2
-rw-r--r--help/rtfconv.bat2
-rw-r--r--help/tutorial.scptbin0 -> 3876 bytes
-rwxr-xr-xhelp/winhelpconv71
-rw-r--r--help/xaos.hlp3996
-rw-r--r--help/xaoshelp.css18
-rwxr-xr-xhelp/xaoshelp.hhp159
-rw-r--r--help/xaoswin.Hpj23
-rwxr-xr-xhelp/xhtml2rest.py537
-rw-r--r--install-sh238
-rw-r--r--ltmain.sh4982
-rw-r--r--m4/ax_cc_maxopt.m4180
-rw-r--r--m4/ax_check_compiler_flags.m474
-rw-r--r--m4/ax_compiler_vendor.m461
-rw-r--r--m4/ax_gcc_archflag.m4213
-rw-r--r--m4/ax_gcc_x86_cpuid.m477
-rw-r--r--src/Makefile.in62
-rw-r--r--src/engine/3d.c240
-rw-r--r--src/engine/3dd.c200
-rw-r--r--src/engine/Makefile.in70
-rw-r--r--src/engine/anti.c358
-rw-r--r--src/engine/blur.c393
-rw-r--r--src/engine/btrace.c596
-rw-r--r--src/engine/btraced.c466
-rw-r--r--src/engine/calculate.h37
-rw-r--r--src/engine/dither.c1200
-rw-r--r--src/engine/docalc.c790
-rw-r--r--src/engine/edge.c113
-rw-r--r--src/engine/edge2.c113
-rw-r--r--src/engine/edge2d.c53
-rw-r--r--src/engine/edged.c66
-rw-r--r--src/engine/emboss.c266
-rw-r--r--src/engine/engine.pri35
-rw-r--r--src/engine/formulas.c3038
-rw-r--r--src/engine/fractal.c471
-rw-r--r--src/engine/i386.c187
-rw-r--r--src/engine/interlace.c134
-rw-r--r--src/engine/itersmall.c171
-rw-r--r--src/engine/julia.c120
-rw-r--r--src/engine/julia.h18
-rw-r--r--src/engine/paletted.c22
-rw-r--r--src/engine/palettef.c165
-rw-r--r--src/engine/plane.c144
-rw-r--r--src/engine/rotate.c200
-rw-r--r--src/engine/rotated.c56
-rw-r--r--src/engine/star.c135
-rw-r--r--src/engine/stard.c31
-rw-r--r--src/engine/stereod.c51
-rw-r--r--src/engine/stereogram.c193
-rw-r--r--src/engine/subwindow.c236
-rw-r--r--src/engine/zoom.c1762
-rw-r--r--src/engine/zoomd.c309
-rw-r--r--src/filter/Makefile.in45
-rw-r--r--src/filter/filter.c297
-rw-r--r--src/filter/filter.pri10
-rw-r--r--src/filter/font.c1814
-rw-r--r--src/filter/font2.c35
-rw-r--r--src/filter/font23.c36
-rw-r--r--src/filter/font3.c41
-rw-r--r--src/filter/grlib.c995
-rw-r--r--src/filter/grlibd.c322
-rw-r--r--src/filter/image.c268
-rw-r--r--src/filter/palette.c1097
-rw-r--r--src/filter/random.c50
-rw-r--r--src/filter/xfont16.c517
-rw-r--r--src/filter/xfont32.c1989
-rw-r--r--src/filter/xfont48.c2100
-rw-r--r--src/i18n/Makefile.in.in53
-rw-r--r--src/i18n/README156
-rw-r--r--src/i18n/cs.po1836
-rw-r--r--src/i18n/de.po1481
-rw-r--r--src/i18n/es.po1561
-rw-r--r--src/i18n/fr.po1506
-rw-r--r--src/i18n/hu.po1477
-rw-r--r--src/i18n/it.po1483
-rw-r--r--src/i18n/pt.po1570
-rw-r--r--src/i18n/ro.po1504
-rw-r--r--src/include/aconfig.h.in60
-rw-r--r--src/include/archaccel.h14
-rw-r--r--src/include/btrace.h12
-rw-r--r--src/include/c256.h12
-rw-r--r--src/include/catalog.h27
-rw-r--r--src/include/complex.h63
-rw-r--r--src/include/config/aconfig.std28
-rw-r--r--src/include/config/config.autoconf141
-rw-r--r--src/include/config/config.std28
-rw-r--r--src/include/cursor.h56
-rw-r--r--src/include/fconfig.h63
-rw-r--r--src/include/filter.h335
-rw-r--r--src/include/formulas.h64
-rw-r--r--src/include/fractal.h170
-rw-r--r--src/include/gccaccel.h40
-rw-r--r--src/include/gccbuild.h65
-rw-r--r--src/include/generic.h15
-rw-r--r--src/include/grlib.h40
-rw-r--r--src/include/hicolor.h16
-rw-r--r--src/include/i386/__math.h586
-rw-r--r--src/include/i386/ctrl87.h120
-rw-r--r--src/include/i386/sstring.h414
-rw-r--r--src/include/include.pri38
-rw-r--r--src/include/misc-f.h17
-rw-r--r--src/include/param.h48
-rw-r--r--src/include/pixel_t.h21
-rw-r--r--src/include/plane.h58
-rw-r--r--src/include/sffe.h139
-rw-r--r--src/include/sffe_cmplx_asm.h140
-rw-r--r--src/include/sffe_cmplx_gsl.h82
-rw-r--r--src/include/timers.h67
-rw-r--r--src/include/true24.h31
-rw-r--r--src/include/truecolor.h13
-rw-r--r--src/include/ui.h160
-rw-r--r--src/include/ui_helper.h550
-rw-r--r--src/include/version.h.in23
-rw-r--r--src/include/xerror.h12
-rw-r--r--src/include/xio.h107
-rw-r--r--src/include/xldio.h14
-rw-r--r--src/include/xmenu.h377
-rw-r--r--src/include/xshl.h50
-rw-r--r--src/include/xthread.h208
-rw-r--r--src/include/zoom.h40
-rw-r--r--src/sffe/About4
-rw-r--r--src/sffe/Makefile.in36
-rw-r--r--src/sffe/asm/build.sh3
-rw-r--r--src/sffe/asm/build_win.sh3
-rw-r--r--src/sffe/asm/cmplx.asm901
-rw-r--r--src/sffe/sffe.c1013
-rw-r--r--src/sffe/sffe.pri23
-rw-r--r--src/sffe/sffe_cmplx_asm.c331
-rw-r--r--src/sffe/sffe_cmplx_gsl.c294
-rw-r--r--src/ui-hlp/Makefile.in47
-rw-r--r--src/ui-hlp/autod.c112
-rw-r--r--src/ui-hlp/autopilot.c214
-rw-r--r--src/ui-hlp/autopilot.h33
-rw-r--r--src/ui-hlp/menu.c1678
-rw-r--r--src/ui-hlp/messg.c145
-rw-r--r--src/ui-hlp/play.c946
-rw-r--r--src/ui-hlp/play.h50
-rw-r--r--src/ui-hlp/playtext.c174
-rw-r--r--src/ui-hlp/render.c664
-rw-r--r--src/ui-hlp/save.c704
-rw-r--r--src/ui-hlp/ui-hlp.pri12
-rw-r--r--src/ui-hlp/ui_helper.c2303
-rw-r--r--src/ui-hlp/wstack.c528
-rw-r--r--src/ui/Makefile.in51
-rw-r--r--src/ui/dialog.c1521
-rw-r--r--src/ui/drivers.c89
-rw-r--r--src/ui/filesel.c677
-rw-r--r--src/ui/fparams.c112
-rw-r--r--src/ui/param.c172
-rw-r--r--src/ui/pipecmd.c113
-rw-r--r--src/ui/ui-drv/aa/Makefile.in39
-rw-r--r--src/ui/ui-drv/aa/ui_aa.c724
-rw-r--r--src/ui/ui-drv/cocoa/AppController.h59
-rw-r--r--src/ui/ui-drv/cocoa/AppController.m542
-rw-r--r--src/ui/ui-drv/cocoa/CustomDialog.h38
-rw-r--r--src/ui/ui-drv/cocoa/CustomDialog.m433
-rw-r--r--src/ui/ui-drv/cocoa/English.lproj/Credits.html26
-rw-r--r--src/ui/ui-drv/cocoa/English.lproj/InfoPlist.stringsbin0 -> 420 bytes
-rw-r--r--src/ui/ui-drv/cocoa/English.lproj/MainMenu.nib/designable.nib498
-rw-r--r--src/ui/ui-drv/cocoa/English.lproj/MainMenu.nib/keyedobjects.nibbin0 -> 4197 bytes
-rw-r--r--src/ui/ui-drv/cocoa/FractalView.h70
-rw-r--r--src/ui/ui-drv/cocoa/FractalView.m347
-rw-r--r--src/ui/ui-drv/cocoa/HowToBuild.txt47
-rw-r--r--src/ui/ui-drv/cocoa/Info.plist69
-rw-r--r--src/ui/ui-drv/cocoa/Japanese.lproj/InfoPlist.stringsbin0 -> 208 bytes
-rw-r--r--src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/classes.nib4
-rw-r--r--src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/info.nib17
-rw-r--r--src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/keyedobjects.nibbin0 -> 10793 bytes
-rw-r--r--src/ui/ui-drv/cocoa/Read Me.rtf193
-rw-r--r--src/ui/ui-drv/cocoa/Readme Cocoa390
-rw-r--r--src/ui/ui-drv/cocoa/VideatorProxy.h42
-rw-r--r--src/ui/ui-drv/cocoa/VideatorProxy.m157
-rw-r--r--src/ui/ui-drv/cocoa/XaoS.icnsbin0 -> 223269 bytes
-rw-r--r--src/ui/ui-drv/cocoa/XaoS.xcodeproj/project.pbxproj831
-rw-r--r--src/ui/ui-drv/cocoa/XaoSDocument.icnsbin0 -> 127993 bytes
-rw-r--r--src/ui/ui-drv/cocoa/XaoS_Prefix.pch7
-rw-r--r--src/ui/ui-drv/cocoa/aconfig.h123
-rw-r--r--src/ui/ui-drv/cocoa/grlib_cocoa.m142
-rw-r--r--src/ui/ui-drv/cocoa/performanceCursor.tiffbin0 -> 4478 bytes
-rw-r--r--src/ui/ui-drv/cocoa/ui_cocoa.m267
-rw-r--r--src/ui/ui-drv/cocoa/version.h22
-rw-r--r--src/ui/ui-drv/gtk/Makefile.in39
-rw-r--r--src/ui/ui-drv/gtk/ui_gtk.c764
-rw-r--r--src/ui/ui-drv/qt/XaoS.icnsbin0 -> 223269 bytes
-rw-r--r--src/ui/ui-drv/qt/XaoS.pro29
-rw-r--r--src/ui/ui-drv/qt/XaoS.qrc5
-rw-r--r--src/ui/ui-drv/qt/aconfig.h63
-rw-r--r--src/ui/ui-drv/qt/config.h149
-rw-r--r--src/ui/ui-drv/qt/config.pri4
-rw-r--r--src/ui/ui-drv/qt/customdialog.cpp179
-rw-r--r--src/ui/ui-drv/qt/customdialog.h29
-rw-r--r--src/ui/ui-drv/qt/fractalwidget.cpp228
-rw-r--r--src/ui/ui-drv/qt/fractalwidget.h57
-rw-r--r--src/ui/ui-drv/qt/images/xaosbig.pngbin0 -> 27584 bytes
-rw-r--r--src/ui/ui-drv/qt/main.cpp180
-rw-r--r--src/ui/ui-drv/qt/mainwindow.cpp172
-rw-r--r--src/ui/ui-drv/qt/mainwindow.h43
-rw-r--r--src/ui/ui-drv/qt/ui_qt.c99
-rw-r--r--src/ui/ui-drv/qt/version.h23
-rw-r--r--src/ui/ui-drv/qt/xaos.icobin0 -> 120841 bytes
-rw-r--r--src/ui/ui-drv/qt/xaos.rc1
-rw-r--r--src/ui/ui-drv/template/Makefile.in39
-rw-r--r--src/ui/ui-drv/template/ui_template.c99
-rw-r--r--src/ui/ui-drv/win32/Makefile.in43
-rw-r--r--src/ui/ui-drv/win32/about.c239
-rw-r--r--src/ui/ui-drv/win32/about.h20
-rw-r--r--src/ui/ui-drv/win32/about.rc19
-rw-r--r--src/ui/ui-drv/win32/dxguid.c1102
-rw-r--r--src/ui/ui-drv/win32/installer/XaoS Installer.nsi138
-rw-r--r--src/ui/ui-drv/win32/installer/XaoS.bmpbin0 -> 25818 bytes
-rw-r--r--src/ui/ui-drv/win32/resource.h3
-rw-r--r--src/ui/ui-drv/win32/small.icobin0 -> 2294 bytes
-rw-r--r--src/ui/ui-drv/win32/ui_win32.c1886
-rw-r--r--src/ui/ui-drv/win32/ui_win32.h20
-rw-r--r--src/ui/ui-drv/win32/version.rc39
-rw-r--r--src/ui/ui-drv/win32/windialo.c471
-rw-r--r--src/ui/ui-drv/win32/winmenu.c243
-rw-r--r--src/ui/ui-drv/win32/xaos.dlg228
-rw-r--r--src/ui/ui-drv/win32/xaos.exe.manifest10
-rw-r--r--src/ui/ui-drv/win32/xaos.icobin0 -> 135286 bytes
-rw-r--r--src/ui/ui-drv/win32/xaos.rc16
-rw-r--r--src/ui/ui-drv/x11/Makefile.in40
-rw-r--r--src/ui/ui-drv/x11/ui_x11.c597
-rw-r--r--src/ui/ui-drv/x11/xlib.c663
-rw-r--r--src/ui/ui-drv/x11/xlib.h139
-rw-r--r--src/ui/ui.c1761
-rw-r--r--src/ui/ui.pri10
-rw-r--r--src/ui/uihelp.c486
-rw-r--r--src/ui/uiint.h75
-rw-r--r--src/ui/uimenu.c572
-rw-r--r--src/util/Makefile.in50
-rw-r--r--src/util/catalog.c253
-rw-r--r--src/util/help.c95
-rw-r--r--src/util/png.c201
-rw-r--r--src/util/thread.c221
-rw-r--r--src/util/timers.c670
-rw-r--r--src/util/util.pri12
-rw-r--r--src/util/xerror.c43
-rw-r--r--src/util/xldio.c603
-rw-r--r--src/util/xmenu.c998
-rw-r--r--src/util/xshl.c470
-rw-r--r--src/util/xstdio.c488
-rw-r--r--src/util/xstring.c141
-rw-r--r--tools/cygwin_profile35
-rw-r--r--tools/dlldeps10
-rwxr-xr-xtools/do-indent14
-rwxr-xr-xtools/indent17
-rwxr-xr-xtools/mkChangeLog11
-rw-r--r--tools/msys_profile40
-rwxr-xr-xtools/tarball31
-rwxr-xr-xtools/update22
-rw-r--r--tools/wintounix.c15
-rw-r--r--tutorial/3dtutor.xaf255
-rw-r--r--tutorial/Bclosing.xaf70
-rw-r--r--tutorial/Bintro.xaf1635
-rw-r--r--tutorial/Bolyai.xaf67
-rw-r--r--tutorial/anim.xaf9
-rw-r--r--tutorial/anim.xhf382
-rw-r--r--tutorial/barnsley.xaf204
-rw-r--r--tutorial/classic.xaf80
-rw-r--r--tutorial/coast.xhf128
-rw-r--r--tutorial/dimension.xaf195
-rw-r--r--tutorial/escape.xaf275
-rw-r--r--tutorial/features.xaf9
-rw-r--r--tutorial/filter.xaf8
-rw-r--r--tutorial/filter.xhf189
-rw-r--r--tutorial/flake1.xhf8
-rw-r--r--tutorial/flake2.xhf32
-rw-r--r--tutorial/flake3.xhf129
-rw-r--r--tutorial/flake4.xhf513
-rw-r--r--tutorial/flake5.xhf1281
-rw-r--r--tutorial/flaketh.xhf64
-rw-r--r--tutorial/fmath.xaf2
-rw-r--r--tutorial/fourfr.xaf131
-rw-r--r--tutorial/fractal.xaf27
-rw-r--r--tutorial/head.xhf1
-rw-r--r--tutorial/incolor.xaf139
-rw-r--r--tutorial/innew.xhf376
-rw-r--r--tutorial/intro.xaf186
-rw-r--r--tutorial/julia.xaf328
-rw-r--r--tutorial/keys.xhf5
-rw-r--r--tutorial/line1.xhf17
-rw-r--r--tutorial/magnet.xaf233
-rw-r--r--tutorial/mset.xaf284
-rw-r--r--tutorial/msetren.xaf286
-rw-r--r--tutorial/new30.xaf86
-rw-r--r--tutorial/newton.xaf254
-rw-r--r--tutorial/octo.xaf174
-rw-r--r--tutorial/other.xaf470
-rw-r--r--tutorial/otherfr.xaf12
-rw-r--r--tutorial/outcolor.xaf342
-rw-r--r--tutorial/outnew.xhf208
-rw-r--r--tutorial/palette.xaf5
-rw-r--r--tutorial/palette.xhf90
-rw-r--r--tutorial/pause.xhf4
-rw-r--r--tutorial/pert.xaf5
-rw-r--r--tutorial/pert.xhf74
-rw-r--r--tutorial/phoenix.xaf167
-rw-r--r--tutorial/plane.xaf469
-rw-r--r--tutorial/power.xaf181
-rw-r--r--tutorial/render.xaf27
-rw-r--r--tutorial/square.xhf20
-rw-r--r--tutorial/tree.xhf63
-rw-r--r--tutorial/trice.xaf133
-rw-r--r--tutorial/truecol.xaf10
-rw-r--r--tutorial/truecol.xhf199
-rwxr-xr-xtutorial/xaf2cat83
664 files changed, 153908 insertions, 0 deletions
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..4f511ac
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,130 @@
+AUTHORS
+-------
+
+This file is autogenerated from help/xaos.hlp.
+If you add a new feature to XaoS or fix a bug,
+please edit help/xaos.hlp and run "cd doc; make".
+
+This list is ordered alphabetically.
+
+
+
+Lucio Henrique de Araujo (lucio.matema@gmail.com)
+ Brazilian/Portuguese translation
+
+Samuel Bizien (samuel@bizien.info)
+ Beryl fractal
+
+Eric Courteau (ecourteau@cplus.fr)
+ francais.cat (translation of tutorials)
+
+Jean-Pierre Demailly (Jean-Pierre.Demailly@ujf-grenoble.fr)
+ Updates for French translation
+
+Radek Doulik (rodo@atrey.karlin.mff.cuni.cz)
+ TK interface, windowid patches
+
+Martin Dozsa (madsoft@centrum.cz)
+ cs.po (Czech translation of menus)
+
+Arpad Fekete (rxpi@freemail.hu)
+ Some new fractals, and the 'More formulae' menu
+
+Zelia Maria Horta Garcia (zeliagarcia@seed.pr.gov.br)
+ Brazilian/Portuguese translation
+
+Tim Goodwin (tgoodwin@cygnus.co.uk)
+ english.cat corrections
+
+Ben Hines
+ autoconf suggestions, Mac OS X port
+
+Jan Hubicka (jh@ucw.cz)
+ Zooming routines, ugly interface, palettes, drivers, autopilot,
+ filters, documentation, tutorials etc.
+
+Jens Kilian (jjk@acm.org)
+ BeOS driver, deutsch.cat
+
+Thomas A. K. Kjaer (takjaer@imv.aau.dk)
+ OS/2 ports (320x200 graphics and AA-lib)
+
+Zoltan Kovacs (kovzol@math.u-szeged.hu)
+ Internationalization, Hungarian translations, finalizing version
+ 3.1, bug fixes, web design, current maintainer
+
+Zsigmond Kovacs (kovzsi@gmail.com)
+ Fractal examples
+
+J.B. Langston III (jb-langston@austin.rr.com)
+ Native Mac OS X port (from version 3.2.2); web redesign;
+ co-maintainer
+
+Andreas Madritsch (amadritsch@datacomm.ch)
+ New fractal types, bailout, many fixes
+
+Mateusz Malczak (xaos@malczak.info)
+ User formula evaluation library
+
+Giorgio Marazzi (gmarazzi@vtr.net)
+ Improvements and fixes for espanhol.cat
+
+Thomas Marsh (thomas.marsh2@gmail.com)
+ First zoomer, formulae, planes, X11 driver, inversions, many ideas
+
+Dominic Mazzoni (dmazzoni@cs.cmu.edu)
+ Macintosh port (version 2.0)
+
+David Meleedy
+ Grammatical and spelling fixed version of `xaos.6'
+
+Paul Nasca (zynaddsubfx@yahoo.com)
+ Ministatus improvement
+
+Nix (nix@esperi.demon.co.uk)
+ Grammatical and spelling fixed version of `xaos.hlp' and other
+ files
+
+Terje Pedersen (terjepe@login.eunet.no)
+ Amiga port
+
+Cesar Perez (oroz@users.sourceforge.net)
+ Spanish translations
+
+Fabrice Premel (premelfa@etu.utc.fr)
+ Periodicity checking
+
+Jan Olderdissen (jan@olderdissen.com)
+ Win32 port
+
+Ilinca Sitaru (ilinca.sitaru@gmail.com)
+ Romanian translation
+
+Daniel Skarda
+ Fractal examples
+
+Andrew Stone (Stone Design - www.stone.com)
+ Videator Support, Cocoa improvements, performance mode, bug fixes
+
+Marton Torok (marton.torok@gmail.com)
+ Small fixes for pipes
+
+Pavel Tzekov (paveltz@csoft.bg)
+ Win32 support
+
+Charles Vidal
+ Tcl/Tk interface
+
+Tapio K. Vocaldo (taps@rmx.com)
+ Macintosh port
+
+Tormod Volden
+ Fixes for X11 driver to improve compatability with Xorg,
+ XScreenSaver, Beryl and Compiz
+
+Philippe Wautelet (p.wautelet@fractalzone.be)
+ Bug fixes for version 3.1.1, French translation, gcc 4.0 fixes
+
+Sergio Zanchetta
+ Italian translation
+
diff --git a/COPYING b/COPYING
new file mode 100644
index 0000000..e77696a
--- /dev/null
+++ b/COPYING
@@ -0,0 +1,339 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+ 675 Mass Ave, Cambridge, MA 02139, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ GNU GENERAL PUBLIC LICENSE
+ TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+ a) You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+
+ b) You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+
+ c) If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+ a) Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+
+ b) Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+
+ c) Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+ NO WARRANTY
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 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 General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ <signature of Ty Coon>, 1 April 1989
+ Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..f1fb9cc
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,2372 @@
+ChangeLog file for XaoS - generated automatically by tools/mkChangeLog.
+Please do not edit this file: your changes will be lost.
+
+
+------------------------------------------------------------------------
+r428 | kovzol | 2009-07-16 16:50:20 -0500 (Thu, 16 Jul 2009) | 1 line
+
+Automatic update by mkChangeLog
+------------------------------------------------------------------------
+r427 | kovzol | 2009-07-16 16:39:43 -0500 (Thu, 16 Jul 2009) | 1 line
+
+Automatic update by mkChangeLog
+------------------------------------------------------------------------
+r426 | jblang | 2009-07-14 23:41:35 -0500 (Tue, 14 Jul 2009) | 1 line
+
+Updated Mac OS X build dependencies for pre-built binaries
+------------------------------------------------------------------------
+r425 | jblang | 2009-07-14 22:19:50 -0500 (Tue, 14 Jul 2009) | 1 line
+
+Update Windows build process for Cygwin instead of MinGW
+------------------------------------------------------------------------
+r424 | jblang | 2009-07-14 19:34:47 -0500 (Tue, 14 Jul 2009) | 1 line
+
+Fix X11 detection
+------------------------------------------------------------------------
+r423 | jblang | 2009-07-13 22:15:40 -0500 (Mon, 13 Jul 2009) | 1 line
+
+Cleanup unused checks in configure file and add AX_CC_MAXOPT
+------------------------------------------------------------------------
+r422 | jblang | 2009-07-12 13:00:10 -0500 (Sun, 12 Jul 2009) | 1 line
+
+Remove unmaintained drivers from autoconf script and fix warnings
+------------------------------------------------------------------------
+r421 | jblang | 2009-07-11 22:14:34 -0500 (Sat, 11 Jul 2009) | 2 lines
+
+Remove DOS and OS2 makefiles for aalib
+
+------------------------------------------------------------------------
+r420 | jblang | 2009-07-11 14:53:57 -0500 (Sat, 11 Jul 2009) | 1 line
+
+Fix typos
+------------------------------------------------------------------------
+r419 | jblang | 2009-07-11 14:50:34 -0500 (Sat, 11 Jul 2009) | 1 line
+
+Restored aa-lib functionality to configure script
+------------------------------------------------------------------------
+r418 | jblang | 2009-07-11 14:36:13 -0500 (Sat, 11 Jul 2009) | 1 line
+
+Restore AA-lib driver
+------------------------------------------------------------------------
+r417 | jblang | 2009-07-11 14:20:49 -0500 (Sat, 11 Jul 2009) | 1 line
+
+Updating install instructions for Linux and Mac OS X
+------------------------------------------------------------------------
+r416 | jblang | 2009-07-11 01:09:44 -0500 (Sat, 11 Jul 2009) | 1 line
+
+Adding dll dependency detection script
+------------------------------------------------------------------------
+r415 | jblang | 2009-07-11 00:32:45 -0500 (Sat, 11 Jul 2009) | 1 line
+
+Updated Windows build instructions
+------------------------------------------------------------------------
+r414 | jblang | 2009-07-11 00:30:55 -0500 (Sat, 11 Jul 2009) | 1 line
+
+Updates to Windows build instructions
+------------------------------------------------------------------------
+r413 | jblang | 2009-07-11 00:06:35 -0500 (Sat, 11 Jul 2009) | 1 line
+
+Updated windows installation instructions
+------------------------------------------------------------------------
+r412 | jblang | 2009-07-10 22:52:03 -0500 (Fri, 10 Jul 2009) | 1 line
+
+Fixes to windows build system
+------------------------------------------------------------------------
+r411 | jblang | 2009-07-07 22:39:10 -0500 (Tue, 07 Jul 2009) | 1 line
+
+Adding patch for compiling gettext 0.17 under MinGW
+------------------------------------------------------------------------
+r410 | jblang | 2009-07-07 22:23:20 -0500 (Tue, 07 Jul 2009) | 1 line
+
+Add '...' to the end of menu items that open dialogs.
+------------------------------------------------------------------------
+r409 | jblang | 2009-07-07 21:27:18 -0500 (Tue, 07 Jul 2009) | 1 line
+
+Add code to attach to parent console so that command line output will be visible
+------------------------------------------------------------------------
+r408 | jblang | 2009-07-06 19:21:07 -0500 (Mon, 06 Jul 2009) | 1 line
+
+Update configure script to work properly in MSYS build environment
+------------------------------------------------------------------------
+r407 | kovzol | 2009-07-03 09:06:08 -0500 (Fri, 03 Jul 2009) | 2 lines
+
+Modified copyright information
+
+------------------------------------------------------------------------
+r406 | jblang | 2009-07-02 22:03:03 -0500 (Thu, 02 Jul 2009) | 1 line
+
+Change version number and fix indentation
+------------------------------------------------------------------------
+r405 | jblang | 2009-07-01 00:10:40 -0500 (Wed, 01 Jul 2009) | 1 line
+
+Conditionalize HtmlHelp support in case SDK isn't available
+------------------------------------------------------------------------
+r404 | jblang | 2009-06-30 23:32:19 -0500 (Tue, 30 Jun 2009) | 1 line
+
+Documentation updates regarding HtmlHelp changes
+------------------------------------------------------------------------
+r403 | jblang | 2009-06-30 22:58:52 -0500 (Tue, 30 Jun 2009) | 1 line
+
+Migrate Windows help system from WinHelp to HtmlHelp. WinHelp is no longer supported as of Vista.
+------------------------------------------------------------------------
+r402 | jblang | 2009-06-29 22:55:46 -0500 (Mon, 29 Jun 2009) | 1 line
+
+Remove reference to 4.x
+------------------------------------------------------------------------
+r401 | jblang | 2009-06-29 22:54:39 -0500 (Mon, 29 Jun 2009) | 1 line
+
+Removed outdated TODOS, replaced with a link to the issue tracker
+------------------------------------------------------------------------
+r400 | jblang | 2009-06-29 22:43:20 -0500 (Mon, 29 Jun 2009) | 1 line
+
+Updated release notes for beta features
+------------------------------------------------------------------------
+r399 | jblang | 2009-06-29 22:28:15 -0500 (Mon, 29 Jun 2009) | 1 line
+
+Documentation updates to reflect infrastructure changes
+------------------------------------------------------------------------
+r398 | jblang | 2009-06-29 22:00:15 -0500 (Mon, 29 Jun 2009) | 1 line
+
+Updated bug reporting instructions.
+------------------------------------------------------------------------
+r397 | jblang | 2009-06-29 21:57:04 -0500 (Mon, 29 Jun 2009) | 1 line
+
+Documentation updates for 3.5
+------------------------------------------------------------------------
+r396 | jblang | 2009-06-29 21:10:08 -0500 (Mon, 29 Jun 2009) | 1 line
+
+GTK driver polishing
+------------------------------------------------------------------------
+r395 | kovzol | 2009-06-29 10:05:35 -0500 (Mon, 29 Jun 2009) | 2 lines
+
+Updates for Portuguese translation.
+
+------------------------------------------------------------------------
+r394 | kovzol | 2009-06-29 05:43:14 -0500 (Mon, 29 Jun 2009) | 2 lines
+
+Updates for Portuguese translation.
+
+------------------------------------------------------------------------
+r393 | kovzol | 2009-06-02 07:46:37 -0500 (Tue, 02 Jun 2009) | 2 lines
+
+Added credits for Brazilian/Portuguese translation.
+
+------------------------------------------------------------------------
+r392 | kovzol | 2009-06-02 07:10:48 -0500 (Tue, 02 Jun 2009) | 2 lines
+
+Adding Portuguese translation (contributed by Lucio de Araujo).
+
+------------------------------------------------------------------------
+r391 | jblang | 2009-05-06 18:49:07 -0500 (Wed, 06 May 2009) | 4 lines
+
+* Fix menu activation bugs
+* First pass at gtk+ native dialogs
+
+
+------------------------------------------------------------------------
+r390 | jblang | 2009-05-06 07:58:57 -0500 (Wed, 06 May 2009) | 5 lines
+
+* Implemented image resizing
+* Fixed memory leaks
+* Implemented programmatic menu toggling
+
+
+------------------------------------------------------------------------
+r389 | jblang | 2009-05-02 18:06:31 -0500 (Sat, 02 May 2009) | 1 line
+
+Reindent sources to K&R style. GNU style plays havoc with some editors.
+------------------------------------------------------------------------
+r388 | jblang | 2009-04-22 22:26:42 -0500 (Wed, 22 Apr 2009) | 1 line
+
+Reverting stupid changes
+------------------------------------------------------------------------
+r387 | jblang | 2009-04-22 19:09:57 -0500 (Wed, 22 Apr 2009) | 1 line
+
+texi2rest rewrite
+------------------------------------------------------------------------
+r386 | jblang | 2009-04-16 20:16:31 -0500 (Thu, 16 Apr 2009) | 1 line
+
+Update texi2rest.py with new architecture; change license to GPL
+------------------------------------------------------------------------
+r385 | jblang | 2009-04-16 00:41:10 -0500 (Thu, 16 Apr 2009) | 1 line
+
+Improvements to texinfo conversion
+------------------------------------------------------------------------
+r384 | jblang | 2009-04-06 00:20:28 -0500 (Mon, 06 Apr 2009) | 1 line
+
+Adding Texinfo to reStructuredText converter
+------------------------------------------------------------------------
+r383 | jblang | 2009-04-05 19:58:20 -0500 (Sun, 05 Apr 2009) | 1 line
+
+Fix texinfo errors
+------------------------------------------------------------------------
+r382 | jblang | 2009-04-05 11:53:16 -0500 (Sun, 05 Apr 2009) | 1 line
+
+Clean up formula documentation
+------------------------------------------------------------------------
+r381 | jblang | 2009-04-04 23:05:58 -0500 (Sat, 04 Apr 2009) | 1 line
+
+Formatting changes
+------------------------------------------------------------------------
+r380 | jblang | 2009-04-02 20:16:19 -0500 (Thu, 02 Apr 2009) | 1 line
+
+Move files around
+------------------------------------------------------------------------
+r379 | jblang | 2009-04-02 20:07:08 -0500 (Thu, 02 Apr 2009) | 1 line
+
+Add developer documentation
+------------------------------------------------------------------------
+r378 | jblang | 2009-04-01 23:11:06 -0500 (Wed, 01 Apr 2009) | 1 line
+
+Remove documentation for deprecated drivers
+------------------------------------------------------------------------
+r377 | jblang | 2009-04-01 23:04:21 -0500 (Wed, 01 Apr 2009) | 1 line
+
+Fix sphinx warnings
+------------------------------------------------------------------------
+r376 | jblang | 2009-04-01 01:38:25 -0500 (Wed, 01 Apr 2009) | 1 line
+
+Sphinxify conversion scripts
+------------------------------------------------------------------------
+r375 | jblang | 2009-04-01 01:27:43 -0500 (Wed, 01 Apr 2009) | 1 line
+
+Removing autogenerated files
+------------------------------------------------------------------------
+r374 | jblang | 2009-04-01 01:24:52 -0500 (Wed, 01 Apr 2009) | 1 line
+
+Check in sphinx build files
+------------------------------------------------------------------------
+r373 | jblang | 2009-04-01 01:21:38 -0500 (Wed, 01 Apr 2009) | 1 line
+
+TOCify navigation pages
+------------------------------------------------------------------------
+r372 | jblang | 2009-04-01 00:52:59 -0500 (Wed, 01 Apr 2009) | 1 line
+
+Sphinxify links
+------------------------------------------------------------------------
+r371 | jblang | 2009-03-31 19:56:51 -0500 (Tue, 31 Mar 2009) | 1 line
+
+Adding anchors to top of files
+------------------------------------------------------------------------
+r370 | jblang | 2009-03-28 18:40:08 -0500 (Sat, 28 Mar 2009) | 1 line
+
+Fix formatting and UI menu page
+------------------------------------------------------------------------
+r369 | jblang | 2009-03-28 18:18:41 -0500 (Sat, 28 Mar 2009) | 1 line
+
+Fix formatting
+------------------------------------------------------------------------
+r368 | jblang | 2009-03-28 18:14:27 -0500 (Sat, 28 Mar 2009) | 1 line
+
+Fix external links and clean up formatting
+------------------------------------------------------------------------
+r367 | jblang | 2009-03-28 16:56:56 -0500 (Sat, 28 Mar 2009) | 1 line
+
+Fix GPL formatting
+------------------------------------------------------------------------
+r366 | jblang | 2009-03-28 16:29:15 -0500 (Sat, 28 Mar 2009) | 1 line
+
+Fix reStructuredText warnings and errors
+------------------------------------------------------------------------
+r365 | jblang | 2009-03-28 15:33:50 -0500 (Sat, 28 Mar 2009) | 1 line
+
+xshl to ReStructuredText conversion
+------------------------------------------------------------------------
+r364 | jblang | 2009-03-28 14:47:26 -0500 (Sat, 28 Mar 2009) | 1 line
+
+xshl to ReStructuredText conversion
+------------------------------------------------------------------------
+r363 | jblang | 2009-03-28 14:16:01 -0500 (Sat, 28 Mar 2009) | 1 line
+
+xshl to ReStructuredText conversion
+------------------------------------------------------------------------
+r362 | jblang | 2009-03-28 13:12:38 -0500 (Sat, 28 Mar 2009) | 1 line
+
+xshl to ReStructuredText conversion
+------------------------------------------------------------------------
+r361 | malczak | 2009-01-28 15:44:51 -0600 (Wed, 28 Jan 2009) | 6 lines
+
+[malczak] some bug fixes
+ - fixed bug #2507911
+ - fixed some sffe related bugs
+ - globaluih moved to uih_mkcontex function
+
+
+------------------------------------------------------------------------
+r360 | kovzol | 2008-09-28 08:06:28 -0500 (Sun, 28 Sep 2008) | 2 lines
+
+Fixes for 4.0.
+
+------------------------------------------------------------------------
+r359 | kovzol | 2008-09-28 07:45:51 -0500 (Sun, 28 Sep 2008) | 2 lines
+
+Updates for 4.0. "make install" is not checked yet.
+
+------------------------------------------------------------------------
+r358 | kovzol | 2008-09-28 06:26:32 -0500 (Sun, 28 Sep 2008) | 2 lines
+
+Small fixes for 4.0, partially finished
+
+------------------------------------------------------------------------
+r357 | kovzol | 2008-09-26 05:38:43 -0500 (Fri, 26 Sep 2008) | 4 lines
+
+Added simple red and simple blue true color modes for educational purposes.
+This also fixed the bug "angle angle2 angle" was missing from possible
+options for a while.
+
+------------------------------------------------------------------------
+r356 | jblang | 2008-07-29 21:13:23 -0500 (Tue, 29 Jul 2008) | 1 line
+
+Added doxygen configuration file
+------------------------------------------------------------------------
+r355 | jblang | 2008-07-28 00:51:50 -0500 (Mon, 28 Jul 2008) | 1 line
+
+Enabling pretty win32 dialog fonts and visual styles
+------------------------------------------------------------------------
+r354 | jblang | 2008-07-27 23:56:48 -0500 (Sun, 27 Jul 2008) | 1 line
+
+Rolling back changes to autoconf; more than I want to take on right now
+------------------------------------------------------------------------
+r353 | jblang | 2008-07-22 22:40:56 -0500 (Tue, 22 Jul 2008) | 3 lines
+
+Adding custom macros
+
+
+------------------------------------------------------------------------
+r352 | jblang | 2008-07-22 22:40:26 -0500 (Tue, 22 Jul 2008) | 3 lines
+
+Streamlined autoconf now working with X11
+
+
+------------------------------------------------------------------------
+r351 | jblang | 2008-07-21 23:44:40 -0500 (Mon, 21 Jul 2008) | 5 lines
+
+Now that i386.c is fixed, remove -DNOASSEMBLY from aconfig.h
+
+Also, remove deleted files from project (BeOS, Plan9, etc.)
+
+
+------------------------------------------------------------------------
+r350 | jblang | 2008-07-21 23:29:41 -0500 (Mon, 21 Jul 2008) | 10 lines
+
+Apple's gcc choked on the assembly in i386.c:
+ i386.c: In function `_control87':
+ i386.c:31: error: PIC register `bx' clobbered in `asm'
+
+This is because -fPIC is enabled on Mac OS X by default.
+To avoid this, I changed all references to bx to cx.
+
+I have confirmed that the code compiles and functions correctly
+after this change.
+
+------------------------------------------------------------------------
+r349 | jblang | 2008-07-19 14:23:18 -0500 (Sat, 19 Jul 2008) | 2 lines
+
+Removing prefix.h; not used by any current drivers
+
+------------------------------------------------------------------------
+r348 | jblang | 2008-07-17 00:28:31 -0500 (Thu, 17 Jul 2008) | 1 line
+
+Moving doc files around to comply with GNU standard layout
+------------------------------------------------------------------------
+r347 | jblang | 2008-07-16 22:05:43 -0500 (Wed, 16 Jul 2008) | 1 line
+
+Updates to configure.in and Makefile.in to remove references to unmaintained drivers
+------------------------------------------------------------------------
+r346 | jblang | 2008-07-16 21:54:53 -0500 (Wed, 16 Jul 2008) | 1 line
+
+Removing unmaintained drivers and supporting files
+------------------------------------------------------------------------
+r345 | jblang | 2008-07-12 16:26:33 -0500 (Sat, 12 Jul 2008) | 1 line
+
+Moved Read Me.rtf from osx to cocoa directory
+------------------------------------------------------------------------
+r333 | jblang | 2008-07-10 22:13:50 -0500 (Thu, 10 Jul 2008) | 2 lines
+
+put the call to bind_textdomain_codeset in ui.c between #ifndef _WIN32 #endif
+
+------------------------------------------------------------------------
+r332 | jblang | 2008-06-04 23:47:23 -0500 (Wed, 04 Jun 2008) | 2 lines
+
+Updated Read Me for 3.4
+
+------------------------------------------------------------------------
+r331 | kovzol | 2008-06-02 15:54:22 -0500 (Mon, 02 Jun 2008) | 2 lines
+
+Updates for 3.4
+
+------------------------------------------------------------------------
+r330 | kovzol | 2008-06-02 09:34:55 -0500 (Mon, 02 Jun 2008) | 2 lines
+
+Updates for the Win32 installer by Andreas
+
+------------------------------------------------------------------------
+r329 | kovzol | 2008-06-01 17:56:35 -0500 (Sun, 01 Jun 2008) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r328 | kovzol | 2008-06-01 17:53:06 -0500 (Sun, 01 Jun 2008) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r327 | kovzol | 2008-06-01 17:51:52 -0500 (Sun, 01 Jun 2008) | 2 lines
+
+Fixing mkauthors for the new help layout
+
+------------------------------------------------------------------------
+r326 | kovzol | 2008-06-01 17:24:27 -0500 (Sun, 01 Jun 2008) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r325 | jblang | 2008-05-27 17:45:17 -0500 (Tue, 27 May 2008) | 3 lines
+
+
+test
+
+------------------------------------------------------------------------
+r324 | jblang | 2008-05-22 22:18:59 -0500 (Thu, 22 May 2008) | 2 lines
+
+GTK speed, menu improvements
+
+------------------------------------------------------------------------
+r323 | kovzol | 2008-05-22 14:37:21 -0500 (Thu, 22 May 2008) | 2 lines
+
+Small updates before 3.4
+
+------------------------------------------------------------------------
+r322 | jblang | 2008-05-22 08:29:02 -0500 (Thu, 22 May 2008) | 2 lines
+
+Increment version numbers
+
+------------------------------------------------------------------------
+r321 | jblang | 2008-05-22 08:27:57 -0500 (Thu, 22 May 2008) | 2 lines
+
+ - Increment version numbers
+
+------------------------------------------------------------------------
+r320 | jblang | 2008-05-21 23:51:03 -0500 (Wed, 21 May 2008) | 2 lines
+
+Fixes to --with flags
+
+------------------------------------------------------------------------
+r319 | jblang | 2008-05-21 22:54:07 -0500 (Wed, 21 May 2008) | 2 lines
+
+Disable automatically building DGA, GGI, AA-lib, and SVGAlib drivers
+
+------------------------------------------------------------------------
+r318 | jblang | 2008-05-21 22:08:58 -0500 (Wed, 21 May 2008) | 2 lines
+
+GTK Menu Support
+
+------------------------------------------------------------------------
+r317 | jblang | 2008-05-21 19:09:35 -0500 (Wed, 21 May 2008) | 2 lines
+
+Updated release notes; GTK+ improvements.
+
+------------------------------------------------------------------------
+r316 | jblang | 2008-05-21 08:48:03 -0500 (Wed, 21 May 2008) | 2 lines
+
+GTK Keyboard Event Handling
+
+------------------------------------------------------------------------
+r315 | jblang | 2008-05-21 00:57:23 -0500 (Wed, 21 May 2008) | 2 lines
+
+Added basic GTK event handling
+
+------------------------------------------------------------------------
+r314 | jblang | 2008-05-20 23:26:50 -0500 (Tue, 20 May 2008) | 2 lines
+
+First pass at GTK+ support
+
+------------------------------------------------------------------------
+r313 | jblang | 2008-05-20 21:38:30 -0500 (Tue, 20 May 2008) | 2 lines
+
+ - Update help file to remove workarounds for fixed issues
+
+------------------------------------------------------------------------
+r312 | jblang | 2008-05-20 21:28:32 -0500 (Tue, 20 May 2008) | 8 lines
+
+ - Fix black screen with edge detection filters
+
+ - Fix black screen with pseudo-3d filter
+
+ - Fix black screen with hsv coloring modes
+
+ - Automatically save window position and size
+
+------------------------------------------------------------------------
+r311 | jblang | 2008-05-15 21:45:14 -0500 (Thu, 15 May 2008) | 2 lines
+
+Fixed some typos.
+
+------------------------------------------------------------------------
+r310 | jblang | 2008-05-15 01:23:05 -0500 (Thu, 15 May 2008) | 2 lines
+
+ - Add link to XaoS Website in About dialog
+
+------------------------------------------------------------------------
+r309 | jblang | 2008-05-15 01:16:29 -0500 (Thu, 15 May 2008) | 4 lines
+
+ - Update Italian translation
+
+ - Fix problem with localized application menu
+
+------------------------------------------------------------------------
+r308 | jblang | 2008-05-15 00:51:00 -0500 (Thu, 15 May 2008) | 2 lines
+
+ - Fix diacritical mark rendering on Mac OS X Tiger
+
+------------------------------------------------------------------------
+r307 | jblang | 2008-05-14 23:52:17 -0500 (Wed, 14 May 2008) | 2 lines
+
+texinfo updates
+
+------------------------------------------------------------------------
+r306 | jblang | 2008-05-14 23:49:31 -0500 (Wed, 14 May 2008) | 2 lines
+
+Fixes for texinfo
+
+------------------------------------------------------------------------
+r305 | kovzol | 2008-05-05 11:11:50 -0500 (Mon, 05 May 2008) | 2 lines
+
+Updates by A. Madritsch for Win32 port
+
+------------------------------------------------------------------------
+r304 | kovzol | 2008-05-05 09:14:43 -0500 (Mon, 05 May 2008) | 2 lines
+
+Changing "XaoS' " to "XaoS's " as J.B. suggested.
+
+------------------------------------------------------------------------
+r303 | jblang | 2008-05-03 09:55:08 -0500 (Sat, 03 May 2008) | 4 lines
+
+Fix compilation problem on Linux. ELF does not automatically prepend
+underscore to c symbols as does Mach-O and COFF, so we have to conditionally
+append it to the asm functions so they match the definitions in the nasm file.
+
+------------------------------------------------------------------------
+r302 | kovzol | 2008-05-02 01:01:26 -0500 (Fri, 02 May 2008) | 2 lines
+
+Version number change and copyright modification
+
+------------------------------------------------------------------------
+r301 | kovzol | 2008-05-01 14:22:18 -0500 (Thu, 01 May 2008) | 2 lines
+
+Some updates (not complete yet)
+
+------------------------------------------------------------------------
+r300 | jblang | 2008-04-28 19:43:35 -0500 (Mon, 28 Apr 2008) | 2 lines
+
+Change pagebreaks
+
+------------------------------------------------------------------------
+r299 | jblang | 2008-04-28 19:31:08 -0500 (Mon, 28 Apr 2008) | 2 lines
+
+Fixing location of xstdio.c
+
+------------------------------------------------------------------------
+r298 | jblang | 2008-04-28 08:31:02 -0500 (Mon, 28 Apr 2008) | 2 lines
+
+Fix typos in help and credits.
+
+------------------------------------------------------------------------
+r297 | kovzol | 2008-04-28 04:02:14 -0500 (Mon, 28 Apr 2008) | 2 lines
+
+Andreas's updates for Mac OS X.
+
+------------------------------------------------------------------------
+r296 | kovzol | 2008-04-28 03:59:19 -0500 (Mon, 28 Apr 2008) | 2 lines
+
+Andreas Madritsch's patch fixes the buffer overflow when switching between the video drivers.
+
+------------------------------------------------------------------------
+r295 | jblang | 2008-04-27 00:32:28 -0500 (Sun, 27 Apr 2008) | 4 lines
+
+ - Add Mac OS X help section
+
+ - Add links to Videator in Mac OS X help section
+
+------------------------------------------------------------------------
+r294 | jblang | 2008-04-26 21:16:13 -0500 (Sat, 26 Apr 2008) | 10 lines
+
+ - Update video encoding section to recommend ffmpeg, mencoder
+
+ - Move Berkeley MPEG encoder information to historical section
+
+ - Create help section to explain how to get support
+
+ - Add library copyright information to credits help section
+
+ - Update Development help section with recent contribution instructions
+
+------------------------------------------------------------------------
+r293 | jblang | 2008-04-26 01:41:21 -0500 (Sat, 26 Apr 2008) | 2 lines
+
+Updating help and fixed popup menu numbering bug
+
+------------------------------------------------------------------------
+r292 | jblang | 2008-04-25 08:33:12 -0500 (Fri, 25 Apr 2008) | 4 lines
+
+ - Cleanups to eliminate warnings
+
+ - Conditionalize videator code
+
+------------------------------------------------------------------------
+r291 | jblang | 2008-04-25 08:23:05 -0500 (Fri, 25 Apr 2008) | 8 lines
+
+2008-04-24
+
+ - Add enable/disable menu item for Videator
+
+ - Move Close menu item to proper place in File menu
+
+ - Reindent code
+
+------------------------------------------------------------------------
+r290 | malczak | 2008-04-24 12:34:36 -0500 (Thu, 24 Apr 2008) | 2 lines
+
+Just changing contact mail
+
+------------------------------------------------------------------------
+r289 | jblang | 2008-04-24 00:13:33 -0500 (Thu, 24 Apr 2008) | 2 lines
+
+Fixed syntax errors in italiano.cat
+
+------------------------------------------------------------------------
+r288 | jblang | 2008-04-24 00:06:58 -0500 (Thu, 24 Apr 2008) | 6 lines
+
+Undoing the following change from previous commit:
+ - Replace gettext (...) with _(...) in all files
+
+It messed up msgmerge so that it did not pick up the strings.
+If it ain't broke, don't fix it!!
+
+------------------------------------------------------------------------
+r287 | jblang | 2008-04-23 23:12:21 -0500 (Wed, 23 Apr 2008) | 14 lines
+
+ I18N
+
+ - Changes to -initLocale: do not overwrite LANG if it is already set
+
+ - Replace gettext (...) with _(...) in all files
+
+ - Added AppController.m and CustomDialog.m in i18n/Makefile.in.in
+
+ - Regenerated po and pot files with new strings from cocoa driver
+
+ MISC
+
+ - Conditionalize window menu with #ifdef MACOSX
+
+------------------------------------------------------------------------
+r286 | kovzol | 2008-04-21 00:48:44 -0500 (Mon, 21 Apr 2008) | 5 lines
+
+Updates by Andreas Madritsch:
+
+ * more beautiful line breaks for SFFE documentation
+ * German translations
+
+------------------------------------------------------------------------
+r285 | jblang | 2008-04-20 20:47:24 -0500 (Sun, 20 Apr 2008) | 3 lines
+
+Changed SDK to 10.4 universal. The application would not open on Tiger when
+compiled agaisnt 10.5 SDK.
+
+------------------------------------------------------------------------
+r284 | kovzol | 2008-04-18 17:16:10 -0500 (Fri, 18 Apr 2008) | 2 lines
+
+makeinfo madness fast fix
+
+------------------------------------------------------------------------
+r283 | kovzol | 2008-04-18 16:56:34 -0500 (Fri, 18 Apr 2008) | 2 lines
+
+Small fixes for 3.4
+
+------------------------------------------------------------------------
+r282 | kovzol | 2008-04-18 16:47:23 -0500 (Fri, 18 Apr 2008) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r281 | kovzol | 2008-04-18 16:31:40 -0500 (Fri, 18 Apr 2008) | 2 lines
+
+Small fixes for 3.4
+
+------------------------------------------------------------------------
+r280 | kovzol | 2008-04-18 16:31:06 -0500 (Fri, 18 Apr 2008) | 2 lines
+
+Fixing file name typo bug
+
+------------------------------------------------------------------------
+r279 | kovzol | 2008-04-18 11:42:29 -0500 (Fri, 18 Apr 2008) | 2 lines
+
+Fixing AUTHORS, updating RELEASE_NOTES for 3.4 (text is written by J.B.)
+
+------------------------------------------------------------------------
+r278 | jblang | 2008-04-17 23:18:23 -0500 (Thu, 17 Apr 2008) | 4 lines
+
+ - Add code to prevent rendering animation if absolute path is not specified
+ for Basename. This prevents files from being accidentally written to the
+ hard drive's root directory
+
+------------------------------------------------------------------------
+r277 | jblang | 2008-04-17 23:16:33 -0500 (Thu, 17 Apr 2008) | 35 lines
+
+ BUGS
+
+ - Fix crash after animation rendering
+
+ Analysis: changes introduced for sffe made the uih variable from ui.c
+ global in ui.h so that the sffe parser can be accessed from custom
+ formula code in formulas.c. Uih was previously declared static in render.c
+ because the animation renderer maintains its own context. SFFE changed
+ this from static to extern so the uih in render.c was pointing to the same
+ uih in ui.c, instead of to a different structure. When animations were
+ rendered, the uih in ui.h got clobbered, and the next function that tried
+ to use it caused a segfault.
+
+ Fix:
+ 1. Change name of global uih pointer defined in ui.h from uih to globaluih.
+ 2. Change sffe code to access globaluih pointer instead of uih
+ 3. Add code to main function to set both uih and globaluih to point at the same structure
+ 4. Change code in cocoa driver to use globaluih as well
+
+ - Fix bug that causes XaoS to crash when using non-native (ugly) dialog
+ code for Render Animation dialog with open file dialog for basename
+
+ Analysis: There was a loop in ui_buildfile in dialog.c, that tried to
+ find a "*" in the default filename, and if it didn't find one, it would
+ run right off the end of the buffer and continue until a seg fault occurred.
+
+ Fix: the loop now checks for both "*" or a nul terminator as the exit
+ condition. If it doesn't find an asterisk, it still stops at the end
+ of the string.
+
+ - Make custom dialog boxes slide out of view before executing menu function
+
+ This prevents the dialog from hanging around after clicking OK during long
+ running operations such as rendering animations
+
+------------------------------------------------------------------------
+r276 | kovzol | 2008-04-17 02:17:42 -0500 (Thu, 17 Apr 2008) | 3 lines
+
+configure.in: aclocal update (http://sources.redhat.com/automake/automake.html#Extending-aclocal)
+documentation updates (including geninfo fix)
+
+------------------------------------------------------------------------
+r275 | jblang | 2008-04-16 22:58:43 -0500 (Wed, 16 Apr 2008) | 35 lines
+
+ I18N
+
+ - Updated italian po and catalog
+
+ - Added Italian to configure.in ALL_LINGUAS
+
+ - Make OK/Cancel buttons on custom dialogs autosize to fit i18n labels
+
+ MISC
+
+ - Change Performance Mode to VJ mode (changed shortcut from P to v)
+ (performance mode might be confused with performance enhancement)
+
+ - Added document icon
+
+ - Added Close menu item to file menu
+
+ - Fixed regression where window did not retain key status after dialog
+
+ - Add cursor changing code in cocoa driver
+
+ - Add hook to change cursor during performance mode
+
+ - Refine about dialog box
+
+ - Add comments and cleanup
+
+ - Changed version to 3.4pre1 in configure.in
+
+ HELP
+
+ - Add css element to make dt elements bold
+
+ - Add anchors for usrform and usrformInit to help file
+
+------------------------------------------------------------------------
+r274 | jblang | 2008-04-10 21:03:30 -0500 (Thu, 10 Apr 2008) | 28 lines
+
+ FULL SCREEN
+
+ - Implement fullscreen code
+
+ - Add menu item to UI menu to toggle fullscreen mode
+
+ - Change render basename type from to DIALOG_STRING to DIALOG_OFILE
+
+ - Added italian translation
+
+ DRIVER
+
+ - Add driver initialization code
+
+ - Add driver uninitialization code
+
+ MISC
+
+ - Conditionalize custom script build phases so they do not do unnecessary work
+
+ - Rebuilt Xcode project to fix issues with debugger and interface builder
+
+ - Incremented Cocoa version number from 3.3 to 3.4
+
+ HELP
+
+ - Got rid of space in help file name
+
+------------------------------------------------------------------------
+r273 | jblang | 2008-04-09 22:43:36 -0500 (Wed, 09 Apr 2008) | 2 lines
+
+Adding italian po from Sergio Zanchetta. He has not provided a catalog file yet and I have not yet made the necessary changes to configure.in or ui.c.
+
+------------------------------------------------------------------------
+r272 | jblang | 2008-04-08 19:02:14 -0500 (Tue, 08 Apr 2008) | 4 lines
+
+ - Implement menu delegate to check/uncheck menu items when displayed
+
+ - Hook up choose file button on custom dialogs
+
+------------------------------------------------------------------------
+r271 | jblang | 2008-04-08 18:46:02 -0500 (Tue, 08 Apr 2008) | 2 lines
+
+forgot to commit this before
+
+------------------------------------------------------------------------
+r270 | jblang | 2008-04-06 23:58:26 -0500 (Sun, 06 Apr 2008) | 8 lines
+
+ - Implement popup menus
+
+ - fix bug in help conversion that results in missing headers for some files
+
+ - I18nize menu items in application menu
+
+ - Add help applescript to automatically launch tutorials
+
+------------------------------------------------------------------------
+r269 | jblang | 2008-04-06 18:55:27 -0500 (Sun, 06 Apr 2008) | 31 lines
+
+HELP SUPPORT
+
+ - Update help conversion script to automatically generate index
+
+ - Update help to use stylesheets
+
+
+I18N
+
+ - Add reference to gettext library, and script command to copy it
+
+ - Add code to detect default locale and set LANG variable accordingly
+
+ - Fixed bug where key equivalents were not found when foreign languages
+ were selected
+
+ - I18nized cut/copy/paste/etc. menu items, and OK/Cancel dialog buttons
+
+ - Add code to convert user's native text encoding (usually UTF-8) to
+ Latin1/2 to prevent garbled text through built-in text handling system
+
+ - Automate po/mo file build and packaging
+
+ - Add code to set locale directory correctly relative to executable path
+
+MISC
+
+ - Add copy/paste functionality for custom dialogs in Cocoa driver
+
+ - Added Window menu and associated menu items in Cocoa driver
+
+------------------------------------------------------------------------
+r268 | jblang | 2008-03-20 23:55:55 -0500 (Thu, 20 Mar 2008) | 10 lines
+
+ HELP SUPPORT
+
+ - Created Apple Help conversion script
+
+ - Added help settings to Info.plist
+
+ - Updated showHelpWithContext:name: method to show main help page
+
+ - Added help conversion script to pre-compile script build phase
+
+------------------------------------------------------------------------
+r267 | jblang | 2008-03-20 22:45:40 -0500 (Thu, 20 Mar 2008) | 2 lines
+
+Added Apple Help conversion script
+
+------------------------------------------------------------------------
+r266 | jblang | 2008-03-20 20:35:29 -0500 (Thu, 20 Mar 2008) | 25 lines
+
+ REFACTORING/CLEANUP
+
+ - Added autorelease pools to all driver functions, wrapping all controller calls
+
+ - removed autorelease pools from inside controller methods
+
+ - Removed Preferences nib, controller, menu item, and associated icons
+ (Videator support will be toggled via menu item in UI menu)
+
+ - changed driver and function name to cocoa_* instead of osx_*
+
+ - Added MACOSX define that can trigger shared functionality for Cocoa/Carbon drivers
+
+ - Removed separate fullscreen driver
+
+ - Removed wrapper functions from controller; now call view functions directly
+
+ - Added functions for driver init and uninit to controller
+
+ - Added pragma marks to categorize functions in controller and view
+
+ - Moved videator hook to view's drawRect:
+
+ - Added wait date to event handling to prevent busy waiting
+
+------------------------------------------------------------------------
+r265 | jblang | 2008-03-20 16:19:11 -0500 (Thu, 20 Mar 2008) | 17 lines
+
+Cocoa driver cleanup
+
+ CLEANUP
+
+ - Added autorelease pools to all driver functions, wrapping all controller calls
+
+ - removed autorelease pools from inside controller methods
+
+ - Removed Preferences nib, controller, menu item, and associated icons
+ (Videator support will be toggled via menu item in UI menu)
+
+ - changed driver and function name to cocoa_* instead of osx_*
+
+ - Added MACOSX define that can trigger shared functionality for Cocoa/Carbon drivers
+
+ - Removed separate fullscreen driver
+
+------------------------------------------------------------------------
+r264 | jblang | 2008-03-19 00:02:37 -0500 (Wed, 19 Mar 2008) | 2 lines
+
+*** empty log message ***
+
+------------------------------------------------------------------------
+r263 | jblang | 2008-03-19 00:02:12 -0500 (Wed, 19 Mar 2008) | 2 lines
+
+Oops--forgot to add VideatorProxy before
+
+------------------------------------------------------------------------
+r262 | jblang | 2008-03-19 00:00:54 -0500 (Wed, 19 Mar 2008) | 36 lines
+
+ - Moved Videator support into separate VideatorProxy class and updated with
+ Andrew's latest changes - UNTESTED
+
+ - Replaced funky bit-swapping code; now use #if __BIG_ENDIAN__ to set color
+ masks correctly
+
+ - Removed unnecessary xstdio_osx.c and made executable-relative paths work
+ with standard xstdio.c
+
+ - Added Enter key equivalent for OK button on custom dialogs
+
+ - Added call to resize image when maximizing window
+
+ - Added call to terminate app on window close
+
+ - Enabled long double support for deeper zooms
+
+ - Added event handling for middle and right mouse buttons
+
+ - Added event handling for scroll wheel panning
+
+ - Added copyright headers to all files
+
+ - Changed [view setNeedsDisplay:YES] to [view display] to draw immediately
+ in order to eliminate jerky zooming motion
+
+ - Added support to print status text
+
+ - Made save and open panels use last selected directory instead of always
+ going back to home directory
+
+ - Made window regain key status after open/save dialog
+
+ - Fixes to custom dialogs to correctly display long doubles and allow
+ horizontal scrolling instead of wrapping values
+
+------------------------------------------------------------------------
+r261 | jblang | 2008-03-16 02:20:25 -0500 (Sun, 16 Mar 2008) | 2 lines
+
+Added third-party libraries; synced up with improved osx build process
+
+------------------------------------------------------------------------
+r260 | jblang | 2008-03-16 01:34:55 -0500 (Sun, 16 Mar 2008) | 2 lines
+
+Added #define NOASSEMBLY
+
+------------------------------------------------------------------------
+r259 | kovzol | 2008-03-14 10:18:24 -0500 (Fri, 14 Mar 2008) | 2 lines
+
+Cleanups to eliminate most warnings.
+
+------------------------------------------------------------------------
+r258 | kovzol | 2008-03-14 09:51:52 -0500 (Fri, 14 Mar 2008) | 2 lines
+
+Since config.h is generated, this is not needed anymore.
+
+------------------------------------------------------------------------
+r257 | jblang | 2008-03-14 00:45:23 -0500 (Fri, 14 Mar 2008) | 17 lines
+
+ * The Mac OS X driver requires a 32-bit rgb mask where the most significant
+ * byte is on (e.g., 0xffffff00). This exposed a bug in the interpol macro
+ * that resulted in distorted colors for the smooth coloring modes.
+ * If the interpol macro is applied to such a mask, it causes an overflow
+ * of the 32-bit int, and the left-most color byte is lost.
+ *
+ * I added shiftinterpol macro to handle such masks. It shifts everything 1
+ * byte to the right, performs the calculation, and then shifts everything
+ * back 1 byte to the left when it is done.
+ *
+ * I also created the safeinterpol macro which detects if the most
+ * signficant byte in the mask is on, and uses the shiftinterpol macro if
+ * so, or the orignal interpol macro if not.
+ *
+ * I then modified the interpoltype macro to use the safeinterpol macro
+ * instead of the interpol macro directly.
+
+------------------------------------------------------------------------
+r256 | kovzol | 2008-03-13 12:24:54 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+Fixing eval/datadir3 madness
+
+------------------------------------------------------------------------
+r255 | kovzol | 2008-03-13 11:55:35 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r254 | kovzol | 2008-03-13 11:55:03 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+Fixes for documentation of SFFE
+
+------------------------------------------------------------------------
+r253 | kovzol | 2008-03-13 11:22:07 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+Removing litter
+
+------------------------------------------------------------------------
+r252 | kovzol | 2008-03-13 11:19:45 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r251 | kovzol | 2008-03-13 11:19:18 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+Updates for 3.3
+
+------------------------------------------------------------------------
+r250 | kovzol | 2008-03-13 07:51:47 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+formconv is not used
+
+------------------------------------------------------------------------
+r249 | kovzol | 2008-03-13 06:38:40 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+needed for configure --- hopefully fresh enough, if not update it from a recent auto*
+
+------------------------------------------------------------------------
+r248 | kovzol | 2008-03-13 06:20:24 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+Updates for user formulas
+
+------------------------------------------------------------------------
+r247 | kovzol | 2008-03-13 05:43:11 -0500 (Thu, 13 Mar 2008) | 2 lines
+
+Updates before 3.3
+
+------------------------------------------------------------------------
+r246 | jblang | 2008-03-12 22:34:27 -0500 (Wed, 12 Mar 2008) | 2 lines
+
+Updated release notes.
+
+------------------------------------------------------------------------
+r245 | jblang | 2008-03-12 22:06:51 -0500 (Wed, 12 Mar 2008) | 2 lines
+
+Updated credits in xaos.hlp
+
+------------------------------------------------------------------------
+r244 | jblang | 2008-03-12 21:57:32 -0500 (Wed, 12 Mar 2008) | 2 lines
+
+Updates to version, readme for 3.3. Removed unnecessary files.
+
+------------------------------------------------------------------------
+r243 | kovzol | 2008-03-12 10:38:37 -0500 (Wed, 12 Mar 2008) | 2 lines
+
+Beryl/Compiz fix
+
+------------------------------------------------------------------------
+r242 | jblang | 2008-03-11 22:36:12 -0500 (Tue, 11 Mar 2008) | 2 lines
+
+Added Read Me.rtf to project and CVS.
+
+------------------------------------------------------------------------
+r241 | jblang | 2008-03-11 21:57:12 -0500 (Tue, 11 Mar 2008) | 2 lines
+
+Added credits to Tormod Volden for X11 driver fixes.
+
+------------------------------------------------------------------------
+r240 | jblang | 2008-03-11 21:41:40 -0500 (Tue, 11 Mar 2008) | 10 lines
+
+Applied patches 1905815 and 1905818 from Tormod Volden.
+
+1905815 adds -window-id as an alias for -windowid
+1905818 makes -windowid or -window-id override -root and -fullscreen
+
+Both of these patches improve compatibility with xscreensaver, which
+passes -window-id and -root to XaoS when displaying a preview window.
+
+Tested on Ubuntu 7.10.
+
+------------------------------------------------------------------------
+r239 | jblang | 2008-03-11 21:25:52 -0500 (Tue, 11 Mar 2008) | 3 lines
+
+Applied patch # 1905549 from Tormod Volden; fixes crashes with
+-fullscreen and -root options on newer versions of Xorg.
+
+------------------------------------------------------------------------
+r238 | jblang | 2008-03-11 19:31:17 -0500 (Tue, 11 Mar 2008) | 10 lines
+
+Added workaround for changes in po file handling introduced by new
+aclocal.m4. If NLS is enabled, and POFILES was not set by the call to
+AM_GNU_GETTEXT, we use the following code taken from the old aclocal.m4
+to set the variable:
+
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+
+------------------------------------------------------------------------
+r237 | jblang | 2008-03-10 22:29:23 -0500 (Mon, 10 Mar 2008) | 5 lines
+
+Using config.sub, config.guess from Ubuntu 7.10's Automake 1.10; the
+ones from Mac OS X would not work on Ubuntu.
+
+Added AC_SUBST(POFILES) directive
+
+------------------------------------------------------------------------
+r236 | jblang | 2008-03-10 22:09:05 -0500 (Mon, 10 Mar 2008) | 2 lines
+
+Updated autoconf to fix gettext detection
+
+------------------------------------------------------------------------
+r235 | jblang | 2008-03-09 19:35:45 -0500 (Sun, 09 Mar 2008) | 2 lines
+
+Changed sffe files to include config.h
+
+------------------------------------------------------------------------
+r234 | jblang | 2008-03-09 19:32:59 -0500 (Sun, 09 Mar 2008) | 2 lines
+
+Changes to use ASM for i386 and GSL for PPC
+
+------------------------------------------------------------------------
+r233 | jblang | 2008-03-09 11:50:34 -0500 (Sun, 09 Mar 2008) | 2 lines
+
+Enabling libpng
+
+------------------------------------------------------------------------
+r232 | jblang | 2008-03-09 11:44:47 -0500 (Sun, 09 Mar 2008) | 2 lines
+
+Changes to autocof:\n1) Detect Darwin (Mac OS X) and pass -DNOASSEMBLY on CFLAGS and CFLAGS1 if found, since Apple's gcc cannot compile the assembly code in i386.c\n2)Add output of 'gsl-config --cflags' to CFLAGS and CFLAGS1. This allows XaoS to find GSL headers if they are in a non-standard location
+
+------------------------------------------------------------------------
+r231 | jblang | 2008-03-08 23:51:04 -0600 (Sat, 08 Mar 2008) | 2 lines
+
+Updates to support custom formulas with sffe/gsl\nBug fix to prevent wrong colors when switching from full screen back to windowed driver\nImproved instructions for building libpng and libgsl
+
+------------------------------------------------------------------------
+r230 | jblang | 2008-03-06 21:21:26 -0600 (Thu, 06 Mar 2008) | 2 lines
+
+Merging back lost changes from r1.7
+
+------------------------------------------------------------------------
+r229 | jblang | 2008-03-06 21:15:30 -0600 (Thu, 06 Mar 2008) | 2 lines
+
+Merging back lost changes from r1.28
+
+------------------------------------------------------------------------
+r228 | jblang | 2008-03-06 21:05:41 -0600 (Thu, 06 Mar 2008) | 2 lines
+
+Merging back lost changes from r1.8
+
+------------------------------------------------------------------------
+r227 | kovzol | 2008-03-06 18:31:17 -0600 (Thu, 06 Mar 2008) | 2 lines
+
+Updates for Darwin --- -DNOASSEMBLY is missing yet
+
+------------------------------------------------------------------------
+r226 | kovzol | 2008-03-06 06:26:02 -0600 (Thu, 06 Mar 2008) | 3 lines
+
+If GSL is present, NASM won't be used.
+version.h is a generated file from now on.
+
+------------------------------------------------------------------------
+r225 | kovzol | 2008-03-05 07:09:41 -0600 (Wed, 05 Mar 2008) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r224 | kovzol | 2008-03-05 07:08:40 -0600 (Wed, 05 Mar 2008) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r223 | kovzol | 2008-03-05 07:00:57 -0600 (Wed, 05 Mar 2008) | 2 lines
+
+Updates for 3.3
+
+------------------------------------------------------------------------
+r222 | kovzol | 2008-03-05 05:49:50 -0600 (Wed, 05 Mar 2008) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r221 | kovzol | 2008-03-05 05:47:22 -0600 (Wed, 05 Mar 2008) | 2 lines
+
+Updates for 3.3
+
+------------------------------------------------------------------------
+r220 | rxpi | 2008-03-05 05:12:58 -0600 (Wed, 05 Mar 2008) | 2 lines
+
+User formula evaluation by Mateusz Malczak - and some examples
+
+------------------------------------------------------------------------
+r219 | rxpi | 2008-03-05 05:04:01 -0600 (Wed, 05 Mar 2008) | 2 lines
+
+User formula evaluation by Mateusz Malczak
+
+------------------------------------------------------------------------
+r218 | jblang | 2006-11-28 21:28:53 -0600 (Tue, 28 Nov 2006) | 14 lines
+
+Committing additional changes submitted 10/30 by Andrew Stone:
+
+ - support for arrow keys
+ up/down change zoom speed
+ right/left: if cycling - change
+ if auto-rotation - change speed of rotation
+
+ - UI -> Performance Mode
+ This will turn off the echoing of messages to the screen as well as set a tiny cursor for zooming
+
+ - going from cycle forward and backward no longer toggles cycling off
+
+ BUG FIX: window now regains key status after after dialog
+
+------------------------------------------------------------------------
+r217 | kovzol | 2006-11-18 06:36:52 -0600 (Sat, 18 Nov 2006) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r216 | kovzol | 2006-11-12 16:49:51 -0600 (Sun, 12 Nov 2006) | 2 lines
+
+Romanian translation by Ilinca Sitaru.
+
+------------------------------------------------------------------------
+r215 | jblang | 2006-10-26 21:22:31 -0500 (Thu, 26 Oct 2006) | 3 lines
+
+Set debug build configuration to build only native architecture to avoid build error
+Added build phase back to cocoa project to create symbolic link from config.h to config.autoconf
+
+------------------------------------------------------------------------
+r214 | jblang | 2006-10-26 20:58:11 -0500 (Thu, 26 Oct 2006) | 3 lines
+
+Added Andrew Stone's patches for keyboard handling and Videator support in Cocoa driver
+See www.stone.com for more about Videator
+
+------------------------------------------------------------------------
+r213 | jblang | 2006-10-15 17:05:48 -0500 (Sun, 15 Oct 2006) | 11 lines
+
+Removing unused port.h file due to license incompatibility:
+== SNIP ==
+XaoS-3.1.2 contains unused header file port.h, which
+has a license
+that does not allow commercial distribution, thus it is
+incompatible
+with GPL. Could you please remove this file?
+
+Vladimir Nadvornik <nadvornik@suse.cz>
+== SNIP ==
+
+------------------------------------------------------------------------
+r212 | jblang | 2006-10-15 16:57:42 -0500 (Sun, 15 Oct 2006) | 2 lines
+
+Added run script phase to create link from include/config/config.autoconf to include/config.h to avoid manual step
+
+------------------------------------------------------------------------
+r211 | jblang | 2006-10-15 16:49:22 -0500 (Sun, 15 Oct 2006) | 3 lines
+
+Added fullscreen driver struct to Cocoa project so it compiles correctly.
+Added run-script build phase to automatically link includes/config/config.autoconf to includes/config.h (to avoid manual step)
+
+------------------------------------------------------------------------
+r210 | jblang | 2006-10-15 16:24:20 -0500 (Sun, 15 Oct 2006) | 2 lines
+
+Added missing files CustomDialog.h and CustomDialog.m (supporting native Mac OS X dialog boxes).
+
+------------------------------------------------------------------------
+r209 | kovzol | 2006-09-26 07:47:49 -0500 (Tue, 26 Sep 2006) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r208 | jblang | 2006-09-23 12:57:38 -0500 (Sat, 23 Sep 2006) | 2 lines
+
+Added Mac OS X fullscreen driver to drivers.c
+
+------------------------------------------------------------------------
+r207 | kovzol | 2006-08-12 05:12:43 -0500 (Sat, 12 Aug 2006) | 6 lines
+
+All modifications by J.B. Langston III for Mac OS X:
+
+* Disabled alloca, which was preventing XaoS from rendering images over 2500x2500
+* Added fullscreen driver
+* Upgraded libpng to 1.2.12
+
+------------------------------------------------------------------------
+r206 | kovzol | 2006-07-13 01:01:47 -0500 (Thu, 13 Jul 2006) | 4 lines
+
+Removing unnecessary files from the OS X driver and
+some fixes for the OS X driver and menu.c (by J.B. Langston III).
+Now version.h is generated.
+
+------------------------------------------------------------------------
+r205 | kovzol | 2006-07-09 14:17:48 -0500 (Sun, 09 Jul 2006) | 2 lines
+
+These files are only for backup.
+
+------------------------------------------------------------------------
+r204 | kovzol | 2006-07-09 03:56:58 -0500 (Sun, 09 Jul 2006) | 2 lines
+
+Mac OS X port, phase 4. Authors' list updated.
+
+------------------------------------------------------------------------
+r203 | kovzol | 2006-07-09 03:47:42 -0500 (Sun, 09 Jul 2006) | 33 lines
+
+J. B. Langston's modifications for Mac OS X port.
+Marton Torok's modification for an fd bug:
+
+-----------------------------------------------------------------------
+Talaltam meg 2 aprosagot az xaos-szal kapcsolatban.
+* I found two small problems.
+Az egyiket kuldom, ott az a gond, hogy pipe eseten az stdout-rol varja
+* One of them is sent now for you. The problem is that, for pipes,
+az inputot (az a vicc, hogy altalban meg igy is mukodik (ha pl.
+* XaoS waits the input from stdout (it is funny that it still works
+konzolrol futtatom), csak akkor nem tetszik neki, ha kozvetlenul az
+* when running from console), but the problem is when stdin is aimed.
+stdin-jet celzom meg...).
+
+A masik egy kicsit misztikus nekem, mindenfele memprof-okkal
+* The other one is more mystical. I tried to find out the issue with
+nezegettem a dolgot, de nem lettem okosabb.
+* with several memprofs but I didn't get any closer.
+A hiba eleg rendesen fugg az inputtol, mindig masik helyen doglik meg.
+* The problem is really depending on the input, the crash is usually
+Kuldok egy leegyszerusitett peldat, ugy talan nyomozhatobb lesz a dolog.
+* comes in different situations and places. I send an example:
+
+(initstate)
+(defaultpalette 0)
+(formula 'mandel)
+(view -0.75 0 2.5 2.5)
+(saveimg "alma.png")
+(view -0.7 0 2.5 2.5)
+(saveimg "alma.png")
+(view -0.65 0 2.5 2.5)
+----------------------------------------------------------------------
+
+------------------------------------------------------------------------
+r202 | kovzol | 2006-07-09 03:28:54 -0500 (Sun, 09 Jul 2006) | 2 lines
+
+Adding OS X port. Phase 2.
+
+------------------------------------------------------------------------
+r201 | kovzol | 2006-07-09 03:25:50 -0500 (Sun, 09 Jul 2006) | 2 lines
+
+Adding J.B. Langston's OS X port. Phase 1.
+
+------------------------------------------------------------------------
+r200 | kovzol | 2006-05-06 08:38:20 -0500 (Sat, 06 May 2006) | 2 lines
+
+An xpf file added for the background image of the new web portal.
+
+------------------------------------------------------------------------
+r199 | kovzol | 2006-05-06 08:01:17 -0500 (Sat, 06 May 2006) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r198 | kovzol | 2006-05-04 01:34:19 -0500 (Thu, 04 May 2006) | 4 lines
+
+Removing own tutorials (not intended for public use).
+Marton Torok (marton.torok@gmail.com) fixed the -pipe mode
+(string recognition did not work).
+
+------------------------------------------------------------------------
+r197 | kovzol | 2006-04-26 14:15:13 -0500 (Wed, 26 Apr 2006) | 2 lines
+
+Modifications for visualizations.
+
+------------------------------------------------------------------------
+r196 | kovzol | 2006-04-26 13:42:38 -0500 (Wed, 26 Apr 2006) | 2 lines
+
+Example animations.
+
+------------------------------------------------------------------------
+r195 | kovzol | 2006-04-26 08:15:59 -0500 (Wed, 26 Apr 2006) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r194 | kovzol | 2006-04-25 15:03:00 -0500 (Tue, 25 Apr 2006) | 2 lines
+
+New fonts (scaling xfont16 -- latin2 version -- up).
+
+------------------------------------------------------------------------
+r193 | kovzol | 2006-04-08 08:46:06 -0500 (Sat, 08 Apr 2006) | 2 lines
+
+Again...
+
+------------------------------------------------------------------------
+r192 | kovzol | 2006-04-08 08:45:46 -0500 (Sat, 08 Apr 2006) | 3 lines
+
+Two modifications: one for the dokuwiki conversion script
+and one for the reloaded int/outt-coloring modes (fix).
+
+------------------------------------------------------------------------
+r191 | kovzol | 2006-03-02 09:27:37 -0600 (Thu, 02 Mar 2006) | 9 lines
+
+Hi Zoltan,
+
+I updated the French translation file for the new version of XaoS and did some
+small improvements to it.
+
+Regards,
+
+Philippe
+
+------------------------------------------------------------------------
+r190 | kovzol | 2006-03-01 15:00:43 -0600 (Wed, 01 Mar 2006) | 2 lines
+
+Better conversion, but not complete yet.
+
+------------------------------------------------------------------------
+r189 | kovzol | 2006-03-01 04:43:14 -0600 (Wed, 01 Mar 2006) | 77 lines
+
+Hello,
+
+I am writing you about the GNU XaoS project,
+as part of by effort to help GNU projects provide a better, more
+consistent build system.
+
+Currently, your project seems to support DESTDIR variable in the
+generated Makefiles (marked as optional in the GNU coding policies, make and
+automake manual), however there's a problem that prevents DESTDIR from
+working correctly.
+
+The STICKY variable, set in configure and used in Makefile, does not consider
+DESTDIR. This can break the build if the user tries to use DESTDIR support.
+
+You can read more information about DESTDIR in the GNU coding standards
+http://www.gnu.org/prep/standards/
+
+and in the Automake manual:
+
+http://www.gnu.org/software/automake/manual/html_mono/automake.html
+
+Sections: "When automake is not enough" and "Staged installs"
+
+I am ready to offer you additional information, help and support.
+Thank you for your help in making GNU projects build systems better.
+
+Claudio Fontana
+
+--
+
+Hello,
+
+--- <kovzol@gmail.com> wrote:
+
+> Dear Claudio, I'm happy to hear that GNU starts to
+> step towards a better,
+> more consistent build system.
+>
+> I'm not an expert in creating Makefiles. However I
+> already put together many
+> ones. Currently I have no time to read too much
+> documentation about this topic.
+> So if you could please help in enhancing the
+> code (pointing to the places to change or you
+> have the opportunity to fix the code), I would be
+> happy. Any other help is greatly appreciated.
+
+Sure thing. I attach a patch against version 3.1 that
+does the following:
+
+configure.in: add DESTDIR to STICKY variable.
+Makefile.in: run -@STICKY@ to ignore chown, chgrp etc
+ useful when running non-root DESTDIR installs.
+ Also strenghten info pages installation rule,
+ avoiding bug that happens when $(infodir)
+ does not exist (see GNU coding standards,
+ never use a directory as the second argument of
+ install)
+
+> Though, in some months I will have the time to do
+> the fixes, but currently I
+> must say I cannot change the code on my own.
+>
+> Thank you for your note again.
+>
+> Regards, Zoltan
+
+Apply from the top source directory with
+
+$ patch < /path/to/XaoS-3.1-DESTDIR-fix.udiff
+
+Ping me if you want a test before the next release;
+
+bye,
+
+Claudio
+
+------------------------------------------------------------------------
+r188 | kovzol | 2006-02-28 15:31:58 -0600 (Tue, 28 Feb 2006) | 2 lines
+
+Fixes.
+
+------------------------------------------------------------------------
+r187 | kovzol | 2006-02-28 14:36:16 -0600 (Tue, 28 Feb 2006) | 2 lines
+
+Fix?
+
+------------------------------------------------------------------------
+r186 | kovzol | 2006-02-28 14:34:34 -0600 (Tue, 28 Feb 2006) | 2 lines
+
+A tool which creates a dokuwiki-like text from the xaos.hlp file.
+
+------------------------------------------------------------------------
+r185 | kovzol | 2006-01-31 06:17:56 -0600 (Tue, 31 Jan 2006) | 2 lines
+
+Adding Spidron hornflake fractal
+
+------------------------------------------------------------------------
+r184 | kovzol | 2006-01-25 13:52:36 -0600 (Wed, 25 Jan 2006) | 2 lines
+
+Fix typo
+
+------------------------------------------------------------------------
+r183 | kovzol | 2006-01-25 13:44:18 -0600 (Wed, 25 Jan 2006) | 2 lines
+
+Update for 3.2
+
+------------------------------------------------------------------------
+r182 | kovzol | 2006-01-25 13:35:51 -0600 (Wed, 25 Jan 2006) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r181 | kovzol | 2006-01-25 13:33:30 -0600 (Wed, 25 Jan 2006) | 2 lines
+
+Updates for 3.2: language support for new .xaf files
+
+------------------------------------------------------------------------
+r180 | rxpi | 2006-01-24 02:29:01 -0600 (Tue, 24 Jan 2006) | 2 lines
+
+Well, adding the tutorial files with "cvs add" now.
+
+------------------------------------------------------------------------
+r179 | kovzol | 2006-01-23 14:54:46 -0600 (Mon, 23 Jan 2006) | 2 lines
+
+Putting Sierpinski triangle vertically centered.
+
+------------------------------------------------------------------------
+r178 | kovzol | 2006-01-23 13:36:09 -0600 (Mon, 23 Jan 2006) | 2 lines
+
+Updates for Win32.
+
+------------------------------------------------------------------------
+r177 | rxpi | 2006-01-23 10:55:26 -0600 (Mon, 23 Jan 2006) | 2 lines
+
+Adding tutorials for the new fractal formulas.
+
+------------------------------------------------------------------------
+r176 | kovzol | 2006-01-23 02:48:29 -0600 (Mon, 23 Jan 2006) | 2 lines
+
+Formulae...
+
+------------------------------------------------------------------------
+r175 | kovzol | 2006-01-23 02:25:01 -0600 (Mon, 23 Jan 2006) | 2 lines
+
+"More formulae", hopefully finally...
+
+------------------------------------------------------------------------
+r174 | kovzol | 2006-01-22 16:54:15 -0600 (Sun, 22 Jan 2006) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r173 | kovzol | 2006-01-22 16:48:39 -0600 (Sun, 22 Jan 2006) | 2 lines
+
+Yep! We are very close to release 3.2. Some fine-tuning was done before it.
+
+------------------------------------------------------------------------
+r172 | rxpi | 2006-01-22 15:18:48 -0600 (Sun, 22 Jan 2006) | 2 lines
+
+3 classic fractals are in Xaos now. xaos.hlp is also modified.
+
+------------------------------------------------------------------------
+r171 | rxpi | 2006-01-22 08:47:27 -0600 (Sun, 22 Jan 2006) | 2 lines
+
+correcting bug (Fast Julia Mode) and improving fractal Sierpinski by Arpi
+
+------------------------------------------------------------------------
+r170 | kovzol | 2006-01-21 04:14:32 -0600 (Sat, 21 Jan 2006) | 2 lines
+
+Some description about the built-in formulas (by A. Fekete).
+
+------------------------------------------------------------------------
+r169 | kovzol | 2006-01-20 16:15:13 -0600 (Fri, 20 Jan 2006) | 4 lines
+
+-mcpu is deprecated in gcc4, using -march instead
+msgmerge is not part of standard gettext package, forcing detection
+=> XaoS now compiles under OpenSUSE 10.0
+
+------------------------------------------------------------------------
+r168 | kovzol | 2006-01-20 15:57:21 -0600 (Fri, 20 Jan 2006) | 6 lines
+
+Applying Arpad Fekete's enhancements in fractal types.
+This version seems to fail to compile under OpenSuSE 10.0 (gcc4).
+Probably the -mcpu option is deprecated.
+This version lacks the updates of the help files (keyboard shortcuts
+for fractal types). Fix is needed.
+
+------------------------------------------------------------------------
+r167 | kovzol | 2005-11-23 15:12:09 -0600 (Wed, 23 Nov 2005) | 2 lines
+
+Splitting formulae into 2 menus (by A. Fekete).
+
+------------------------------------------------------------------------
+r166 | kovzol | 2005-11-15 15:22:16 -0600 (Tue, 15 Nov 2005) | 2 lines
+
+New items.
+
+------------------------------------------------------------------------
+r165 | kovzol | 2005-11-15 15:00:46 -0600 (Tue, 15 Nov 2005) | 2 lines
+
+Updates before release.
+
+------------------------------------------------------------------------
+r164 | kovzol | 2005-11-14 05:16:11 -0600 (Mon, 14 Nov 2005) | 2 lines
+
+Update for 3.1.3.
+
+------------------------------------------------------------------------
+r163 | kovzol | 2005-11-13 08:27:05 -0600 (Sun, 13 Nov 2005) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r162 | kovzol | 2005-11-13 08:18:36 -0600 (Sun, 13 Nov 2005) | 2 lines
+
+Updates for gcc-4.0 by P. Wautelet
+
+------------------------------------------------------------------------
+r161 | kovzol | 2005-09-12 09:52:25 -0500 (Mon, 12 Sep 2005) | 2 lines
+
+2 new fractals (triceratops, catseye) by A. Fekete
+
+------------------------------------------------------------------------
+r160 | kovzol | 2005-05-28 12:14:20 -0500 (Sat, 28 May 2005) | 14 lines
+
+Andreas Madritsch updated this file. He writes:
+
+Date: Fri, 27 May 2005 23:11:17 +0200
+From: Andreas Madritsch <amadritsch@datacomm.ch>
+To: kovzol <kovzol@math.u-szeged.hu>
+Subject: Problem with the DirectX header files
+
+Hello Zoltan
+
+The attached file should solve the problem with the DirectX header files.
+
+Regards
+Andreas
+
+------------------------------------------------------------------------
+r159 | kovzol | 2005-05-07 15:42:11 -0500 (Sat, 07 May 2005) | 2 lines
+
+Updating French translations (contributed by P. Wautelet)
+
+------------------------------------------------------------------------
+r158 | kovzol | 2005-02-20 06:24:01 -0600 (Sun, 20 Feb 2005) | 2 lines
+
+Paul Nasca's email address has been changed.
+
+------------------------------------------------------------------------
+r157 | kovzol | 2005-02-11 03:57:30 -0600 (Fri, 11 Feb 2005) | 2 lines
+
+Updates for 3.1.2.
+
+------------------------------------------------------------------------
+r156 | kovzol | 2005-02-11 03:50:30 -0600 (Fri, 11 Feb 2005) | 2 lines
+
+Removing XaoS homepage link from hinting URLs of libpng and zlib packages.
+
+------------------------------------------------------------------------
+r155 | kovzol | 2005-02-11 03:47:57 -0600 (Fri, 11 Feb 2005) | 2 lines
+
+Fixing 2 typos.
+
+------------------------------------------------------------------------
+r154 | kovzol | 2005-02-11 03:47:04 -0600 (Fri, 11 Feb 2005) | 2 lines
+
+Update for 3.1.2.
+
+------------------------------------------------------------------------
+r153 | kovzol | 2005-02-11 03:40:06 -0600 (Fri, 11 Feb 2005) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r152 | kovzol | 2005-02-11 03:38:15 -0600 (Fri, 11 Feb 2005) | 7 lines
+
+Updates for 3.1.2:
+- workaround for the B-B problem (if you press B twice, some newer gcc
+ versions generate wrong code and you get a segmentation fault ---
+ however gcc developers are not sure this is a gcc problem),
+- copying examples to the correct directory,
+- recognizing msgmerge.
+
+------------------------------------------------------------------------
+r151 | kovzol | 2005-02-05 07:10:04 -0600 (Sat, 05 Feb 2005) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r150 | kovzol | 2005-02-05 07:08:29 -0600 (Sat, 05 Feb 2005) | 2 lines
+
+Updates for 3.1.1
+
+------------------------------------------------------------------------
+r149 | kovzol | 2005-02-05 06:27:47 -0600 (Sat, 05 Feb 2005) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r148 | kovzol | 2005-02-05 06:24:17 -0600 (Sat, 05 Feb 2005) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r147 | kovzol | 2005-02-05 06:23:34 -0600 (Sat, 05 Feb 2005) | 2 lines
+
+Adding example files + some updates for 3.1.1.
+
+------------------------------------------------------------------------
+r146 | kovzol | 2005-02-05 06:22:36 -0600 (Sat, 05 Feb 2005) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r145 | kovzol | 2005-02-05 04:10:10 -0600 (Sat, 05 Feb 2005) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r144 | kovzol | 2004-11-24 01:11:51 -0600 (Wed, 24 Nov 2004) | 2 lines
+
+Running do-indent for beautifying sources.
+
+------------------------------------------------------------------------
+r143 | kovzol | 2004-11-23 13:17:05 -0600 (Tue, 23 Nov 2004) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r142 | kovzol | 2004-11-23 11:52:31 -0600 (Tue, 23 Nov 2004) | 3 lines
+
+Patch for gcc-3.4 -- by Patrick Kursawe (kursawe@users.sf.net).
+For details please read http://sourceforge.net/tracker/index.php?func=detail&aid=997200&group_id=5771&atid=105771
+
+------------------------------------------------------------------------
+r141 | kovzol | 2004-11-01 19:07:23 -0500 (Mon, 01 Nov 2004) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r140 | kovzol | 2004-10-30 17:33:33 -0500 (Sat, 30 Oct 2004) | 2 lines
+
+Updates for version 3.1.1.
+
+------------------------------------------------------------------------
+r139 | kovzol | 2004-10-30 16:31:17 -0500 (Sat, 30 Oct 2004) | 2 lines
+
+Double backspace problem for X11 driver is fixed.
+
+------------------------------------------------------------------------
+r138 | kovzol | 2004-10-30 15:30:04 -0500 (Sat, 30 Oct 2004) | 29 lines
+
+3 small patches by Philippe Wautelet <p.wautelet@fractalzone.be>,
+sent to me on Tue, 26 Oct 2004 22:44:12 +0200:
+
+-----------------------8X-------------------------------------------------
+Hi,
+
+Here are the patches to correct some (small) bugs I found.
+
+filesel.patch: correct a bug in the list of files in a directory: a
+negative value could appear (the check was done too early) and was at
+the origin of an access out of the valid memory range
+
+ui.patch: correct a bug when the -nogui option was used and that there
+are no available driver (this corrects the bug with the request ID 906942)
+
+zoom.patch: permutated some conditions in 'if' to prevent access to not
+initialized values
+
+That's all for the moment.
+
+Regards,
+
+Philippe
+-----------------------8X-------------------------------------------------
+
+I compiled the code after applying the patches and no problems occured
+during running (however I didn't do big tests, including the original
+problems, too).
+
+------------------------------------------------------------------------
+r137 | kovzol | 2004-03-04 14:09:26 -0600 (Thu, 04 Mar 2004) | 2 lines
+
+Modifications by Giorgio Marizzi (espanhol.cat).
+
+------------------------------------------------------------------------
+r136 | kovzol | 2004-03-04 14:00:16 -0600 (Thu, 04 Mar 2004) | 2 lines
+
+Fix and improvements by Giorgio Marazzi.
+
+------------------------------------------------------------------------
+r135 | kovzol | 2003-09-01 09:33:22 -0500 (Mon, 01 Sep 2003) | 2 lines
+
+French catalog update by Jean-Pierre Demailly
+
+------------------------------------------------------------------------
+r134 | kovzol | 2003-03-27 08:07:55 -0500 (Thu, 27 Mar 2003) | 2 lines
+
+Deleting "pre" from "prerelease".
+
+------------------------------------------------------------------------
+r133 | kovzol | 2003-03-27 04:47:44 -0500 (Thu, 27 Mar 2003) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r132 | kovzol | 2003-03-27 04:46:17 -0500 (Thu, 27 Mar 2003) | 2 lines
+
+Removing info about multiple Windows binaries (only one is packaged).
+
+------------------------------------------------------------------------
+r131 | kovzol | 2003-03-27 04:28:59 -0500 (Thu, 27 Mar 2003) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r130 | kovzol | 2003-03-27 04:27:07 -0500 (Thu, 27 Mar 2003) | 2 lines
+
+Update.
+
+------------------------------------------------------------------------
+r129 | kovzol | 2003-03-25 17:33:26 -0500 (Tue, 25 Mar 2003) | 2 lines
+
+Fixing Win32 driver crash, suggested by Andreas.
+
+------------------------------------------------------------------------
+r128 | kovzol | 2003-03-20 16:45:47 -0500 (Thu, 20 Mar 2003) | 3 lines
+
+XaoS became unstable, but texts are internationalized and they don't appear
+twice when changing the driver mode. Needs to be fixed.
+
+------------------------------------------------------------------------
+r127 | kovzol | 2003-03-20 04:45:22 -0500 (Thu, 20 Mar 2003) | 2 lines
+
+Another attempt to finalize i18n basics for Windows...
+
+------------------------------------------------------------------------
+r126 | kovzol | 2003-03-19 07:09:34 -0500 (Wed, 19 Mar 2003) | 2 lines
+
+Another attempt to fix Win32 i18n...
+
+------------------------------------------------------------------------
+r125 | kovzol | 2003-03-18 13:07:21 -0500 (Tue, 18 Mar 2003) | 4 lines
+
+An attempt to gettextize Copy, Paste, About and Resize (mainly for Windows).
+On Linux it compiles, under Windows not tested yet. Maybe under Windows there
+should be some code written for menu_delete() -- which has been removed now.
+
+------------------------------------------------------------------------
+r124 | kovzol | 2003-03-18 05:45:46 -0500 (Tue, 18 Mar 2003) | 2 lines
+
+Some small updates.
+
+------------------------------------------------------------------------
+r123 | kovzol | 2003-03-18 05:08:15 -0500 (Tue, 18 Mar 2003) | 3 lines
+
+"make install" stops under Windows because there is a file called INSTALL.
+That's whay INSTALL had to be removed.
+
+------------------------------------------------------------------------
+r122 | kovzol | 2003-03-18 03:33:11 -0500 (Tue, 18 Mar 2003) | 3 lines
+
+Andreas updated autoconf-stuff to detect i18n on Windows properly.
+Tested and work OK.
+
+------------------------------------------------------------------------
+r121 | kovzol | 2003-03-13 05:08:57 -0500 (Thu, 13 Mar 2003) | 2 lines
+
+..\..\locale is changed to ../../locale.
+
+------------------------------------------------------------------------
+r120 | kovzol | 2003-03-11 07:32:29 -0500 (Tue, 11 Mar 2003) | 3 lines
+
+Trying to force -lintl -liconf -D HAVE_GETTEXT if --with-included-gettext
+was added to configure options. Not tested yet.
+
+------------------------------------------------------------------------
+r119 | kovzol | 2003-03-11 06:38:21 -0500 (Tue, 11 Mar 2003) | 2 lines
+
+Trying to fix that LC_MESSAGES/* directories were not created.
+
+------------------------------------------------------------------------
+r118 | kovzol | 2003-03-11 06:09:44 -0500 (Tue, 11 Mar 2003) | 2 lines
+
+Updating.
+
+------------------------------------------------------------------------
+r117 | kovzol | 2003-03-11 06:06:23 -0500 (Tue, 11 Mar 2003) | 2 lines
+
+Putting X arrow back.
+
+------------------------------------------------------------------------
+r116 | kovzol | 2003-03-11 05:28:46 -0500 (Tue, 11 Mar 2003) | 4 lines
+
+Andreas solved Win32 langauge detection problem. I18n now works under Win32.
+He also improved the code which is generating xaos.dlg (however it can
+be still enhanced for housing internationalized texts).
+
+------------------------------------------------------------------------
+r115 | kovzol | 2003-03-06 06:54:24 -0600 (Thu, 06 Mar 2003) | 2 lines
+
+Trying ..\..\locale instead of ../../locale under Windows, LOCALEDIR.
+
+------------------------------------------------------------------------
+r114 | kovzol | 2003-03-06 06:37:37 -0600 (Thu, 06 Mar 2003) | 2 lines
+
+Changing back to the previous version due to a commission fault.
+
+------------------------------------------------------------------------
+r113 | kovzol | 2003-03-06 04:02:06 -0600 (Thu, 06 Mar 2003) | 3 lines
+
+Andreas added localedir support for Windows and updated xaos.dlg
+to house internationalized texts in some widgets under Windows.
+
+------------------------------------------------------------------------
+r112 | kovzol | 2003-03-05 06:47:09 -0600 (Wed, 05 Mar 2003) | 2 lines
+
+Andreas fixed "Color:".
+
+------------------------------------------------------------------------
+r111 | kovzol | 2003-03-04 04:30:22 -0600 (Tue, 04 Mar 2003) | 2 lines
+
+Update.
+
+------------------------------------------------------------------------
+r110 | kovzol | 2003-03-04 04:21:36 -0600 (Tue, 04 Mar 2003) | 3 lines
+
+Trying to generate a LOCALEDIR-dependent Makefile in src/i18n.
+Tested on Linux, on Windows should also be tested.
+
+------------------------------------------------------------------------
+r109 | kovzol | 2003-03-04 03:03:49 -0600 (Tue, 04 Mar 2003) | 2 lines
+
+Andreas updated the Windows installation notes.
+
+------------------------------------------------------------------------
+r108 | kovzol | 2003-03-03 11:56:33 -0600 (Mon, 03 Mar 2003) | 3 lines
+
+Andreas Madritsch improved the Windows port for supporting i18n.
+Tested and works properly.
+
+------------------------------------------------------------------------
+r107 | kovzol | 2003-02-28 05:26:25 -0600 (Fri, 28 Feb 2003) | 2 lines
+
+Fixing deleting unwanted, non-existing addresses.
+
+------------------------------------------------------------------------
+r106 | kovzol | 2003-02-28 05:24:36 -0600 (Fri, 28 Feb 2003) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r105 | kovzol | 2003-02-28 05:18:41 -0600 (Fri, 28 Feb 2003) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r104 | kovzol | 2003-02-28 05:01:25 -0600 (Fri, 28 Feb 2003) | 2 lines
+
+Preparing for release... :-)
+
+------------------------------------------------------------------------
+r103 | kovzol | 2003-02-28 04:06:43 -0600 (Fri, 28 Feb 2003) | 2 lines
+
+configure had to be regenerated.
+
+------------------------------------------------------------------------
+r102 | kovzol | 2003-02-28 02:58:16 -0600 (Fri, 28 Feb 2003) | 4 lines
+
+Added MIT/SHM support enabling/disabling. Updated documentation.
+Version is 3.1 from now on. Tcl/Tk fix (trailing character removed).
+Binary file st6xBkKv is also removed.
+
+------------------------------------------------------------------------
+r101 | kovzol | 2003-02-25 12:19:47 -0600 (Tue, 25 Feb 2003) | 2 lines
+
+An attempt to detect DirectDraw driver. Not tested yet.
+
+------------------------------------------------------------------------
+r100 | kovzol | 2003-02-25 04:43:24 -0600 (Tue, 25 Feb 2003) | 4 lines
+
+Andreas Madritsch has updated the English and German tutorial files
+for the new 3 fractal types. I also updated the Hungarian catalog
+file for being synchronized with the latest tutorials.
+
+------------------------------------------------------------------------
+r99 | kovzol | 2003-02-17 10:57:26 -0600 (Mon, 17 Feb 2003) | 3 lines
+
+Andreas Madritsch has updated German translations
+(and he created texts for German menus).
+
+------------------------------------------------------------------------
+r98 | kovzol | 2003-02-11 05:27:56 -0600 (Tue, 11 Feb 2003) | 2 lines
+
+Fixing formula in Bailout.
+
+------------------------------------------------------------------------
+r97 | kovzol | 2003-02-11 04:43:57 -0600 (Tue, 11 Feb 2003) | 2 lines
+
+Fixed installation (LC_* directory was not created).
+
+------------------------------------------------------------------------
+r96 | kovzol | 2003-02-10 16:42:28 -0600 (Mon, 10 Feb 2003) | 5 lines
+
+The wrong "gettext" library was detected. Now I read some info
+about doing this correctly in the info pages of GNU gettext.
+Now --disable-nls will switch i18n off. Tested and seems
+to work correctly.
+
+------------------------------------------------------------------------
+r95 | kovzol | 2003-02-10 11:52:43 -0600 (Mon, 10 Feb 2003) | 2 lines
+
+Locale directory is now generated.
+
+------------------------------------------------------------------------
+r94 | kovzol | 2003-02-10 04:36:45 -0600 (Mon, 10 Feb 2003) | 2 lines
+
+The generated files also have to be updated.
+
+------------------------------------------------------------------------
+r93 | kovzol | 2003-02-10 04:27:10 -0600 (Mon, 10 Feb 2003) | 2 lines
+
+Bailout is available as command and command line option as well.
+
+------------------------------------------------------------------------
+r92 | kovzol | 2003-02-07 05:47:22 -0600 (Fri, 07 Feb 2003) | 2 lines
+
+Moving Bailout into Calculation menu in the documentation.
+
+------------------------------------------------------------------------
+r91 | kovzol | 2003-02-06 09:44:54 -0600 (Thu, 06 Feb 2003) | 2 lines
+
+Added Bailout to documentation.
+
+------------------------------------------------------------------------
+r90 | kovzol | 2003-02-06 07:36:19 -0600 (Thu, 06 Feb 2003) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r89 | kovzol | 2003-02-06 07:34:42 -0600 (Thu, 06 Feb 2003) | 2 lines
+
+Fixing duplicated helpmenu and file nodes.
+
+------------------------------------------------------------------------
+r88 | kovzol | 2003-02-05 14:52:15 -0600 (Wed, 05 Feb 2003) | 2 lines
+
+TODO item solved.
+
+------------------------------------------------------------------------
+r87 | kovzol | 2003-02-05 08:59:53 -0600 (Wed, 05 Feb 2003) | 2 lines
+
+Fixing some problems in i18n.
+
+------------------------------------------------------------------------
+r86 | kovzol | 2003-02-04 05:21:55 -0600 (Tue, 04 Feb 2003) | 2 lines
+
+Added Dominic Mazzoni to the list of authors.
+
+------------------------------------------------------------------------
+r85 | kovzol | 2003-02-04 05:04:27 -0600 (Tue, 04 Feb 2003) | 2 lines
+
+RESTRICT is not neeeded.
+
+------------------------------------------------------------------------
+r84 | kovzol | 2003-02-04 05:03:39 -0600 (Tue, 04 Feb 2003) | 2 lines
+
+Mac OS X port seems to be completed. :-)
+
+------------------------------------------------------------------------
+r83 | kovzol | 2003-02-04 04:38:13 -0600 (Tue, 04 Feb 2003) | 2 lines
+
+Trying to solve the NO_MALLOC_H/RESTRICT problem for Mac OS X.
+
+------------------------------------------------------------------------
+r82 | kovzol | 2003-02-04 03:03:13 -0600 (Tue, 04 Feb 2003) | 2 lines
+
+Trying to detect missing malloc.h via configure.
+
+------------------------------------------------------------------------
+r81 | kovzol | 2003-02-03 11:41:49 -0600 (Mon, 03 Feb 2003) | 2 lines
+
+Small bugfix.
+
+------------------------------------------------------------------------
+r80 | kovzol | 2003-02-03 11:09:38 -0600 (Mon, 03 Feb 2003) | 3 lines
+
+Unfortunately CVS doesn't support changing file permissions.
+So I had to rename some files. Sorry for inconvenience...
+
+------------------------------------------------------------------------
+r79 | kovzol | 2003-02-03 10:53:57 -0600 (Mon, 03 Feb 2003) | 2 lines
+
+Added UNIX version of rtfconv.bat.
+
+------------------------------------------------------------------------
+r78 | kovzol | 2003-02-03 10:45:36 -0600 (Mon, 03 Feb 2003) | 2 lines
+
+Re-adding using chmod 755.
+
+------------------------------------------------------------------------
+r77 | kovzol | 2003-02-03 10:27:09 -0600 (Mon, 03 Feb 2003) | 2 lines
+
+Deleted files, because changing their access information is not allowed.
+
+------------------------------------------------------------------------
+r76 | kovzol | 2003-02-03 10:16:46 -0600 (Mon, 03 Feb 2003) | 4 lines
+
+Added Mac OS X support. Unfortunately its detection is very ugly yet.
+Tested on Darwin 5.5 (SourceForge Compile Farm). Should be tested if other
+OSes still work properly.
+
+------------------------------------------------------------------------
+r75 | kovzol | 2003-02-03 04:18:58 -0600 (Mon, 03 Feb 2003) | 2 lines
+
+Forgotten to autogenerate... now it is OK.
+
+------------------------------------------------------------------------
+r74 | kovzol | 2003-02-03 04:16:52 -0600 (Mon, 03 Feb 2003) | 6 lines
+
+Added Mac OS X support, based on patches by Ben Hines.
+(Officially not tested yet.)
+
+Documentation now can be generated using Makefiles.
+Fixing some small bugs in xaos.hlp and updating xaos.geninfo.
+
+------------------------------------------------------------------------
+r73 | kovzol | 2003-01-31 10:19:39 -0600 (Fri, 31 Jan 2003) | 3 lines
+
+Upgraded configuration with newer (however, not the newest) libtool,
+suggested by Ben Hines.
+
+------------------------------------------------------------------------
+r72 | kovzol | 2003-01-29 06:48:24 -0600 (Wed, 29 Jan 2003) | 3 lines
+
+Mac doesn't like #undef Register(...) just #undef Register. Fix suggestion
+by Andreas Madritsch. Tested.
+
+------------------------------------------------------------------------
+r71 | kovzol | 2003-01-28 05:49:46 -0600 (Tue, 28 Jan 2003) | 2 lines
+
+Adding more information.
+
+------------------------------------------------------------------------
+r70 | kovzol | 2003-01-24 06:10:16 -0600 (Fri, 24 Jan 2003) | 2 lines
+
+Fixing -D DEBUG check in ui.c.
+
+------------------------------------------------------------------------
+r69 | kovzol | 2003-01-24 03:49:05 -0600 (Fri, 24 Jan 2003) | 4 lines
+
+I misunderstood a fact about config.autoconf and I changed it in the
+wrong way. I wrote the previous text back. Now i18n detection
+information will be displayed only during -D DEBUG.
+
+------------------------------------------------------------------------
+r68 | kovzol | 2003-01-24 03:09:21 -0600 (Fri, 24 Jan 2003) | 2 lines
+
+Regenerated.
+
+------------------------------------------------------------------------
+r67 | kovzol | 2003-01-24 02:57:10 -0600 (Fri, 24 Jan 2003) | 2 lines
+
+Fixing warning message.
+
+------------------------------------------------------------------------
+r66 | kovzol | 2003-01-24 02:29:28 -0600 (Fri, 24 Jan 2003) | 2 lines
+
+Regenerated configure, improved mkChangeLog.
+
+------------------------------------------------------------------------
+r65 | kovzol | 2003-01-24 02:25:36 -0600 (Fri, 24 Jan 2003) | 2 lines
+
+Improving detection of GNU gettext. Beautifying INSTALL file.
+
+------------------------------------------------------------------------
+r64 | kovzol | 2003-01-23 12:05:56 -0600 (Thu, 23 Jan 2003) | 3 lines
+
+I forgot to commit Andreas' change for MacIntosh and Windows
+sent me on 2002-10-03. Now they're all committed.
+
+------------------------------------------------------------------------
+r63 | kovzol | 2003-01-23 11:15:53 -0600 (Thu, 23 Jan 2003) | 3 lines
+
+General cleanup and spelling fixes in many documentation files.
+(However I'm not a native English speaker... :-)
+
+------------------------------------------------------------------------
+r62 | kovzol | 2003-01-23 06:46:48 -0600 (Thu, 23 Jan 2003) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r61 | kovzol | 2003-01-23 06:42:34 -0600 (Thu, 23 Jan 2003) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r60 | kovzol | 2003-01-23 03:37:38 -0600 (Thu, 23 Jan 2003) | 3 lines
+
+Fixing svgalib detection bug (it did not work at all from version 1.2
+as reported by Andreas Madritsch).
+
+------------------------------------------------------------------------
+r59 | kovzol | 2003-01-21 17:11:43 -0600 (Tue, 21 Jan 2003) | 2 lines
+
+Updates for 3.1pre6 (mainly for DOS port).
+
+------------------------------------------------------------------------
+r58 | kovzol | 2003-01-17 04:46:35 -0600 (Fri, 17 Jan 2003) | 3 lines
+
+ANNOUNCE is removed from files have to be intalled.
+I've forgotten to change configure.in and configure for aalib 1.4 check.
+
+------------------------------------------------------------------------
+r57 | kovzol | 2003-01-17 03:48:16 -0600 (Fri, 17 Jan 2003) | 2 lines
+
+Fixing.
+
+------------------------------------------------------------------------
+r56 | kovzol | 2003-01-17 03:47:40 -0600 (Fri, 17 Jan 2003) | 2 lines
+
+Automatic update by mkChangeLog
+
+------------------------------------------------------------------------
+r55 | kovzol | 2003-01-17 03:42:33 -0600 (Fri, 17 Jan 2003) | 6 lines
+
+Major cleanup. Some files have been removed, others moved to new places.
+ChangeLog is generated automatically from now on. Added missing credits
+to all necessary files. Added README. ./configure now checks aalib
+version >= 1.4 (version 1.3 reports bad image height, this caused memory
+overflow).
+
+------------------------------------------------------------------------
+r54 | kovzol | 2003-01-10 05:00:47 -0600 (Fri, 10 Jan 2003) | 3 lines
+
+ChangeLog.[ch] was indented, they should not!
+Fixing do-indent.
+
+------------------------------------------------------------------------
+r53 | kovzol | 2003-01-10 04:26:16 -0600 (Fri, 10 Jan 2003) | 7 lines
+
+I18n basics are finished. .po file for Hungarian language is also
+considered as finished, however some irrelevant messages are not
+translated yet.
+
+"do-indent" is more intelligent. A run of this script was done
+to beautify code.
+
+------------------------------------------------------------------------
+r52 | kovzol | 2003-01-08 05:40:30 -0600 (Wed, 08 Jan 2003) | 2 lines
+
+Enhanced i18n.
+
+------------------------------------------------------------------------
+r51 | kovzol | 2003-01-08 05:32:32 -0600 (Wed, 08 Jan 2003) | 2 lines
+
+i18n should not be taken to the rules.
+
+------------------------------------------------------------------------
+r50 | kovzol | 2003-01-04 17:51:13 -0600 (Sat, 04 Jan 2003) | 5 lines
+
+Beautifying Makefiles (i18n now can be made without installing).
+
+A demonstration version of internationalizing dialogs
+(Perturbation and Julia-seed works now, tested).
+
+------------------------------------------------------------------------
+r49 | kovzol | 2003-01-04 17:48:11 -0600 (Sat, 04 Jan 2003) | 2 lines
+
+Fixing a bug I put into this file however Nix fixed it earlier.
+
+------------------------------------------------------------------------
+r48 | kovzol | 2002-12-30 09:04:55 -0600 (Mon, 30 Dec 2002) | 2 lines
+
+Added HAVE_GETTEXT constant for fixing broken i18n support.
+
+------------------------------------------------------------------------
+r47 | kovzol | 2002-12-30 08:24:02 -0600 (Mon, 30 Dec 2002) | 4 lines
+
+Automated patching from Nix' fixes. Mostly grammar fixes
+in English language, however some documentation related
+changes are also commited.
+
+------------------------------------------------------------------------
+r46 | kovzol | 2002-12-09 09:17:16 -0600 (Mon, 09 Dec 2002) | 2 lines
+
+Nix-fixes, second part. To be continued...
+
+------------------------------------------------------------------------
+r45 | kovzol | 2002-12-09 04:33:44 -0600 (Mon, 09 Dec 2002) | 4 lines
+
+Some corrections done by Nix <nix@esperi.demon.co.uk>. There are
+other fixes he did, but I was only able to start commiting his
+fixes...
+
diff --git a/ChangeLog.old b/ChangeLog.old
new file mode 100644
index 0000000..f310556
--- /dev/null
+++ b/ChangeLog.old
@@ -0,0 +1,1082 @@
+This file is generated with "more ChangeLog* > ChangeLog.old"
+on 16 January 2003 by Zoltan Kovacs. From now on the official
+ChangeLog file will be generated automagically from CVS.
+
+So, please do not edit this file.
+
+----------------------------------------------------------------------------
+
+::::::::::::::
+ChangeLog
+::::::::::::::
+Version 3.1
+ o New homepage at http://www.gnu.org
+ Speedups:
+ o The internal loop now uses integer comparisons on x86 (about 10%
+ speedup)
+ o Better timming
+ o Cleverer and faster solid guessing algorithm
+ o Faster resolution reduction loops (more cache and SMP friendly)
+ o Faster copying loops (lower register pressure because of new table
+ layout)
+ o New string inlines for x86 that does aligning of memory acceses
+ o I've made some patches to gcc-2.95 to improve XaoS code
+ o Assembly loops for moving data
+ (overall XaoS is more than twice the speed of version 3.0)
+ New features
+ o New antialiasing filter
+ o New drivers:
+ GGI
+ DGA
+ Win32
+ dX-window
+ dX-fullscreen
+ BeOS
+ DirectWindow
+ DirectScreen
+ o Improved tutorials:
+ o New tutorial "math behind fractals"
+ o First chapter of tutorial "an introduction to fractals" has been
+ split into the introduction part and part about the Mandelbrot set
+ o Improved first chapter
+ o Added line graphics into many tutorials
+ o Spanish message catalog contributed by Cesar Perez
+ o Added (color) command to specify color of text
+ o Rendering sequences of images from animation files
+ o New wrapper around I/O routines alowing XaoS to read arbitary streams
+ like string etc.
+ o New library for handling menus added. I think it is big step towards
+ a nice user interface, since all keybindings and menus will be
+ independent at UI, so the ugly interface now will be just simple code
+ calling this library.
+ o Added simple dialog description structure...
+ o Added library with simple graphics primitives (line, rectangle,
+ text)
+ o Palette extended to allow few preallocated color cells for UI and
+ such.
+ o Timer library now handles current group changes nicely,
+ also supports time emulation used by emulating constant framerate
+ good for saving animations
+ o Palette creator now accepts zero for maximal palette size
+ o Lots of play functions made generic and integrated into user
+ interface (user now should specify palette seed or reset state
+ of XaoS into "factory defaults")
+ o Menus, dialog, command line options, hotkeys and animation replay
+ code now use same function registry. So there are lots of new command
+ line parameters, file format commands etc...
+
+ Some command line parameters also changed their name (like -load ->
+ -loadpos) so please modify your scripts...
+ o Added xshl (XaoS simple hypertext langage) library
+ o Motion blur now handles changes of filter configuration in better
+ way
+ o Added some other fractal examples into first chapter
+ o Behave better when btrace or interruptible calculation interrupted
+ o Documentation split into Hacker's and User's guide, so we don't need
+ to distribute hacker documentation in the source distributions and
+ users don't need to print this part.
+ o Timer library now supports Win32 high precision timer
+ o Support for backslash path convention under DOS and Windows
+ o Accept both \n lines and \n\r lines
+ o Internationalization (i18n) support added for menus
+ o New fractal types: newton^4, barsnley2 and magnet2
+ UI changes:
+ o Menus are now displayed nicely
+ o New nice dialogs. XaoS is now mostly user friendly :)
+ o Native UI wrappers for BeOS and Windows
+ o Undo and redo, cut and past available at many systems
+ o Main menu is now available at 'enter' key.
+ o Better arrow keys handling
+ o Formula changing now resets perturbation too
+ o New context sensitive help.
+ Now uses xshl (XaoS simple hypertext language), so you
+ might do hyperlinks, links to tutorials and basic formating of text
+ o Bailout may be set
+ o Logarithmic zoom ratio also displayed in ministatus
+ Driver API changes
+ o Drivers now sends special keys as KEY_UP etc...
+ o Parameter parsing library cleaned. It now don't prints driver's
+ name automatically in help text. Use HELP line. (see ui_template.c)
+ o Removed TRUECOLORMI, HICOLOR and REALCOLOR image types.
+ There is now just TRUECOLOR16, TRUECOLOR24 and TRUECOLOR.
+ to set where red, green and blue channels lie use new redmask,
+ greenmask and bluemask fields in driver's structure
+ o Similar changes in the S* configure defines
+ o Removed unused functions: driveropt (now should be done by menus)
+ clrscr (now XaoS does in the buffer)
+ o Added new flag RESIZE_COMMAND
+ (if ui should add an '=' resize function to menu - should be enabled
+ in the most fullscreen drivers, which don't do resizing dialog
+ using menus, but using getsize call - like SVGAlib etc.)
+ windowed drivers should disable this
+ o Removed help entry (add this text into xaos.hlp file with same
+ keyword as your driver's short name)
+ UI-helper changes:
+ o It is now based on a menuing system... controls are almost the same,
+ but internally implementation is different. Only visible changes I
+ know about are that double 'q' for quit doesn't work anymore, and 's'
+ menu is now like the file menu in many programs, so it contains quit and
+ other functions.
+ o window handling
+ o New message and error handling code
+ o Displays texts directly to output buffer instead of asking
+ ui interface
+ o Improved passfunc
+ o Support for constant framerate emulation
+ Fixes:
+ o Support for libpng 1.0.x and 1.1.x
+ o Fixed email addresses in ANNOUNCE
+ o Fixed nasty bug in timer library - it caused great memory
+ corruption..
+ o Fixed crash in palette filter
+ o Fixed some memory leaks
+ o Color cycling don't overwrite filter's palette anymore
+ o Fixed memory leak in blur.c
+ o Enabled forgotten optimizations for bpp==1
+ o Removed IMO unusable command (calculate)
+ o Fixed memory leak in error handling in play.c
+ o Check for inconzestient configuration in ui_helper.c
+ o play now accepts empty files
+ o cycling speed is saved correctly
+ o Filters are now saved in right order, filters that depends
+ at master are initialized first.
+ o No crash when user tries to set letterspersec to 0,
+ it's not allowed now
+ o Fractal type magnet has been modified
+ Cleanups:
+ o Removed lots of ui code and moved to menu.c
+ o Removed old and obsolete functions ui_message, ui_tbreak, ui_menu
+ ui_message2 renamed to ui_message
+ o Removed ui_tbreak calls from x11 driver
+ o Removed curses driver - it is obsoleted by aa driver now
+ o Structure timer moved to timerlib...
+ o Removed ui_getcontext, since it is old and ugly hack to give
+ better control to driver not recommended at all...
+ o Removed special driver menu code and integrated into XaoS menuing
+ system
+ o Removed some code duplication in uinew
+ o Removed old keyboard buffer code in uinew.c
+ o Assertions are now disabled in zoom.c
+ o ui and ui-helper split into separate directories
+ o uinew renamed back to ui. It is not so new anymore :)
+ o many rewrites in ui code.
+ o Engine now handles generic truecolor modes at depths 16,24 and 32
+ (not just few selected ones)
+ o The full code has been autoformatted with GNU indent utility
+ X11 driver:
+ o better support for bitmaps
+ o Added windowid option to support external GUIs
+ o Extended visualid detection heuristics
+ o Avoided crash when selected visual != default visual
+ o Now supports almost all truecolor modes...
+ o Take care for incompatible endianity of images
+ Svgalib driver:
+ o Use linewidth parameter instead of bytesperpixel*width
+ o Send correct key masks
+ o -grayscale for grayscale emulation
+ AA-lib driver
+ o Uses new menuing system
+-------------------------------------------------------------------------------
+Version 3.0
+ MOST SIGNIFICANT CHANGE:
+ o Richard M. Stallman agreed with adding XaoS into GNU project
+ Fixes:
+ o XaoS is now sticky bit save when svgadriver enabled
+ o Fixed crash in resizing in stereogram mode
+ o Fixed crash in stereogram mode+different scanline/width
+ o Fixed crash with dealing NaN sizes
+ o Fixed small bug in mkrealloctable
+ o Fixed ctrl87.c to do not make compilation problems anymore
+ (was renamed to i386.c :) but also some register conflicts fixed.
+ o Fixed memory owerflowing in julia code
+ o Removed GIF code due to patent problems
+ o Timer library and ui code now handles better low resolution timers
+ Also measuring of time for status line changed. So gives bit
+ different results now :) (lower but more exact)
+ o Fixed few minnor bugs in solid guessing. Now it should be
+ more effective. But who knows...
+ o -incoloring now works
+ Major code reorganization.
+ o New palette functions supports
+ x truecolor, truecolor24, hicolor and maxcolor handling
+ x allocation/set palette scheme
+ o New nice image structure that suppotrs:
+ x truecolor, truecolor24, hicolor, maxcolor, and 256 colors
+ x nonstandard order of lines (like one in windoze etc..)
+ x double buffering
+ x palette functions
+ o New partially object oriented filter sistem
+ x allows elegant way to add effects like stereogram generation
+ x makes possible to reduce resolution after stereogram etc..
+ x combination of various calculation algorithms is now
+ possible in elegant way
+ x makes source code much cleaner and extensible
+ o New user interface helper library
+ x makes easy to add new user interfaces or use as
+ a part of some other program
+ x implemented in cleaner way than old ugly-interface
+ x hides XaoS's internals and provides easy to understand
+ set of functions for users of XaoS engine.
+ o XaoS now uses center/range possitioning instead of
+ left top/right bottom becase:
+ x it is better human readable (you can see zoom easily)
+ x it is more exact (small difference do not fall to zero
+ as soon as in normal system)
+ x it is easier to handle in rotation (you can do still
+ same operations - zooms, movements like in unrotated.
+ x better fits operation permited in(zooming view/moving)
+ x I expect will look better in save files
+ x simplified many operations performed on it.
+ o As the side effect:
+ x old ugly interface code is a bit obsolette. Requires
+ small changes into drivers
+ x no more large zoom_context. Context is now divided into
+ many parts. So many structures should be used by other
+ parts of XaoS separately.
+ x zoom.[ch] splitted into fractal routines and zooming
+ engine. This makes easier add ingnew zooming/calculation
+ methods (like on in fractos, boundary detection...)
+ x most of siggnificant data structures are copied into fixed
+ memory locations before start of calculation. I expect it
+ will speed up accesing its field because complex
+ traveling throught pointers will be avoided and reduces
+ number of parameters passed to calculation functions.
+ At the other hand it should bring many problems in
+ multithreading. In calculating one image at many procesors
+ should be OK. Since these structures are same. Calculating
+ of multiple images at time should be real problem. But why
+ not use multitasking? or some hack with redefinig this
+ structures back into pointers should be possible in this
+ cases.
+ x less multiplyings but more memory accesses in
+ calcline/column should speedup on pentiums with fast
+ cache.
+ x autopilot now should work at many contexts at time
+ x better implementation of fill
+ x many new bugs but few old fixed
+ x ugly interface code was greatly simplified since everything
+ interesting went into ui_helper
+ x resizing and such stuff is now much simplier
+ x palette rotation implemented in cleaner way. Now does
+ not require changes into drivers. Uses new setpalette
+ driver function. I can not imagine hardware, where
+ setpalette is imposible but rotation possible.
+ x timer library now passes userdata to handlers - required
+ for implementation of rotatepalette
+ x palette rotatin in truecolor modes is not possible anymore
+ (since xaos is not internally 8bit)
+ Cleanups:
+ o New macro system for formulas that allows easy manipulation
+ with calculation loops. But looks ugly. Is that cleanup?
+ o Julia code is now automatically generated for formulas..
+ o Directory structure,
+ XaoS divided into several libs (engine,ui,util,drivers)
+ o Simplier configuration headers
+ o timerlib:wait mechanizm has obsoletted by much better slowdown
+ mechanizm
+ Speedups:
+ o Boundary detection for new images
+ o I've browsed mkrealloctable and removed few unnecesary
+ ifs. Maybe it speeded up..
+ o MAGICAL VALUE OF 100 FPS IS GONE!!!! Now you can see 120 FPS
+ on pentium :)
+ New completly fixedpoint mkrealloctable performs very well!
+ (isn't that cool idea? just simple precalclate everything into
+ fixedpoint that depends on the zoom and do rest in
+ integers ? :))) I am so silly coder! now XaoS usually does
+ not fall under 7fps on my 486 so it works in acceprable
+ performance. maybe we should add logo "Ready for 486!(tm)"
+ :) (and whats about fixed point calculation loops? :)
+ Fixedpoint brought many advantages - precalculated pow
+ tables, no owerflowing/NaN/precisity problems, many
+ variables changed to constants(since distance between
+ lines is statically 512) and much more :)
+ Now we should start thinking about deepzoom feature
+ since most of XaoS is already resolution independent.
+ New mkrealloctable is approx twice as fast on pentium
+ (tests on 486 should be interesting)
+ o Dynamical resolution lowering now performs much better
+ (Should help especially on 486)
+ o Better dynamical resolution timeout choice - keeps
+ higher framerate during zooming but lowers after
+ zooming stops.
+ o At 386 uses uptimized versions of memset and memcpy
+ o A bit faster julia calculation loop
+ o Autopilot code is now simplier, faster, has better out of
+ range and lowqualitty detection and seems to have better
+ results
+ o Macro system in calculation loop caused instant speedup. Why?
+ o New new possition caluclation algorithm. Seems to be a bit faster
+ and produces better results
+ o Random dot generator now reduces resolution to 1/4,
+ because brain is unable to decode image inormations at
+ normal resolution. :)
+ o New uncompressed loops - one iteration for mandelbrot is
+ just about 14 instructions (was 23)
+ o Periodicity checking
+ Fabrice Premel <premelfa@etu.utc.fr>
+ o Another 1/8 speedup caused by forcing register allocation
+ (i386 only)
+ o Malloc/free is now called less often (once per frame)
+ New features:
+ o BeOs driver.
+ Jens Kilian <jjk@acm.org>
+ o Truecolor(24/32-little and big edian), Hicolor, Realcolor, Fixedcolor
+ and monochrome support
+ o Interlace filter that instantly makes your computer
+ twice as fast!
+ o Motion blur filter
+ o Dithering filter
+ o Julia preview for all formula types
+ o Image rotation
+ o New AA-lib driver that does high qualitty text mode rendering
+ see AA project homepage at http://www.ta.jcu.cz/aa
+ o Two edge detection filters
+ o Palette emulation filter
+ o Emboss filter
+ o SMP support using threads
+ o Two new palette generation algorithms
+ o Changed default window size to 480x360 because I hope that XaoS
+ is now fast enought to work in resonable speed at this resolution
+ o Animated tutorials:
+ Introduction to fractal
+ features overview
+ whats new
+ o New outcoloring modes:
+ o Potential
+ o Another colorfull decomposition
+ o Smooth (for truecolor/truecolor24/hicolor/realcolor displays)
+ o New incoloring modes
+ o decomposition-like
+ o real/imag
+ o Save images into PNG format. Problem is that now XaoS
+ requires zlib and pnglib that should bring problems to
+ users compiling XaoS at UNIX workstations. I personally
+ dislike writing of image saving code. Please if you have
+ some, or you want to write code, that don't require these
+ libraries, let me know.
+ o Saving of possition.
+ o Documentation is now in texinfo format. Describes some XaoS
+ internals
+ o Timer library:
+ x handler should remove its timer when activated
+ x New slowdown, stop and resume functions
+ x Runtime switching between allegro compatible mode and
+ uclock mode
+ o Configure script now does simple autodetection for long
+ double - enables it just at intel compatible platforms, since
+ it is sure, that it works well there. Let me know about other
+ platforms with fast working long double
+ o New file README.compilers, that discuss optimizing
+ switches/problems with various compilers/platforms.
+ UI Changes
+ o added -delay option as suggested by Johan Hagman
+ o added -maxframerate option that is similiar to -delay
+ o added -letterspersec option to changes subtitles speed
+ o added -threads command line option
+ o added menu for saving
+ o added .XaoSrc file
+ o new -play, -load, -letterspersec options
+ o major rewrite
+ o 'E' now handle filters (not just stereogram)
+ o 'O' now handler image rOtation
+ o 'B' for perbutation
+ o Help should be paged using up and down arrow
+ o 'S' now have menu for various saving options
+ also during animation recording 'S' menu contains some special
+ commands like clearing of sceeen or text ourput primitives
+ o 'V' now handles "various stuff menu" - menu with not so often used
+ thinks. So 'K' 'G' 'T' and 'D' are free again :)
+ o Palette rotation renamed to color cycling to reduce confusin
+ with image rotation. So it is activated by 'Y' now.
+ o Julia mode is not disabled after keypress.
+ o Configuration file
+ o Drivers now provides information about textwidth and function
+ to clear screen
+ o New timming code allowing better replay at different
+ resolution/computer
+ o dynamic time for dynamic resolution (nice feature :) now works
+ better on architectures with unexact timming(like dos with
+ old timming routines)
+ PLAN9 Changes
+ o Updated driver to work better with new user interface code,
+ some cleanups
+ o -nopalette switch is now handled better - XaoS enables dithering
+ so output is almost identical to user palette mode. Just it is a bit
+ slower and requires more memory.
+ o Removed mkfile, since it became obsolette because of source
+ code reorganization. I am still unable to write mkfiles since
+ some required files seems to be missing in "demo" installation
+ so back to mk script :(
+ o Suport for 1bpp displays
+ SVGA Changes
+ o Supports truecolor, missordered truecolor, truecolor24, hicolor
+ and realcolor modes
+ o Some hacks in order to make thread stuff working
+ X11 Changes
+ o support for fullscreen mode so XaoS can act as screensaver.
+ Johan Hagman <Johan.Hagman@mailbox.swipnet.se>
+ o works on alphas and other 64bit architectures in
+ hicolor/truecolor mode Alexander V. Lukyanov
+ <lav@video.yars.free.net>
+ (this change is now obsolette since hicolor/truecolor is in
+ the main engine now)
+ o removed some XFlush calls so XaoS is now MUCH faster, but should
+ make problems at old servers. Use -sync
+ o Fixed resize and keysym crash
+ o Supports truecolor, missordered truecolor, hicolor, realcolor and fixedcolor
+ o Uses private colormap as default since shared colormap looks
+ too ugly. (note that shared colormap scheme is still supported,
+ but features are bit limited)
+ o added -display switch
+ o Now have normal, wait and replay mouse
+ o Handles keyboard better.
+ o Reduced memory usage in X11 modes
+ o Support for black and white modes
+ DOS Changes
+ o supports new allegro(2.2)-better dialog, portability, higher
+ resolutions
+ o fixed timming - now it works in much higher framerate(not
+ limited to 18.2 and even to 3.64 in dynamic resolution)
+ o new -i_love_bill for windows friendly mode
+ o Now compiles with lfn enabled
+ o does not work under linux dosemulator anymore
+ (dosemulator guys fixed the problem, so it works again :)
+ o Updated for work-in-progress allegro(www.talula.demon.co.uk)
+ now supports truecolor, hicolor and realcolor, also driver is
+ much simplier since custom dialog code is not required anymore.
+ o Have new lovely wait cursor
+-------------------------------------------------------------------------------
+Version 2.2
+ Fixes:
+ o bug in palette changing code
+ o more detections for various curses versions
+ o small well hidden bug in reallocation algorithm discovered.
+ o removed passing in registers to avoid compiler bug
+ o now allows unzoom greater than MAX_INT again
+ o symetry handling works for deeper unzooms too.
+ o more test for owerflowing/underflowing of resolution.
+ so now produces garbage but does not crash(feature?)
+ o more exact zooming/unzooming
+ o better framerate handling
+ o fixes for pgcc - do not generate faults..
+ Cleanups:
+ o char * -> unsigned char *
+ o mkrealloctable
+ o some optimizations for pipelining
+ o cleaned code to compile with -pedantic -traditional -Wall
+ o ugly interface-better menu code, drawing fractal etc..
+ o all timing code changed to use timer library
+ o approximation algorithm
+ o functions called maximally once per frame are not inlined
+ anymore
+ o created few directories for documentation etc..
+ o Minor changes in color indexing
+ o palette changing code
+ o rewrote solid guessing
+ o some variables in drivers structure changed to flags
+ Speedups:
+ o symetry handling code in mkrealloc table optimized a bit.
+ now is faster,shorter and does better job. :)
+ o non x/y symetries disabled because they slowes down for now..
+ o approximation algorithm optimized-lots of memory accesses
+ avoided-great speedup..
+ now performs much better(16fps -> 18 on 486)
+ also small hidden bug discovered, pricing redesigned a bit
+ and loops simplified-divided into more loops
+ function is now longer.
+ Also taken special care to minimize number of PRICE calls
+ mkrealloc tables is not main problem anymore. Handles
+ correctly all situations I tryed and is quite fast.
+ o approximation algorithm is now fixed point
+ sprprisingly very small speedup..(but much smaller code)
+ o better newton and barnsley calculation routines
+ New features:
+ o added fast preview mode for julias (julia.c)
+ o configure coprocesor on 386/gnuc
+ o created timer library that allows nice timing.
+ asynchronous operations and lots of other funny stuff..
+ Bad thing is that XaoS does not work anymore w/o function for
+ getting time in milisec/usec. Gettimeofday, ftime and plan9
+ /dev/msec are supported. Others can be added to timmers.c and
+ timmers.h. Please send me modified version
+ o improved configure script
+ o Added additional statistics functions good for testing of
+ algorithm
+ o lots of tests for speed done..(see doc/speed)
+ o completly new calculatenewinterruptible. This function
+ acts like calculatenew but may be interrupted(using interrupt
+ varibale) and then makes image with lower resolution
+ This makes possible to reduce resolution on the fly if
+ required
+ o approximation algorithm now works well with new
+ calculatenewinterruptible
+ o improved palette changing
+ o Improved solid guessing for variable range instead of range 2
+ also another special loop w/o sg when sg impossible
+ o do_fractal now supports both-interruptible/uninterruptible
+ modes
+ o Added magnet fractal
+ o Added julia form of newton(bit tricky but looks well)
+ o Added julia form of octo
+ o Added support for random dot stereograms
+ o pass is now string-more readable informations
+ o mailing lists (xaos,xaos-announce,xaos-devel) see doc/README
+ Documentation changes:
+ o new tutorial
+ o new algorithm descriptions
+ o new PROBLEMS file
+ o new README.gcc file
+ o new xaosman.txt file
+ o updates for new versions
+ UI Changes:
+ o improved speed detection in ministatus
+ o added 'j' for julia modes
+ o added 'd' for default palette
+ o added 't' for fast calculation modes control
+ o added 'g' for solid guessing options
+ o added 'o' for rotating
+ o added '0' for magnet
+ o added 'e' for random dot stereogram
+ o changed to use timer library
+ o does not crash with deep unzooms
+ o added support for palette rotating
+ o extended timing stuff for suport sync timing group..
+ this group is called "quite" often..
+ o added support for new resolution lowering feature
+ o now operates with exact screen sizes-no more fractal
+ deformations..
+ o automatical detection of optimal framerate for new resolution
+ lowering algorithm
+ X11 changes:
+ o more sanity checking for mitshm initialization
+ o Added support for rotating palette for private colormap
+ and truecolor modes. 8bpp pseudocolor w/o privatecolormap
+ is impossible..
+ o Uses X' function for autodetection screen size in milimeters..
+ (is this reilable?)
+ SVGA changes:
+ o Waits for retrace before displaying..looks better
+ curses changes:
+ o Use capital letter for G and E to avid collisions with ugly
+ interface
+ o Compatible with ncurses w/o redrawwin
+ MS-DOG,X11 and SVGA driver:
+ o Added support for palette rotating
+-------------------------------------------------------------------------------
+Version 2.1
+ o >>>>FINALLY<<<< discovered and implemented PROVED TO BE
+ OPTIMAL dynamical aproximation algorithm in linear time!!!
+ It is still bit slow..but it is here!
+ It should slow down at the begining but certainly speeds up
+ during zoom
+ Also allows deeper zoom
+ o added out of memory checks to make xaos safer on non unix platforms
+ o autopilot is now timed by same way as all other parts are.
+ Now will act same on all computers(I hope)
+ o Memorry corruption bug fixed - it caused problems with ysizes not dividable
+ by 2 with some other strange situations.
+ o New README.interface
+ This helps others to extend XaoS or use its routines
+ in their software
+ o Added many sanity checking to make easy debugging of new ports
+ o small cleanups (unused variables etc..)
+ o minnor speedups
+ o added OS/2 port(graphics 320x200 and text) By Thomas A. K. Kjaer
+ o added macintosh support by Tapio K. Vocadlo (thanks)
+ o added support for different scanline size than width. for Mac and X11 port
+ >>WARNING<< changes to driver API:alloc_buffers now returns line size(usually
+ width)
+ o Thomas' email updated
+ o Bit less agresive to gcc optimizer..no more compiler crashes..
+ I hope
+ UI Changes:
+ o <- and -> stops calculation
+ o driver changing disabled when just one driver available
+ o status line
+ o minnor cleanups
+ Plan 9 changes:
+ o mkfile by Scott Schwartz
+ o correct timming. Thanks to Niger Roles and others on 9fans list
+ MS-DOS Changes:
+ o hiddes mouse at resizes - do not cause crashes anymore
+ X11 Changes:
+ o private colormap support
+ o Fixed freed memory accessing bug..
+ o added switches:
+ -private
+ -usedefault
+ -nomitshm
+ o improved autodetection of best available visual-if defaultvisual!=pseudocolor
+ try truecolor first..do not use truecolor visuals on pseudocolor displays(look
+ ugly)
+ also supports 8bpptruecolor, staticcolor and grayscale(untested)
+ o Fixed bug in changing number of entries that caused problems on SGI
+-------------------------------------------------------------------------------
+Version 2.0
+ o Configure script.
+ o Added biomorph outcoloring mode
+ o Compiles now with -O2 - no -O3 required..
+ but kept -O6 for invoking pgcc optimizations
+ o Many changes to make binary file smaller...consts, static, no
+ inlines and so on..
+ about 10KB from full XaoS saved..
+ o Long doubles automatically disabled on SunOs
+ o added new curses based interface. Have you ever seen realtime
+ 256 color fractal zoomer with text based output? :)
+ o Now just one compact binary for all available drivers
+ o Faster startup..(three times)
+ o Compiles w/o many warnings(except these in libraries and
+ implicit definitions) with -ansi -pedantic -traditional -Wall
+ o Autopilot not detects "oscillating" and too deep zoom so it can work
+ to infinity...can run as demo w/o any user input..
+ also auto detects major changes done by user and reinitializes variables...
+ so it restarts after changing of fractal type and so on..
+ o many many new bugs!
+ But remember! Its not bug! Its feature!
+ Ugly interface changes:
+ o Completely redesigned-hardware depended parts are now
+ coded as drivers with common interface-easier adding
+ of new architectures
+ but looks as ugly as in previous releases :)
+ o Added changing of display driver on the fly
+ o Displays calculation status
+ o Possibility of interrupting calculation
+ o Reduced size of output program
+ (for example SVGAlib version from 48 to 37)
+ o speed changing is now with displaying of status..
+ o all ports modified for new interface
+ o better status informations
+ o new keys:
+ '?'/'/' status information
+ 'r' recalculate
+ 'z' interrupt
+ 'v' driver change
+ ' ' Redraw screen(or display current calculation status)
+ o new hyperugly text browser that displays long and interesting
+ help text
+ o Command line options support. Now you may configure XaoS
+ quite well..(turn on autopilot, set iterations etc..)
+ o Changes to make drivers non reentrant
+ SVGAlib prot changes:
+ o Ui_svga is now event handled. It does not stay in wait
+ loop anymore.
+ o Keys are now buffered-no more problems with disabling
+ autopilot
+ o Added command line option:
+ -mode to select graphics mode
+ o Now handles text in xmodes w/o seg. faults
+ o Fixed possible crash after resizing
+ o for compatibility with old SVGAlib keeps old non event handled
+ keyboard interface....but not recommended at all!
+ PLAN9 port changes:
+ o During porting to new ui interface I found nasty bug in displaying.
+ Now plan9 port is IMWHO surprisingly fast. 8c produces quite good code.
+ still crashes in higher resolution and has color problems
+ o added keys [,] for changing iterations and ;,' for speed
+ o Better palette handling
+ MS-DOS port changes:
+ o Keys are now buffered-no more problems with disabling
+ autopilot
+ o Compiled using DJGPP 2.01. So many DJGPP's bugs fixed :)
+ X11 port changes:
+ o Fixed some bugs that caused troubles when memory is not zeroed..
+ o Added support for 16bpp, 24bpp and 32bpp truecolor visuals
+ o Fixed bug that caused possible crashes before freeing images
+ (resizing etc..)
+ o Removed unnecessary INLINEs in xlib.c/xlib.h ..
+ makes binary size bit smaller.
+ Algorithm revisions:
+ o Many areas inside set are not calculated
+ o realloc_t - most often used array is now 32byte aligned..
+ o Better newton calculating code-math now optimized by hand.
+ o Small fixes in symmetry handling code
+ also minor speedups
+ o Mandelbrot calculation rewrote into 386 assembly..
+ less than 5% speedup :((( (gcc guys:good work! :)
+ note that this is only for Intel platforms-xaos is still
+ compatible with non Intel computers :)
+
+ because of out coloring bugs disabled for now..
+ o Completely new reallocing algorithms. Now proved to be
+ optimal
+ but because of ugly looking results returned back to original one
+ current algoritmus is just about 20% slower than hypothetical
+ optimal one..still trying :)
+ o Assembler fast inlined memcpy...also just for 386+
+ o Changed solid guessing method so it is up to 20% more effective
+ in hope that no more mistakes introduced
+ startup speed on 486 was reduced from 6 seconds to 4
+ in fact it seems to make less errors than previous one :)
+ o Small changes in Barnsley code
+ o Minor fixes in symmetry code
+-------------------------------------------------------------------------------
+Version 1.2
+ New features:
+ o New recalculating with non rectangular pixels. (for full screen modes)
+ great for modes X :)
+ o New palette with white background
+ o Added coprocessor configuration into MS-DOS port - some coloring
+ modes are MUCH faster because of no more SIGFPE ignoring..
+ o Added support for 1280x1024 and 1600x1200 into MS-DOS port
+ o Default type changed back to double because long double is
+ non standard
+ o 9x15 font changed to more compatible and better looking fixed.
+ o First release of plan9 port (very interesting OS see
+ http://plan9.att.com..trial version if free)-not
+ complete yet..colors looks ugly and keys like
+ arrows does not work..
+
+ someone who can help me?
+
+ o Added key defines for old SVGAlib compatibility.
+
+ Fixes:
+ o Fixed bug that caused problems on dos configuration with
+ lot of free memory :)
+ o Fixed symmetry handling in binary decomposition+lambda planes
+ o fixed some bugs that caused core dumps on non Intel
+ architectures
+ o Floating point exception is now ignored-no more
+ problems with random overflowing...(but great slowdown
+ in cases that caused sigfpe)
+ o lots of cleanups for plan9 cc.
+ o Width of font is autodetected. fixed problems with
+ non-standard X servers
+ o Avoided pgcc bug that caused wrong calculating of octo fractal
+ o Fixed color inside set(not fixed 0)
+ o Fixed color handling in X11
+-------------------------------------------------------------------------------
+Version 1.1
+ o Removed unusable fixedpoint routines(386 users - go back to 1.0!)
+ o New planes (toggled by pressing "i")
+ - mu (normal complex plane)
+ - 1/mu (inversed)
+ - 1/(mu+0.25)
+ - lambda
+ - 1/lambda
+ - 1/(lambda-1)
+ - 1/(mu-1.40115)
+ o Symmetry code completely redesigned
+ o Added "m" into help
+ o Better approximation algorithm in "mkrealloctable";
+ now it is about twice faster with a small zooming step
+ o Approximation in approximation for yet better..also twice faster
+ o Lots of cleanups
+ o port for MS-DOG called chappi
+ o Default palette is now same at all architectures
+ o Some memory overflowing fixes(oops)
+ o Fixed some divisions by zero
+ o Number_t clean-allows deeper zoom for long doubles
+-------------------------------------------------------------------------------
+Version 1.0
+ o First Release
+-------------------------------------------------------------------------------
+
+::::::::::::::
+ChangeLog.c
+::::::::::::::
+o New text.c Support for text output primitives
+o New wstack.c - support for simple windows
+o New playtext.c for displaying messages
+o font moved from os2 drivers to ui.
+ takk: please fix this in your driver)
+o Image now allows to define few color cells for UI,
+ wich are allocated at the begining of palette
+o Updated all drivers to support new preallocating
+ (palette handling functions needs to know palette now)
+o Removed curses driver (aa driver will need some
+ hacking for new text output stuff in order to make it useable,
+ and I don 't want to make such dirty hacks twice.
+ Also curses driver had quite old rendering code and
+ some functions was broken)
+o New message and error handling code in ui library
+o Changes text displaying / saving code
+o Clear screen is now handled in ui_helper instead of uinew
+o Changed ministatus / status code to use new windowing and
+ text primitives
+o Dialog can now be generated by called function.
+ Useful for setting default values
+::::::::::::::
+ChangeLog.e
+::::::::::::::
+ o Fixed problems with X driver
+ o Antialiasing filter...
+ o Fixed clipping in wstack.c
+ o ! now activates command prompt
+ o Builddialog now draws...
+ o Antialiasing filter (slow, but should be nice for rendering
+ animations/saving images)
+ o Aded short name description into structure
+ o Quite lot of dialog and menu handling moved from ui code to
+ xmenu code
+ o Added support for calling dialoged functions with just one paramter
+ nicely
+ o Some menu code made universal and moved into ui_helper.c
+ o Save image and tutorial replay calls passfunc
+ o menu library extended to handle hash table of short names
+ o parsing of parameters is now controled by menu library
+ o Lots of play code made generic and moved into ui_helper.c (it is now
+ getting big grrr...)
+ o menuroot is now handled by ui_helper library
+ o Removed plenty of obsolette functions
+ o Dialog code now handles complex number input nicely
+ o Fixed numberous bugs
+ o Checked tutorials and fixed forgoten stuff
+::::::::::::::
+ChangeLog.f
+::::::::::::::
+ o Image library now backstores just windows, where it is necesary
+ (the detection is quite silly, but IMO works in most cases)
+ o New help system :))
+ o Added command line options for selecting window id and printing menu
+ specification (should be possibly usefull for tcl/tk or possibly other
+ separate GUIs)
+ o First version of Tcl/Tk interface by Charles Vidal
+ o Some additions into help file and fixes in xshl library
+::::::::::::::
+ChangeLog.g
+::::::::::::::
+ o New fileselector
+ o Better motion blur handling
+ o Lots of updates into tutorials, first chapter split into Mandlebrot and
+ Julia chapters
+ o new fileselector widget
+::::::::::::::
+ChangeLog.h
+::::::::::::::
+o Line drawing functions - not very fast,
+ but performs antialiasing etc.
+o Enabled forgotten optimizations for bpp == 1
+o Better I / B / P frame decision algorithm
+ (now seems to give quite good results)
+o Motion vector guessing ...
+o Fixed some bugs in antialiasing, vertical /
+ horizontal line drawing and such
+o Some new options for rendering
+o Document how to generate seqences for MPEG encoding
+o Fixed command flags - now works commands as loadpos
+::::::::::::::
+ChangeLog.i
+::::::::::::::
+ o slowmode wich disables some optimizations that causes quality loss (used
+ for rendering)
+ o Fixed some bugs in subwindow filter
+ o Set of hacks for AAlib driver
+ o Updated AAlib driver.
+ o New tutorial "math behing fractals"
+ o first chapter of tutorial "an introduction to fractals" has been split
+ into the introduction part and part about the Mandelbrot set
+ o Added some other fractal examples into first chapter
+::::::::::::::
+ChangeLog.j
+::::::::::::::
+ o Updated DOS driver
+ o Extended the new tutorial
+ o Some fixes...
+ o Fixed color cycling code
+ o Behave better when interrupted in boundary trace or interruptible
+ caluclation
+ o Bitmap output routines
+ o Fixed bug in parameter parsing...
+::::::::::::::
+ChangeLog.k
+::::::::::::::
+ o Some fixies for the 64bit architectures (we have new ultra-30 and SGI
+ octane at school - I wish to have one...hmmmm)
+ o Cleanded code a bit in order to avoid those tons of warings at SGI
+ compilers
+ o Changed image detection heruistics in X driver
+ o Engine now handles different truecolors than just few choosed ones...
+ now UI layer needs to support this
+ o New visual detection in the X driver
+ o Another try to implement -windowid option
+ o Fixed some bugs in new interrupt in uninterruptible calculation code
+ o Fixed crash in scheme parser
+ o Better truecolor handing
+ o Take care for the endianity of images
+ o Saving of text color
+::::::::::::::
+ChangeLog.l
+::::::::::::::
+ o GGI driver
+ o Cleanups into driver's API
+ o Improved handling of checkboxed dialoged functions...
+ o Fixed some bugs in menu printing and syntax a bit
+ (sorry Rodo...:)
+ now it prints radio/checkbox
+ in radio/checkbox it print on/off flag too
+ o Short names of incolorings and such..
+ o New print_menu and print_dialog commands
+ o Fixes for plan9...
+ o better waitcursor handling...
+::::::::::::::
+ChangeLog.m
+::::::::::::::
+ o Fixes
+ o Updates to the documentatio:
+ o Another change to the print_menus format - menu header is now printed in
+ the reversed order and keyword is in quotes. Just to keep same syntax as used
+ by other parts.
+ o Documentation split into Hacker's and user's guide. They are now separate
+ manuals, so we don't need to distribute hacker's documentation in the binarry
+ distributions and save some disc space. Also users don't need to print this.
+ o Automatical conversion script to convert xaos.hlp into chapters in texinfo
+ manual.
+ o Keys are now case-sensitive
+ o Menu rotation improvements
+ o Fixes in menu handling
+ o Another handling of 'z' key
+::::::::::::::
+ChangeLog.n
+::::::::::::::
+ o Some cleanups and type checking...
+ o First patches for Win32 support
+ o Small changes in plane handling
+ o Many extensions to documentation
+::::::::::::::
+ChangeLog.q
+::::::::::::::
+ o fixed 24 bit mode
+ o some minor bug fixes
+ o Win32 driver
+ o Changes to configure script and timer code for CygWin32
+ o Changes to xio library to support backslash path conventions
+ o fixed button pressing code
+::::::::::::::
+ChangeLog.r
+::::::::::::::
+ o Fix SMP thinkos
+ o XaoS now works on plan9 again..
+ o Fixed bug in docalc.c - julia code now works in truecolor modes
+ o Fixed Win32 resizing bug
+ o Workaround Win32 stat() bug (fix file selector problems)
+ o ui_win32 driver redesigned and split into win32 driver and directX driver
+ o DirectX DLLs are loaded at runtime, so they are not required for XaoS
+ o resizing works
+ o resolution selection dialog
+ o Fixed SVGAlib driver lockup
+ o handle "help file not found" correctly
+ o New xerror library for signaling fatal error (should be redirected
+ to messageboxes now)
+ o Updated GGI driver, added support for changing visuals...
+ o Add Win32 releated docs
+ o Fix in filesel dialog
+ o Fixed waitfunc timming
+ o uih/c cleanups in ui_helper.c. ui_helper is now re-entrant
+ o dialog for rendering functions to allow users of GUI centric systems do
+ rendering.
+::::::::::::::
+ChangeLog.t
+::::::::::::::
+ o Fix aspect ratios in win32 driver
+ o Get exact screen sizes in win32 driver
+ o Fix crash in subwindow filter
+ o Itersmall driver works in 24bpp too.
+ o Documentation for gui_driver section.
+ o MAX macro removed or renamed to not conflict
+ with MAX macro defined by some OSes (like BeOS or Windows)
+ o Removed some cut-and-paste-programming artefacts in antialiasing driver
+ o Fixed fixedcolor -> bitmap switch bug.
+ o Added separators to menus
+ o Fixed another fixedcolor switch bug
+ o BeOS changes:
+ o Added new version of Jens's driver
+ o Updated autoconf files to support BeOS
+ o Quit and changing of driver works now. So I can start thinking about
+ the DirectWindow driver.
+ o Added support for BeOS to configure script
+ o Fixed Jens's BeOS port to work on Intel
+ o better resizing
+ o Added status line to Be GUI
+ o Support 15bpp, 16bpp and all the other weird modes.
+ o Added "about" to file menu
+ o Fullscreen mode support
+ o DirectWindow mode support
+ o DirectScreen mode support
+::::::::::::::
+ChangeLog.u
+::::::::::::::
+ o BeOS driver:
+ changed image/xpf to image/x-xpf and xaf respectively
+ fixed random crashes
+ fixed memory leak in exit
+ avoid race condition in FileElement class
+ print fatal messages in nice dialogs
+ be verbose when dialog resources are not available
+ updated mouse tracking for R4
+ cut & paste support
+ translator support
+ o Fixed some SMP support stuff
+ o XIO layer extended to handle generic streams (write/read strings etc..)
+ o Allow save inside record
+::::::::::::::
+ChangeLog.v
+::::::::::::::
+ * Shut up c++ compiler warnings and errors
+ * Added undo/redo mechanizm
+ * Free _ALL_ memory before exit. This help to debug memory leaks. Also BeOS
+ shared libraries prabably don't free it automagically.
+ * Windows:
+ * cut&paste support
+ * fixed some dX releated stuff
+ * support for separators
+ * plastic border around the fractal
+ * BeOS:
+ * Fix some BeOS translator releated stuff
+ * Support for multiple file drops
+ * Fix colormap functions in fullscreen driver
+ * Use correct (BeOSish) way to exit
+ * Don't exit on fatal errors in translator
+ * Cleanup everything once translator is done
+ * Don't let user to enter incorect image sizes in translator
+ configuration
+ * Fixed replay algorithms
+ * Small speedups in interruptible calculation mode
+::::::::::::::
+ChangeLog.w
+::::::::::::::
+ * Cleanup code around catalog loading (Win95 port seems to crash there)
+ * Process events before entering main loop to let driver report the correct
+ size by resize event.
+ * Reordered uninterruptible calculation to allow better guessing
+ * Guess a lot more pixels
+ (zooming is now visibly faster, hope still accurate enought)
+ * Fixes in __fabsl code
+ * Small fixes and improvements in tutorials
+::::::::::::::
+ChangeLog.x
+::::::::::::::
+ * BeOS driver:
+ * Fixed RadioMode in menu handling
+ * First code for media addons, still broken
+ * Fixed nasty memory leak in menu handling.
+ * Windows driver:
+ * fixed combobox displaying
+ * about dialog
+ * cleanups in directX code
+ * hide fullscreen directX window before displaying messagebox
+ * tolower file extensions
+ * fixed redrawing bugs in filter system.
+ * some C++ releated cleanups
+ * new __math.h from glibc2.1 with better inlines
+ * improved sstring.h to handle missaligned memcpy corectly.
+ * improvements in gccbuild
+ * added smoothmorph command
+ * fixed filter bug
+ * fixed memory leak in timerlib
+ * improved some tutorials
+::::::::::::::
+ChangeLog.y
+::::::::::::::
+ o New assembly loop for moveoldpoints
+ o Moveoldpoints rewrite to match more closely current situation in XaoS
+ o The fill passes unified to one and made approx twice as fast
+ (cache misses are greatly reduced)
+ o DOS port updated
+ o DGA driver
+ o IL1 font needed for spanish catalogs (whats about unicode and proportional
+ fonts?)
+ o Spanish catalogs
+ o Lots of CONST keywords added around all sources.
+ o Some missing "static" keywords added.
diff --git a/Doxyfile b/Doxyfile
new file mode 100644
index 0000000..0426020
--- /dev/null
+++ b/Doxyfile
@@ -0,0 +1,1356 @@
+# Doxyfile 1.5.5
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+# TAG = value [value, ...]
+# For lists items can also be appended using:
+# TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file
+# that follow. The default is UTF-8 which is also the encoding used for all
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the
+# iconv built into libc) for the transcoding. See
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING = UTF-8
+
+# The PROJECT_NAME tag is a single word (or a sequence of words surrounded
+# by quotes) that should identify the project.
+
+PROJECT_NAME =
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number.
+# This could be handy for archiving the generated documentation or
+# if some version control system is used.
+
+PROJECT_NUMBER =
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute)
+# base path where the generated documentation will be put.
+# If a relative path is entered, it will be relative to the location
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY =
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create
+# 4096 sub-directories (in 2 levels) under the output directory of each output
+# format and will distribute the generated files over these directories.
+# Enabling this option can be useful when feeding doxygen a huge amount of
+# source files, where putting all generated files in the same directory would
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all
+# documentation generated by doxygen is written. Doxygen will use this
+# information to generate all constant output in the proper language.
+# The default language is English, other supported languages are:
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional,
+# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek,
+# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages),
+# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish,
+# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish,
+# and Ukrainian.
+
+OUTPUT_LANGUAGE = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will
+# include brief member descriptions after the members that are listed in
+# the file and class documentation (similar to JavaDoc).
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend
+# the brief description of a member or function before the detailed description.
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator
+# that is used to form the text in various listings. Each string
+# in this list, if found as the leading text of the brief description, will be
+# stripped from the text and the result after processing the whole list, is
+# used as the annotated text. Otherwise, the brief description is used as-is.
+# If left blank, the following values are used ("$name" is automatically
+# replaced with the name of the entity): "The $name class" "The $name widget"
+# "The $name file" "is" "provides" "specifies" "contains"
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF =
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then
+# Doxygen will generate a detailed section even if there is only a brief
+# description.
+
+ALWAYS_DETAILED_SEC = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all
+# inherited members of a class in the documentation of that class as if those
+# members were ordinary class members. Constructors, destructors and assignment
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full
+# path before files name in the file list and in the header files. If set
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag
+# can be used to strip a user-defined part of the path. Stripping is
+# only done if one of the specified strings matches the left-hand part of
+# the path. The tag can be used to show relative paths in the file list.
+# If left blank the directory from which doxygen is run is used as the
+# path to strip.
+
+STRIP_FROM_PATH =
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of
+# the path mentioned in the documentation of a class, which tells
+# the reader which header file to include in order to use a class.
+# If left blank only the name of the header file containing the class
+# definition is used. Otherwise one should specify the include paths that
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH =
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter
+# (but less readable) file names. This can be useful is your file systems
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen
+# will interpret the first line (until the first dot) of a JavaDoc-style
+# comment as the brief description. If set to NO, the JavaDoc
+# comments will behave just like regular Qt-style comments
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will
+# interpret the first line (until the first dot) of a Qt-style
+# comment as the brief description. If set to NO, the comments
+# will behave just like regular Qt-style comments (thus requiring
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen
+# treat a multi-line C++ special comment block (i.e. a block of //! or ///
+# comments) as a brief description. This used to be the default behaviour.
+# The new default is to treat a multi-line C++ comment block as a detailed
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the DETAILS_AT_TOP tag is set to YES then Doxygen
+# will output the detailed description near the top, like JavaDoc.
+# If set to NO, the detailed description appears after the member
+# documentation.
+
+DETAILS_AT_TOP = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented
+# member inherits the documentation from any documented member that it
+# re-implements.
+
+INHERIT_DOCS = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce
+# a new page for each member. If set to NO, the documentation of a member will
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab.
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE = 8
+
+# This tag can be used to specify a number of aliases that acts
+# as commands in the documentation. An alias has the form "name=value".
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to
+# put the command \sideeffect (or @sideeffect) in the documentation, which
+# will result in a user-defined paragraph with heading "Side Effects:".
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES =
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C
+# sources only. Doxygen will then generate output that is more tailored for C.
+# For instance, some of the names that are used will be different. The list
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C = YES
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java
+# sources only. Doxygen will then generate output that is more tailored for
+# Java. For instance, namespaces will be presented as packages, qualified
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran
+# sources only. Doxygen will then generate output that is more tailored for
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL
+# sources. Doxygen will then generate output that is tailored for
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL = NO
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want
+# to include (a tag file for) the STL sources as input, then you should
+# set this tag to YES in order to let doxygen match functions declarations and
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s.
+# func(std::string) {}). This also make the inheritance and collaboration
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to
+# enable parsing support.
+
+CPP_CLI_SUPPORT = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only.
+# Doxygen will parse them like normal C++ but will assume all classes use public
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT = NO
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
+# tag is set to YES, then doxygen will reuse the documentation of the first
+# member in the group (if any) for the other members of the group. By default
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of
+# the same type (for instance a group of public functions) to be put as a
+# subgroup of that type (e.g. under the Public Functions section). Set it to
+# NO to prevent subgrouping. Alternatively, this can be done per class using
+# the \nosubgrouping command.
+
+SUBGROUPING = YES
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum
+# is documented as struct, union, or enum with the name of the typedef. So
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct
+# with name TypeT. When disabled the typedef will appear as a member of a file,
+# namespace, or class. And the struct will be named TypeS. This can typically
+# be useful for C code in case the coding convention dictates that all compound
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT = NO
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
+# documentation are documented, even if no documentation was available.
+# Private class members and static file members will be hidden unless
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class
+# will be included in the documentation.
+
+EXTRACT_PRIVATE = YES
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file
+# will be included in the documentation.
+
+EXTRACT_STATIC = YES
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs)
+# defined locally in source files will be included in the documentation.
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES = YES
+
+# This flag is only useful for Objective-C code. When set to YES local
+# methods, which are defined in the implementation section but not in
+# the interface are included in the documentation.
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be
+# extracted and appear in the documentation as a namespace called
+# 'anonymous_namespace{file}', where file will be replaced with the base
+# name of the file that contains the anonymous namespace. By default
+# anonymous namespace are hidden.
+
+EXTRACT_ANON_NSPACES = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all
+# undocumented members of documented classes, files or namespaces.
+# If set to NO (the default) these members will be included in the
+# various overviews, but no documentation section is generated.
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all
+# undocumented classes that are normally visible in the class hierarchy.
+# If set to NO (the default) these classes will be included in the various
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all
+# friend (class|struct|union) declarations.
+# If set to NO (the default) these declarations will be included in the
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any
+# documentation blocks found inside the body of a function.
+# If set to NO (the default) these blocks will be appended to the
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS = NO
+
+# The INTERNAL_DOCS tag determines if documentation
+# that is typed after a \internal command is included. If the tag is set
+# to NO (the default) then the documentation will be excluded.
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate
+# file names in lower-case letters. If set to YES upper-case letters are also
+# allowed. This is useful if you have classes or files whose names only differ
+# in case and if your file system supports case sensitive file names. Windows
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES = YES
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen
+# will show members with their full class and namespace scopes in the
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen
+# will put a list of the files that are included by a file in the documentation
+# of that file.
+
+SHOW_INCLUDE_FILES = YES
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline]
+# is inserted in the documentation for inline members.
+
+INLINE_INFO = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen
+# will sort the (detailed) documentation of file and class members
+# alphabetically by member name. If set to NO the members will appear in
+# declaration order.
+
+SORT_MEMBER_DOCS = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the
+# brief documentation of file, namespace and class members alphabetically
+# by member name. If set to NO (the default) the members will appear in
+# declaration order.
+
+SORT_BRIEF_DOCS = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the
+# hierarchy of group names into alphabetical order. If set to NO (the default)
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be
+# sorted by fully-qualified names, including namespaces. If set to
+# NO (the default), the class list will be sorted only by class name,
+# not including the namespace part.
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES.
+# Note: This option applies only to the class list, not to the
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or
+# disable (NO) the todo list. This list is created by putting \todo
+# commands in the documentation.
+
+GENERATE_TODOLIST = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or
+# disable (NO) the test list. This list is created by putting \test
+# commands in the documentation.
+
+GENERATE_TESTLIST = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or
+# disable (NO) the bug list. This list is created by putting \bug
+# commands in the documentation.
+
+GENERATE_BUGLIST = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or
+# disable (NO) the deprecated list. This list is created by putting
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS =
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines
+# the initial value of a variable or define consists of for it to appear in
+# the documentation. If the initializer consists of more lines than specified
+# here it will be hidden. Use a value of 0 to hide initializers completely.
+# The appearance of the initializer of individual variables and defines in the
+# documentation can be controlled using \showinitializer or \hideinitializer
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated
+# at the bottom of the documentation of classes and structs. If set to YES the
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES = YES
+
+# If the sources in your project are distributed over multiple directories
+# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy
+# in the documentation. The default is NO.
+
+SHOW_DIRECTORIES = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that
+# doxygen should invoke to get the current version for each file (typically from
+# the version control system). Doxygen will invoke the program by executing (via
+# popen()) the command <command> <input-file>, where <command> is the value of
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file
+# provided by doxygen. Whatever the program writes to standard output
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER =
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are
+# generated by doxygen. Possible values are YES and NO. If left blank
+# NO is used.
+
+WARNINGS = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for
+# potential errors in the documentation, such as not documenting some
+# parameters in a documented function, or documenting parameters that
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR = YES
+
+# This WARN_NO_PARAMDOC option can be abled to get warnings for
+# functions that are documented, but have no documentation for their parameters
+# or return value. If set to NO (the default) doxygen will only warn about
+# wrong or incomplete parameter documentation, but not about the absence of
+# documentation.
+
+WARN_NO_PARAMDOC = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that
+# doxygen can produce. The string should contain the $file, $line, and $text
+# tags, which will be replaced by the file and line number from which the
+# warning originated and the warning text. Optionally the format may contain
+# $version, which will be replaced by the version of the file (if it could
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning
+# and error messages should be written. If left blank the output is written
+# to stderr.
+
+WARN_LOGFILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain
+# documented source files. You may enter file names like "myfile.cpp" or
+# directories like "/usr/src/myproject". Separate the files or directories
+# with spaces.
+
+INPUT = src
+
+# This tag can be used to specify the character encoding of the source files
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is
+# also the default input encoding. Doxygen uses libiconv (or the iconv built
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for
+# the list of possible encodings.
+
+INPUT_ENCODING = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank the following patterns are tested:
+# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx
+# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90
+
+FILE_PATTERNS =
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories
+# should be searched for input files as well. Possible values are YES and NO.
+# If left blank NO is used.
+
+RECURSIVE = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should
+# excluded from the INPUT source files. This way you can easily exclude a
+# subdirectory from a directory tree whose root is specified with the INPUT tag.
+
+EXCLUDE = aconfig.h
+
+# The EXCLUDE_SYMLINKS tag can be used select whether or not files or
+# directories that are symbolic links (a Unix filesystem feature) are excluded
+# from the input.
+
+EXCLUDE_SYMLINKS = NO
+
+# If the value of the INPUT tag contains directories, you can use the
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude
+# certain files from those directories. Note that the wildcards are matched
+# against the file with absolute path, so to exclude all test directories
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS =
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
+# (namespaces, classes, functions, etc.) that should be excluded from the
+# output. The symbol name can be a fully qualified name, a word, or if the
+# wildcard * is used, a substring. Examples: ANamespace, AClass,
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS =
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or
+# directories that contain example code fragments that are included (see
+# the \include command).
+
+EXAMPLE_PATH =
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp
+# and *.h) to filter out the source-files in the directories. If left
+# blank all files are included.
+
+EXAMPLE_PATTERNS =
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be
+# searched for input files to be used with the \include or \dontinclude
+# commands irrespective of the value of the RECURSIVE tag.
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or
+# directories that contain image that are included in the documentation (see
+# the \image command).
+
+IMAGE_PATH =
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should
+# invoke to filter for each input file. Doxygen will invoke the filter program
+# by executing (via popen()) the command <filter> <input-file>, where <filter>
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an
+# input file. Doxygen will then use the output that the filter program writes
+# to standard output. If FILTER_PATTERNS is specified, this tag will be
+# ignored.
+
+INPUT_FILTER =
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern
+# basis. Doxygen will compare the file name with each pattern and apply the
+# filter if there is a match. The filters are a list of the form:
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further
+# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER
+# is applied to all files.
+
+FILTER_PATTERNS =
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using
+# INPUT_FILTER) will be used to filter the input files when producing source
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will
+# be generated. Documented entities will be cross-referenced with these sources.
+# Note: To get rid of all source code in the generated output, make sure also
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER = NO
+
+# Setting the INLINE_SOURCES tag to YES will include the body
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct
+# doxygen to hide any special comment blocks from generated source code
+# fragments. Normal C and C++ comments will always remain visible.
+
+STRIP_CODE_COMMENTS = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES (the default)
+# then for each documented function all documented
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES (the default)
+# then for each documented function all documented entities
+# called/used by that function will be listed.
+
+REFERENCES_RELATION = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default)
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will
+# link to the source code. Otherwise they will link to the documentstion.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code
+# will point to the HTML generated by the htags(1) tool instead of doxygen
+# built-in source browser. The htags tool is part of GNU's global source
+# tagging system (see http://www.gnu.org/software/global/global.html). You
+# will need version 4.8.6 or higher.
+
+USE_HTAGS = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen
+# will generate a verbatim copy of the header file for each class for
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index
+# of all compounds will be generated. Enable this if the project
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX = NO
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX = 5
+
+# In case all classes in a project start with a common prefix, all
+# classes will be put under the same header in the alphabetical index.
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX =
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will
+# generate HTML output.
+
+GENERATE_HTML = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard header.
+
+HTML_HEADER =
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for
+# each generated HTML page. If it is left blank doxygen will generate a
+# standard footer.
+
+HTML_FOOTER =
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading
+# style sheet that is used by each HTML page. It can be used to
+# fine-tune the look of the HTML output. If the tag is left blank doxygen
+# will generate a default style sheet. Note that doxygen will try to copy
+# the style sheet file to the HTML output directory, so don't put your own
+# stylesheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET =
+
+# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes,
+# files or namespaces will be aligned in HTML using tables. If set to
+# NO a bullet list will be used.
+
+HTML_ALIGN_MEMBERS = YES
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files
+# will be generated that can be used as input for tools like the
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm)
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP = NO
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files
+# will be generated that can be used as input for Apple's Xcode 3
+# integrated development environment, introduced with OSX 10.5 (Leopard).
+# To create a documentation set, doxygen will generate a Makefile in the
+# HTML output directory. Running make will produce the docset in that
+# directory and running "make install" will install the docset in
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find
+# it at startup.
+
+GENERATE_DOCSET = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the
+# feed. A documentation feed provides an umbrella under which multiple
+# documentation sets from a single provider (such as a company or product suite)
+# can be grouped.
+
+DOCSET_FEEDNAME = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that
+# should uniquely identify the documentation set bundle. This should be a
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID = org.doxygen.Project
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML
+# documentation will contain sections that can be hidden and shown after the
+# page has loaded. For this to work a browser that supports
+# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox
+# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari).
+
+HTML_DYNAMIC_SECTIONS = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can
+# be used to specify the file name of the resulting .chm file. You
+# can add a path in front of the file if the result should not be
+# written to the html output directory.
+
+CHM_FILE =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can
+# be used to specify the location (absolute path including file name) of
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION =
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag
+# controls if a separate .chi index file is generated (YES) or that
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag
+# controls whether a binary table of contents is generated (YES) or a
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND = NO
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index at
+# top of each HTML page. The value NO (the default) enables the index and
+# the value YES disables it.
+
+DISABLE_INDEX = NO
+
+# This tag can be used to set the number of enum values (range [1..20])
+# that doxygen will group on one line in the generated HTML documentation.
+
+ENUM_VALUES_PER_LINE = 4
+
+# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be
+# generated containing a tree-like index structure (just like the one that
+# is generated for HTML Help). For this to work a browser that supports
+# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+,
+# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are
+# probably better off using the HTML help feature.
+
+GENERATE_TREEVIEW = NO
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be
+# used to set the initial width (in pixels) of the frame in which the tree
+# is shown.
+
+TREEVIEW_WIDTH = 250
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will
+# generate Latex output.
+
+GENERATE_LATEX = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be
+# invoked. If left blank `latex' will be used as the default command name.
+
+LATEX_CMD_NAME = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to
+# generate index for LaTeX. If left blank `makeindex' will be used as the
+# default command name.
+
+MAKEINDEX_CMD_NAME = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact
+# LaTeX documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_LATEX = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used
+# by the printer. Possible values are: a4, a4wide, letter, legal and
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE = a4wide
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES =
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for
+# the generated latex document. The header should contain everything until
+# the first chapter. If it is left blank doxygen will generate a
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER =
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will
+# contain links (just like the HTML output) instead of page references
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of
+# plain latex in the generated Makefile. Set this option to YES to get a
+# higher quality PDF documentation.
+
+USE_PDFLATEX = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode.
+# command to the generated LaTeX files. This will instruct LaTeX to keep
+# running if errors occur, instead of asking the user for help.
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not
+# include the index chapters (such as File Index, Compound Index, etc.)
+# in the output.
+
+LATEX_HIDE_INDICES = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output
+# The RTF output is optimized for Word 97 and may not look very pretty with
+# other RTF readers or editors.
+
+GENERATE_RTF = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact
+# RTF documents. This may be useful for small projects and may help to
+# save some trees in general.
+
+COMPACT_RTF = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated
+# will contain hyperlink fields. The RTF file will
+# contain links (just like the HTML output) instead of page references.
+# This makes the output suitable for online browsing using WORD or other
+# programs which support those fields.
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS = NO
+
+# Load stylesheet definitions from file. Syntax is similar to doxygen's
+# config file, i.e. a series of assignments. You only have to provide
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE =
+
+# Set optional variables used in the generation of an rtf document.
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE =
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will
+# generate man pages
+
+GENERATE_MAN = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT = man
+
+# The MAN_EXTENSION tag determines the extension that is added to
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output,
+# then it will generate one additional man file for each entity
+# documented in the real man page(s). These additional files
+# only source the real man page, but without them the man command
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will
+# generate an XML file that captures the structure of
+# the code including all documentation.
+
+GENERATE_XML = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put.
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_SCHEMA =
+
+# The XML_DTD tag can be used to specify an XML DTD,
+# which can be used by a validating XML parser to check the
+# syntax of the XML files.
+
+XML_DTD =
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will
+# dump the program listings (including syntax highlighting
+# and cross-referencing information) to the XML output. Note that
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will
+# generate an AutoGen Definitions (see autogen.sf.net) file
+# that captures the structure of the code including all
+# documentation. Note that this feature is still experimental
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will
+# generate a Perl module file that captures the structure of
+# the code including all documentation. Note that this
+# feature is still experimental and incomplete at the
+# moment.
+
+GENERATE_PERLMOD = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be
+# nicely formatted so it can be parsed by a human reader. This is useful
+# if you want to understand what is going on. On the other hand, if this
+# tag is set to NO the size of the Perl module output will be much smaller
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY = YES
+
+# The names of the make variables in the generated doxyrules.make file
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX.
+# This is useful so different doxyrules.make files included by the same
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX =
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will
+# evaluate all C-preprocessor directives found in the sources and include
+# files.
+
+ENABLE_PREPROCESSING = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro
+# names in the source code. If set to NO (the default) only conditional
+# compilation will be performed. Macro expansion can be done in a controlled
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES
+# then the macro expansion is limited to the macros specified with the
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files
+# in the INCLUDE_PATH (see below) will be search if a #include is found.
+
+SEARCH_INCLUDES = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that
+# contain include files that are not input files but should be processed by
+# the preprocessor.
+
+INCLUDE_PATH =
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
+# patterns (like *.h and *.hpp) to filter out the header-files in the
+# directories. If left blank, the patterns specified with FILE_PATTERNS will
+# be used.
+
+INCLUDE_FILE_PATTERNS =
+
+# The PREDEFINED tag can be used to specify one or more macro names that
+# are defined before the preprocessor is started (similar to the -D option of
+# gcc). The argument of the tag is a list of macros of the form: name
+# or name=definition (no spaces). If the definition and the = are
+# omitted =1 is assumed. To prevent a macro definition from being
+# undefined via #undef or recursively expanded use the := operator
+# instead of the = operator.
+
+PREDEFINED = USE_PNG USE_PTHREAD GTK_DRIVER X11_DRIVER WIN32_DRIVER DDRAW_DRIVER SFFE_USING SFFE_CMPLX_GSL SFFE_CMPLX_ASM
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then
+# this tag can be used to specify a list of macro names that should be expanded.
+# The macro definition that is found in the sources will be used.
+# Use the PREDEFINED tag if you want to use a different macro definition.
+
+EXPAND_AS_DEFINED =
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then
+# doxygen's preprocessor will remove all function-like macros that are alone
+# on a line, have an all uppercase name, and do not end with a semicolon. Such
+# function macros are typically used for boiler-plate code, and will confuse
+# the parser if not removed.
+
+SKIP_FUNCTION_MACROS = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles.
+# Optionally an initial location of the external documentation
+# can be added for each tagfile. The format of a tag file without
+# this location is as follows:
+# TAGFILES = file1 file2 ...
+# Adding location for the tag files is done as follows:
+# TAGFILES = file1=loc1 "file2 = loc2" ...
+# where "loc1" and "loc2" can be relative or absolute paths or
+# URLs. If a location is present for each tag, the installdox tool
+# does not have to be run to correct the links.
+# Note that each tag file must have a unique name
+# (where the name does NOT include the path)
+# If a tag file is not located in the directory in which doxygen
+# is run, you must also specify the path to the tagfile here.
+
+TAGFILES =
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE =
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed
+# in the class index. If set to NO only the inherited external classes
+# will be listed.
+
+ALLEXTERNALS = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed
+# in the modules index. If set to NO, only the current project's groups will
+# be listed.
+
+EXTERNAL_GROUPS = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base
+# or super classes. Setting the tag to NO turns the diagrams off. Note that
+# this option is superseded by the HAVE_DOT option below. This is only a
+# fallback. It is recommended to install and use dot, since it yields more
+# powerful graphs.
+
+CLASS_DIAGRAMS = YES
+
+# You can define message sequence charts within doxygen comments using the \msc
+# command. Doxygen will then run the mscgen tool (see
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where
+# the mscgen tool resides. If left empty the tool is assumed to be found in the
+# default search path.
+
+MSCGEN_PATH =
+
+# If set to YES, the inheritance and collaboration graphs will hide
+# inheritance and usage relations if the target is undocumented
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is
+# available from the path. This tool is part of Graphviz, a graph visualization
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT = YES
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect inheritance relations. Setting this tag to YES will force the
+# the CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for each documented class showing the direct and
+# indirect implementation dependencies (inheritance, containment, and
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
+# collaboration diagrams in a style similar to the OMG's Unified Modeling
+# Language.
+
+UML_LOOK = NO
+
+# If set to YES, the inheritance and collaboration graphs will show the
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT
+# tags are set to YES then doxygen will generate a graph for each documented
+# file showing the direct and indirect include dependencies of the file with
+# other documented files.
+
+INCLUDE_GRAPH = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each
+# documented header file showing the documented files that directly or
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then
+# doxygen will generate a call dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable call graphs
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then
+# doxygen will generate a caller dependency graph for every global function
+# or class method. Note that enabling this option will significantly increase
+# the time of a run. So in most cases it will be better to enable caller
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen
+# will graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY = YES
+
+# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES
+# then doxygen will show the dependencies a directory has on other directories
+# in a graphical way. The dependency relations are determined by the #include
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
+# generated by dot. Possible values are png, jpg, or gif
+# If left blank png will be used.
+
+DOT_IMAGE_FORMAT = png
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH =
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that
+# contain dot files that are included in the documentation (see the
+# \dotfile command).
+
+DOTFILE_DIRS =
+
+# The MAX_DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of
+# nodes that will be shown in the graph. If the number of nodes in a graph
+# becomes larger than this value, doxygen will truncate the graph, which is
+# visualized by representing a node as a red box. Note that doxygen if the
+# number of direct children of the root node in a graph is already larger than
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the
+# graphs generated by dot. A depth value of 3 means that only nodes reachable
+# from the root by following a path via at most 3 edges will be shown. Nodes
+# that lay further from the root node will be omitted. Note that setting this
+# option to 1 or 2 may greatly reduce the computation time needed for large
+# code bases. Also note that the size of a graph can be further restricted by
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent
+# background. This is enabled by default, which results in a transparent
+# background. Warning: Depending on the platform used, enabling this option
+# may lead to badly anti-aliased labels on the edges of a graph (i.e. they
+# become hard to read).
+
+DOT_TRANSPARENT = YES
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
+# files in one run (i.e. multiple -o and -T options on the command line). This
+# makes dot run faster, but since only newer versions of dot (>1.8.10)
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will
+# generate a legend page explaining the meaning of the various boxes and
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will
+# remove the intermediate dot files that are used to generate
+# the various graphs.
+
+DOT_CLEANUP = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+
+# The SEARCHENGINE tag specifies whether or not a search engine should be
+# used. If set to NO the values of all tags below this one will be ignored.
+
+SEARCHENGINE = NO
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..cee8180
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,339 @@
+HOW TO COMPILE AND INSTALL XAOS
+===============================
+
+NOTE: This is the source code package for XaoS. You cannot use XaoS from
+this package until you compile it. For end users, we recommend using a
+pre-built binary instead.
+
+If you would like to install a binary version for Windows or Mac OS X,
+download the appropriate package for your operating system from
+
+ http://xaos.sf.net
+
+For Ubuntu and Debian users, type the following from a shell prompt to
+automatically install XaoS:
+
+ sudo apt-get install xaos
+
+For other GNU/Linux users, refer to your distribution's instructions for
+installing packages from its repositories.
+
+Compilation from source is only necessary if:
+
+ * you are a packager for an operating system distribution,
+ * you want to try new features which are not yet included in the
+ binary packages available for your distribution,
+ * you want to try some changes/enhancements on XaoS source code.
+
+You should be comfortable compiling software and working on a Unix command
+line before attempting these instructions.
+
+
+
+Unix-Like Systems
+=================
+
+Build Requirements
+------------------
+
+XaoS should compile on most modern Unix-like systems. It has been most
+recently tested on Ubuntu 9.04.
+
+The dependencies are broken down by the functionality that requires them. If
+you are not trying to compile an official binary and only want to test or
+develop a certain subset of XaoS's features, you can skip the dependencies
+that are not relevant to those features.
+
+To compile XaoS you need:
+
+ * A modern version of gcc (3.x or higher) from http://gcc.gnu.org/
+ * Other optimizing C compilers may work but have not been tested
+
+To build the X11 UI, you need:
+
+ * Xlib library and headers from http://www.x.org/.
+
+For the GTK UI you need:
+
+ * GTK+ 2.x (tested with 2.16) from http://www.gtk.org/.
+
+XaoS can display fractals as high quality ASCII art. For this, you need:
+
+ * AA-lib 1.4 or higher from http://aa-project.sf.net
+
+To compile XaoS with support for saving images you need:
+
+ * zlib from http://www.zlib.net/
+ * libpng from http://www.libpng.org/pub/png/libpng.html
+
+To use internationalization (i18n) you need:
+
+ * gettext from http://www.gnu.org/software/gettext/
+ * libiconv from http://www.gnu.org/software/libiconv/
+
+To support user-defined formulas, you need ONE of the following:
+
+ * nasm from http://www.nasm.us/
+ * gsl from http://www.gnu.org/software/gsl/
+
+ NOTE: Nasm will only work on x86 architectures, but GSL should work on any
+ modern platform.
+
+These dependencies may be available pre-compiled through your operating
+system's package repository. See your operating system's documentation for
+more details.
+
+NOTE: Many GNU/Linux distributions separate the run-time and development
+components of their libraries into different packages. If you install
+these dependencies from your distribution's repository, please make sure to
+install the development packages as well (usually marked -dev or -devel).
+
+Users of Ubuntu and Debian can automatically install all the necessary
+build dependencies from above by typing:
+
+ sudo apt-get build-dep xaos
+
+However, GTK+ is not configured as a build dependency yet, so you will
+need to install it manually by typing:
+
+ sudo apt-get install libgtk2.0-dev
+
+
+Building XaoS
+-------------
+
+To build XaoS, type the following commands from the XaoS source directory:
+
+ ./configure
+ make
+
+XaoS will automatically detect which dependencies you have installed and
+configure itself to support whatever features are available. If you find
+that some feature is missing, please verify that you have installed the
+corresponding dependency (including the developer libraries).
+
+Configure will try to choose the best optimization switches for your
+architecture, but it may not work well for less common ones. You can
+provide optimization flags by specifying them before running configure:
+
+ CFLAGS=(your best optimizing switches)
+ export CFLAGS
+
+You can also customize what optional features to build by passing options
+to the configure script.
+
+To enable experimental SMP support use:
+
+ --with-pthread=yes
+
+To enable the experimental GTK UI, use:
+
+ --with-gtk-driver=yes --with-x11-driver=no
+
+To enable the aa-lib driver, use:
+
+ --with-aa-driver=yes
+
+Run "./configure --help" for a full list of options.
+
+Once you have successfully compiled XaoS, type the following to install it:
+
+ sudo make install
+
+
+For Win32
+=========
+
+Build Requirements
+------------------
+
+XaoS supports Windows XP or later. To compile a fully-featured XaoS binary
+on Windows, you need the following dependencies.
+
+The dependencies are broken down by the functionality that requires them. If
+you are not trying to compile an official binary and only want to test or
+develop a certain subset of XaoS's features, you can skip the dependencies
+that are not relevant to those features.
+
+To compile XaoS, you need:
+
+ * Cygwin from http://www.cygwin.com/
+
+ In addition to the Base packages, the following packages are required:
+
+ autoconf gcc make gettext gettext-devel subversion tidy
+
+ The following packages are are also recommended to make Cygwin nicer to use:
+
+ indent mintty ncurses unzip vim wget
+
+ Any dependencies required by these packages will be automatically selected
+ when you select the package. Do not unselect any of the dependencies that
+ the installer automatically chooses.
+
+ HINT: These packages will be easier to find if you maximize the Cygwin
+ installer and click the View button until you reach "Full" mode to
+ list the packages in alphabetical order.
+
+To build with DirectX support you need:
+
+ * DirectX SDK from http://msdn.microsoft.com/en-us/directx/aa937788.aspx
+
+To build with online help support you need:
+
+ * HTML Help SDK from
+ http://msdn.microsoft.com/en-us/library/ms670169(VS.85).aspx
+
+To compile XaoS with support for saving images you need:
+
+ * zlib binaries from http://gnuwin32.sourceforge.net/packages/zlib.htm
+ * libpng binaries from http://gnuwin32.sourceforge.net/packages/libpng.htm
+
+ Download the installer for each labeled "Complete package, except sources"
+
+To use internationalization (i18n) you need:
+
+ * libiconv binaries from http://gnuwin32.sourceforge.net/packages/libiconv.htm
+ * gettext binaries from http://gnuwin32.sourceforge.net/packages/gettext.htm
+
+ Download the installer for each labeled "Complete package, except sources"
+
+To compile XaoS with smp support you need:
+
+ * Pthreads-w32 from http://sourceware.org/pthreads-win32/
+
+ NOTE: Pthreads-w32 will extract to the current directory by default. The
+ recommended installation path is C:\pthreads-w32.
+
+To build the XaoS installer you need:
+
+ * NSIS from http://nsis.sourceforge.net/
+
+
+Preparation
+-----------
+
+After running the installer for each of the dependencies above, start Cygwin
+from the icon on your desktop or in your start menu. For a nicer shell, start
+MinTTY from the start menu (assuming you installed it). You will be presented
+with a bash command prompt very similar to GNU/Linux or Unix.
+
+Extract the XaoS source files:
+
+ tar xfz XaoS-$VERSION.tar.gz # replace $VERSION with actual version
+
+Or, check out the latest sources from Subversion:
+
+ svn co https://xaos.svn.sourceforge.net/svnroot/xaos/trunk xaos
+
+NOTE: If your Windows username contains spaces, do not extract the sources in
+your home directory. Instead create a directory called, for example, /build
+and extract them there.
+
+The remaining steps should be performed from the root of the XaoS sources.
+
+Add the contents of cygwin_profile from the tools directory to your profile:
+
+ cat tools/cygwin_profile >> $HOME/.bash_profile
+
+Edit the "$HOME/.bash_profile" file and make sure all the *_HOME variables at
+the top point to the correct location where you installed each of the
+dependencies. These variables are necessary so that gcc can find the
+libraries and header files that you installed to various locations on your
+computer. You should not have to modify the second half of the file.
+
+Exit and restart Cygwin so the changes to your .bash_profile will take effect.
+
+
+Building XaoS
+-------------
+
+To build XaoS, type the following commands from the XaoS source root:
+
+ ./configure
+ make
+
+XaoS will automatically detect what dependencies you have installed and
+configure itself to support whatever features are available. If you find
+that some feature is missing, please verify that you have installed the
+corresponding dependency and that the installation location is specified
+correctly in your "$HOME/.bash_profile" file.
+
+To build the windows help file go to the help directory and run the following
+command:
+
+ make chm
+
+To install XaoS to a staging directory, type the following commands:
+
+ export DESTDIR=<installdir>
+ make install-win
+
+where <installdir> should be the absolute path of the folder in which XaoS
+should be installed.
+
+To build the XaoS installer, install XaoS to
+XaoS/src/ui/ui-drv/win32/installer/XaoS. Use NSIS to compile the script XaoS
+Installer.nsi in the directory XaoS/src/ui/ui-drv/win32/installer.
+
+
+Mac OS X
+========
+
+Build Dependencies
+------------------
+
+XaoS runs on Mac OS X 10.4 or later but compilation has only been tested
+recently on 10.5.
+
+Xcode 3.0 or later is required to compile XaoS for Mac OS X. You can find
+it on the Developer Tools disc that came with your computer or download it
+from:
+
+ http://developer.apple.com/mac/
+
+Pre-compiled binaries for additional Mac OS X third-party build dependencies
+can be downloaded from:
+
+ http://downloads.sourceforge.net/sourceforge/xaos/xaos-thirdparty-cocoa-20090714.tar.gz
+
+Exract this file within the src/ui/ui-drv/cocoa/thirdparty directory of your
+XaoS source distribution.
+
+Alternatively, to compile third party dependencies from source, download:
+
+ * libpng from http://www.libpng.org/pub/png/libpng.html
+ * gettext from http://www.gnu.org/software/gettext/
+ * gsl from http://www.gnu.org/software/gsl/
+
+Extract each library and build them using the following commands:
+
+ env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk \
+ -arch i386 -arch ppc -mmacosx-version-min=10.4" \
+ LDFLAGS="-arch i386 -arch ppc" \
+ ./configure --prefix=$XAOS_ROOT/src/ui/ui-drv/cocoa/thirdparty \
+ --disable-dependency-tracking
+
+ make
+ make install
+
+Be sure to replace $XAOS_ROOT with the root of your XaoS folder. This
+will install the libraries and headers in src/ui/ui-drv/cocoa/thirdparty
+where the Xcode project will be able to find them.
+
+For more information about building open source libraries as universal
+binaries see:
+
+ http://developer.apple.com/technotes/tn2005/tn2137.html
+
+
+Building XaoS
+-------------
+
+The Mac OS X version of XaoS is not compiled using the configure scripts in
+the root directory. Instead, use the Xcode project located in:
+
+ src/ui/ui-drv/cocoa/XaoS.xcodeproj
+
+If the libraries were installed properly, you should be able to build XaoS
+from the Xcode project.
diff --git a/Makefile.in b/Makefile.in
new file mode 100644
index 0000000..6af72dc
--- /dev/null
+++ b/Makefile.in
@@ -0,0 +1,88 @@
+# Makefile for XaoS
+#
+# Always use src as the top-level
+prefix= @prefix@
+exec_prefix= @exec_prefix@
+datadir= @datadir@
+bindir= @bindir@
+mandir= @mandir@
+infodir= @infodir@
+
+@SET_MAKE@
+
+default clean realclean echo help depend xaos:
+ @cd src ; $(MAKE) $@
+
+all:
+ @cd src ; $(MAKE) all
+
+distclean:
+ #@$(MAKE) -C src $@
+ @$(MAKE) -C src distclean
+ rm -f libtool config.cache config.status config.log src/include/config.h src/include/aconfig.h
+ rm -f src/Makefile.common src/arch/linux/Makefile.main
+ rm -f `find . -name Makefile`
+ rm -f `find . -name '*~'`
+ rm -f `find . -name '*.d'`
+ rm -f `find . -name '*[\.]orig'`
+ rm -vf `find . -size 0`
+
+install:
+ @INSTALL@ -d $(DESTDIR)$(datadir)/XaoS
+ @INSTALL@ -d $(DESTDIR)$(datadir)/XaoS/tutorial
+ @INSTALL@ -d $(DESTDIR)$(datadir)/XaoS/examples
+ @INSTALL@ -d $(DESTDIR)$(datadir)/XaoS/catalogs
+ @INSTALL@ -d $(DESTDIR)$(datadir)/XaoS/doc
+ @INSTALL@ -d $(DESTDIR)$(datadir)/XaoS/help
+ @INSTALL@ -d $(DESTDIR)$(bindir)
+ @INSTALL@ -d $(DESTDIR)$(mandir)/man6
+ @INSTALL@ -s bin/xaos $(DESTDIR)$(bindir)
+ @INSTALL@ -m 444 tutorial/*.x[ah]f $(DESTDIR)$(datadir)/XaoS/tutorial
+
+ @INSTALL@ -m 444 examples/README $(DESTDIR)$(datadir)/XaoS/examples
+ @INSTALL@ -m 444 examples/Hubicka/*.x[ap]f $(DESTDIR)$(datadir)/XaoS/examples
+ @INSTALL@ -m 444 examples/0rfelyus/*.x[ap]f $(DESTDIR)$(datadir)/XaoS/examples
+ @INSTALL@ -m 444 examples/ZKovacs/*.x[ap]f $(DESTDIR)$(datadir)/XaoS/examples
+ @INSTALL@ -m 444 examples/ZsKovacs/*.x[ap]f $(DESTDIR)$(datadir)/XaoS/examples
+ @INSTALL@ -m 444 examples/Malczak/*.x[ap]f $(DESTDIR)$(datadir)/XaoS/examples
+ @INSTALL@ -m 444 examples/Langston/*.x[ap]f $(DESTDIR)$(datadir)/XaoS/examples
+
+ @INSTALL@ -m 444 catalogs/*.cat catalogs/README $(DESTDIR)$(datadir)/XaoS/catalogs
+ @INSTALL@ -m 444 help/xaos.hlp $(DESTDIR)$(datadir)/XaoS/help
+ @INSTALL@ -m 444 AUTHORS NEWS COPYING TODO INSTALL ChangeLog ChangeLog.old $(DESTDIR)$(datadir)/XaoS/doc
+ @INSTALL@ -m 444 doc/xaos.6 $(DESTDIR)$(mandir)/man6
+ test -z "$(infodir)" || @INSTALL@ -d "$(DESTDIR)$(infodir)"
+ @INSTALL@ -m 444 doc/xaos.info $(DESTDIR)$(infodir)/xaos.info
+ @if (install-info --version) >/dev/null 2>&1; then \
+ echo " install-info --info-dir='$(DESTDIR)$(infodir)' \
+ '$(DESTDIR)$(infodir)/xaos.info'"; \
+ install-info --info-dir="$(DESTDIR)$(infodir)" \
+ "$(DESTDIR)$(infodir)/xaos.info"; \
+ else : ; fi
+
+ if [ "@USE_NLS@" = "yes" ]; then $(MAKE) -C src/i18n/ install; fi
+
+install-win:
+ @INSTALL@ -d $(DESTDIR)/tutorial
+ @INSTALL@ -d $(DESTDIR)/examples
+ @INSTALL@ -d $(DESTDIR)/catalogs
+ @INSTALL@ -d $(DESTDIR)/doc
+ @INSTALL@ -d $(DESTDIR)/help
+ @INSTALL@ -d $(DESTDIR)/bin
+
+ @INSTALL@ tutorial/*.x[ah]f $(DESTDIR)/tutorial
+ @INSTALL@ examples/README $(DESTDIR)/examples
+ @INSTALL@ examples/Hubicka/*.x[ap]f $(DESTDIR)/examples
+ @INSTALL@ examples/0rfelyus/*.x[ap]f $(DESTDIR)/examples
+ @INSTALL@ examples/ZKovacs/*.x[ap]f $(DESTDIR)/examples
+ @INSTALL@ examples/ZsKovacs/*.x[ap]f $(DESTDIR)/examples
+ @INSTALL@ examples/Malczak/*.x[ap]f $(DESTDIR)/examples
+ @INSTALL@ examples/Langston/*.x[ap]f $(DESTDIR)/examples
+ @INSTALL@ catalogs/*.cat catalogs/README $(DESTDIR)/catalogs
+ @INSTALL@ AUTHORS NEWS COPYING TODO INSTALL ChangeLog ChangeLog.old $(DESTDIR)/doc
+ @if test -f "help/xaoshelp.chm"; then \
+ @INSTALL@ help/xaoshelp.chm $(DESTDIR)/help; \
+ fi
+ @INSTALL@ bin/xaos.exe $(DESTDIR)/bin
+
+ if [ "@USE_NLS@" = "yes" ]; then $(MAKE) -C src/i18n/ install-win; fi
diff --git a/NEWS b/NEWS
new file mode 100644
index 0000000..c28f06c
--- /dev/null
+++ b/NEWS
@@ -0,0 +1,453 @@
+RELEASE NOTES FOR XAOS VERSION 3.5
+----------------------------------
+
+Cross-platform changes
+======================
+
+o New Portuguese translation courtesy of Lucio Henrique de Arujo and
+ Zelia Maria Horta Garcia
+
+o Fixed crash bug when using -render command line option with user formulas
+ (Mateusz Malczak)
+
+o Removed support for unmaintained platforms (DOS, BeOS, Plan 9, etc.)
+
+o Updated documentation to reflect infrastructure changes
+ (Discussion and issue tracking have moved to Google Groups and Google Code)
+
+o Additional fractal examples by J.B. Langston
+
+
+Windows-specific changes
+========================
+
+o Improved GUI appearance with modern fonts and controls on XP and Vista
+
+o Help format changed from WinHelp to HtmlHelp. WinHelp was no longer
+ supported starting with Windows Vista and Windows 7.
+
+o Fixed bug where output was invisible when using XaoS from the command line
+
+o Simplified and improved build instructions for Windows developers
+
+
+GTK+ User Interface (Beta)
+==========================
+
+The GTK+ user interface is approaching beta quality. We welcome beta
+testers to try out this version and let us know what issues you encounter.
+Please share your feedback with us on the developer's discussion group at:
+http://groups.google.com/group/xaos-devel.
+
+We ask that beta testers be advanced users who are comfortable compiling
+software from source and submitting useful bug reports including backtraces.
+If you are not comfortable with this, then please wait for the final version
+to be released. We would also really appreciate it if any experienced GTK+
+developers can review our code and make suggestions for improvement.
+
+Since the GTK+ UI is still not ready for everyday use, it will not be
+compiled by default. You must explicitly enable it using the following
+configure switch:
+
+ --with-gtk-driver=yes
+
+In addition, we recommend you disable all other drivers when using the GTK
+driver using the following configure switches:
+
+ --with-x11-driver=no
+
+
+New Documentation Format (Beta)
+===============================
+
+We are in the process of migrating the XaoS help system to Sphinx and
+reStructuredText. Our user manual was previously in a crippled subset
+of HTML that we dubbed XSHL, which was missing many features necessary
+for maintaining modern, attractive documentation.
+
+Sphinx was developed by the Python project for their documentation, and
+it is very similar to a Wiki in the way you mark up the text. It can
+output the results as HTML, PDF, and Windows Help. It supports all the
+important things that are missing from the current help format, such as
+tables, images, and internet hyperlinks. It can even convert LaTeX math
+markup into image files that get included in the HTML output.
+
+The documentation still needs a lot of work before it is ready, and we
+have to make some modifications to Sphinx itself in order to integrate
+the documentation it produces with XaoS's help system. However, it is
+far enough along that we would welcome volunteers who are familar with
+reStructuredText to submit improvements to the documentation.
+
+The new documentation is located in the help/rest directory, and it can
+be converted into HTML or PDF using the included Makefile. In order to
+generate the output, you will need to install Sphinx. Visit the Sphinx
+homepage at http://sphinx.pocoo.org/ for installation instructions and
+more information on the new documentation format.
+
+If you would like to help with the documentation, please contact us on
+the discussion group at: http://groups.google.com/group/xaos-devel.
+We will be happy to help you get started.
+
+
+RELEASE NOTES FOR XAOS VERSION 3.4
+----------------------------------
+
+Cross-platform changes
+======================
+
+o New Italian translation courtesy of Sergio Zanchetta
+
+o Updated catalog and i18n for German by Andreas Madritsch
+
+o Bug fix to prevent garbled characters when using non-English languages
+ on modern systems using UTF-8
+
+o Bug fix to prevent XaoS from crashing after using the Render Animation
+ functionality
+
+o Bug fix to prevent incorrect colors on smooth coloring modes with
+ certain video modes
+
+Mac-specific changes
+====================
+
+This is a huge release for Mac users. The Mac user interface has been
+completely rewritten in Cocoa and improved in a number of ways:
+
+o Standard Aqua dialog boxes instead of the strange-looking Unixy things
+ in previous versions. Fields in dialog boxes now support cut and paste
+ as you would expect.
+
+o Pop-up menus are now displayed using standard Aqua menus
+
+o Menu bar in full-screen mode is now the standard Mac OS X menu bar. It
+ automatically slides into view when you move your mouse to the top of
+ the screen and slides out when you move away from it.
+
+o XaoS now has a standard Aqua about dialog box, which displays links to
+ license and credits in help file.
+
+o Help is now displayed via Mac OS X's standard help viewer. Tutorials
+ can still be launched via links in the help viewer.
+
+o Support for opening xpf (Saved Position) and xaf (Saved Animation)
+ files directly from Finder via drag and drop and by double-clicking.
+ XaoS now includes its own document icon for these files as well.
+
+o Support for basic AppleScriptability via the standard script
+ dictionary. Includes things like opening files and manipulating the
+ window, but no XaoS-specific functionality.
+
+o Support for panning the fractal with the mouse scroll wheel or
+ trackpad two-finger gestures.
+
+In addition to the user interface improvements, XaoS for Mac has the
+following improvements:
+
+o Now uses greater precision (long double) for calculations to enable
+ much deeper zooms.
+
+o In addition to English, XaoS for Mac OS X now supports the following
+ languages: Czech, French, German, Hungarian, Italian, Romanian, and
+ Spanish.
+
+o Integration with Stone Design's Videator (http://stone.com/Videator/).
+ XaoS can now send live a live video stream to Videator, which can then
+ do post-processing using Mac OS X's core video technology. This is
+ great for VJing (live video performance art). See
+ http://stone.com/Videator/VJ.html for more details.
+
+o Edge Detection and Pseudo 3D filters now work correctly. Fixed a
+ bug that previously caused them to render the image completely black.
+
+Experimental GTK+ Port
+======================
+
+An experimental GTK+ user interface has been added in the src/ui/ui-drv/gtk
+directory. Eventually we hope to replace the old X11 interface with this
+one so that XaoS will blend in seamlessly with the GNOME environment.
+
+Right now, this port is incomplete and it should be considered an alpha-
+quality preview. As such, the GTK+ port will not be compiled by default.
+You must explicitly enable it using the following configure switch:
+
+ --with-gtk-driver=yes
+
+In addition, we recommend you disable all other drivers when using the GTK
+driver using the following configure switches:
+
+ --with-x11-driver=no
+ --with-dga-driver=no
+ --with-ggi-driver=no
+ --with-aa-driver=no
+
+Please do not report bugs against the GTK+ driver. We know that it is very
+buggy and we are working to rapidly improve it. If you want to help with the
+GTK+ driver's development, please contact the xaos-devel mailing list first,
+since it is likely that your patches could conflict with the rapid development
+that is taking place on this driver.
+
+RELEASE NOTES FOR XAOS VERSION 3.3
+----------------------------------
+
+This release is mostly done by Mateusz Malczak who implemented user
+formula support for XaoS. This feature has been a huge demand for
+several years and we proudly (humbly?) announce it to the public
+audience now.
+
+Mateusz has been working on the underlying SFFE (SegFault Formula
+Evaluator) library for several months. XaoS-3.3 can be compiled using
+both NASM (Netwide Assembler) or GSL (GNU Scientific Library) for the
+underlying complex arithmetics used by SFFE. For more information about
+the available user functions please read the enclosed documentation
+(see online help, "Other things to read", last entry), or visit
+Mateusz's info page on http://www.segfaultlabs.com/sfXaoS.
+
+User formula support has been tested on Linux, Windows, and Mac OS X
+systems. Recent Ubuntu versions should work without any problems.
+
+You may also notice that internationalization can be broken on modern
+Linux systems. This is due to the use of Unicode (UTF8) by default on
+these operating systems (including Ubuntu 7.x). To solve these
+problems please read Section 6 in src/i18n/README. If you are a packager
+of a Linux distribution, you may consider to add extra codepages for
+standard locales to the dependency list of XaoS (or create a package
+which installs an extra locale if needed).
+
+In addition, this version includes several fixes to the X11 driver
+contributed by Tormod Volden. These improve compatibility with recent
+versions of Xorg (-fullscreen and -root options), XScreenSaver
+(-window-id), and Beryl and Compiz (extreme transparency).
+
+Other improvements include a bug fix for color cycling and a performance
+mode, which inhibits text output when using XaoS for public exhibition
+(VJing). These changes were contributed by Andrew Stone.
+
+Finally, this version includes several build improvements for Mac OS X
+and a bug fix for incorrect colors on Intel Macs when switching from
+fullscreen to windowed mode.
+
+
+RELEASE NOTES FOR XAOS VERSION 3.2.3
+------------------------------------
+
+Romanian translation added. Contributed by Ilinca Sitaru.
+
+
+RELEASE NOTES FOR XAOS VERSION 3.2.2
+------------------------------------
+
+This release contains a rewritten Mac OS X port by J. B. Langston III,
+and some small fixes for pipes by Marton Torok. For more details
+please read the ChangeLog file.
+
+
+RELEASE NOTES FOR XAOS VERSION 3.2.1
+------------------------------------
+
+A new fractal type, the Spidron hornflake has appeared. We changed
+the web site to a dokuwiki database, so the help system contains
+now a converter for dokuwiki (not completely working yet).
+
+STICKY/DESTDIR is now supported (by Claudio Fontana). The French
+translation is updated (by Philippe Wautelet). Bigger fonts are
+available for Latin-2 based usage if the user changes the screen
+resolution more than 800x600 or 1000x720.
+
+Some small fixes have been done in the catalog files.
+
+
+RELEASE NOTES FOR XAOS VERSION 3.2
+----------------------------------
+
+Main points are the classic Sierpinski and Koch fractals, but still
+other formulas are introduced. Some 'oldie but goldie' fractals are
+included from the Fractint formula database. The keystroke order has been
+changed a little bit. Now gcc-4.0.x is also supported (-mcpu is deprecated
+now and the source had to be modified for this).
+
+The new formulas are demonstrated with 3 new tutorial movies. These are
+also available in Hungarian language. Volunteers are requested to
+translate the new movies into other languages.
+
+
+RELEASE NOTES FOR XAOS VERSION 3.1.3
+------------------------------------
+
+Using this release gcc version 4.0 should also compile the code, not only
+the 3.x versions.
+
+Two new fractal types were also added. In addition, the DirectX header
+files have been fixed. The French translations are updated.
+
+
+RELEASE NOTES FOR XAOS VERSION 3.1.2
+------------------------------------
+
+This release is a fast bugfix for some gcc versions (or more precisely,
+there is a workaround for the B-B bug, see the ChangeLog for details).
+The example files were not able to load in version 3.1.1 and msgmerge
+was not recognized (this is fixed, however not tested yet).
+
+There are other small but irrelevant fixes (see ChangeLog), too.
+
+
+RELEASE NOTES FOR XAOS VERSION 3.1.1
+------------------------------------
+
+This release is a CVS snapshot freeze for those who are using newer
+systems. The most important update is a fix for gcc-3.4. There are also
+
+- improvements in French and Spanish translations,
+- some more example files (contributed by Zsigmond Kovács),
+- some fixes which patch annoying problems.
+
+For other issues please read the ChangeLog file.
+
+
+RELEASE NOTES FOR XAOS VERSION 3.1
+----------------------------------
+
+We would like to release a quality product in all manner. Unfortunately,
+such a complex software like XaoS requires many details and it does not
+seem to be so easy to put a quality software together.
+
+Well, we did all our best... Here come the latest release binaries
+for Linux, Windows and DOS. They should work with the following
+restrictions:
+
+1. The Linux version seems to be the most stable one. Almost
+ no bugs were encountered testing it the last few weeks.
+ SuSE 7.3 and SuSE 8.0 should be good enough to compile
+ it. The latest source has been also tested on the Compile
+ Farm of SourceForge.net with the next results:
+
+ * [x86] Linux 2.4 (Debian 2.2)
+ Compiles OK. Seems to be build properly.
+
+ * [x86] Linux 2.4 (Red Hat 7.3)
+ Compiles OK, runs properly. It is suggested to
+ configure it with --with-mitshm=no to avoid immediate
+ exit after startup. Runs correctly in an X11 window
+ on cf.sf.net.
+
+ * [x86] FreeBSD (4.7-STABLE)
+ ./configure exits properly, make stops with an error.
+
+ * [Alpha] Linux 2.2 (Debian 3.0)
+ ./configure exits properly, make stops with an error
+ during compiling ui.c.
+
+ * [PPC - G4] MacOS X 10.1 SERVER Edition
+ Compiles OK, the executable gave MIT/SHM problem
+ with "./configure". It should work with --with-mithsm=no,
+ but currently I have no access to any Mac OS X
+ systems to test this.
+
+ * [Sparc - Ultra60] Linux 2.4 (Debian 3.0)
+ Compiles OK, seems to be build properly.
+
+ * [Sparc - R220] Sun Solaris (8)
+ ./configure stops with an error.
+
+ * [CerfCube SA 1110] Linux 2.4 (Debian 3.0)
+ Compiles OK, seems to be build properly.
+
+ * [J2EE] IBM WebSphere
+ Compiles OK, runs properly.
+
+ I tried to run the executables, mostly I got "Cannot initialize
+ driver", except where I wrote "runs propery" above. I'm almost sure
+ that those platforms I wrote "seems to be build properly" for, XaoS
+ will work without any problems, because there should be only "Can't
+ open display"-related configuration errors on cf.sf.net and/or at my
+ place.
+
+ You can also realize that internationalization (i18n) will only work
+ if you install XaoS as the system administrator with "make install".
+ Future releases may solve this problem.
+
+ Tcl/Tk interface now works, but it is not updated since a rather long
+ time. You can run it entering "wish ./xaosmenu.tcl &" in a Unix shell
+ in the bin/ directory. This interface is experimental.
+
+ Under SVGAlib latin2 fonts will not work for some internationalized
+ messages.
+
+ For compilation with Aalib, you need version 1.4 which can be
+ downloaded from http://aa-project.sf.net.
+
+2. Microsoft DOS users will enjoy i18n if their system supports it.
+ Unfortunately some systems have to have plain DOS to make i18n
+ available. Many Windows systems also support running batch
+ files from native Windows, however not all (my Windows NT 4
+ does not). DOS users should run xaos-??.bat in the bin\
+ directory.
+
+ Note that some messages in latin2 fonts will not be displayed
+ correctly.
+
+ Aalib may not work 100% correctly. It may depend on your DPMI
+ settings. You should download the latest csdpmi*.zip package.
+
+ If you want to compile XaoS from scratch, you should download
+ the following software:
+
+ aalib-1.4rc5.tar.gz, all402.zip, bnu213b.zip, djdev203.zip,
+ fil41b.zip, gcc2952b.zip, gtxt040b.zip, licv17b.zip, mak3791.zip,
+ png1012b.zip, txi42b.zip, zlib114b.zip.
+
+ Aalib must be patched to compile it (I sent a patch to the
+ SourceForge Tracker) and libvga and libtext (needed for Aalib) must
+ be also installed. Note that libtext will not compile under the
+ newest DJGPP, if someone know why DJGPP fails to compile the
+ appropriate assembly code, please write to us.
+
+3. XaoS has i18n support under Microsoft Windows now. You are not
+ suggested changing the drivers many times because XaoS will
+ crash.
+
+4. Here is a list about recent bugs and problems:
+
+ * Fixing Macintosh version (load/save works incorrectly).
+ * Checking why Bailout item is duplicated in Windows help.
+ * Displaying latin2 fonts correctly.
+ * Fixing catalog files (mainly French and Spanish).
+ * Filling up i18n for menu files for some languages.
+ * Fixing Macintosh version (crash when loading random examples).
+ * Fixing Windows version (crash when several times saving files
+ and configurations).
+ * Fixing generated xaos.dlg for certain languages (e.g. Hungarian).
+ * Fixing crashing configure/make for all problematic platforms.
+ * Rewriting i18n to be easier to add new menus and others.
+ * All other todos announced in TODO file.
+
+That's all. However the problem list is quite long, we hope
+you will enjoy XaoS 3.1.
+
+Regards,
+
+Zoltan Kovacs <kovzol@math.u-szeged.hu>
+Andreas Madritsch <amadritsch@datacomm.ch>
+Jan Hubicka <jh@ucw.cz>
+J.B. Langston <jb-langston@austin.rr.com>
+
+Credits:
+
+Jan Hubicka is the main author of XaoS. He wrote the biggest parts of
+this program, in fact, all the most important things.
+
+Andreas Madritsch helped a lot putting together version 3.1. He also
+compiled the DOS and Windows executable and made German translations of
+menu items available. He added bailout and 3 fractal types into version
+3.1. He also fixed i18n to work under Windows correctly.
+
+Zoltan Kovacs wrote this documentation about the recent installation
+problems and he was finalizing release 3.1. He added i18n support into
+XaoS and cleaned up the code as it was possible.
+
+J.B. Langston contributed the Mac OS X native driver, the new XaoS web
+design, and has helped maintain the software from 3.2.2 onward.
+
+Many others helped as well. The full list of them can be seen in file
+AUTHORS.
diff --git a/README b/README
new file mode 100644
index 0000000..d098637
--- /dev/null
+++ b/README
@@ -0,0 +1,110 @@
+XaoS - a real time fractal zoomer and morpher
+=============================================
+
+For installation instructions please see the INSTALL file.
+
+Original authors of XaoS are Jan Hubicka (jh@ucw.cz) and Thomas Marsh
+(tmarsh@tivoli.com). Many other people contributed to the project as
+well. Their list is too long to be included here. See AUTHORS file in
+the XaoS distribution.
+
+
+INTRODUCTION
+------------
+
+XaoS is a fast portable real-time interactive fractal zoomer. It
+displays the Mandelbrot set (among other escape time fractals) and
+allows you to zoom smoothly into the fractal. Various coloring modes are
+provided for both the points inside and outside the selected set. In
+addition, switching between Julia and Mandelbrot fractal types and
+displaying planes is provided. The first version was a poorly written
+Mandelbrot viewer by Thomas later modified by Jan to support high
+frame-rate zooming. Other additions were later made including autopilot
+(for those of you without driver licenses), palette changing, PNG
+saving, and fractal inversion.
+
+
+SUPPORTED PLATFORMS
+-------------------
+
+Starting from version 3.5, the supported platforms are:
+
+ * POSIX (Linux, FreeBSD, Solaris, etc.)
+ * Microsoft Windows (XP or later)
+ * Mac OS X (10.4 or later)
+
+The following platforms were also supported in earlier versions:
+
+ * BeOS
+ * Old Macintosh versions
+ * Microsoft DOS
+ * OS/2
+ * Plan 9
+
+Due to the lack of volunteers interested in maintaing older platforms, we
+are discontinuing support for them. If you want to use XaoS on one of
+these platforms, please download an earlier version.
+
+Of course, volunteers are always welcome to resurrect support for older
+platforms or port XaoS to other platforms it doesn't currently support.
+
+
+FEATURES
+--------
+
+ * fast smooth interactive real-time zooming (even on ancient machines!)
+ * 24 fractal formulas + user defined formula
+ * autopilot
+ * menu driven interface
+ * context sensitive help and animated tutorials
+ * various colorization, post calculation filters, color cycling
+ * image/animation saving/replay
+ * image export to PNG
+ * internationalized texts
+ * configurable calculation methods
+ * real-time image rotation
+ * many example fractals
+ * switching between Mandelbrot/Julia mode
+ * fast Julia preview
+ * zooming in 6*10^16 times, zooming out 10^30 times
+ * SMP support
+
+...and many more!
+
+
+HOMEPAGE
+--------
+
+http://xaos.sf.net
+
+
+HOW TO REPORT BUGS
+------------------
+
+Please try to reproduce the bug and submit a description and output of
+
+ xaos -config
+
+to the issue tracker (http://code.google.com/p/gnuxaos/issues/list).
+
+Debugger info (backtraces and so forth) is also welcome.
+
+
+THANKS TO
+---------
+
+ * Unknown Samorai from Brazil (for $20 --- your email doesn't work)
+ * Stanislav "XaoS" Mikes (for the name of our program)
+ * Borislav Deianov (for sharing ideas)
+ * Isaac Newton (for discovering his method)
+ * Benoit B. Mandelbrot (for ordering the Julia sets)
+ * Richard M. Stallman (for GNU)
+ * Linus Torvalds (for the best kernel)
+ * Tim Wegner & Bert Tyler (for Fractint)
+ * Darryl House (for making code of Fractint readable)
+
+
+NO THANKS TO
+------------
+
+ * Bill Gates
diff --git a/TODO b/TODO
new file mode 100644
index 0000000..2cdd7f3
--- /dev/null
+++ b/TODO
@@ -0,0 +1,66 @@
+TODO ITEMS
+----------
+
+Visit the issue tracker at http://code.google.com/p/gnuxaos/issues/list
+for a list of outstanding issues.
+
+In particular, we would welcome volunteers to help us finish the
+following projects that we are currently focusing on:
+
+
+GTK+ User Interface (Beta)
+==========================
+
+The GTK+ user interface is approaching beta quality. We welcome beta
+testers to try out this version and let us know what issues you encounter.
+Please share your feedback with us on the developer's discussion group at:
+http://groups.google.com/group/xaos-devel.
+
+We ask that beta testers be advanced users who are comfortable compiling
+software from source and submitting useful bug reports including backtraces.
+If you are not comfortable with this, then please wait for the final version
+to be released. We would also really appreciate it if any experienced GTK+
+developers can review our code and make suggestions for improvement.
+
+Since the GTK+ UI is still not ready for everyday use, it will not be
+compiled by default. You must explicitly enable it using the following
+configure switch:
+
+ --with-gtk-driver=yes
+
+In addition, we recommend you disable all other drivers when using the GTK
+driver using the following configure switches:
+
+ --with-x11-driver=no
+
+
+New Documentation Format (Beta)
+===============================
+
+We are in the process of migrating the XaoS help system to Sphinx and
+reStructuredText. Our user manual was previously in a crippled subset
+of HTML that we dubbed XSHL, which was missing many features necessary
+for maintaining modern, attractive documentation.
+
+Sphinx was developed by the Python project for their documentation, and
+it is very similar to a Wiki in the way you mark up the text. It can
+output the results as HTML, PDF, and Windows Help. It supports all the
+important things that are missing from the current help format, such as
+tables, images, and internet hyperlinks. It can even convert LaTeX math
+markup into image files that get included in the HTML output.
+
+The documentation still needs a lot of work before it is ready, and we
+have to make some modifications to Sphinx itself in order to integrate
+the documentation it produces with XaoS's help system. However, it is
+far enough along that we would welcome volunteers who are familar with
+reStructuredText to submit improvements to the documentation.
+
+The new documentation is located in the help/rest directory, and it can
+be converted into HTML or PDF using the included Makefile. In order to
+generate the output, you will need to install Sphinx. Visit the Sphinx
+homepage at http://sphinx.pocoo.org/ for installation instructions and
+more information on the new documentation format.
+
+If you would like to help with the documentation, please contact us on
+the discussion group at: http://groups.google.com/group/xaos-devel.
+We will be happy to help you get started.
diff --git a/aclocal.m4 b/aclocal.m4
new file mode 100644
index 0000000..2b3babf
--- /dev/null
+++ b/aclocal.m4
@@ -0,0 +1,2394 @@
+# generated automatically by aclocal 1.10.2 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
+# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
+# PARTICULAR PURPOSE.
+
+# gettext.m4 serial 60 (gettext-0.17)
+dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2006.
+
+dnl Macro to add for using GNU gettext.
+
+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
+dnl default (if it is not specified or empty) is 'no-libtool'.
+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
+dnl depending on --{enable,disable}-{shared,static} and on the presence of
+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
+dnl $(top_builddir)/intl/libintl.a will be created.
+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
+dnl implementations (in libc or libintl) without the ngettext() function
+dnl will be ignored. If NEEDSYMBOL is specified and is
+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
+dnl INTLDIR is used to find the intl libraries. If empty,
+dnl the value `$(top_builddir)/intl/' is used.
+dnl
+dnl The result of the configuration is one of three cases:
+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
+dnl and used.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 2) GNU gettext has been found in the system's C library.
+dnl Catalog format: GNU --> install in $(datadir)
+dnl Catalog extension: .mo after installation, .gmo in source tree
+dnl 3) No internationalization, always use English msgid.
+dnl Catalog format: none
+dnl Catalog extension: none
+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
+dnl The use of .gmo is historical (it was needed to avoid overwriting the
+dnl GNU format catalogs when building on a platform with an X/Open gettext),
+dnl but we keep it in order not to force irrelevant filename changes on the
+dnl maintainers.
+dnl
+AC_DEFUN([AM_GNU_GETTEXT],
+[
+ dnl Argument checking.
+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
+])])])])])
+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
+])])])])
+ define([gt_included_intl],
+ ifelse([$1], [external],
+ ifdef([AM_GNU_GETTEXT_][INTL_SUBDIR], [yes], [no]),
+ [yes]))
+ define([gt_libtool_suffix_prefix], ifelse([$1], [use-libtool], [l], []))
+ gt_NEEDS_INIT
+ AM_GNU_GETTEXT_NEED([$2])
+
+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
+ ifelse(gt_included_intl, yes, [
+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
+ ])
+
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ dnl Ideally we would do this search only after the
+ dnl if test "$USE_NLS" = "yes"; then
+ dnl if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
+ dnl the configure script would need to contain the same shell code
+ dnl again, outside any 'if'. There are two solutions:
+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
+ dnl documented, we avoid it.
+ ifelse(gt_included_intl, yes, , [
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+ ])
+
+ dnl Sometimes, on MacOS X, libintl requires linking with CoreFoundation.
+ gt_INTL_MACOSX
+
+ dnl Set USE_NLS.
+ AC_REQUIRE([AM_NLS])
+
+ ifelse(gt_included_intl, yes, [
+ BUILD_INCLUDED_LIBINTL=no
+ USE_INCLUDED_LIBINTL=no
+ ])
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ dnl Add a version number to the cache macros.
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ dnl If we use NLS figure out what method
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+ ifelse(gt_included_intl, yes, [
+ AC_MSG_CHECKING([whether included gettext is requested])
+ AC_ARG_WITH(included-gettext,
+ [ --with-included-gettext use the GNU gettext library included here],
+ nls_cv_force_use_gnu_gettext=$withval,
+ nls_cv_force_use_gnu_gettext=no)
+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
+
+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
+ ])
+ dnl User does not insist on using GNU NLS library. Figure out what
+ dnl to use. If GNU gettext is available we use this. Else we have
+ dnl to fall back to GNU NLS library.
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+changequote(,)dnl
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+changequote([,])dnl
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ AC_CACHE_CHECK([for GNU gettext in libc], [$gt_func_gnugettext_libc],
+ [AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings],
+ [eval "$gt_func_gnugettext_libc=yes"],
+ [eval "$gt_func_gnugettext_libc=no"])])
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
+ ifelse(gt_included_intl, yes, , [
+ AM_ICONV_LINK
+ ])
+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
+ dnl even if libiconv doesn't exist.
+ AC_LIB_LINKFLAGS_BODY([intl])
+ AC_CACHE_CHECK([for GNU gettext in libintl],
+ [$gt_func_gnugettext_libintl],
+ [gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ dnl Now see whether libintl exists and does not depend on libiconv.
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [eval "$gt_func_gnugettext_libintl=yes"],
+ [eval "$gt_func_gnugettext_libintl=no"])
+ dnl Now see whether libintl exists and depends on libiconv.
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);],
+ [bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")],
+ [LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+ ])
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"])
+ fi
+
+ dnl If an already present or preinstalled GNU gettext() is found,
+ dnl use it. But if this macro is used in GNU gettext, and GNU
+ dnl gettext is already preinstalled in libintl, we update this
+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ dnl Reset the values set by searching for libintl.
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
+ dnl GNU gettext is not found in the C library.
+ dnl Fall back on included GNU gettext library.
+ nls_cv_use_gnu_gettext=yes
+ fi
+ fi
+
+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions used to generate GNU NLS library.
+ BUILD_INCLUDED_LIBINTL=yes
+ USE_INCLUDED_LIBINTL=yes
+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV $LIBTHREAD"
+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV $LTLIBTHREAD"
+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
+ fi
+
+ CATOBJEXT=
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Mark actions to use GNU gettext tools.
+ CATOBJEXT=.gmo
+ fi
+ ])
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ dnl Some extra flags are needed during linking.
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ AC_DEFINE(ENABLE_NLS, 1,
+ [Define to 1 if translation of program messages to the user's native language
+ is requested.])
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ AC_MSG_CHECKING([whether to use NLS])
+ AC_MSG_RESULT([$USE_NLS])
+ if test "$USE_NLS" = "yes"; then
+ AC_MSG_CHECKING([where the gettext function comes from])
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ AC_MSG_RESULT([$gt_source])
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ AC_MSG_CHECKING([how to link with libintl])
+ AC_MSG_RESULT([$LIBINTL])
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
+ fi
+
+ dnl For backward compatibility. Some packages may be using this.
+ AC_DEFINE(HAVE_GETTEXT, 1,
+ [Define if the GNU gettext() function is already present or preinstalled.])
+ AC_DEFINE(HAVE_DCGETTEXT, 1,
+ [Define if the GNU dcgettext() function is already present or preinstalled.])
+ fi
+
+ dnl We need to process the po/ directory.
+ POSUB=po
+ fi
+
+ ifelse(gt_included_intl, yes, [
+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
+ dnl to 'yes' because some of the testsuite requires it.
+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
+ BUILD_INCLUDED_LIBINTL=yes
+ fi
+
+ dnl Make all variables we use known to autoconf.
+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
+ AC_SUBST(USE_INCLUDED_LIBINTL)
+ AC_SUBST(CATOBJEXT)
+
+ dnl For backward compatibility. Some configure.ins may be using this.
+ nls_cv_header_intl=
+ nls_cv_header_libgt=
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ DATADIRNAME=share
+ AC_SUBST(DATADIRNAME)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INSTOBJEXT=.mo
+ AC_SUBST(INSTOBJEXT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ GENCAT=gencat
+ AC_SUBST(GENCAT)
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLOBJS=
+ if test "$USE_INCLUDED_LIBINTL" = yes; then
+ INTLOBJS="\$(GETTOBJS)"
+ fi
+ AC_SUBST(INTLOBJS)
+
+ dnl Enable libtool support if the surrounding package wishes it.
+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
+ ])
+
+ dnl For backward compatibility. Some Makefiles may be using this.
+ INTLLIBS="$LIBINTL"
+ AC_SUBST(INTLLIBS)
+
+ dnl Make all documented variables known to autoconf.
+ AC_SUBST(LIBINTL)
+ AC_SUBST(LTLIBINTL)
+ AC_SUBST(POSUB)
+])
+
+
+dnl gt_NEEDS_INIT ensures that the gt_needs variable is initialized.
+m4_define([gt_NEEDS_INIT],
+[
+ m4_divert_text([DEFAULTS], [gt_needs=])
+ m4_define([gt_NEEDS_INIT], [])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_NEED([NEEDSYMBOL])
+AC_DEFUN([AM_GNU_GETTEXT_NEED],
+[
+ m4_divert_text([INIT_PREPARE], [gt_needs="$gt_needs $1"])
+])
+
+
+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
+
+# iconv.m4 serial AM6 (gettext-0.17)
+dnl Copyright (C) 2000-2002, 2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
+[
+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([iconv])
+])
+
+AC_DEFUN([AM_ICONV_LINK],
+[
+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
+ dnl those with the standalone portable GNU libiconv installed).
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
+
+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
+ dnl accordingly.
+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
+
+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed libiconv and not disabled its use
+ dnl via --without-libiconv-prefix, he wants to use it. The first
+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
+ am_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
+
+ AC_CACHE_CHECK([for iconv], am_cv_func_iconv, [
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_func_iconv=yes)
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ AC_TRY_LINK([#include <stdlib.h>
+#include <iconv.h>],
+ [iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);],
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes)
+ LIBS="$am_save_LIBS"
+ fi
+ ])
+ if test "$am_cv_func_iconv" = yes; then
+ AC_CACHE_CHECK([for working iconv], am_cv_func_iconv_works, [
+ dnl This tests against bugs in AIX 5.1 and HP-UX 11.11.
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ AC_TRY_RUN([
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
+ [case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac])
+ LIBS="$am_save_LIBS"
+ ])
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+ AC_DEFINE(HAVE_ICONV, 1,
+ [Define if you have the iconv() function and it works.])
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ AC_MSG_CHECKING([how to link with libiconv])
+ AC_MSG_RESULT([$LIBICONV])
+ else
+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
+ dnl either.
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+ AC_SUBST(LIBICONV)
+ AC_SUBST(LTLIBICONV)
+])
+
+AC_DEFUN([AM_ICONV],
+[
+ AM_ICONV_LINK
+ if test "$am_cv_func_iconv" = yes; then
+ AC_MSG_CHECKING([for iconv declaration])
+ AC_CACHE_VAL(am_cv_proto_iconv, [
+ AC_TRY_COMPILE([
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ AC_MSG_RESULT([$]{ac_t:-
+ }[$]am_cv_proto_iconv)
+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
+ [Define as const if the declaration of iconv() needs const.])
+ fi
+])
+
+# intlmacosx.m4 serial 1 (gettext-0.17)
+dnl Copyright (C) 2004-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Checks for special options needed on MacOS X.
+dnl Defines INTL_MACOSX_LIBS.
+AC_DEFUN([gt_INTL_MACOSX],
+[
+ dnl Check for API introduced in MacOS X 10.2.
+ AC_CACHE_CHECK([for CFPreferencesCopyAppValue],
+ gt_cv_func_CFPreferencesCopyAppValue,
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFPreferences.h>],
+ [CFPreferencesCopyAppValue(NULL, NULL)],
+ [gt_cv_func_CFPreferencesCopyAppValue=yes],
+ [gt_cv_func_CFPreferencesCopyAppValue=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+ AC_DEFINE([HAVE_CFPREFERENCESCOPYAPPVALUE], 1,
+ [Define to 1 if you have the MacOS X function CFPreferencesCopyAppValue in the CoreFoundation framework.])
+ fi
+ dnl Check for API introduced in MacOS X 10.3.
+ AC_CACHE_CHECK([for CFLocaleCopyCurrent], gt_cv_func_CFLocaleCopyCurrent,
+ [gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ AC_TRY_LINK([#include <CoreFoundation/CFLocale.h>], [CFLocaleCopyCurrent();],
+ [gt_cv_func_CFLocaleCopyCurrent=yes],
+ [gt_cv_func_CFLocaleCopyCurrent=no])
+ LIBS="$gt_save_LIBS"])
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ AC_DEFINE([HAVE_CFLOCALECOPYCURRENT], 1,
+ [Define to 1 if you have the MacOS X function CFLocaleCopyCurrent in the CoreFoundation framework.])
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+ AC_SUBST([INTL_MACOSX_LIBS])
+])
+
+# lib-ld.m4 serial 3 (gettext-0.13)
+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl Subroutines of libtool.m4,
+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
+dnl with libtool.m4.
+
+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
+AC_DEFUN([AC_LIB_PROG_LD_GNU],
+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac])
+with_gnu_ld=$acl_cv_prog_gnu_ld
+])
+
+dnl From libtool-1.4. Sets the variable LD.
+AC_DEFUN([AC_LIB_PROG_LD],
+[AC_ARG_WITH(gnu-ld,
+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
+AC_REQUIRE([AC_PROG_CC])dnl
+AC_REQUIRE([AC_CANONICAL_HOST])dnl
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ AC_MSG_CHECKING([for ld used by GCC])
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [[\\/]* | [A-Za-z]:[\\/]*)]
+ [re_direlt='/[^/][^/]*/\.\./']
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ AC_MSG_CHECKING([for GNU ld])
+else
+ AC_MSG_CHECKING([for non-GNU ld])
+fi
+AC_CACHE_VAL(acl_cv_path_LD,
+[if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi])
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ AC_MSG_RESULT($LD)
+else
+ AC_MSG_RESULT(no)
+fi
+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
+AC_LIB_PROG_LD_GNU
+])
+
+# lib-link.m4 serial 13 (gettext-0.17)
+dnl Copyright (C) 2001-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+AC_PREREQ(2.54)
+
+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
+dnl augments the CPPFLAGS variable.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
+ ac_cv_lib[]Name[]_prefix="$LIB[]NAME[]_PREFIX"
+ ])
+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
+ LIB[]NAME[]_PREFIX="$ac_cv_lib[]Name[]_prefix"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
+ dnl results of this search when this library appears as a dependency.
+ HAVE_LIB[]NAME=yes
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
+dnl searches for libname and the libraries corresponding to explicit and
+dnl implicit dependencies, together with the specified include files and
+dnl the ability to compile and link the specified testcode. If found, it
+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
+dnl Sets and AC_SUBSTs the LIB${NAME}_PREFIX variable to nonempty if libname
+dnl was found in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ AC_REQUIRE([AC_LIB_RPATH])
+ define([Name],[translit([$1],[./-], [___])])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+
+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
+ dnl accordingly.
+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
+
+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
+ dnl because if the user has installed lib[]Name and not disabled its use
+ dnl via --without-lib[]Name-prefix, he wants to use it.
+ ac_save_CPPFLAGS="$CPPFLAGS"
+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
+
+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
+ ac_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIB[]NAME"
+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
+ LIBS="$ac_save_LIBS"
+ ])
+ if test "$ac_cv_lib[]Name" = yes; then
+ HAVE_LIB[]NAME=yes
+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
+ AC_MSG_CHECKING([how to link with lib[]$1])
+ AC_MSG_RESULT([$LIB[]NAME])
+ else
+ HAVE_LIB[]NAME=no
+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
+ dnl $INC[]NAME either.
+ CPPFLAGS="$ac_save_CPPFLAGS"
+ LIB[]NAME=
+ LTLIB[]NAME=
+ LIB[]NAME[]_PREFIX=
+ fi
+ AC_SUBST([HAVE_LIB]NAME)
+ AC_SUBST([LIB]NAME)
+ AC_SUBST([LTLIB]NAME)
+ AC_SUBST([LIB]NAME[_PREFIX])
+ undefine([Name])
+ undefine([NAME])
+])
+
+dnl Determine the platform dependent parameters needed to use rpath:
+dnl acl_libext,
+dnl acl_shlibext,
+dnl acl_hardcode_libdir_flag_spec,
+dnl acl_hardcode_libdir_separator,
+dnl acl_hardcode_direct,
+dnl acl_hardcode_minus_L.
+AC_DEFUN([AC_LIB_RPATH],
+[
+ dnl Tell automake >= 1.10 to complain if config.rpath is missing.
+ m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])])
+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+ ])
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ dnl Determine whether the user wants rpath handling at all.
+ AC_ARG_ENABLE(rpath,
+ [ --disable-rpath do not hardcode runtime library paths],
+ :, enable_rpath=yes)
+])
+
+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
+dnl the libraries corresponding to explicit and implicit dependencies.
+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
+dnl Also, sets the LIB${NAME}_PREFIX variable to nonempty if libname was found
+dnl in ${LIB${NAME}_PREFIX}/$acl_libdirstem.
+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
+[
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
+ dnl Autoconf >= 2.61 supports dots in --with options.
+ define([N_A_M_E],[m4_if(m4_version_compare(m4_defn([m4_PACKAGE_VERSION]),[2.61]),[-1],[translit([$1],[.],[_])],[$1])])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib]N_A_M_E[-prefix],
+[ --with-lib]N_A_M_E[-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
+ --without-lib]N_A_M_E[-prefix don't search for lib$1 in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ dnl Search the library and its dependencies in $additional_libdir and
+ dnl $LDFLAGS. Using breadth-first-seach.
+ LIB[]NAME=
+ LTLIB[]NAME=
+ INC[]NAME=
+ LIB[]NAME[]_PREFIX=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='$1 $2'
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
+ dnl or AC_LIB_HAVE_LINKFLAGS call.
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
+ else
+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
+ dnl that this library doesn't exist. So just drop it.
+ :
+ fi
+ else
+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ dnl The same code as in the loop below:
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ dnl First look for a shared library.
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ dnl Then look for a static library.
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ dnl Found the library.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ dnl Linking with a shared library. We attempt to hardcode its
+ dnl directory into the executable's runpath, unless it's the
+ dnl standard /usr/lib.
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ dnl No hardcoding is needed.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ dnl The hardcoding into $LIBNAME is system dependent.
+ if test "$acl_hardcode_direct" = yes; then
+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
+ dnl resulting binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode DIR into the resulting
+ dnl binary.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ dnl Rely on "-L$found_dir".
+ dnl But don't add it if it's already contained in the LDFLAGS
+ dnl or the already constructed $LIBNAME
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
+ else
+ dnl We cannot use $acl_hardcode_runpath_var and LD_RUN_PATH
+ dnl here, because this doesn't fit in flags passed to the
+ dnl compiler. So give up. No hardcoding. This affects only
+ dnl very old systems.
+ dnl FIXME: Not sure whether we should use
+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
+ dnl here.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ dnl Linking with a static library.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
+ else
+ dnl We shouldn't come here, but anyway it's good to have a
+ dnl fallback.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
+ fi
+ fi
+ dnl Assume the include files are nearby.
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ LIB[]NAME[]_PREFIX="$basedir"
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ dnl Potentially add $additional_includedir to $INCNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 3. if it's already present in $CPPFLAGS or the already
+ dnl constructed $INCNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INC[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $INCNAME.
+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ dnl Look for dependencies.
+ if test -n "$found_la"; then
+ dnl Read the .la file. It defines the variables
+ dnl dlname, library_names, old_library, dependency_libs, current,
+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ dnl We use only dependency_libs.
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 3. if it's already present in $LDFLAGS or the already
+ dnl constructed $LIBNAME,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LIBNAME.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIB[]NAME; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LTLIBNAME.
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ dnl Potentially add DIR to rpathdirs.
+ dnl The rpathdirs will be appended to $LIBNAME at the end.
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ dnl Potentially add DIR to ltrpathdirs.
+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ dnl Handle this in the next round.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ dnl Handle this in the next round. Throw away the .la's
+ dnl directory; it is already contained in a preceding -L
+ dnl option.
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ dnl Most likely an immediate library name.
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ dnl Didn't find the library; assume it is in the system directories
+ dnl known to the linker and runtime loader. (All the system
+ dnl directories known to the linker should also be known to the
+ dnl runtime loader, otherwise the system is severely misconfigured.)
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user must
+ dnl pass all path elements in one option. We can arrange that for a
+ dnl single library, but not when more than one $LIBNAMEs are used.
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ dnl Note: acl_hardcode_libdir_flag_spec uses $libdir and $wl.
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ dnl When using libtool, the option that works for both libraries and
+ dnl executables is -R. The -R options are cumulative.
+ for found_dir in $ltrpathdirs; do
+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
+ done
+ fi
+])
+
+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
+dnl unless already present in VAR.
+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
+dnl contains two or three consecutive elements that belong together.
+AC_DEFUN([AC_LIB_APPENDTOVAR],
+[
+ for element in [$2]; do
+ haveit=
+ for x in $[$1]; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ [$1]="${[$1]}${[$1]:+ }$element"
+ fi
+ done
+])
+
+dnl For those cases where a variable contains several -L and -l options
+dnl referring to unknown libraries and directories, this macro determines the
+dnl necessary additional linker options for the runtime path.
+dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL])
+dnl sets LDADDVAR to linker options needed together with LIBSVALUE.
+dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed,
+dnl otherwise linking without libtool is assumed.
+AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS],
+[
+ AC_REQUIRE([AC_LIB_RPATH])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ $1=
+ if test "$enable_rpath" != no; then
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ dnl Use an explicit option to hardcode directories into the resulting
+ dnl binary.
+ rpathdirs=
+ next=
+ for opt in $2; do
+ if test -n "$next"; then
+ dir="$next"
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next=
+ else
+ case $opt in
+ -L) next=yes ;;
+ -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'`
+ dnl No need to hardcode the standard /usr/lib.
+ if test "X$dir" != "X/usr/$acl_libdirstem"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ next= ;;
+ *) next= ;;
+ esac
+ fi
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n ""$3""; then
+ dnl libtool is used for linking. Use -R options.
+ for dir in $rpathdirs; do
+ $1="${$1}${$1:+ }-R$dir"
+ done
+ else
+ dnl The linker is used for linking directly.
+ if test -n "$acl_hardcode_libdir_separator"; then
+ dnl Weird platform: only the last -rpath option counts, the user
+ dnl must pass all path elements in one option.
+ alldirs=
+ for dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="$flag"
+ else
+ dnl The -rpath options are cumulative.
+ for dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ $1="${$1}${$1:+ }$flag"
+ done
+ fi
+ fi
+ fi
+ fi
+ fi
+ AC_SUBST([$1])
+])
+
+# lib-prefix.m4 serial 5 (gettext-0.15)
+dnl Copyright (C) 2001-2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+
+dnl From Bruno Haible.
+
+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
+dnl require excessive bracketing.
+ifdef([AC_HELP_STRING],
+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
+
+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
+dnl to access previously installed libraries. The basic assumption is that
+dnl a user will want packages to use other packages he previously installed
+dnl with the same --prefix option.
+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
+dnl libraries, but is otherwise very convenient.
+AC_DEFUN([AC_LIB_PREFIX],
+[
+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
+ AC_REQUIRE([AC_PROG_CC])
+ AC_REQUIRE([AC_CANONICAL_HOST])
+ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB])
+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
+ dnl By default, look in $includedir and $libdir.
+ use_additional=yes
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ AC_LIB_ARG_WITH([lib-prefix],
+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
+ --without-lib-prefix don't search for libraries in includedir and libdir],
+[
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+ AC_LIB_WITH_FINAL_PREFIX([
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+ ])
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+])
+ if test $use_additional = yes; then
+ dnl Potentially add $additional_includedir to $CPPFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/include,
+ dnl 2. if it's already present in $CPPFLAGS,
+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ for x in $CPPFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ dnl Really add $additional_includedir to $CPPFLAGS.
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ dnl Potentially add $additional_libdir to $LDFLAGS.
+ dnl But don't add it
+ dnl 1. if it's the standard /usr/lib,
+ dnl 2. if it's already present in $LDFLAGS,
+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
+ dnl 4. if it doesn't exist as a directory.
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ for x in $LDFLAGS; do
+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux*) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ dnl Really add $additional_libdir to $LDFLAGS.
+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ fi
+])
+
+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
+dnl acl_final_exec_prefix, containing the values to which $prefix and
+dnl $exec_prefix will expand at the end of the configure script.
+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
+[
+ dnl Unfortunately, prefix and exec_prefix get only finally determined
+ dnl at the end of configure.
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
+dnl variables prefix and exec_prefix bound to the values they will have
+dnl at the end of the configure script.
+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
+[
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ $1
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+])
+
+dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing
+dnl the basename of the libdir, either "lib" or "lib64".
+AC_DEFUN([AC_LIB_PREPARE_MULTILIB],
+[
+ dnl There is no formal standard regarding lib and lib64. The current
+ dnl practice is that on a system supporting 32-bit and 64-bit instruction
+ dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit
+ dnl libraries go under $prefix/lib. We determine the compiler's default
+ dnl mode by looking at the compiler's library search path. If at least
+ dnl of its elements ends in /lib64 or points to a directory whose absolute
+ dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the
+ dnl default, namely "lib".
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+])
+
+# nls.m4 serial 3 (gettext-0.15)
+dnl Copyright (C) 1995-2003, 2005-2006 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+AC_DEFUN([AM_NLS],
+[
+ AC_MSG_CHECKING([whether NLS is requested])
+ dnl Default is enabled NLS
+ AC_ARG_ENABLE(nls,
+ [ --disable-nls do not use Native Language Support],
+ USE_NLS=$enableval, USE_NLS=yes)
+ AC_MSG_RESULT($USE_NLS)
+ AC_SUBST(USE_NLS)
+])
+
+# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
+#
+# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 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 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# PKG_PROG_PKG_CONFIG([MIN-VERSION])
+# ----------------------------------
+AC_DEFUN([PKG_PROG_PKG_CONFIG],
+[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
+m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ AC_PATH_TOOL([PKG_CONFIG], [pkg-config])
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=m4_default([$1], [0.9.0])
+ AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version])
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ PKG_CONFIG=""
+ fi
+
+fi[]dnl
+])# PKG_PROG_PKG_CONFIG
+
+# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
+#
+# Check to see whether a particular set of modules exists. Similar
+# to PKG_CHECK_MODULES(), but does not set variables or print errors.
+#
+#
+# Similar to PKG_CHECK_MODULES, make sure that the first instance of
+# this or PKG_CHECK_MODULES is called, or make sure to call
+# PKG_CHECK_EXISTS manually
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_EXISTS],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+if test -n "$PKG_CONFIG" && \
+ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then
+ m4_ifval([$2], [$2], [:])
+m4_ifvaln([$3], [else
+ $3])dnl
+fi])
+
+
+# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
+# ---------------------------------------------
+m4_define([_PKG_CONFIG],
+[if test -n "$PKG_CONFIG"; then
+ if test -n "$$1"; then
+ pkg_cv_[]$1="$$1"
+ else
+ PKG_CHECK_EXISTS([$3],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_failed=yes])
+ fi
+else
+ pkg_failed=untried
+fi[]dnl
+])# _PKG_CONFIG
+
+# _PKG_SHORT_ERRORS_SUPPORTED
+# -----------------------------
+AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi[]dnl
+])# _PKG_SHORT_ERRORS_SUPPORTED
+
+
+# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
+# [ACTION-IF-NOT-FOUND])
+#
+#
+# Note that if there is a possibility the first call to
+# PKG_CHECK_MODULES might not happen, you should be sure to include an
+# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
+#
+#
+# --------------------------------------------------------------
+AC_DEFUN([PKG_CHECK_MODULES],
+[AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl
+AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl
+AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl
+
+pkg_failed=no
+AC_MSG_CHECKING([for $1])
+
+_PKG_CONFIG([$1][_CFLAGS], [cflags], [$2])
+_PKG_CONFIG([$1][_LIBS], [libs], [$2])
+
+m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS
+and $1[]_LIBS to avoid the need to call pkg-config.
+See the pkg-config man page for more details.])
+
+if test $pkg_failed = yes; then
+ _PKG_SHORT_ERRORS_SUPPORTED
+ if test $_pkg_short_errors_supported = yes; then
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"`
+ else
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
+
+ ifelse([$4], , [AC_MSG_ERROR(dnl
+[Package requirements ($2) were not met:
+
+$$1_PKG_ERRORS
+
+Consider adjusting the PKG_CONFIG_PATH environment variable if you
+installed software in a non-standard prefix.
+
+_PKG_TEXT
+])],
+ [AC_MSG_RESULT([no])
+ $4])
+elif test $pkg_failed = untried; then
+ ifelse([$4], , [AC_MSG_FAILURE(dnl
+[The pkg-config script could not be found or is too old. Make sure it
+is in your PATH or set the PKG_CONFIG environment variable to the full
+path to pkg-config.
+
+_PKG_TEXT
+
+To get pkg-config, see <http://pkg-config.freedesktop.org/>.])],
+ [$4])
+else
+ $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS
+ $1[]_LIBS=$pkg_cv_[]$1[]_LIBS
+ AC_MSG_RESULT([yes])
+ ifelse([$3], , :, [$3])
+fi[]dnl
+])# PKG_CHECK_MODULES
+
+# po.m4 serial 15 (gettext-0.17)
+dnl Copyright (C) 1995-2007 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
+
+AC_PREREQ(2.50)
+
+dnl Checks for all prerequisites of the po subdirectory.
+AC_DEFUN([AM_PO_SUBDIRS],
+[
+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+ AC_REQUIRE([AM_PROG_MKDIR_P])dnl defined by automake
+ AC_REQUIRE([AM_NLS])dnl
+
+ dnl Release version of the gettext macros. This is used to ensure that
+ dnl the gettext macros and po/Makefile.in.in are in sync.
+ AC_SUBST([GETTEXT_MACRO_VERSION], [0.17])
+
+ dnl Perform the following tests also if --disable-nls has been given,
+ dnl because they are needed for "make dist" to work.
+
+ dnl Search for GNU msgfmt in the PATH.
+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
+ dnl The second test excludes FreeBSD msgfmt.
+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
+ [$ac_dir/$ac_word --statistics /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
+
+ dnl Test whether it is GNU msgfmt >= 0.15.
+changequote(,)dnl
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([MSGFMT_015])
+changequote(,)dnl
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([GMSGFMT_015])
+
+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
+ dnl The second test excludes FreeBSD xgettext.
+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
+ :)
+ dnl Remove leftover from FreeBSD xgettext call.
+ rm -f messages.po
+
+ dnl Test whether it is GNU xgettext >= 0.15.
+changequote(,)dnl
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+changequote([,])dnl
+ AC_SUBST([XGETTEXT_015])
+
+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >&]AS_MESSAGE_LOG_FD[ 2>&1], :)
+
+ dnl Installation directories.
+ dnl Autoconf >= 2.60 defines localedir. For older versions of autoconf, we
+ dnl have to define it here, so that it can be used in po/Makefile.
+ test -n "$localedir" || localedir='${datadir}/locale'
+ AC_SUBST([localedir])
+
+ dnl Support for AM_XGETTEXT_OPTION.
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+ AC_SUBST([XGETTEXT_EXTRA_OPTIONS])
+
+ AC_CONFIG_COMMANDS([po-directories], [[
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done]],
+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+ ])
+])
+
+dnl Postprocesses a Makefile in a directory containing PO files.
+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
+[
+ # When this code is run, in config.status, two variables have already been
+ # set:
+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
+ # - LINGUAS is the value of the environment variable LINGUAS at configure
+ # time.
+
+changequote(,)dnl
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+
+ # Find a way to echo strings without interpreting backslash.
+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='echo'
+ else
+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
+ gt_echo='printf %s\n'
+ else
+ echo_func () {
+ cat <<EOT
+$*
+EOT
+ }
+ gt_echo='echo_func'
+ fi
+ fi
+
+ # A sed script that extracts the value of VARIABLE from a Makefile.
+ sed_x_variable='
+# Test if the hold space is empty.
+x
+s/P/P/
+x
+ta
+# Yes it was empty. Look if we have the expected variable definition.
+/^[ ]*VARIABLE[ ]*=/{
+ # Seen the first line of the variable definition.
+ s/^[ ]*VARIABLE[ ]*=//
+ ba
+}
+bd
+:a
+# Here we are processing a line from the variable definition.
+# Remove comment, more precisely replace it with a space.
+s/#.*$/ /
+# See if the line ends in a backslash.
+tb
+:b
+s/\\$//
+# Print the line, without the trailing backslash.
+p
+tc
+# There was no trailing backslash. The end of the variable definition is
+# reached. Clear the hold space.
+s/^.*$//
+x
+bd
+:c
+# A trailing backslash means that the variable definition continues in the
+# next line. Put a nonempty string into the hold space to indicate this.
+s/^.*$/P/
+x
+:d
+'
+changequote([,])dnl
+
+ # Set POTFILES to the value of the Makefile variable POTFILES.
+ sed_x_POTFILES=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`
+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
+ # Compute POTFILES_DEPS as
+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
+ POTFILES_DEPS=
+ for file in $POTFILES; do
+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
+ done
+ POMAKEFILEDEPS=""
+
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
+ sed_x_LINGUAS=`$gt_echo "$sed_x_variable" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`
+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
+ fi
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ # Compute PROPERTIESFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
+ # Compute CLASSFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
+ # Compute QMFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
+ # Compute MSGFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
+ # Compute RESOURCESDLLFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ PROPERTIESFILES=
+ CLASSFILES=
+ QMFILES=
+ MSGFILES=
+ RESOURCESDLLFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
+ QMFILES="$QMFILES $srcdirpre$lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ JAVACATALOGS=
+ QTCATALOGS=
+ TCLCATALOGS=
+ CSHARPCATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
+ QTCATALOGS="$QTCATALOGS $lang.qm"
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
+ done
+ fi
+
+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang.msg: $lang.po
+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
+ # Add dependencies that cannot be formulated as a simple suffix rule.
+ for lang in $ALL_LINGUAS; do
+ frobbedlang=`echo $lang | sed -e 's/_/-/g' -e 's/^sr-CS/sr-SP/' -e 's/@latin$/-Latn/' -e 's/@cyrillic$/-Cyrl/' -e 's/^sr-SP$/sr-SP-Latn/' -e 's/^uz-UZ$/uz-UZ-Latn/'`
+ cat >> "$ac_file.tmp" <<EOF
+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
+EOF
+ done
+ fi
+ if test -n "$POMAKEFILEDEPS"; then
+ cat >> "$ac_file.tmp" <<EOF
+Makefile: $POMAKEFILEDEPS
+EOF
+ fi
+ mv "$ac_file.tmp" "$ac_file"
+])
+
+dnl Initializes the accumulator used by AM_XGETTEXT_OPTION.
+AC_DEFUN([AM_XGETTEXT_OPTION_INIT],
+[
+ XGETTEXT_EXTRA_OPTIONS=
+])
+
+dnl Registers an option to be passed to xgettext in the po subdirectory.
+AC_DEFUN([AM_XGETTEXT_OPTION],
+[
+ AC_REQUIRE([AM_XGETTEXT_OPTION_INIT])
+ XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS $1"
+])
+
+# progtest.m4 serial 4 (gettext-0.14.2)
+dnl Copyright (C) 1996-2003, 2005 Free Software Foundation, Inc.
+dnl This file is free software; the Free Software Foundation
+dnl gives unlimited permission to copy and/or distribute it,
+dnl with or without modifications, as long as this notice is preserved.
+dnl
+dnl This file can can be used in projects which are not available under
+dnl the GNU General Public License or the GNU Library General Public
+dnl License but which still want to provide support for the GNU gettext
+dnl functionality.
+dnl Please note that the actual code of the GNU gettext library is covered
+dnl by the GNU Library General Public License, and the rest of the GNU
+dnl gettext package package is covered by the GNU General Public License.
+dnl They are *not* in the public domain.
+
+dnl Authors:
+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
+
+AC_PREREQ(2.50)
+
+# Search path for a program which passes the given test.
+
+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
+[
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "$2", so it can be a program name with args.
+set dummy $2; ac_word=[$]2
+AC_MSG_CHECKING([for $ac_word])
+AC_CACHE_VAL(ac_cv_path_$1,
+[case "[$]$1" in
+ [[\\/]]* | ?:[[\\/]]*)
+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&AS_MESSAGE_LOG_FD
+ if [$3]; then
+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+dnl If no 4th arg is given, leave the cache variable unset,
+dnl so AC_PATH_PROGS will keep looking.
+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
+])dnl
+ ;;
+esac])dnl
+$1="$ac_cv_path_$1"
+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
+ AC_MSG_RESULT([$]$1)
+else
+ AC_MSG_RESULT(no)
+fi
+AC_SUBST($1)dnl
+])
+
+# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+#
+# This file is free software; the Free Software Foundation
+# gives unlimited permission to copy and/or distribute it,
+# with or without modifications, as long as this notice is preserved.
+
+# AM_PROG_MKDIR_P
+# ---------------
+# Check for `mkdir -p'.
+AC_DEFUN([AM_PROG_MKDIR_P],
+[AC_PREREQ([2.60])dnl
+AC_REQUIRE([AC_PROG_MKDIR_P])dnl
+dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P,
+dnl while keeping a definition of mkdir_p for backward compatibility.
+dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile.
+dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of
+dnl Makefile.ins that do not define MKDIR_P, so we do our own
+dnl adjustment using top_builddir (which is defined more often than
+dnl MKDIR_P).
+AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl
+case $mkdir_p in
+ [[\\/$]]* | ?:[[\\/]]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+])
+
diff --git a/catalogs/README b/catalogs/README
new file mode 100644
index 0000000..1c5d617
--- /dev/null
+++ b/catalogs/README
@@ -0,0 +1,11 @@
+Last modification information:
+$Header: /home/jblang/XaoS-cvsbackup/XaoS/catalogs/README,v 1.5 2003-03-18 10:45:46 kovzol Exp $
+
+Changes since 3.0:
+
+Julia is now a separate chapter, so you need to renumber all chapters
+and add this one.
+
+Catalogs that need an update:
+
+francais.cat
diff --git a/catalogs/README.i18n b/catalogs/README.i18n
new file mode 100644
index 0000000..c556268
--- /dev/null
+++ b/catalogs/README.i18n
@@ -0,0 +1,14 @@
+NOTES FOR INTERNATIONALIZATION (I18N) SUPPORT
+---------------------------------------------
+
+2 September 2002
+
+Last modification information:
+$Header: /home/jblang/XaoS-cvsbackup/XaoS/catalogs/README.i18n,v 1.2 2003-01-17 09:42:33 kovzol Exp $
+
+All of the available languages must be registered in ../ui/ui.c.
+The other entries in ../ui-hlp/menu.c are no longer used.
+Please edit ../i18n/*.po and read the README file to add
+and/or improve i18n support for your language.
+
+Zoltan Kovacs <kovzol@math.u-szeged.hu>
diff --git a/catalogs/cesky.cat b/catalogs/cesky.cat
new file mode 100644
index 0000000..6a03c51
--- /dev/null
+++ b/catalogs/cesky.cat
@@ -0,0 +1,952 @@
+# Message catalog file required to replay XaoS tutorials in
+# czech language this is latin2 version in case I will once add
+# support for latin2 fonts
+#
+# Copyright (C) 1997 by Jan Hubicka
+#
+# See english.cat for more info
+#########################################################
+#For file dimension.xaf
+encoding "2"
+fmath "Fraktály a matematika"
+fmath1 "Fraktály jsou poměrně novou
+Äástí matematiky a proto je zde
+ještě mnoho nevyřešených otázek"
+fmath2 "Dokonce neexistuje ani uspokojivá
+definice"
+fmath3 "Většinou považujeme za fraktály
+všechno, kde lze
+najít jistou soběpodobnost."
+
+def1 "Jednou z možných definic je..."
+def2 "Co to znamená?"
+def3 "Napřed je nutné rozumět rozdílu
+mezi Hausdorff Besicovichovou dimmenzí
+a topologickou dimenzí."
+
+topo1 "Topologická dimenze odpovídá
+\"normální\" představě o dimenzi"
+topo2 "bod má dimenzi 0"
+topo3 "křivka 1"
+topo4 "a rovina 2"
+
+hb1 "Definice Hausdorff Besicovichovy
+dimenze vychází z jednoduchého
+pozorování"
+hb2 "Velikost dvojnásobnÄ› zvÄ›tÅ¡ené úseÄky
+se zvětší dvakrát"
+hb3 "Velikost zvÄ›tÅ¡eného Ätverce
+ale ÄtyÅ™ikrát"
+hb4 "Podobně se chovají i vyšší dimenze"
+hb5 "K výpoÄtu dimenze z této hodnoty
+lze použít následující vzorec:"
+hb6 "dimenze = log s / log z
+kde z je změna zvětšení a
+s je změna velikosti objektu"
+hb7 "Pro úseÄku a zvÄ›tÅ¡ení 2
+je změna velikosti také 2.
+log 2 / log 2 = 1"
+hb8 "Pro Ätverec a zvÄ›tÅ¡ení 2
+je změna velikosti 4.
+log 4 / log 2 = 2"
+hb9 "Hausdorff Besicovichova dimenze
+je tedy u mnoha objektů stejná jako
+topologická dimenze"
+hb10 "Zajímavější jsou výsledky u fraktálů"
+hb11 "VezmÄ›me například snÄ›hovou vloÄku,"
+hb12 "která vznikne opakovaným nahrazováním
+jedné úseÄky za ÄtyÅ™i."
+hb13 "Nové úseÄky jsou vždy tÅ™etinové
+oproti původním"
+hb14 "Po trojnásobném zvětšení tedy budou
+stejně dlouhé,"
+hb15 "Díky soběpodobnosti, která vznikla
+opakovaným nahrazováním,"
+hb15b "každá tato Äást je kopie celého
+fraktálu v původní velikosti,"
+hb16 "Protože jsou zde ÄtyÅ™i takové kopie,
+fraktál se zvÄ›tÅ¡il ÄtyÅ™ikrát"
+hb17 "Po dosazení:
+log 4 / log 3 = 1.261"
+hb18 "Získali jsme tedy hodnotu větší
+než 1 (topologická dimenze křivky)"
+hb19 "Hausdorff Besicovichova dimenze (1.261)
+je vyšší, než topologická dimenze (1)"
+hb20 "Podle definice tedy je
+snÄ›hová vloÄka fraktál"
+
+defe1 "Tato definice neni perfektní,
+protože vyluÄuje nÄ›které tvary,
+které lze považovat za fraktály."
+defe2 "Ukazuje ale jednu ze zajímavých
+vlastností fraktálů"
+defe3 "a je pomÄ›rnÄ› Äasto používana."
+defe4 "Hausdorff Besicovichova dimenze
+se také Äasto nazývá
+\"fraktálovou dimenzí\""
+
+
+#########################################################
+#For file escape.xaf
+escape "Fraktály a matematika
+
+kapitola druhá
+
+escape time fractals"
+escape1 "Některé fraktály (jako
+snÄ›hová vloÄka) se generují
+jednoduchým postupem"
+escape2 "XaoS je ale program
+pro výpoÄet jiného typu fraktálů -
+známych jako escape time fractals"
+escape3 "Metoda jejich generování
+je trohu odlišná, ale také založena
+na iterování"
+escape4 "Obrazovka je považována
+za rovinu komplexních Äísel"
+escape5 "Reálná osa je horizontálně"
+escape6 "a imaginární vertikálně"
+escape7 "Každý bod má svůj orbit"
+escape8 "Jehož trajektorie se vypoÄte
+pomocí iteraÄní funkce f(z,c),
+kde z je hodnota z předchozí iterace
+a c je parametr (bod na obrazovce)"
+escape9 "Například u Mandelbrotovy
+množiny iteraÄní funkce je z = z^2 + c"
+orbit1 "například pokud se budeme
+zajímat o bod 0 - 0.6i"
+orbit2 "použijeme ho jako hodnotu pro
+parametr c"
+orbit3 "Orbit vždy zaÄíná na pozici
+z = 0 + 0i"
+orbit3b "potom budeme opakovanÄ›
+poÄítat iteraÄní funkci a pokaždé
+získáme novou hodnotu z pro další
+iteraci"
+orbit4 "Pokud orbit zůstane v koneÄných
+hodnotách, bod patří do množiny."
+orbit5 "V tomto případě posloupnost
+konverguje"
+orbit6 "Proto tento bod patří do množiny"
+orbit7 "V jiných případech ale nemusí"
+orbit8 "(například pro bod 10 + 0i
+první iterace je 110, druhá
+12110 atd.)"
+orbit9 "Takové body jsou mimo množinu"
+
+bail1 "Pořád ale mluvíme o nekoneÄném
+poÄtu iterací a nekoneÄných Äíslech"
+bail2 "Protože jsou ale poÄítaÄe
+koneÄné, není možné provédst výpoÄet
+přesně"
+bail3 "Lze ale dokázat, že pokud
+vzdálenost orbitu od nuly větší, než 2,
+orbit pokaždé uteÄe do nekoneÄna"
+bail4 "Proto můžeme pÅ™eruÅ¡it výpoÄet,
+pokud bod opusti okolí nuly
+(bailout test)"
+bail5 "V příadÄ›, že poÄítáme bod mimo
+množinu, potřebujeme tedy pouze
+koneÄný poÄet iterací"
+bail6 "Také se pomocí tohoto testu
+vytváří barevné pruhy okolo množiny"
+bail7 "Obarvují se podle poÄtu iterací,
+které orbit potřeboval k porušení
+bailout testu"
+
+iter1 "Uvnitř množiny ale stále
+potÅ™ebujeme nekoneÄnÄ› iterací"
+iter2 "Je tedy nutné výpoÄet
+přerušit po daném maximálním
+poÄtu iterací"
+iter3 "Maximální poÄet iterací
+urÄuje pÅ™esnost výpoÄtu"
+iter4 "Pokud neprovedeme žádné
+iterace, bailout test vytvoří
+kruh o poloměru 2"
+iter5 "ZvyÅ¡ováním maximálního poÄtu
+iterací dostaneme přesnější a
+přesnější aproximaci"
+
+limit1 "XaoS standardnÄ› poÄítá 170
+iterací"
+limit2 "V některých místech je možné
+zoomomovat poměrně dlouho bez
+dosažení limitu přesnosti"
+limit3 "V jiných místech ale
+lze dosáhnout limitu docela brzo"
+limit4 "výsledek je potom poněkud
+jednotvárný"
+limit5 "Po zvýšení poÄtu iterací ale
+vznikne mnoho nových detailů"
+ofracts1 "Ostatní fraktály v XaoSovi
+jsou poÄítáný pomocí jiných formulí
+a bailout testů, ale základní
+postup je stejný"
+ofracts2 "Tento postup je nároÄný
+na výkon poÄítaÄe. XaoS
+má mnoho optimalizací o kerých
+se můžete doÄíst v souboru
+doc/xaos.info"
+
+#########################################################
+#For file anim.xaf
+anim "Ukládání a přehrávání
+animací"
+
+#########################################################
+#For file anim.xhf
+
+anim2 "Možná jste si už všimli,
+že XaoS umí přehrávat animace."
+
+anim3 "Ty je možné vytvářet přímo
+v XaoSovi"
+
+languag1 "Protože
+jsou ale animace a pozice uloženy
+pomocí jednoduchého jazyka,"
+
+languag2 "(pozice jsou ve steném
+formátu jako animace)"
+
+languag3 "je možné potom animace
+ruÄnÄ› upravovat."
+
+
+languag4 "Většina animací dodávaných
+s XaoSem je psaná kompletnÄ› ruÄnÄ›
+pouze s pomocí uložených pozic"
+
+modif1 "Jenom jednoduchou úpravou
+tohoto souboru"
+
+modif2 "Je možné vygenerovat
+jednoduchou \"zmenšovací\" animaci."
+modif3 "Pomocí této změny \"zvětšovací\" animaci."
+
+newanim "Také je možné napsat úplně
+nové animace a efekty"
+
+examples "Inspiraci můžete hledat
+také v příkladech, které lze
+nahrávat v náhodném pořadí ze
+save/load menu"
+
+examples2 "Pomocí uložených pozic
+je také možné převádět souřadnice
+do jiných programů."
+
+examples3 "Fantazii se meze
+nekladou snad kromÄ› jazyka
+použitého v souborech popsaného
+v xaos.info"
+
+#########################################################
+#For file barnsley.xaf
+
+intro4 "Úvod do fraktálů
+
+Část pátá - Formulka pana Barnsleyho"
+
+barnsley1 "Jinou formulku si
+vymyslel pan Michael Barnsley"
+
+barnsley2 "Výsledkem je tento podivný fraktál"
+
+barnsley3 "Nepatří zrovna k nejzajímavějším"
+
+barnsley4 "Jeho Juliovy množiny
+vypadají mnohem lépe."
+
+barnsley5 "Jejich struktura připomíná krystaly,"
+
+barnsley6 "narozdíl od většiny ostatních
+fraktálů v XaoSovi, které
+vypadají spíše organicky"
+#########################################################
+#For file filter.xaf
+
+filter "filtry"
+
+#########################################################
+#For file filter.xhf
+
+filter1 "Filtr je efekt aplikovaný
+na data potom, co se fraktál vypoÄte"
+
+filter2 "XaoS má následující filtry"
+
+motblur "Motion blur"
+
+edge "Dva různé filtry
+na detekci hran"
+
+edge2 "První dělá hrany tlustší
+a proto je pěkný hlavně ve vysokých
+rozlišeních"
+
+edge3 "Druhý dÄ›lá hrany tenÄí"
+
+star "Starfield"
+
+interlace "Interlace filter
+
+zrychluje výpoÄet a ve výšším rozlíšení
+dělá podobný efekt jako Motion Blur"
+
+stereo "Stereogram filter"
+
+stereo2 "Pokud v následují
+Äásti nic neuvidíte, možná
+to není tím, že neumíte šilhat,
+ale proto, že XaoS předpokládá
+menší monitor. To můžete změnit
+parametry z příkazové řádky.
+PÅ™eÄtÄ›te si xaos -help."
+
+emboss1 "Emboss filter"
+
+palettef1 "Palette emulator umožňuje
+rotaci palety i v true-coloru"
+truecolorf "Poslední filtr emuluje
+true-color."
+
+#########################################################
+#For file fractal.xaf
+
+end "Konec"
+
+fcopyright "Úvod do fraktálů
+vytvoÅ™il Jan HubiÄka
+v Äervenci roku 1997"
+
+suggestions "
+Pošlete mi všechny
+nápady a komentáře
+na moji adresu:
+
+xaos-discuss@lists.sourceforge.net
+
+Děkuji"
+
+#########################################################
+#For file incolor.xaf
+
+incolor1 "Většinou se body
+uvnitř množiny kreslí jednou
+barvou"
+
+incolor2 "To pěkně zvýrazní hranice
+ale oblasti ivnitř vypadají poněkud
+nudnÄ›."
+
+incolor3 "Pokud je chcete mít
+trochu zábavnější, můžete použit
+hodnotu posledního orbitu
+k urÄení barvy"
+
+incolor4 "XaoS má deset různých
+takových výpoÄtů, které nazývá
+\"incoloring modes\""
+
+zmag "zmag
+
+Barva se poÄítá podle
+vzdálenosti posledního
+orbitu od poÄátku"
+
+#########################################################
+#For file innew.xaf
+
+innew1 "Decomposition like
+
+Funguje stejne jako
+\"color decomposition\"
+v \"outcoloring modes\"
+tedy podle úhlu posledního
+orbitu"
+
+innew2 "real/imag
+
+Jak název napovídá, barva
+se vypoÄte podle reálné Äásti
+posledního orbitu vydělené imaginární"
+
+innew3 "Následujících 6 režimů
+nemá nějaké hlubší opodstatnění
+snad mimo toho, že vypadají zajímavě.
+Část je opsána z programu flarium."
+
+#########################################################
+#For file intro.xaf
+
+fractal "...Fraktály..."
+fractal1 "Co to je?"
+
+fractal2 "Definice pana Mandelbrota:
+Fraktál je množina, pro kterou
+Hausdorff Besicovichova dimenze
+přesahuje topologickou dimenzi."
+
+fractal3 "Něco snad není jasné?"
+
+fractal4 "Nevadí.
+
+Většina matematiků stejně není
+touto definicí uspokojena"
+
+fractal5 "Jednoduše:"
+
+fractal6 "fraktál je složený z Äástí"
+
+fractal7 "kde každá je přibližná
+zmenšená kopie celku"
+
+fractal8 "Neustálým kopírováním"
+
+fractal9 "vznikne celý fraktál."
+
+facts "Co je na fraktálech tak zajímavého?"
+
+fact1 "Jsou nezavislé na měřítku"
+fact2 "Jsou soběpodobné"
+fact3 "A Äasto se vyskytují
+v přirodě."
+#fact4 "Například mraky, hory
+#nebo pobřeží."
+fact5 "Ale i hodně matematických
+konstrukcí jsou fraktály"
+fact6 "Jednu právě sledujete na obrazovce"
+
+fmath4 "Mnoho fraktálů lze konstruovat
+iteraÄním postupem"
+fmath5 "Například fraktál známý
+jako křivka von Kochové"
+fmath6 "vznikne zaměňováním úseÄky"
+fmath7 "za ÄtyÅ™i"
+fmath8 "Toto je první iterace"
+fmath9 "Nyní ale postup můžeme opakovat"
+fmath10 "a získat druhou,"
+fmath11 "třetí,"
+fmath12 "a Ätvrtou iteraci."
+fmath13 "Po nekoneÄném poÄtu iterací
+vznikne fraktál,"
+fmath14 "který připomíná jednu třetinu
+snÄ›hové vloÄky"
+tree1 "Mnoho jiných tvrarů lze zkonstruovat
+podobným postupem"
+tree2 "Například jinou zámÄ›nou úseÄky"
+tree3 "vznikne strom"
+nstr "Iterace také mohou být založené
+na náhodných Äíslech"
+nstr2 "ZámÄ›nou úseÄky"
+nstr3 "za dvÄ› s malou chybou"
+nstr4 "vznikne fraktál připomínající pobřeží"
+nstr5 "Podobným postupem lze vytvořit
+mraky, pohoří a mnoho dalších
+tvarů z přírody"
+
+############################################################################
+# mset.xaf
+
+fact7 "Nejznámější je..."
+
+mset "Mandelbrotova množina"
+mset1 "Je generována jednoduchým
+výrazem"
+mset2 "Ale je to jeden
+z nejkrásnějších fraktálů"
+mset3 "Protože je soběpodobná,"
+mset4 "hranice množiny obsahují"
+mset5 "miniaturní kopie celku"
+mset6 "Toto je největší kopie.
+Pouze přibližně 50krát zmenšená"
+mset7 "Mandelbrotova množina není
+ÄistÄ› sobÄ›podobná"
+mset8 "Každá miniaturní kopie
+se liší"
+mset9 "Tato je 76000krát menší"
+mset10 "Kopie z jiných Äástí
+jsou odlišnější."
+
+nat "Hranice množiny
+neobsahují pouze miniaturní
+kopie celku"
+nat1 "Ale i nekoneÄné množství
+jiných tvarů"
+nat2 "Některé jsou neuvěřitelně
+podobné těm z přírody"
+nat3 "Vypadají jako stromy,"
+nat4 "řeky a jezera,"
+nat5 "galaxie"
+nat6 "nebo vodopády"
+nat7 "Obsahuje ale i naprosto nové tvary"
+
+juliach "Úvod do fraktálů
+
+Část druhá - Juliova množina"
+julia "Mandelbrotova množina
+není jediným fraktálem generovaným
+výrazem z=z^2+c,"
+julia1 "dalším je"
+julia2 "Juliova množina"
+julia3 "Zajímavé je, že není
+pouze jediná taková množina,"
+julia4 "ale je jich hned
+nekoneÄnÄ› mnoho"
+julia5 "Každá se liší pouze jednou hodnotou"
+julia6 "Bodem zvoleným v Mandelbrotově množine"
+julia7 "Mandelbrotova množina je
+vpodstatě mapa Juliových množin."
+julia8 "Body uvnitř množiny mají
+Juliovy množiny velké a spojité"
+julia9 "Body vně mají Juliovy
+množiny nespojité"
+julia10 "Nejzajímavější jsou body
+na hranicích"
+
+theme "Téma juliovy množiny záleží
+na bodu zvolém v Mandelbrotově množině"
+
+theme1 "Ve zmenšení jsou
+detaily kolem zvoleného bodu"
+
+theme2 "velmi podobné s Mandlebrotovou množinou."
+theme3 "Po zmenšení ale zjistíte"
+theme4 "že se jedná o úplně jiný fraktál"
+theme5 "Juliovy množiny na první pohled
+vypadají nudně, protože se téma nemění"
+theme6 "Zůstává to zvolené
+v Mandelbrotové množině"
+theme7 "PeÄlivým výbÄ›rem bodu lze
+ale získat"
+theme8 "zajímavé obrázky"
+
+#########################################################
+#For file keys.xhf
+
+keys "Klávesy:
+
+q - Konec přehrávání
+Space - urychlení
+ (může chvíli trvat)
+vlevo/vpravo - změna rychlosti titulků"
+
+#########################################################
+#For file magnet.xaf
+
+intro7 "Úvod do fraktálů
+
+Část osmá - Magnet"
+
+magnet "Toto není Mandelbrotova množina"
+magnet1 "Tento fraktál se nazývá magnet,
+protože pochází z teoretické
+fyziky"
+magnet2 "Vychází ze studie
+magnetických renormalizaÄních
+transformací"
+
+similiar "Podobnost s Mandelbrotovou
+množinou je zajímavá, protože to
+už není pouze matematická hÅ™iÄka."
+
+magjulia "Má neobvyklé juliovy množiny"
+
+#########################################################
+#For file new.xaf
+
+new "Co je nového ve verzi 3.0?"
+speed "1. Je rychlejší1"
+speed1 "Hlavní výpoÄetní smyÄka
+nyní hledá periody a dělá několik
+iterací najednou"
+speed2 "Nové fraktály se poÄitají
+pomocí metody \"boundary detection\""
+speed3 "VýpoÄet nových fraktálů je proto
+mnohem rychlejší."
+speed4 "Například Mandelbrotova
+množina při 1 000 000 iterací"
+speed5 "poÄítám..."
+speed6 "Hotovo"
+speed7 "XaoS má heruistiku
+a nehledá periody
+tam, kde je neoÄekává.
+(žádné takové kolem nejsou)"
+speed8 "Take hlavní rutinky byly
+optimalizovány a jsou dvakrát
+rychlejší"
+speed9 "Takže nyní dosahuje 130FPS
+na 130Mhz pentiu"
+
+new2 "2. filtry"
+new3 "3. devět outcoloring modů"
+new4 "4. nové incoloring mody"
+new5 "5. Truecolor coloring mody"
+new6 "6. Přehrávání a ukládání animací"
+newend "A další změny jako rotace, lepší
+nahodné palety apod. Kompletní seznam
+změn je v souboru ChangeLog"
+
+#########################################################
+#For file newton.xaf
+
+intro3 "Úvod do fraktálů
+
+Část Ätvrtá-Newtonova metoda"
+newton "Tento fraktál je generovaný
+uplnÄ› jiným výpoÄtem"
+newton1 "Newtonovou aproximaÄní metodou
+pro hledání kořenů polynomu x^3=1"
+newton2 "Sleduje se poÄet iterací
+nutný k dosažení přibližného výsledku"
+newton3 "Tři kořeny můžete vidět jako
+modré koleÄka"
+newton4 "Nejzajímavější jsou ale
+Äásti, kde si výpoÄet nebyl jistý,
+ke kterému kořenu se vydá"
+newton5 "Fraktál je velmi soběpodobný
+a tak tu už nic moc nového nenajdete"
+newton6 "Ale je možné vygenerovat
+\"skoro-Juliovy\" množiny"
+newton7 "Kde se zvolený bod
+pÅ™iÄte jako chyba pÅ™i aproximaci"
+newton8 "To vnese do výpoÄtu nepoÅ™adek
+a uÄiní fraktál zajímavÄ›jším"
+
+#########################################################
+#For file octo.xaf
+intro6 "Úvod do fraktálů
+
+Část sedmá-Octo"
+octo "Octo je jeden
+z méně známych fraktálů"
+octo1 "Vybrali jsme jej,
+protože má neobvyklý tvar"
+octo2 "PodobnÄ› jako u Newtonova
+fraktálu XaoS umí generovat
+\"skoro-Juliovy\" množiny"
+
+#########################################################
+#For file outcolor.xaf
+
+outcolor "Out coloring modes"
+outcolor1 "Mandelbrotova množina
+je to oÅ¡klivé Äerné uprostÅ™ed
+obrazovky"
+outcolor2 "Barevna věc okolo jsou
+pouze hranice"
+outcolor3 "NormálnÄ› se barva urÄuje
+podle poÄtu iterací nutných
+k dosažení limitu"
+outcolor4 "Ale jsou i jiné cesty"
+outcolor5 "XaoS je nazývá
+\"outcoloring modes\""
+
+iterreal "iter+real
+
+K obarvení pÅ™iÄte reálnou Äást
+posledního orbitu k poÄtu iterací"
+iterreal1 "Některé nudnější obrázky
+tím lze vylepšit"
+
+iterimag "Další coloring mode-iter+imag
+má podobné výsledky"
+iterimag2 "Není se Äemu divit -
+jediný rozdíl je, že pÅ™iÄíta
+imaginární Äást orbitu"
+
+iprdi "iter+real/imag
+
+Zde se pÅ™iÄte realná Äást posledního
+orbitu vydÄ›lená imaginarní k poÄtu
+iterací"
+
+sum "iter+real+imag+real/imag
+
+A toto je souÄet vÅ¡ech pÅ™edchozích"
+
+decomp "binarry decompossition
+
+Pokud je imaginární Äást
+menší než nula, odeÄte se
+poÄet iterací od maximálního
+poÄtu iterací, jinak se používa
+poÄet iterací"
+
+bio "Biomorphs
+
+Tento režim se tak jmenuje proto,
+že některé fraktály potom vypadají
+jako jednobunÄ›Äní živoÄichové"
+
+#########################################################
+#For file outnew.xhf
+
+potential "Potential
+
+Tento režim vypdá nejlépe
+v true-color režimu"
+
+cdecom "color decompossition"
+cdecom2 "Barva se vypoÄte
+podle úhlu posledního orbitu"
+cdecom3 "Je podobná binární
+dekompozici ale barva přechází
+plynule"
+cdecom4 "V Newtonově fraktálu
+obarvuje bod podle kořenu, ke
+kterému se přibližuje a ne podle
+poÄtu iterací"
+
+smooth "smooth
+
+Tento režim se pokouší
+vytvořit plynulé přechody
+a zarovnat skoky způsobené
+zmÄ›nou poÄtu iterací"
+smooth1 "Nefunguje na fraktálech
+Newton a Magnet"
+smooth2 "Funguje také
+pouze v true-coloru proto
+si zapněte truecolor filtr
+pokud jej nemáte"
+
+#########################################################
+#For file outnew.xhf
+
+intro5 "Úvod do fraktálů
+
+Část šestá - Phoenix"
+
+phoenix "Toto je Mandelbrotova množina
+pro formuli známou jako Phoenix"
+
+phoenix1 "Vypadá trochu jinak než
+ostatní fraktály v XaoSovi ale je
+možne najít jistou podobnost
+s Mandelbrotovou množinou"
+
+phoenix2 "Také obsahuje \"anténu\" vepředu"
+
+phoenix3 "Pořád téma Jiliovy množiny
+odpovídá tématu kolem zvoleného bodu,"
+
+phoenix4 "ale Juliovy množiny vypadají
+docela jinak"
+
+#########################################################
+#For file plane.xaf
+
+plane1 "Normálně realná souřadnice
+bodu odpovídá x-ové souradnici na
+obrazovce a imaginární y-ové"
+
+plane2 "XaoS má ale i 6 dalších metod"
+plane3 "1/mu
+
+Kruhová inverse - Äásti z nekoneÄna
+jdou no nuly a nula do nekoneÄna"
+plane4 "Toto je normální
+Mandelbrotova množina"
+plane5 "A toto po inversi"
+plane6 "Množina byla ve středu,
+proto je nyní všude kolem a
+nekoneÄná modrá oblast kolem
+je teÄ malé koleÄko uprostÅ™ed"
+plane7 "Další obrázky budou
+pokaždé ukázávny normálně
+a po inversi"
+
+plane8 "1/mu+0.25
+
+Zobrazení je podobné inversi,
+pouze střed je posunut"
+plane9 "Protože střed je
+na hranici množiny, zobrazila
+se jako nekoneÄná parabola"
+plane10 "Zajímavě skresluje i jiné fraktály,
+protože robíjí jejich symetrii"
+
+lambda "Zobrazení lambda"
+
+ilambda "1/lambda
+
+Kombinace inverze a lambdy"
+
+imlambda "1/(lambda-1)
+
+Kombinace inverze,
+posunutí a lambdy"
+
+imlambda2 "Způsobuje zajímavou
+deformaci Mandelbrotovy množiny"
+
+mick "1/(mu-1.40115)
+
+A opět inverze s posunitím,
+nyní posunuta do speciálního
+bodu Mandelbrotovy množiny.
+V okolí tohoto bodu je množina
+soběpodobná. Toto skreslení
+zvÄ›tÅ¡uje tuto Äást"
+
+#########################################################
+#For file power.xaf
+
+intro2 "Úvod do fraktálů
+
+Část třetí-Mandelbrotovy množiny
+vyšších řádů"
+
+power "z^2+c není jediný vzorec
+generující fraktál"
+power2 "Jenom trochu upravený - x^3+c
+generuje fraktál také"
+power3 "Ten samozřejmě také obsahuje
+kopie hlavni nožiny"
+
+power4 "Další takové fraktály
+vzniknou upravenými vzorci"
+
+pjulia "A každá taková množina
+má odpovidající Juliovy množiny"
+
+#########################################################
+#For file truecolor.xaf
+
+truecolor "Truecolor coloring modes"
+truecolor1 "Normálně se fraktály
+obarvují pomocí palety. V truecoloru
+se paleta emuluje"
+truecolor2 "Jediný rozdíl je,
+že paleta je větší a barvy
+se plynule interpolují"
+truecolor3 "Truecolor coloring mode
+má úplně jiný přístup. Používá
+různé hodnoty z vypoÄtu,"
+truecolor4 "k výpoÄtu přímo barvy,
+nejenom pozice v paletÄ›"
+truecolor5 "To umožňuje zobrazit
+až ÄtyÅ™i hodnoty v jednom bodÄ›"
+truecolor6 "Truecolor coloring
+mode vyžaduje truecolor. Pokud
+ho nemáte, zapněte si laskavě
+truecolor filtr"
+
+#########################################################
+#For file pert.xaf
+
+pert0 "Perturbation"
+pert1 "PodobnÄ› jako u Juliovy
+množiny můžete měnit parametr
+pro generování"
+pert2 "Je možné v Mandelbrotově
+množině měnit parametr jménem
+\"perturbation\""
+pert3 "Ovlivní se tím startovní
+pozice orbitu, která je obvykle [0,0]"
+pert4 "Nedělá tak zajímavé změny
+jako parametr Juliovy Množiny,
+ale je tím možné fraktál udělat
+náhodnější."
+
+#########################################################
+#For file palette.xaf
+
+pal "Náhodné palety"
+pal0 "XaoS nemá žádné ruÄnÄ›
+definované palety jako
+většina ostatních programů
+generujicí fraktály,
+místo toho je generuje náhodně"
+pal1 "JednoduÅ¡e maÄkejte 'P'
+tak dlouho, dokud si nějakou
+z nabízených palet nevyberete"
+pal2 "Jsou použity tři algoritmy"
+pal3 "První dělá přechody
+z Äerné do náhodne barvy"
+pal4 "Druhý pÅ™echod z Äerné do barvy
+a potom do bílé"
+pal5 "Třetí je inspirován
+kubistickými obrazy"
+
+#########################################################
+#For file other.xaf
+
+auto1 "Autopilot"
+auto2 "Ti línější můžou jednoduše
+zapnout autopilota a nechat
+XaoS zkoumat fraktál automaticky"
+fastjulia1 "Režim pro výběr Juliovy množiny"
+fastjulia2 "V tomto režimu můžete měnit
+parametr Juliovy množiny plynule"
+fastjulia3 "Díky podobnosti s okolím
+bodu v Mandelbrotově množině je také
+jej možné použít jako preview bodu
+pÅ™ed tím, než tam zaÄnete zoomovat"
+rotation "Rotace obrazu"
+cycling "Rotace palety"
+
+##############################################
+#for file trice.xaf
+
+trice1 "Triceratops and Catseye fractals"
+trice2 "If you change the bailout value"
+trice3 "of an escape-time fractal"
+trice4 "to a smaller value,"
+trice5 "you will get an other fractal."
+trice6 "With this method we can get"
+trice7 "very interesting patterns"
+trice8 "with separate areas of one color."
+trice9 "The Triceratops fractal"
+trice10 "is also made with this method."
+trice11 "Many similar pictures can be"
+trice12 "made of Triceratops."
+trice13 "The Catseye fractal"
+trice14 "is like an eye of a cat."
+trice15 "But if we raise the bailout value..."
+trice16 "...we get a more interesting fractal..."
+trice17 "...with bubbles..."
+trice18 "...and beautiful Julias."
+
+##############################################
+#for file fourfr.xaf
+
+fourfr1 "Mandelbar, Lambda, Manowar and Spider"
+fourfr2 "This is the Mandelbar set."
+fourfr3 "It's formula is: z = (conj(z))^2 + c"
+fourfr4 "Some of its Julias are interesting."
+fourfr5 "But let's see other fractals now."
+fourfr6 "The Lambda fractal has a structure"
+fourfr7 "similar to Mandelbrot's."
+fourfr8 "It's like the Mandelbrot set on the lambda plane."
+fourfr9 "But Lambda is a Julia set, here is MandelLambda."
+fourfr10 "...fast Julia mode..."
+fourfr11 "This is the fractal Manowar."
+fourfr12 "It was found by a user of Fractint."
+fourfr13 "It has Julias similar to the whole set."
+fourfr14 "This fractal is called Spider."
+fourfr15 "It was found by a user of Fractint, too."
+fourfr16 "And it has Julias similar to the whole set, too."
+
+##############################################
+#for file classic.xaf
+
+classic1 "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+classic2 "This is the famous Sierpinski Gasket fractal."
+classic3 "And this is the escape-time variant of it."
+classic4 "You can change its shape by selecting"
+classic5 "another 'Julia seed'"
+classic6 "This fractal is the Sierpinski Carpet."
+classic7 "And here is it's escape-time variant."
+classic8 "This is famous, too."
+classic9 "And finally, this is the escape-time variant"
+classic10 " of the Koch Snowflake."
+
+
+##############################################
+#for file otherfr.xaf
+
+otherfr1 "Other fractal types in XaoS"
diff --git a/catalogs/deutsch.cat b/catalogs/deutsch.cat
new file mode 100644
index 0000000..954079b
--- /dev/null
+++ b/catalogs/deutsch.cat
@@ -0,0 +1,1067 @@
+# Katalogdatei für die Wiedergabe der XaoS-Tutorials auf deutsch.
+#
+# Copyright (C) 1997 by Jan Hubicka
+# Ãœbersetzung von Jens Kilian <jjk@acm.org>
+#
+# Falls Sie Xaos diese Datei modifizieren wollen, sollten Sie folgendes beachten:
+#
+# Das Format des Kataloges ist
+# identifikator[leerzeichen]"wert"[leerzeichen]
+#
+# Der Identifikator ist ein kurzer Text, der in den Tutorials benutzt wird
+# und nicht übersetzt werden darf. Nur der Wert sollte geändert werden.
+# Verwenden Sie \" anstelle von " und \\ anstelle von \. Zeilenumbrüche
+# direkt eingeben (nicht mit \n).
+#
+# Sie können die Texte verkürzen oder verlängern; XaoS passt die
+# Darstellungszeit automatisch an. Beachten Sie, dass der Text auf einen
+# 320x200 Pixel grossen Bildschirm passen sollte; dazu sollte keine Zeile
+# länger als 40 Zeichen sein. Das ist nicht viel:
+#234567890123456789012345678901234567890
+# Bitte kontrollieren Sie, ob sich die Tutorials bei einer Auflösung von
+# 320x200 noch darstellen lassen.
+#
+# Wenn Sie Fehler in dieser Datei finden, lassen Sie es mich bitte wissen.
+#########################################################
+#Datei: dimension.xaf
+
+fmath "Die Mathematik hinter Fraktalen"
+fmath1 "Fraktale Geometrie ist ein sehr junges
+Gebiet der Mathematik, weshalb hier
+noch viele Fragen ungelöst sind."
+fmath2 "Sogar die Definitionen sind unklar."
+fmath3 "Normalerweise nennen wir etwas fraktal,
+wenn eine gewisse Selbstähnlichkeit
+gefunden werden kann. "
+
+def1 "Eine der möglichen Definitionen ist:"
+#Definition from the intro.xaf is displayed here.
+#If it is a problem in your langage catalog, let me
+#know and I will create a special key
+def2 "Was heisst das?"
+def3 "Um dies zu erklären, müssen wir zuerst
+verstehen, was die topologische- und
+die Hausdorff-Besicovich-Dimension
+sind."
+
+topo1 "Die topologische Dimension
+ist die \"normale\" Dimension."
+topo2 "Ein Punkt hat 0 Dimensionen"
+topo3 "Eine Linie hat 1 Dimension"
+topo4 "Eine Fläche hat 2, usw."
+
+hb1 "Die Definition der
+Hausdorff-Besicovich-Dimension
+kommt von der einfachen Tatsache, dass"
+hb2 "eine Linie die so gezoomt wird,
+dass sich ihre Länge verdoppelt,
+danach zwei mal so lang ist,
+wie sie vorher war."
+hb3 "Andererseits wächst die Ausdehnung
+eines Quadrates, das in gleicher Weise
+gezoomt wird, um den Faktor vier."
+hb4 "Ähnliche Regeln funktionieren auch
+für Objekte, die sich in mehrere
+Dimensionen ausdehnen."
+hb5 "Um Dimensionen mit Hilfe dieser
+Tatsache zu berechnen, kann folgende
+Gleichung benutzt werden:"
+hb6 "Dimension = log s / log z,
+wobei z dem Zoomfaktor
+und s der Ausdehnung entspricht"
+hb7 "Wird eine Linie um den Faktor 2
+gezoomt, ändert auch die Ausdehnung
+um den Faktor 2.
+log 2 / log 2 = 1"
+hb8 "Wird ein Quadrat um den Faktor 2
+gezoomt, ändert die Ausdehnung um den
+Faktor 4.
+log 4 / log 2 = 2"
+hb9 "Diese Definition führt zu den
+erwarteten Resultaten für normale
+Formen."
+hb10 "Interessanter wird es bei Fraktalen."
+hb11 "Sehen Sie sich die so genannte kochsche
+Schneeflockenkurve an,"
+hb12 "welche entsteht, wenn man eine Linie in
+drei gleiche Abschnitte teilt und den
+Mittleren durch zwei ebenso lange
+Abschnitte ersetzt und diesen Vorgang
+beliebig oft wiederholt."
+hb13 "Die neuen Linien haben 1/3 der Grösse
+der ursprünglichen Linie."
+hb14 "Nach dem Zoomen um den Faktor 3,
+sind diese Linien exakt gleich lang
+wie die ursprüngliche Linie."
+hb15 "Wegen der Selbstähnlichkeit, die durch
+unendlich wiederholtes Teilen entsteht,"
+hb15b "wird jedes dieser Teile eine exakte
+Kopie des ursprünglichen Fraktals."
+hb16 "Weil beim Teilen vier solche Kopien
+entstehen, wächst die Ausdehnung des
+Fraktals um den Faktor 4."
+hb17 "Nun setzen wir diesen Wert in unsere
+Gleichung ein:
+log 4 / log 3 = 1.261"
+hb18 "Wir erhalten einen Wert der grösser als
+1 (die topologische Dimension der
+Kurve) ist."
+hb19 "Die Hausdorff-Besicovich-Dimension
+(1.261) ist grösser als die
+topologische Dimension."
+hb20 "Gemäss dieser Definition
+ist die Schneeflockenkurve ein Fraktal."
+
+defe1 "Diese Definition ist jedoch nicht
+perfekt, da sie eine Menge Formen
+ausschliesst, die auch Fraktale sind."
+defe2 "Aber sie zeigt eine der interessanten
+Eigenschaften von Fraktalen"
+defe3 "und sie ist sehr populär."
+defe4 "Die-Hausdorff-Besicovich Dimension
+wird auch \"fraktale Dimension\"
+genannt."
+
+#########################################################
+#Datei: escape.xaf
+
+escape "Die Mathematik hinter Fraktalen
+
+Kapitel 2 - Fliehzeit-Fraktale"
+escape1 "Gewisse Fraktale
+(wie die Schneeflockenkurve)
+werden durch sich wiederholende
+Aufteilung erzeugt."
+escape2 "XaoS kann Fraktale erzeugen,
+die einer andere Kategorie angehören
+und Fliehzeit-Fraktale genannt werden."
+escape3 "Die Methode diese zu erzeugen,
+unterscheidet sich von der im
+vorhergehenden Kapitel erläuterten,
+basiert aber auch auf der Iteration
+(Wiederholung)."
+escape4 "Betrachten wir den ganzen
+Bildschirm als eine komplexe Ebene."
+escape5 "Die reelle Achse ist
+horizontal orientiert."
+escape6 "Die imaginäre Achse ist
+vertikal orientiert."
+escape7 "Jeder Punkt hat sein eigenes Orbital,"
+escape8 "dessen Laufbahn durch die iterative
+Formel f(z,c) beschrieben wird, wobei
+z der Position im Orbital entspricht,
+die der zu berechnenden voran geht,
+und c der Punkt ist, dem das Orbital
+angehört."
+escape9 "Die iterative Funktion
+für die Mandelbrotmenge lautet
+z=z^c+c."
+
+orbit1 "Um das Orbital, das dem Punkt
+0 - 0.6i angehört, zu untersuchen,"
+orbit2 "müssen wir diese komplexe Zahl c
+zuweisen."
+orbit3 "Das Orbital beginnt bei
+z = 0 + 0.6i"
+orbit3b "Wir werten die iterative Funktion
+wiederholt aus, und erhalten bei jeder
+Auswertung einen neuen Punkt im
+Orbital, den wir sogleich für die
+nächste Auswertung verwenden."
+orbit4 "Der Punkt gehört der Mandelbrotmenge an,
+falls das Orbital in der
+Endlichkeit bleibt."
+orbit5 "In unserem Beispiel ist dies der Fall..."
+orbit6 "Somit gehört dieser Punkt der
+Mandelbrotmenge an."
+orbit7 "In anderen Fällen verschwinden
+die Orbitale in der Unendlichkeit."
+orbit8 "Untersuchen wir zum Beispiel den Punkt
+10 + 0i, erhalten wir nach der ersten
+Iteration 10, nach der zweiten 110,
+nach der dritten 12110, usw."
+orbit9 "Solche Punkte gehören nicht der
+Mandelbrotmenge an."
+
+bail1 "Bis jetzt sprechen wir immer noch von
+unendlich grossen Zahlen."
+bail2 "Da Computer nur endliche Zahlen
+darstellen können, sind sie nicht in
+der Lage Fraktale exakt zu berechnen."
+bail3 "Es kann jedoch bewiesen werden,
+dass Orbitale, die einen Abstand von
+2 vom Nullpunkt überschreiten, stets
+in der Unendlichkeit verschwinden."
+bail4 "Somit können die Berechnungen
+abgebrochen werden, sobald das Orbital
+einen Abstand von 2 vom Nullpunkt
+überschritten hat und damit den
+so genannten Bailout-Test nicht
+bestanden hat."
+bail5 "Für Punkte die nicht der
+Mandelbrotmenge angehören, benötigen
+wir jetzt nur noch eine endliche Anzahl
+Iterationen."
+bail6 "Auf diese Weise entstehen die farbigen
+Streifen um die Mandelbrotmenge."
+bail7 "Sie werden je nach Anzahl Iterationen
+eingefärbt, die notwendig sind, um
+einen Abstand von 2 vom Nullpunkt zu
+überschreitet."
+
+iter1 "Auch für Punkte die der Mandelbrotmenge
+angehören, sind unendlich viele
+Iterationen möglich."
+iter2 "Um die Berechnungen zu einem Ende
+zu bringen, wird nach einer
+vorgegebener Anzahl Iterationen
+abgebrochen und angenommen, dass der
+Punkt der Mandelbrotmenge angehört."
+iter3 "Die maximale Anzahl der Iterationen
+bestimmt die Genauigkeit der
+Annäherung."
+iter4 "Ohne Iterationen würde lediglich
+ein Kreis mit Radius 2 entstehen."
+iter5 "Je höher die maximale Anzahl
+Iterationen, um so exakter die
+Annäherung und um so mehr Zeit wird für
+die Berechnung benötigt."
+limit1 "XaoS verwendet standardmässig
+170 Iterationen."
+limit2 "In gewisse Bereiche können Sie
+weit hinein zoomen, ohne unexakte
+Resultate zu erhalten."
+limit3 "In anderen Bereichen erhalten Sie
+relativ schnell unexakte Resultate."
+limit4 "Die Bilder werden ziemlich langweilig,
+wenn dies geschieht."
+limit5 "Nach erhöhen der maximalen Anzahl
+Iterationen erhalten Sie neue,
+interessante Details."
+
+ofracts1 "Andere Fraktale in XaoS werden mit
+anderen Formeln und Bailout-Tests
+berechnet, die Methode bleibt aber
+grundsätzlich die selbe."
+ofracts2 "Es sind so viele Berechnungen notwendig,
+dass XaoS viele Optimierungen
+vornehmen muss.
+
+Mehr Informationen darüber finden Sie
+in der Datei doc/xaos.info"
+
+#########################################################
+# Datei: anim.xaf
+
+anim "Ãœberblick: Features von XaoS
+
+Animations- und Positions-Dateien"
+
+#########################################################
+# Datei: anim.xhf
+
+anim2 "Wie Sie wahrscheinlich gemerkt haben,
+kann XaoS aufgezeichnete Animationen
+und Tutorials wiedergeben."
+
+anim3 "Die Aufzeichnung erfolgt direkt in XaoS."
+
+languag1 "Animations- und Positionsdateien
+werden in einer einfachen Kommando-
+sprache gespeichert."
+
+languag2 "Positionsdateien enthalten eine
+Animation mit nur einem Teilbild."
+
+languag3 "Die Dateien sollten nachträglich von
+Hand bearbeitet werden, um das Ergebnis
+zu verbessern."
+
+languag4 "Die meisten Animationen in den Tutorials
+wurden komplett von Hand erstellt
+(ausgehend von einer Positionsdatei)."
+
+modif1 "Eine simple Änderung dieser
+vereinfachten Positionsdatei"
+
+modif2 "ergibt eine Kamerafahrt rückwärts."
+modif3 "Und diese Änderung eine Vorwärtsfahrt."
+
+newanim "Sie können auch komplett neue
+Animationen und Effekte erzeugen."
+
+examples "Viele Beispiele sind beigefügt, aus
+denen Sie mit dem Save/Load-Menü eine
+zufällige Auswahl treffen können."
+
+examples2 "Über die Positionsdateien können Sie
+auch Koordinaten mit anderen Programmen
+austauschen."
+
+examples3 "Die einzigen Beschränkungen sind Ihre
+Phantasie und die Kommandosprache, die
+im File \"xaos.info\" beschrieben wird."
+
+#########################################################
+# Datei: barnsley.xaf
+
+intro4 "Fraktale - Eine Einführung
+
+Kapitel 5 - Die Barnsley-Formel"
+
+barnsley1 "Eine weitere Formel, die von
+Michael Barnsley eingeführt wurde."
+
+barnsley2 "Sie erzeugt dieses seltsame Fraktal."
+
+barnsley3 "Es hat keine besonders interessanten
+Stellen -"
+
+barnsley4 "Aber ihre Juliamengen sind hübsch."
+
+barnsley5 "Es hat interessanterweise eine
+\"kristalline\" Struktur,"
+
+barnsley6 "im Gegensatz zu den \"organischen\"
+Strukturen vieler anderer Fraktale."
+
+barnsley7 "Michael Barnsley hat auch andere
+Formeln eingeführt."
+
+barnsley8
+ "Eine davon erzeugt dieses Fraktal."
+
+#########################################################
+# Datei: filter.xaf
+
+filter "Ãœberblick: Features von XaoS
+
+Filter"
+
+#########################################################
+# Datei: filter.xhf
+
+filter1 "Ein Filter ist ein Effekt, der auf jedes
+Teilbild angewendet wird, nachdem das
+Fraktal berechnet wurde."
+
+filter2 "XaoS besitzt folgende Filter:"
+
+# Fällt jemandem was Besseres ein?
+motblur "Motion Blur"
+
+edge "Zwei Kantenerkennungsfilter"
+
+edge2 "Der erste erzeugt breite Linien
+und eignet sich besonders für
+hohe Auflösungen."
+
+edge3 "Der zweite macht die Linien schmaler."
+
+star "Ein einfacher Sternenfilter"
+
+interlace "Der Halbbildfilter beschleunigt die
+Berechnung und erzeugt bei hoher
+Auflösung einen Bewegungseffekt."
+
+stereo "Stereogramm-Filter"
+
+stereo2 "Falls Sie in den nächsten Beispielen
+nichts sehen können, obwohl Sie
+Stereogramme schon kennen, ist wahr-
+scheinlich Ihre Bildschirmgröße falsch
+konfiguriert. \"XaoS-Hilfe\" gibt Ihnen
+weitere Informationen."
+
+emboss1 "Ein Prägeeffekt-Filter"
+
+palettef1 "Ein Palettenemulator macht es möglich,
+auch auf Truecolor-Bildschirmen eine
+Palettenrotation darzustellen."
+
+truecolorf "Ein Truecolor-Filter erlaubt es Ihnen,
+auch auf 8-Bit-Bildschirmen Echtfarb-
+Darstellungen zu erzeugen."
+
+#########################################################
+# Datei: fractal.xaf
+
+end "Ende"
+
+fcopyright "Die Einführung in die Fraktale wurde
+im Juli 1997 von Jan Hubicka erstellt.
+Ãœbersetzung von Jens Kilian."
+
+suggestions "
+Bitte schicken Sie alle Ideen,
+Vorschläge, Danksagungen, Flames
+und Bug-Reports an
+
+xaos-discuss@lists.sourceforge.net
+
+Danke."
+
+#########################################################
+# Datei: incolor.xaf
+
+incolor1 "Normalerweise werden die Bildpunkte
+im Innern der berechneten Menge als
+einheitliche Farbe dargestellt."
+
+incolor2 "Dies macht die Ränder der Menge deutlich
+sichtbar, aber der Innenraum kann durch
+die Farbfläche recht langweilig werden."
+
+incolor3 "Um ihn etwas interessanter zu machen,
+kann der letzte Orbitwert benutzt
+werden, um die Farbe zu bestimmen."
+
+incolor4 "XaoS besitzt zehn verschiedene Methoden
+dafür, genannt \"Innere Färbungs Modi\"."
+
+zmag "zmag
+
+Die Farbe wird aus dem Betrag
+des letzten Orbits berechnet."
+
+#########################################################
+# Datei: innew.xaf
+
+innew1 "decomposition like
+
+Arbeitet in derselben Weise wie die
+Farbzerlegung bei der Einfärbung
+der äußeren Bildpunkte."
+
+
+innew2 "real/imag
+
+Die Farbe errechnet sich aus dem
+Realteil des letzten Orbits, geteilt
+durch den Imaginärteil."
+
+innew3 "Die anderen 6 Modi sind meist zufällig
+gewählte oder aus dem Programm
+\"Flarium\" stammende Formeln."
+
+#########################################################
+# Datei: intro.xaf
+
+fractal "...Fraktale..."
+fractal1 "Was ist ein Fraktal?"
+
+fractal2 "Die Definition von Benoit Mandelbrot:
+Ein Fraktal ist eine Menge, deren
+Hausdorff-Besicovich-Dimension ihre
+topologische Dimension übersteigt."
+
+fractal3 "Noch Fragen?"
+
+fractal4 "Egal. Diese Definition ist anfechtbar."
+
+fractal5 "In einfacheren Worten:
+Ein Fraktal ist eine Form,"
+
+fractal6 "zusammengesetzt aus Einzelstücken,"
+
+fractal7 "von denen jedes angenähert eine
+verkleinerte Kopie des Ganzen ist."
+
+fractal8 "Dieser Prozess, immer wieder angewendet,"
+
+fractal9 "erzeugt das gesamte Fraktal."
+
+facts "Fraktale haben viele
+überraschende Eigenschaften."
+
+fact1 "Fraktale sind maßstabsunabhängig,"
+fact2 "sie sind selbstähnlich,"
+fact3 "und sie beschreiben Objekte,
+wie sie in der Natur vorkommen."
+fact4 "Zum Beispiel Wolken, Berge oder Küsten."
+fact5 "Es gibt auch viele mathematische
+Strukturen, die Fraktale sind."
+fact6 "Wie jene, die Sie auf dem Bildschirm sehen."
+fact7 "Die vielleicht bekannteste ist..."
+
+fmath4 "Die meisten Fraktale entstehen durch
+einen iterativen Prozess."
+fmath5 "So wird zum Beispiel das Fraktal, das
+unter dem Name kochsche Schneeflocken Kurve
+bekannt ist,"
+fmath6 "durch iteratives Ändern einer Linie"
+fmath7 "in vier Linien erzeugt."
+fmath8 "Dies ist die erste Iteration des
+Prozesses."
+fmath9 "Nun wiederholen wir den Vorgang."
+fmath10 "Nach 2 Iterationen..."
+fmath11 "Nach 3 Iterationen..."
+fmath12 "Nach 4 Iterationen..."
+fmath13 "Und nach unendlicher Anzahl Iterationen
+erhalten wir ein Fraktal."
+fmath14 "Seine Form sieht aus wie ein Teil einer
+Schneeflocke."
+tree1 "Mit ähnlichen Methoden kann eine
+Vielzahl anderer Formen erzeugt werden."
+tree2 "Indem man eine Linie in anderer Weise
+ändert,"
+tree3 "erhält man zum Beispiel einen Baum."
+nstr "Iterationen können auch zufällige
+Störungen in das Fraktal einbringen."
+nstr2 "Indem man eine Linie in zwei Linien
+ändert"
+nstr3 "und einen kleinen Fehler hinzufügt,"
+nstr4 "kann man Fraktale erzeugen, die wie
+Küstenlinien aussehen."
+nstr5 "Ein ähnlicher Prozess könnte Wolken,
+Berge und viele andere natürliche
+Formen erzeugen."
+
+mset "Die Mandelbrotmenge."
+mset1 "Sie wird durch eine sehr
+einfache Formel erzeugt,"
+mset2 "aber sie ist eines der
+schönsten Fraktale."
+mset3 "Weil die Mandelbrotmenge ein Fraktal ist,"
+mset4 "enthalten ihre Randbereiche"
+mset5 "verkleinerte Kopien der Gesamtmenge."
+mset6 "Dies ist die größte davon,
+nur ungefähr 50 mal kleiner."
+mset7 "Weil die Mandelbrotmenge nicht
+strikt selbstähnlich ist,"
+mset8 "sind alle diese Mini-Kopien verschieden."
+mset9 "Diese ist 76000 mal kleiner."
+mset10 "Kopien in anderen Bereichen der Menge
+weisen größere Unterschiede auf."
+
+nat "Aber die Randbereiche enthalten
+nicht nur Kopien der Gesamtmenge."
+nat1 "Sie enthalten auch unendliche
+Variationen verschiedener Ornamente."
+nat2 "Einige davon ähneln in überraschender
+Weise Formen, wie man sie in der Natur
+vorfindet."
+nat3 "Sie können dort Bäume,"
+nat4 "Flüsse und Seen,"
+nat5 "Galaxien"
+nat6 "und Wasserfälle finden."
+nat7 "Das Fraktal enthält auch Formen
+ohne jede Entsprechung."
+
+juliach "Fraktale - Eine Einführung
+
+Kapitel 2 - Julia"
+julia "Die Mandelbrotmenge ist nicht das
+einzige Fraktal, das durch die Formel
+z=z^2+c erzeugt wird."
+julia1 "Ebenfalls berühmt sind die"
+julia2 "Juliamengen."
+julia3 "Interessant an ihnen ist, daß es
+nicht nur eine einzige Juliamenge gibt,"
+julia4 "sondern unendlich viele Variationen."
+julia5 "Sie alle unterscheiden sich nur
+im Startwert der Formel,"
+julia6 "einem Punkt aus der Mandelbrotmenge."
+julia7 "Man kann die Mandelbrotmenge
+als Karte der Juliamengen betrachten."
+julia8 "Punkte im Innern der Menge entsprechen
+Juliamengen mit großen geschlossenen
+schwarzen Flächen."
+julia9 "Punkte außerhalb der Menge entsprechen
+nicht zusammenhängenden Juliamengen."
+julia10 "Die interessantesten Juliamengen
+gehören aber zu den Randpunkten."
+
+theme "Das Aussehen der Juliamenge hängt stark
+von dem ausgewählten Startpunkt ab."
+theme1 "Bei starker Vergrößerung erhält man ein
+sehr ähnlich aussehendes Fraktal,"
+theme2 "nachdem man auf die Julia-
+Darstellung umschaltet."
+theme3 "Aber beim Herausfahren werden Sie sehen,"
+theme4 "daß Sie sich in einem völlig
+anderen Fraktal befinden."
+theme5 "Juliamengen scheinen recht
+langweilig zu sein, weil sich
+ihr Aussehen nicht ändert,"
+theme6 "sondern immer der ausgewählten Stelle
+aus der Mandelbrotmenge ähnlich sieht."
+theme7 "Aber durch sorgfältige Wahl
+des Anfangspunktes ergeben sich"
+theme8 "schöne Bilder."
+
+#########################################################
+# Datei: keys.xhf
+
+keys "Tasten:
+
+q - Wiedergabe abbrechen
+Space - Bild überspringen
+ (kann etwas dauern)
+Left/Right - Geschwindigkeit anpassen"
+
+#########################################################
+# Datei: magnet.xaf
+
+intro7 "Fraktale - Eine Einführung
+
+Kapitel 8 - Magnet"
+
+magnet "Dies ist NICHT die Mandelbotmenge."
+magnet1 "Dieses Fraktal heißt \"Magnet\",
+weil seine Berechnungsformel aus
+der theoretischen Physik kommt."
+magnet2 "Es stammt aus der Erforschung
+theoretischer Gitterstrukturen
+auf dem Gebiet magnetischer
+Renormalisierungstransformationen."
+# Ey boah, ey!
+
+similiar "Seine Ähnlichkeit mit der Mandelbrotmenge
+ist interessant, weil dies eine Formel
+aus der realen Welt ist."
+
+magjulia "Seine Juliamenge sind recht ungewöhnlich."
+
+magnet3 "Es gibt auch noch ein zweites
+Magnet Fraktal."
+
+#########################################################
+# Datei: new.xaf
+
+new "Was gibt's Neues in Version 3.0?"
+speed "1. Speedups"
+speed1 "Die Haupt-Berechnungsschleifen wurden
+entrollt und führen eine
+Periodizitätsprüfung durch."
+speed2 "Vollbilder werden durch
+Boundary-Tracing berechnet."
+speed3 "Dadurch ist die Vollbildberechnung
+jetzt erheblich schneller."
+speed4 "Zum Beispiel die Berechnung
+der Mandelbrotmenge mit
+1.000.000 Iterationen..."
+speed5 "Berechnung läuft."
+speed6 "Fertig."
+speed7 "XaoS benutzt eine Heuristik und schaltet
+die Periodizitätsprüfung ab, wenn der
+berechnete Punkt vermutlich nicht ins
+Innere der Mandelbrotmenge fällt."
+speed8 "Auch die Zoom-Funktionen wurden
+beschleunigt, so daß sie jetzt
+ca. doppelt so schnell sind."
+speed9 "Auf einem 130MHz-Pentium
+erreicht XaoS jetzt 130FPS."
+# Arrgh. Auf meiner 2x133MHz BeBox nicht.
+# Aber wir werden ja noch sehen...
+
+new2 "2. Filter"
+new3 "3. Neun \"Äussere Färbungs Modi\""
+new4 "4. Neue \"Innere Färbungs Modi\""
+new5 "5. Truecolor-Modi"
+new6 "6. Speichern/Wiedergabe von Animationen"
+newend "Und viele andere Verbesserungen, z.B.
+Bildrotation und Palettenerzeugung.
+Die volle Liste steht im \"ChangeLog\"."
+
+#########################################################
+# Datei: newton.xaf
+
+intro3 "Fraktale - Eine Einführung
+
+Kapitel 4 - Die Newton-Methode"
+newton "Dieses Fraktal wird auf eine
+völlig andere Weise berechnet -"
+newton1 "Newtonsche Approximation zum Auffinden
+der Wurzeln des Polynoms x^3=1."
+newton2 "Gezählt wird die Anzahl der Iterationen
+beim Auffinden der genäherten Wurzel."
+newton3 "Sie können die drei Wurzeln
+sehen (als blaue Kreise)."
+newton4 "Die interessantesten Stellen sind jene,
+an denen das Newton-Verfahren unsicher
+ist, welche der Wurzeln richtig ist."
+newton5 "Das Fraktal ist sehr selbstähnlich
+und nicht besonders interessant."
+newton6 "Aber XaoS kann \"Pseudo-Juliamengen\"
+dafür erzeugen."
+newton7 "Es benutzt dazu den Startwert als
+Fehler bei der Approximation."
+newton8 "Das macht das Fraktal interessanter."
+newton9 "XaoS kann auch noch ein anderes
+Newton Fraktal erzeugen."
+newton10 "Newtonsche Approximation zum Auffinden
+der Wurzeln des Polynoms x^4=1."
+newton11 "Auch hier können Sie die vier Wurzeln
+sehen (als blaue Kreise)."
+
+#########################################################
+# Datei: octo.xaf
+intro6 "Fraktale - Eine Einführung
+
+Kapitel 7 - Octo"
+octo "Octo ist ein Fraktal, das durch
+eine weniger oft benutzte Formel
+erzeugt wird."
+octo1 "Wir haben es für XaoS wegen seiner
+ungewöhnlichen Form ausgewählt."
+octo2 "XaoS kann \"Pseudo-Juliamengen\" dafür
+erzeugen, ähnlich wie bei \"Newton\"."
+
+#########################################################
+# Datei: outcolor.xaf
+
+outcolor "Äussere Färbungs Modi"
+outcolor1 "Die Mandelbrotmenge ist der langweilige
+schwarze Teich in der Bildschirmmitte."
+outcolor2 "Die farbigen Streifen rundherum
+sind die Randbereiche der Menge."
+outcolor3 "Normalerweise werden zum Einfärben die
+Iterationen gezählt, bis der Wert der
+Formel z^2+c einen Grenzwert erreicht."
+outcolor4 "Aber es gibt auch andere Methoden,
+die Menge zu visualisieren."
+outcolor5 "In XaoS heißen sie \"Äussere Färbungs Modi\"."
+
+iterreal "iter+real
+
+Berechnet die Farbe aus dem Realteil
+des letzten Orbits plus der Anzahl
+der Iterationen."
+iterreal1 "Sie können diesen Modus benutzen,
+um langweilige Bilder hübscher
+zu machen."
+
+iterimag "Der zweite Modus - iter+imag -
+ergibt ähnliche Resultate."
+iterimag2 "Der einzige Unterschied dabei ist,
+daß der Imaginärteil des Orbits
+verwendet wird."
+
+iprdi "iter+real/imag
+
+Berechnet die Farbe aus dem Quotienten
+von Real- und Imaginärteil des letzten
+Orbits plus der Anzahl der Iterationen."
+
+sum "iter+real+imag+real/imag
+
+Die Summe aller vorigen Modi."
+
+decomp "Binäre Zerlegung
+
+Wenn der Imaginärteil positiv ist,
+wird die Zahl der Iterationen benutzt,
+ansonsten die Differenz zwischen der
+maximalen und gemessenen Anzahl."
+
+bio "Biomorphs
+
+Dieser Modus heißt so, weil er einigen
+Fraktalen das Aussehen einzelliger
+Lebewesen verleiht."
+
+#########################################################
+# Datei: outnew.xhf
+
+potential "Potential
+
+Dieser Modus sieht besonders gut
+in Truecolor-Darstellung bei
+wenig vergrößerten Bildern aus."
+
+cdecom "Farbzerlegung"
+cdecom2 "Die Farbe wird aus dem Winkel
+des letzten Orbits berechnet."
+cdecom3 "Die Farbzerlegung ähnelt der binären
+Zerlegung, aber interpoliert die
+Farben gleichmäßig."
+cdecom4 "Im Newton-Fraktal kann sie benutzt
+werden, um eine Einfärbung aufgrund
+der angenäherten Wurzel zu erzielen."
+
+smooth "Farbverlauf
+
+Der Farbverlaufsmodus versucht die
+durch die Iterationen verursachten
+Streifen aufzulösen und glatte
+Farbübergänge zu schaffen."
+smooth1 "Er funktioniert nicht bei den Fraktalen
+\"Newton\" und \"Magnet\", weil diese
+endliche Attraktoren besitzen."
+smooth2 "Er benötigt außerdem einen Truecolor-,
+Hi-Color- oder Real-Color-Modus.
+Bei 8bpp-Darstellung muß dazu der
+Truecolor-Filter eingeschaltet werden."
+
+#########################################################
+# Datei: outnew.xhf
+
+intro5 "Fraktale - Eine Einführung
+
+Kapitel 6 - Phoenix"
+
+phoenix "Dies ist die Mandelbrotmenge
+der Formel namens \"Phoenix\"."
+
+phoenix1 "Sie sieht anders aus als die anderen
+Fraktale in XaoS, aber man kann einige
+Ähnlichkeiten zur Mandelbrotmenge
+darin finden."
+
+phoenix2 "Sie enthält ebenfalls eine \"Antenne\"
+mit Miniaturkopien der Gesamtmenge."
+
+phoenix3 "Es gibt auch thematische Zusammenhänge
+zwischen den Juliamengen und der
+Mandelbrot-Version."
+
+phoenix4 "Aber die Juliamengen
+sind sehr verschieden."
+
+#########################################################
+# Datei: plane.xaf
+
+plane1 "Normalerweise wird der Realteil eines
+Bildpunktes auf die X-Achse des Bild-
+schirms abgebildet, der Imanginärteil
+auf die Y-Achse."
+
+plane2 "XaoS bietet 6 alternative
+Abbildungsebenen an."
+plane3 "1/mu
+
+Dies ist eine Inversion. Der unendlich
+ferne Punkt wird auf 0 abgebildet und
+umgekehrt. Auf diese Art können Sie
+festellen, was mit dem Fraktal bei
+unendlichem Herauszoomen passiert."
+plane4 "Dies ist eine normal Mandelbrotmenge."
+plane5 "Diese ist invertiert."
+plane6 "Wie Sie sehen, war die Menge vorher in
+der Bildmitte, jetzt liegt sie am Rand.
+Das unendlich große blaue Gebiet rund
+um die Menge wurde auf einen kleinen
+Kreis um den Nullpunkt abgebildet."
+plane7 "Die nächsten Bilder werden alle jeweils
+normal und invertiert dargestellt,
+damit Sie sehen können, was passiert."
+
+plane8 "1/mu+0.25
+
+Dieser Modus ähnelt der Inversion,
+aber mit einem verschobenen Zentrum."
+plane9 "Weil der Mittelpunkt jetzt auf dem Rand
+der Mandelbrotmenge liegt, können Sie
+unendlich große parabolische Strukturen
+sehen."
+plane10 "Bei anderen Fraktalen treten ebenfalls
+interessante Effekte auf, weil dieser
+Modus normalerweise die Symmetrien
+aufbricht."
+
+lambda "Eine völlig andere Darstellung
+ergibt die lambda-Ebene."
+
+ilambda "1/lambda
+
+Dies ist eine Kombination der Inversion
+mit der lambda-Ebene."
+
+imlambda "1/(lambda-1)
+
+Dies ist eine Kombination der
+Inversion mit einer Verschiebung
+in der lambda-Ebene."
+
+imlambda2 "Sie bewirkt eine sehr interessante
+Verformung der Mandelbrotmenge."
+
+mick "1/(mu-1.40115)
+
+Dies ist wiederum eine Inversion mit
+verschobenem Zentrum. Der Mittelpunkt
+ist nun der Feigenbaum-Punkt, an dem
+die Menge selbstähnlich ist. Details
+rund um diesen Punkt werden stark
+vergrößert."
+
+#########################################################
+# Datei: power.xaf
+
+intro2 "Fraktale - Eine Einführung
+
+Kapitel 3
+Mandelbrotmengen höherer Ordnung"
+
+power "z^2+c ist nicht die einzige Formel,
+die ein Fraktal erzeugt."
+power2 "Eine leicht veränderte Version - z^3+c -
+ergibt ein ähnliches Fraktal."
+power3 "Es enthält natürlich auch
+Kopien der Gesamtmenge."
+
+power4 "Ähnliche Fraktale können mit
+weiteren leicht veränderten
+Formeln erzeugt werden."
+
+pjulia "Jedes davon hat auch
+entsprechende Juliamengen."
+
+#########################################################
+# Datei: truecolor.xaf
+
+truecolor "Truecolor-Modi"
+truecolor1 "Normalerweise werden die Fraktale
+mit Hilfe einer Palette eingefärbt.
+Bei Truecolor-Darstellung wird die
+Palette emuliert."
+truecolor2 "Der einzige Unterschied ist, daß
+die Palette größer ist und die
+Farbverläufe glatter sind."
+truecolor3 "Der Truecolor-Farbmodus arbeitet
+auf völlig andere Weise. Er benutzt
+verschiedene Parameter, die bei der
+Berechnung des Fraktals auftreten."
+truecolor4 "Er berechnet die Farben selbst, anstelle
+eine Palette zu benutzen."
+truecolor5 "Dies erlaubt, bis zu vier verschiedene
+Werte in einem Pixel darzustellen."
+truecolor6 "Der Truecolor-Farbmodus funktioniert
+natürlich nur in Truecolor-Darstellung.
+Auf einem 8-bit-Display müssen Sie also
+den Truecolor-Filter aktivieren."
+
+#########################################################
+#for file pert.xaf #NEW (up to end of file)
+
+pert0 "Perturbation"
+pert1 "Der Anfangswert bei Darstellung einer
+Juliamenge erlaubt es, mit derselben
+Berechnungsformel verschiedene
+Juliamengen zu erzeugen."
+pert2 "Sie können für die Mandelbrotmenge durch
+Angabe eines Perturbationswertes einen
+ähnlichen Effekt erreichen."
+pert3 "Dieser Wert verändert den Ausgangspunkt
+für die Iteration (normal [0,0])."
+pert4 "Er verändert das Fraktal nicht so stark
+wie es der Startwert einer Juliamenge
+tut, aber er ist nützlich, wenn Sie das
+Fraktal etwas zufälliger machen wollen."
+
+##########################################################
+#for file palette.xaf
+
+pal "Zufallspaletten"
+pal0 "XaoS hat keine große Bibliothek von
+vordefinierten Paletten (wie viele
+anderer Programme), sonder erzeugt
+zufällige Paletten."
+pal1 "Sie können solange die Taste 'P' drücken,
+bis XaoS eine Palette erzeugt, die
+Ihnen gefällt."
+pal2 "Drei verschiedene Algorithmen
+werden dafür benutzt."
+pal3 "Der erste erzeugt Übergänge von farbigen
+zu schwarzen Streifen."
+pal4 "Der zweite erzeugt Übergänge von
+schwarzen über farbige zu weißen
+Streifen."
+pal5 "Der letzte wurde von kubistischer
+Malerei inspiriert."
+
+###########################################################
+#for file other.xaf
+
+auto1 "Autopilot"
+auto2 "Wenn Sie faul sind, können Sie den
+Autopiloten einschalten und XaoS
+das Fraktal automatisch erforschen
+lassen."
+fastjulia1 "Schneller Julia-Suchmodus"
+fastjulia2 "In diesem Modus können Sie den
+Anfangswert einer Juliamenge
+durch eine Animation finden."
+fastjulia3 "Er ist auch nützlich als eine Vorschau
+der Juliamenge, bevor Sie hereinzoomen.
+Wegen des thematischen Zusammenhangs
+zwischen Juliamenge und der Umgebung
+des gewählten Punktes können Sie das
+ungefähre Aussehen im Voraus bestimmen."
+rotation "Bildrotation"
+cycling "Palettenrotation"
+bailout "Fluchtradius"
+bailout1 "Das ist die Mandelbrotmenge unter
+Verwendung der äusseren Färbung Smooth."
+bailout2 "Vergrössert man den Fluchtradius auf 64,
+erhält man ausgeglichenere
+Farbübergänge."
+bailout3 "Bei den meisten Fraktaltypen ergeben
+sich bei verschiedenen Werten für den
+Fluchtradius ähnliche Fraktale."
+bailout4 "Dies gilt nicht für Barnsley Fraktale."
+
+
+
+
+##############################################
+#for file trice.xaf
+
+trice1 "Triceratops und Katzenaugen Fraktale"
+trice2 "Wenn Sie den Fuchtradius"
+trice3 "eines Fliehzeit-Fraktals"
+trice4 "auf einen kleineren Wert ändern,"
+trice5 "erhalten Sie ein anderes Fraktal."
+trice6 "Mit dieser Methode erhalten wir"
+trice7 "sehr interessante Muster"
+trice8 "mit separaten Gebieten einer Farbe."
+trice9 "Das Triceratops Fraktal"
+trice10 "wird auch mit dieser Methode erzeugt."
+trice11 "Viele ähnliche Bilder"
+trice12 "können mit Triceratops erzeugt werden."
+trice13 "Das Katzenaugen Fraktal"
+trice14 "sieht wie ein Katzenauge aus."
+trice15 "Wenn wie den Fluchtradius vergrössern..."
+trice16 "...erhalten wir ein interessanteres Fraktal..."
+trice17 "...mit Blasen..."
+trice18 "...und schönen Juliamengen."
+
+##############################################
+#for file fourfr.xaf
+
+fourfr1 "Mandelbar, Lambda, Manowar and Spider"
+fourfr2 "Das ist die Mandelbarmenge."
+fourfr3 "Ihre Formel ist: z = (conj(z))^2 + c"
+fourfr4 "Manche ihrer Juliamengen sind interessant."
+fourfr5 "Doch lasst uns jetzt andere Fraktale sehen."
+fourfr6 "Das Lambda Fraktal hat eine Struktur"
+fourfr7 "ähnlich dem Mandelbrot Fraktal."
+fourfr8 "Es ähnelt der Mandelbrotmenge in der Lambda Ebene."
+fourfr9 "Lambda ist eine Juliamenge, hier die Mandelbrotmenge."
+fourfr10 "...schneller Julia Modus..."
+fourfr11 "Das ist das Manowar Fraktal."
+fourfr12 "Es wurde von einem Fractint Benutzer gefunden."
+fourfr13 "Es hat Juliamengen, die ihm ähneln."
+fourfr14 "Dieses Fraktal heisst Spider."
+fourfr15 "Es wurde auch von einem Fractint Benutzer gefunden."
+fourfr16 "Es hat auch Juliamengen, die ihm ähneln."
+
+##############################################
+#for file classic.xaf
+
+classic1 "Sierpinski Dichtung, S.Teppich, Kochsche Schneeflocke"
+classic2 "Das ist das berühmte Sierpinski Dichtungs Fraktal."
+classic3 "Und das ist die Fliehzeit Variante davon."
+classic4 "Sie können seine Form ändern indem Sie"
+classic5 "einen anderen Julia Wert wählen"
+classic6 "Dieses Fraktal ist der Sierpinski Teppich."
+classic7 "Und das ist die Fliehzeit Variante davon."
+classic8 "Das ist ebenfalls berühmt."
+classic9 "Und das ist schliesslich die Fliehzeit Variante"
+classic10 "der Kochschen Schneeflocken."
+
+##############################################
+#for file otherfr.xaf
+
+otherfr1 "Andere Fraktale in XaoS"
diff --git a/catalogs/english.cat b/catalogs/english.cat
new file mode 100644
index 0000000..c94fda9
--- /dev/null
+++ b/catalogs/english.cat
@@ -0,0 +1,1078 @@
+# Message catalog file required to replay XaoS tutorials in
+# English language
+#
+# Copyright (C) 1997 by Jan Hubicka
+#
+# Corrected by Tim Goowin
+# Further corrections by David Meleedy
+# And some more by Nix
+#
+# There are a few things you should know if you want to change or
+# translate this file.
+#
+# The format of this catalog is identifier[blanks]"value"[blanks]
+#
+# Identifier is a key used by the program. Do not translate it! Only
+# translate the value. If you want a quote character `"' in the text,
+# use `\"'. For `\' use `\\'. Don't use `\n' for enter; use a literal
+# newline.
+#
+# If you wish to translate this file into any new language, please let
+# me know. You should translate this text freely: you don't need to use
+# exactly the same sentences as here, if you have idea how to make text
+# more funny, interesting, or add some information, do it.
+#
+# You can use longer or shorter sentences, since XaoS will automatically
+# calculate time for each subtitle.
+#
+# Also, please let me have any suggestions for improving this text and
+# the tutorials.
+#
+# Tutorial text needs to fit into a 320x200 screen. So all lines must be
+# shorter than 40 characters. This is 40 characters:
+#234567890123456789012345678901234567890
+# And thats not much! Be careful!
+# Please check that your updated tutorials work in 320x200 to ensure
+# that everything is OK.
+#########################################################
+#For file dimension.xaf
+
+fmath "The math behind fractals"
+fmath1 "Fractals are a very new field
+of math, so there are still lots
+of unsolved questions."
+fmath2 "Even the definitions are not clean"
+fmath3 "We usually call something a fractal
+if some self-similarity can be found"
+
+
+def1 "One of the possible definitions is..."
+#Definition from the intro.xaf is displayed here.
+#If it is a problem in your langage catalog, let me
+#know and I will create a special key
+def2 "What does this mean?"
+def3 "To explain it we first need
+to understand what the topological and
+Hausdorff Besicovich dimensions are."
+
+topo1 "The topological dimension
+is the \"normal\" dimension."
+topo2 "A point has 0 dimensions"
+topo3 "A line has 1"
+topo4 "A surface has 2, etc..."
+
+hb1 "The definition of the
+Hausdorff Besicovich dimension
+comes from the simple fact that:"
+hb2 "A line that is zoomed so that it doubles
+in length is twice as long as it was."
+hb3 "On the other hand, the size
+of a square that is similarly zoomed
+grows by four times."
+hb4 "Similar rules work in higher
+dimensions too."
+hb5 "To calculate dimensions from
+this fact, you can use the
+following equation:"
+hb6 "dimension = log s / log z
+where z is the zoom change and
+s is the size change"
+hb7 "for a line with zoom 2,
+the size change is also 2.
+log 2 / log 2 = 1"
+hb8 "for a square with zoom 2,
+the size change is 4.
+log 4 / log 2 = 2"
+hb9 "So this definition gives
+the same results for normal shapes"
+hb10 "Things will become more interesting
+with fractals..."
+
+hb11 "Consider a snowflake curve"
+hb12 "which is created by repeatedly
+splitting a line into four lines."
+hb13 "The new lines are 1/3 the size of
+the original line"
+hb14 "After zooming 3 times, these lines will
+become exactly as big as the
+original lines."
+hb15 "Because of the self similarity created
+by the infinite repeating
+of this metamorphosis,"
+hb15b "each of these parts will
+become an exact copy of the original
+fractal."
+hb16 "Because there are four such copies, the
+fractal size grows by 4X"
+hb17 "After putting these values in equations:
+log 4 / log 3 = 1.261"
+hb18 "We get a value greater than 1
+(The topological dimension
+of the curve)"
+hb19 "The Hausdorff Besicovich dimension
+(1.261) is greater than the
+topological dimension."
+hb20 "According to this definition,
+the snowflake is a fractal."
+
+defe1 "This definition, however, is not
+perfect since it excludes lots of
+shapes which are fractals."
+defe2 "But it shows one of the
+interesting properties of fractals,"
+defe3 "and it is quite popular."
+defe4 "The Hausdorff Besicovich dimension
+is also often called a
+\"fractal dimension\""
+
+#########################################################
+#For file escape.xaf
+escape "The math behind fractals
+
+chapter 2 - Escape time fractals"
+escape1 "Some fractals (like snowflake)
+are created by simple subdivision
+and repetition."
+escape2 "XaoS can generate a different
+category of fractals - called
+escape time fractals."
+escape3 "The method to generate them
+is somewhat different, but is also
+based on using iteration."
+escape4 "They treat the whole screen as
+a complex plane"
+escape5 "The real axis is placed horizontally"
+escape6 "and the imaginary is placed vertically"
+escape7 "Each point has its own orbit"
+escape8 "The trajectory of which is calculated
+using the iterative function, f(z,c)
+where z is the previous position and c
+is the new position on the screen."
+escape9 "For example in the Mandelbrot
+set, the iterative function is z=z^c+c"
+orbit1 "In case we want to examine
+point 0 - 0.6i"
+orbit2 "We assign this parameter to c"
+orbit3 "Iteration of the orbit
+starts at z=0+0i"
+orbit3b "Then we repeatedly calculate
+the iterative function, and we
+repeatedly get a new z value for
+the next iteration."
+orbit4 "We define the point that belongs to the
+set, in case the orbit stays finite."
+orbit5 "In this case it does..."
+orbit6 "So this point is inside the set."
+orbit7 "In other cases it would
+go quickly to infinity."
+orbit8 "(for example, the value 10+0i
+The first iteration is 110,
+the second 12110 etc..)"
+orbit9 "So such points are outside the set."
+
+bail1 "We are still speaking about
+infinite numbers and iterations
+of infinite numbers..."
+bail2 "But computers are
+finite, so they can't
+calculate fractals exactly."
+bail3 "It can be proved that in the
+case where the orbit's distance from
+zero is more than 2, the orbit
+always goes to inifinity."
+bail4 "So we can interrupt calculations
+after the orbit fails this test.
+(This is called the bailout test)"
+bail5 "In cases where we calculate points
+outside the set, we now need just a
+finite number of iterations."
+bail6 "This also creates the colorful
+stripes around the set."
+bail7 "They are colored according to the
+number of iterations of orbits needed
+to fall in the bailout set."
+iter1 "Inside the set we still
+need infinite numbers of calculations"
+iter2 "The only way to do it is to interrupt
+the calculations after a given
+number of iterations and
+use the approximate results"
+iter3 "The maximal number of iterations
+therefore specifies how exact
+the approximation will be."
+iter4 "Without any iterations you would create
+just a circle with a radius of 2
+(because of the bailout condition)"
+iter5 "Greater numbers of iterations makes
+more exact approximations, but
+it takes much longer to calculate."
+limit1 "XaoS, by default, calculates
+170 iterations."
+limit2 "In some areas you could zoom for a
+long time without reaching this limit."
+limit3 "In other areas you get
+inexact results quite soon."
+limit4 "Images get quite boring
+when this happens."
+limit5 "But after increasing the number
+of iterations, you will get lots of new
+and exciting details."
+ofracts1 "Other fractals in XaoS are
+calculated using different formulae
+and bailout tests, but the method
+is basically the same."
+ofracts2 "So many calculations are required
+that XaoS performs lots of
+optimizations.
+
+You might want to read about
+these in the file
+doc/xaos.info"
+
+#########################################################
+#For file anim.xaf
+anim "XaoS features overview
+
+Animations and position files"
+
+#########################################################
+#For file anim.xhf
+
+anim2 "As you have probably noticed,
+XaoS is able to replay animations
+and tutorials."
+
+anim3 "They can be recorded directly
+from XaoS,"
+
+languag1 "since animations and
+position files are stored
+in a simple command language"
+
+languag2 "(position files are
+just one frame animations)."
+
+languag3 "Animations can be manually
+edited later to achieve more
+professional results."
+
+languag4 "Most animations in these tutorials
+were written completely manually,
+starting from just a position file."
+
+modif1 "A simple modification"
+
+modif2 "generates an \"unzoom\" movie,"
+modif3 "and this modification, a \"zoom\" movie."
+
+newanim "You can also write completely
+new animations and effects."
+
+examples "XaoS also comes with
+many example files, that can
+be loaded randomly from the
+save / load menu."
+
+examples2 "You can also use position
+files to exchange coordinates with
+other programs."
+
+examples3 "The only limits are your
+imagination, and the command
+language described in xaos.info."
+
+#########################################################
+#For file barnsley.xaf
+
+intro4 "An introduction to fractals
+
+Chapter 5-Barnsley's formula"
+
+barnsley1 "Another formula
+introduced by Michael Barnsley"
+
+barnsley2 "generates this strange fractal."
+
+barnsley3 "It is not very interesting
+to explore,"
+
+barnsley4 "but it has beautiful Julias!"
+
+barnsley5 "It is interesting because it has
+a \"crystalline\" structure,"
+
+barnsley6 "rather than the \"organic\"
+structure found in many other
+fractals."
+
+barnsley7 "Michael Barnsley has also introduced
+other formulas."
+
+barnsley8 "One of them generates this fractal."
+
+#########################################################
+#For file filter.xaf
+
+filter "XaoS features overview
+
+filters"
+
+#########################################################
+#For file filter.xhf
+
+filter1 "A filter is an effect applied
+to each frame after the fractal
+is calculated."
+
+filter2 "XaoS implements the
+following filters:"
+
+motblur "motion blur,"
+
+edge "two edge detection filters,"
+
+edge2 "(the first makes wide lines and is
+useful at high resolutions,"
+
+edge3 "the second makes
+narrower lines),"
+
+star "a simple star-field filter,"
+
+interlace "an interlace filter, (this speeds up
+calculations and gives the effect of
+motion blur at higher resolutions),"
+
+stereo "a random dot
+stereogram filter,"
+
+stereo2 "(if you are unable to see anything
+in the next images and you can
+normally see random dot stereograms,
+you probably have the screen size
+incorrectly configured---use `xaos
+-help' for more information),"
+
+emboss1 "an emboss filter," #NEW
+
+palettef1 "a palette emulator filter,
+(enables color cycling on
+truecolor displays)" #NEW
+
+truecolorf "a true color filter, (creates
+true-color images on 8bpp displays)."
+
+#########################################################
+#For file fractal.xaf
+
+end "The end."
+
+fcopyright "The introduction to fractals
+was done by Jan Hubicka in July 1997
+and later modified and updated
+for new versions of XaoS
+
+Corrections by:
+Tim Goodwin <tgoodwin@cygnus.co.uk>
+and
+David Meleedy <dmm@skepsis.com>
+and
+Nix <nix@esperi.demon.co.uk>"
+# Add your copyright here if you are translating/correcting this file
+
+suggestions "
+Please send all ideas,
+suggestion, thanks, flames
+and bug-reports to:
+
+xaos-discuss@lists.sourceforge.net
+
+Thank You"
+
+#########################################################
+#For file incolor.xaf
+
+incolor1 "Usually, points inside the set are
+displayed using a single solid
+color."
+
+incolor2 "This makes the set boundaries
+very visible, but the areas inside the
+set are quite boring."
+
+incolor3 "To make it a bit more
+interesting, you can use the
+value of the last orbit to assign
+color to points inside the set."
+
+incolor4 "XaoS has ten different
+ways to do that. They are called
+\"in coloring modes\"."
+
+zmag "zmag
+
+Color is calculated from
+the magnitude of the last orbit."
+
+#########################################################
+#For file innew.xaf
+
+innew1 "Decomposition like
+
+This works in same way
+as color decomposition
+in outside coloring modes
+"
+
+innew2 "Real / Imag
+
+Color is calculated from the
+real part of the last orbit divided
+by the imaginary part."
+
+innew3 "The next 6 coloring modes are
+formulas mostly chosen at random, or
+copied from other programs."
+
+#########################################################
+#For file intro.xaf
+
+fractal "...Fractals..."
+fractal1 "What is a fractal?"
+
+fractal2 "Benoit Mandelbrot's definition:
+a fractal is a set for which the
+Hausdorff Besicovich dimension
+strictly exceeds the
+topological dimension."
+
+fractal3 "Still in the dark?"
+
+fractal4 "Don't worry.
+This definition is only important if
+you're a mathematician."
+
+fractal5 "In English,
+a fractal is a shape"
+
+fractal6 "that is built from pieces"
+
+fractal7 "each of which is approximately a
+reduced size copy of the whole
+fractal."
+
+fractal8 "This process repeats itself"
+
+fractal9 "to build the complete fractal."
+
+facts "There are many surprising
+facts about fractals:"
+
+fact1 "Fractals are independent of scale,"
+fact2 "they are self similar,"
+fact3 "and they often resemble objects
+found in the nature"
+#fact4 "such as clouds, mountains,
+#or coastlines."
+fact5 "There are also many
+mathematical structures
+that define fractals,"
+fact6 "like the one you see on the screen."
+fmath4 "Most fractals are
+created by an iterative process"
+fmath5 "for example the fractal known
+as the von Koch curve"
+fmath6 "is created by changing
+one line"
+fmath7 "into four lines"
+fmath8 "This is the first
+iteration of the process"
+fmath9 "Then we repeat this change"
+fmath10 "after 2 iterations..."
+fmath11 "after 3 iterations..."
+fmath12 "after 4 iterations.."
+fmath13 "and after an infinite number of
+iterations we get a fractal."
+fmath14 "Its shape looks like one third of
+a snowflake."
+tree1 "Lots of other shapes could
+be constructed by similar methods."
+tree2 "For example by changing a line
+in a different way"
+tree3 "We can get a tree."
+nstr "Iterations can possibly
+introduce random noise into a fractal"
+nstr2 "By changing a line into two"
+nstr3 "lines and adding some small error"
+nstr4 "you can get fractals looking like
+a coastline."
+nstr5 "A similar process could
+create clouds, mountains, and lots of
+other shapes from nature"
+
+#######################################################
+## mset.xaf
+
+fact7 "Undoubtedly the most famous fractal is.."
+
+mset "The Mandelbrot Set"
+mset1 "It is generated from
+a very simple formula,"
+mset2 "but it is one of the
+most beautiful fractals."
+mset3 "Since the Mandelbrot set is a fractal,"
+mset4 "its boundaries contain"
+mset5 "miniature copies of
+the whole set."
+mset6 "This is the largest one, about 50
+times smaller than the entire set."
+mset7 "The Mandelbrot set is
+not completely self similar,"
+mset8 "so each miniature
+copy is different."
+mset9 "This one is about 76,000 times
+smaller than the whole."
+mset10 "Copies in different parts
+of the set differ more."
+
+nat "The boundaries don't just contain
+copies of the whole set,"
+nat1 "but a truly infinite variety
+of different shapes."
+nat2 "Some of them are surprisingly
+similar to those found in nature:"
+nat3 "you can see trees,"
+nat4 "rivers with lakes,"
+nat5 "galaxies,"
+nat6 "and waterfalls."
+nat7 "The Mandelbrot set also contains many
+completely novel shapes."
+
+###############################################################################
+############
+
+juliach "An introduction to fractals
+
+Chapter 2-Julia"
+
+julia "The Mandelbrot set is not the only
+fractal generated by the formula:
+z=z^2+c"
+julia1 "The other is..."
+julia2 "the Julia set"
+julia3 "There is not just one Julia set,"
+julia4 "but an infinite
+variety of them."
+julia5 "Each is constructed from a \"seed\","
+julia6 "which is a point selected
+from the Mandelbrot set."
+julia7 "The Mandelbrot set can be seen
+as a map of various Julia sets."
+julia8 "Points inside the Mandelbrot set
+correspond to Julias with large
+connected black areas,"
+julia9 "whereas points outside the Mandelbrot set
+correspond to disconnected Julias."
+julia10 "The most interesting Julias have
+their seed just at the boundaries of
+the Mandelbrot set."
+
+theme "The theme of a Julia set also
+depends heavily on the seed point
+you choose."
+theme1 "When you zoom in
+to the Mandelbrot set, you will get
+a very thematically similar fractal"
+theme2 "when switching to the
+corresponding Julia."
+theme3 "But zoom out again, and you discover"
+theme4 "that you are in a completely
+different fractal."
+theme5 "Julia sets may seem to be quite
+boring since they don't change themes"
+theme6 "and remain faithful to the
+seed chosen from the Mandelbrot set."
+theme7 "But by carefully choosing the
+seed point you can generate"
+theme8 "beautiful images."
+
+#########################################################
+#For file keys.xhf
+
+keys "Keys:
+
+q - stop replay
+Space - skip frame
+ (can take a while)
+Left/Right - adjust speed of subtitles"
+
+#########################################################
+#For file magnet.xaf
+
+intro7 "An introduction to fractals
+
+Chapter 8-Magnet"
+
+magnet "This is NOT the Mandelbrot set."
+magnet1 "This fractal is called \"magnet\"
+since its formula comes
+from theoretical physics."
+magnet2 "It is derived from the study
+of theoretical lattices in the
+context of magnetic renormalization
+transformations."
+
+similiar "Its similarity to the Mandelbrot set
+is interesting since this is a real
+world formula."
+
+magjulia "Its julia sets are quite unusual."
+
+magnet3 "There is also a second magnet fractal."
+
+#########################################################
+#For file new.xaf
+
+new "What's new in version 3.0?"
+speed "1. Speedups"
+speed1 "The main calculation loops
+are now unrolled and
+do periodicity checking."
+speed2 "New images are calculated using
+boundary detection,"
+speed3 "so calculating new images
+is now much faster."
+speed4 "For example, calculation
+of the Mandelbrot set at
+1,000,000 iterations..."
+speed5 "calculating..."
+speed6 "finished."
+speed7 "XaoS has a heuristic that
+automatically disables periodicity
+checking when it doesn't expect the
+calculated point to be inside the set
+(when all surrounding points aren't)."
+speed8 "Also the main zooming routines
+have been optimized so zooming is
+approximately twice as fast."
+speed9 "XaoS now reaches 130FPS
+on my 130Mhz Pentium."
+
+new2 "2. Filters."
+new3 "3. Nine out-coloring modes."
+new4 "4. New in-coloring modes."
+new5 "5. True-color coloring modes."
+new6 "6. Animation save/replay."
+newend "And many other enhancements, such
+as image rotation, better palette
+generation... See the ChangeLog for
+a complete list of changes." #NEW
+
+#########################################################
+#For file newton.xaf
+
+intro3 "An introduction to fractals
+
+Chapter 4-Newton's method"
+newton "This fractal is generated by
+a completely different formula:"
+newton1 "Newton's numerical method for finding
+the roots of a polynomial x^3=1."
+newton2 "It counts the number of iterations
+required to get the approximate root."
+newton3 "You can see the three roots
+as blue circles."
+newton4 "The most interesting parts are in places
+where the starting point is almost
+equidistant from two or three roots."
+newton5 "This fractal is very self similar
+and not very interesting to explore."
+newton6 "But XaoS is able to
+generate \"Julia-like\" sets,"
+newton7 "where it uses the error in the
+approximation as the seed."
+newton8 "This makes the Newton fractal
+more interesting."
+newton9 "XaoS can also generate an other
+Newton fractal."
+newton10 "Newton's numerical method for finding
+the roots of a polynomial x^4=1."
+newton11 "You can see the four roots
+as blue circles."
+
+#########################################################
+#For file octo.xaf
+intro6 "An introduction to fractals
+
+Chapter 7-Octo"
+octo "Octo is a less well known fractal."
+octo1 "We've chosen it for XaoS
+because of its unusual shape."
+octo2 "XaoS is also able
+to generate \"Julia-like\" sets,
+similar to those in the Newton set."
+
+#########################################################
+#For file outcolor.xaf
+
+outcolor "Out coloring modes"
+outcolor1 "The Mandelbrot set is just
+the boring black lake
+in the middle of screen"
+outcolor2 "The colorful stripes
+around it are the boundaries
+of the set."
+outcolor3 "Normally the coloring is
+based on the number of iterations
+required to reach the bail-out value."
+outcolor4 "But there are other
+ways to do the coloring."
+outcolor5 "XaoS calls them
+out-coloring modes."
+
+iterreal "iter+real
+
+This mode colors the boundaries by
+adding the real part of the last
+orbit to the number of iterations."
+iterreal1 "You can use it to make
+quite boring images more interesting."
+
+iterimag "iter+imag is similar to iter+real."
+iterimag2 "The only difference is that it uses
+the imaginary part of the last
+orbit."
+
+iprdi "iter+real/imag
+
+This mode colors the boundaries by
+adding the number of iterations to
+the real part of the last orbit
+divided by the imaginary part."
+
+sum "iter+real+imag+real/imag
+
+is the sum of all the previous coloring
+modes."
+
+decomp "binary decomposition
+
+When the imaginary part is greater
+than zero, this mode uses the number
+of iterations; otherwise it uses the
+maximal number of iterations minus
+the number of iterations of binary
+decomposition."
+
+bio "biomorphs
+
+This coloring mode is so called since
+it makes some fractals look like
+one celled animals."
+
+#########################################################
+#For file outnew.xhf
+
+potential "potential
+
+This coloring mode looks
+very good in true-color
+for unzoomed images."
+
+cdecom "color decomposition"
+cdecom2 "In this mode, the color is calculated
+from the angle of the last orbit."
+cdecom3 "It is similar to
+binary decomposition but
+interpolates colors smoothly."
+cdecom4 "For the Newton type, it can be used
+to color the set based on which root
+is found, rather than the number of
+iterations."
+
+smooth "smooth
+
+Smooth coloring mode tries to remove
+stripes caused by iterations and
+make smooth gradations."
+smooth1 "It does not work for the Newton set
+and magnet formulae since they have
+finite attractors."
+smooth2 "And it only works for true color and
+high color display modes. So if you
+have 8bpp, you will need to enable
+the true color filter."
+
+#########################################################
+#For file outnew.xhf
+
+intro5 "An introduction to fractals
+
+Chapter 6-Phoenix"
+
+phoenix "This is the Mandelbrot set for
+a formula known as Phoenix."
+
+phoenix1 "It looks different than the other
+fractals in XaoS, but some similarity
+to the Mandelbrot set can be found:"
+
+phoenix2 "the Phoenix set also contains a
+\"tail\" with miniature copies of
+the whole set,"
+
+phoenix3 "there is still a correspondence of
+\"theme\" between the Mandelbrot
+version and the Julias,"
+
+phoenix4 "but the Julias are very different."
+
+#########################################################
+#For file plane.xaf
+
+plane1 "Usually, the real part of a point
+in the complex plane is mapped to
+the x coordinate on the screen; the
+imaginary part is mapped to the y
+coordinate."
+
+plane2 "XaoS provides 6 alternative
+mapping modes"
+plane3 "1/mu
+
+This is an inversion - areas from
+infinity come to 0 and 0 is mapped
+to infinity. This lets you see what
+happens to a fractal when it is
+infinitely unzoomed."
+plane4 "This is a normal Mandelbrot..."
+plane5 "and this is an inverted one."
+plane6 "As you can see, the set was
+in the center and now it is
+all around. The infinitely large
+blue area around the set
+is mapped into the small
+circle around 0."
+plane7 "The next few images will be
+shown in normal, and then inverted mode
+to let you see what happens"
+
+plane8 "1/mu+0.25
+
+This is another inverted mode, but
+with a different center of inversion.
+"
+plane9 "Since the center of inversion lies
+at the boundary of Mandelbrot set,
+you can now see infinite parabolic
+boundaries."
+plane10 "It has an interesting effect on
+other fractals too, since it usually
+breaks their symmetry."
+
+lambda "The lambda plane provides a
+completely different view."
+
+ilambda "1/lambda
+
+This is a combination of
+inversion and the lambda plane."
+
+imlambda "1/(lambda-1)
+
+This is combination of lambda,
+move, and inversion."
+
+imlambda2 "It gives a very interesting
+deformation of the Mandelbrot set."
+
+mick "1/(mu-1.40115)
+
+This again, is inversion with a moved
+center. The center is now placed
+into Feigenbaum points - points
+where the Mandelbrot set is self
+similar. This highly magnifies the
+details around this point."
+
+#########################################################
+#For file power.xaf
+
+intro2 "An introduction to fractals
+
+Chapter 3-Higher power Mandelbrot sets"
+
+power "z^2+c is not the only
+formula that generates fractals."
+power2 "Just a slightly modified one: x^3+c
+generates a similar fractal."
+power3 "And it is, of course, also
+full of copies of the main set."
+
+power4 "Similar fractals can be generated
+by slightly modified formulae"
+
+pjulia "and each has a corresponding series
+of Julia sets too."
+
+#########################################################
+#For file truecolor.xaf
+
+truecolor "True-color coloring modes"
+truecolor1 "Usually fractals are colored using
+a palette. In true-color mode, the
+palette is emulated."
+truecolor2 "The only difference is that the
+palette is bigger and colors are
+smoothly interpolated in coloring
+modes."
+truecolor3 "True-color coloring mode
+uses a completely different
+technique. It uses various parameters
+from the calculation"
+truecolor4 "to generate an exact
+color - not just an index
+into the palette."
+truecolor5 "This makes it possible to display up
+to four values in each pixel."
+truecolor6 "True color coloring mode of course
+requires true color. So on 8bpp
+displays, you need to enable the
+true-color filter."
+
+#########################################################
+#for file pert.xaf #NEW (up to end of file)
+
+pert0 "Perturbation"
+pert1 "Just as the Julia formula uses
+different seeds to generate
+various Julias from one formula,"
+pert2 "you can change the perturbation
+value for the Mandelbrot sets."
+pert3 "It changes the starting position of
+the orbit from the default value of 0."
+pert4 "Its value doesn't affect the
+resulting fractal as much as the seed
+does for the Julias, but it is useful
+when you want to make a fractal more
+random."
+
+##########################################################
+#for file palette.xaf
+
+pal "Random palettes"
+pal0 "XaoS doesn't come with large
+library of predefined palettes
+like many other programs, but
+generates random palettes."
+pal1 "So you can simply keep pressing 'P'
+until XaoS generates a palette that
+you like for your fractal."
+pal2 "Three different algorithms
+are used:"
+pal3 "The first makes stripes going from
+some color to black."
+pal4 "The second makes stripes from black
+to some color to white."
+pal5 "The third is inspired by cubist
+paintings."
+
+###########################################################
+#for file other.xaf
+
+auto1 "Autopilot"
+auto2 "If you are lazy, you
+can enable autopilot to
+let XaoS explore a fractal
+automatically."
+fastjulia1 "Fast Julia browsing mode"
+fastjulia2 "This mode lets you morph
+the Julia set according to the
+current seed."
+fastjulia3 "It is also useful as a preview of an
+area before you zoom in - because of
+the thematic correspondence between
+the Julia and the point you choose,
+you can see the approximate theme
+around a point before you zoom in."
+rotation "Image rotation"
+cycling "Color cycling"
+bailout "Bailout"
+bailout1 "That's the Mandelbrot set with an
+outcoloring mode 'smooth.'"
+bailout2 "By increasing bailout to 64, you get
+more balanced color transitions."
+bailout3 "For most fractal types different bailout
+values result in similar fractals."
+bailout4 "That's not true for Barnsley fractals."
+
+
+
+
+##############################################
+#for file trice.xaf
+
+trice1 "Triceratops and Catseye fractals"
+trice2 "If you change the bailout value"
+trice3 "of an escape-time fractal"
+trice4 "to a smaller value,"
+trice5 "you will get an other fractal."
+trice6 "With this method we can get"
+trice7 "very interesting patterns"
+trice8 "with separate areas of one color."
+trice9 "The Triceratops fractal"
+trice10 "is also made with this method."
+trice11 "Many similar pictures can be"
+trice12 "made of Triceratops."
+trice13 "The Catseye fractal"
+trice14 "is like an eye of a cat."
+trice15 "But if we raise the bailout value..."
+trice16 "...we get a more interesting fractal..."
+trice17 "...with bubbles..."
+trice18 "...and beautiful Julias."
+
+##############################################
+#for file fourfr.xaf
+
+fourfr1 "Mandelbar, Lambda, Manowar and Spider"
+fourfr2 "This is the Mandelbar set."
+fourfr3 "It's formula is: z = (conj(z))^2 + c"
+fourfr4 "Some of its Julias are interesting."
+fourfr5 "But let's see other fractals now."
+fourfr6 "The Lambda fractal has a structure"
+fourfr7 "similar to Mandelbrot's."
+fourfr8 "It's like the Mandelbrot set
+on the lambda plane."
+fourfr9 "But Lambda is a Julia set,
+here is MandelLambda."
+fourfr10 "...fast Julia mode..."
+fourfr11 "This is the fractal Manowar."
+fourfr12 "It was found by a user of Fractint."
+fourfr13 "It has Julias similar to the whole set."
+fourfr14 "This fractal is called Spider."
+fourfr15 "It was found by a user of Fractint, too."
+fourfr16 "And it has Julias similar
+to the whole set, too."
+
+##############################################
+#for file classic.xaf
+
+classic1 "Sierpinski Gasket, S.Carpet,
+Koch Snowflake"
+classic2 "This is the famous
+Sierpinski Gasket fractal."
+classic3 "And this is
+the escape-time variant of it."
+classic4 "You can change its shape by selecting"
+classic5 "another 'Julia seed'"
+classic6 "This fractal is the Sierpinski Carpet."
+classic7 "And here is it's escape-time variant."
+classic8 "This is famous, too."
+classic9 "And finally, this is
+the escape-time variant"
+classic10 "of the Koch Snowflake."
+
+##############################################
+#for file otherfr.xaf
+
+otherfr1 "Other fractal types in XaoS"
diff --git a/catalogs/espanhol.cat b/catalogs/espanhol.cat
new file mode 100644
index 0000000..2218ef3
--- /dev/null
+++ b/catalogs/espanhol.cat
@@ -0,0 +1,1048 @@
+# Archivo de mensajes requeridos para reproducir los tutoriales
+# de XaoS en Castellano.
+#
+# Copyright (C) 1997 by Jan Hubicka
+#
+# Hay algunas pocas cosas que deberías saber si quieres cambiar
+# o traducir este fichero.
+#
+# El formato de este catálogo es identificador[espacios en blanco]
+# "valor"[espacios en blanco]
+#
+# Identifiador es una clave usada por el programa. No la traduzcas.
+# Traduce sólo el campo valor. Si quires entrecomillar un caracter
+# '"'en el texto, usa '\". Para '\' pon '\\'. No uses '\n'para enter;
+# usa el literal nueva_linea.
+#
+# Si quieres traducir este archivo a otro idioma, por favor, hazmelo
+# saber. Debes traducirlo libremente: no es necesario usar exactamente
+# las mismas frases que aquí, si tienes alguna idea para hacerlo
+# más divertido, interesante o añadir alguna información, hazlo.
+#
+# Puedes usar frases más cortas o más largas, ya que, XaoS calculará
+# automáticamente el tiempo para cada subtitulo.
+#
+# Hazme saber, tambie'n, cualquier sugerencia para mejorar el texto y los
+# tutoriales.
+#
+# El texto del Tutorial ha de caber en una pantalla 320x200. Luego las líneas
+# deben estar por debajo de 40 caracteres. Esto son 40 caracteres:
+#234567890123456789012345678901234567890
+# Y, ¿No es mucho! ¿Ten cuidado!
+# Por favor, comprueba que el nuevo tutorial funciona en 320x200
+
+#########################################################
+#For file dimension.xaf
+
+fmath "La matemática detrás de los fractales"
+fmath1 "Los Fractales son un campo muy nuevo
+de las matemáticas, así que aún existen
+muchas preguntas sin resolver."
+fmath2 "Incluso las definiciones no están
+claras."
+fmath3 "Usualmente llamamos a algo fractal,
+si muestra alguna auto-similitud"
+
+def1 "Una de las posibles definiciones es..."
+#Definition from the intro.xaf is displayed here.
+#If it is a problem in your language catalog, let me
+#know and I will create a special key
+def2 "Qué significa esto?"
+def3 "Para explicarlo, primero necesitamos
+entender qué son las dimensiones
+topológicas y de Hausdorff Besicovich."
+
+topo1 "La dimensión topológica
+es la dimensión \"normal\"."
+topo2 "Un punto tiene 0 dimensiones"
+topo3 "Una línea tiene una dimensión"
+topo4 "Una superfície tiene dos, etc..."
+
+hb1 "La definición de la dimensión
+Hausdorff Besicovich proviene de este
+simple hecho:"
+hb2 "El lado de una línea ampliada dos
+veces (zoom) crece también a lo más dos
+veces."
+hb3 "Por otro lado, el tamaño de un
+cuadrado crece cuatro veces como mucho"
+hb4 "Reglas similares funcionan para
+mayores dimensiones también."
+hb5 "Para calcular las dimensiones para
+este hecho, debes usar la siguiente
+ecuación:"
+hb6 "dimensión = log s / log z
+donde 'z' es el cambio de zoom y 's'
+es el cambio del tamaño"
+hb7 "para una línea con zoom 2,
+el tamaño del cambio también es 2.
+log 2 / log 2 = 1"
+hb8 "para un cuadrado con zoom 2,
+el tamaño del cambio es 4.
+log 4 / log 2 = 2"
+hb9 "Así, esta definición da los mismos
+resultados para formas normales"
+hb10 "Las cosas se tornan más interesantes
+con los fractales..."
+
+hb11 "Considera una curva de un copo de nieve"
+hb12 "Que se crea cambiando repetidamente
+una línea por cuatro líneas."
+hb13 "Las nuevas líneas son 1/3 del tamaño
+de la línea original"
+hb14 "Después de acercar (zoom) 3 veces,
+estas líneas serán exactamente del
+mismo tamaño que las líneas originales."
+hb15 "Esto ocurre por la auto-similitud
+creada por la repetición infinita de
+esta metamorfosis,"
+hb15b "cada una de estas partes se convierte
+en una copia exacta del fractal
+original."
+hb16 "El tamaño del fractal crece 4 veces
+porque hay cuatro copias del mismo."
+hb17 "Después de colocar estos valores en
+las ecuaciones: log 4 / log 3 = 1.261"
+hb18 "Obtenemos un valor mayor que uno!
+(La dimensión topológica de la curva)"
+hb19 "La dimensión Hausdorff Besicovich
+(1.261) es mayor que la dimensión
+topológica."
+hb20 "De acuerdo con esta definición,
+se concluye que nuestro copo de nieve
+es un fractal."
+
+defe1 "Esta definición, sin embargo, no es
+perfecta ya que excluye muchas figuras
+que son fractales."
+defe2 "Pero demuestra una de las propiedades
+interesantes de los fractales,"
+defe3 "y que es muy popular."
+defe4 "La dimensión Hausdorff Besicovich
+también se conoce como la
+\"dimensión fractal\"."
+
+#########################################################
+#For file escape.xaf
+escape "La matemática detrás de los fractales
+
+Capítulo 2 - Escape time fractals"
+escape1 "Algunos fractales (como el copo de
+nieve) son creados de una
+manera simple."
+escape2 "XaoS puede generar una categoría
+distinta de fractales, llamada
+\"Fractales fuera de tiempo\" (Escape
+ Time Fractals)."
+escape3 "El método para generarlos es un
+poco diferente, pero también está
+basado en el uso de la iteración."
+escape4 "Se toma la pantalla completa como
+el plano complejo"
+escape5 "El eje real es colocado horizontalmente"
+escape6 "y el eje imaginario es colocado
+verticalmente."
+escape7 "Cada punto tiene su propia órbita."
+escape8 "La trayectoria sobre la que se calcula
+utilizando la función iterativa, f(z,c)
+donde z es la posición previa y c es
+la nueva posición en la pantalla."
+escape9 "Por ejemplo, en el conjunto Mandelbrot,
+la función iterativa es z=z^2+c"
+orbit1 "En caso de que queramos examinar
+el punto 0 - 0.6i,"
+orbit2 "asignamos este parámetro a c"
+orbit3 "la iteración de la órbita comienza
+en z= 0 + 0i"
+orbit3b "Luego, repetidamente calculamos la
+función iterativa, y repetidamente
+obtenemos un nuevo valor para z para la
+siguiente iteración."
+orbit4 "Revisamos si el punto que pertenece al
+conjunto, es decir, si la órbita
+permanece finita."
+orbit5 "En este caso, sí lo está..."
+orbit6 "Así que el punto está dentro del
+conjunto."
+orbit7 "En otros casos, irá rápidamente hacia
+el infinito."
+orbit8 "(por ejemplo, el valor 10+0i cuya
+primera iteración es 110, la segunda es
+12110, etc...)"
+orbit9 "Así que estos puntos están fuera
+del conjunto."
+bail1 "Aún estamos hablando de números
+infinitos y de iteraciones de números
+infinitos..."
+bail2 "... pero los computadores son finitos,
+así que no pueden calcular fractales de
+forma exacta."
+bail3 "Se puede probar que, en caso de que
+la distancia de la órbita desde cero es
+mayor que 2, siempre se irá al infinito."
+bail4 "Entonces podemos interrumpir los
+cálculos para órbitas que fallan este
+test. (Esto se conoce como el test de
+borde)"
+bail5 "En los casos de estar calculando puntos
+que están fuera del conjunto,
+necesitamos sólo un cantidad finita de
+iteraciones."
+bail6 "Esto es lo que crea las líneas
+coloridas alrededor del conjunto."
+bail7 "Son coloreadas de acuerdo con el
+número de iteraciones que necesita la
+órbita para fallar el test de borde."
+iter1 "Dentro del conjunto aún necesitamos
+una cantidad infinita de cálculos"
+iter2 "La única forma de hacerlo, es
+interrumpiendo los cálculos después de
+una cantidad determinada de iteraciones
+y utilizar los resultados aproximados."
+iter3 "El máximo de iteraciones, por lo tanto
+determina qué tan exacto la
+aproximación será."
+iter4 "Sin iteraciones, crearías sólo un
+círculo con radio 2 (por la condición
+de borde)"
+iter5 "Mayor cantidad de iteraciones logran
+aproximaciones más exactas, pero toma
+más tiempo calcularlas."
+limit1 "XaoS, por defecto, calcula 170
+iteraciones."
+limit2 "En algunas áreas puedes hacer zoom
+durante bastante tiempo sin encontrar
+este límite."
+limit3 "En otras áreas obtienes resultados
+inexactos muy rápidamente."
+limit4 "Las imágenes se vuelven muy aburridas
+cuando esto sucede."
+limit5 "Pero después de aumentar el número
+de iteraciones, obtienes muchos
+detallles nuevos e interesantes."
+ofracts1 "Otros fractales en XaoS son
+calculados usando diferentes formulas
+y pruebas de borde, pero el método es
+básicamente el mismo."
+ofracts2 "Se requiere mucho cálculo para
+que XaoS realice muchas optimizaciones.
+
+Puedes leer más sobre esto, en el
+fichero (archivo) doc/xaos.info"
+
+#########################################################
+#Para el fichero anim.xaf
+anim "Características de XaoS
+
+Ficheros de posición y animaciones"
+
+#########################################################
+#Para el fichero anim.xhf
+
+anim2 "Como probablemente has notado, XaoS
+es capaz de repetir animaciones y
+tutoriales."
+
+anim3 "Deben ser grabados directamente
+desde Xaos,"
+
+languag1 "ya que, los ficheros de posición
+y animación son guardados en un simple
+lenguaje de comandos"
+
+languag2 "(los ficheros de posición
+son animaciones de un sólo frame)."
+
+languag3 "Las animaciones pueden
+ser editadas a mano posteriormente
+para conseguir unos resultados más
+profesionales."
+
+languag4 "Casi todas las animaciones
+de estos tutoriales han sido escritas
+completamente a mano a partir de un
+archivo de posición."
+
+modif1 "Una simple modificación"
+
+modif2 "genera una película que retrocede,"
+modif3 "y este modificación una que se acerca."
+
+newanim "También puedes escribir nuevas
+animaciones y efectos"
+
+examples "XaoS también tiene muchos
+ficheros de ejemplo, que pueden ser
+cargados aleatoriamente desde el menú
+salvar / guardar."
+
+examples2 "También puedes usar los
+ficheros de posición para cambiar
+coordenadas con otros programas."
+
+examples3 "Los únicos límites son
+tu imaginación y el lenguage
+de comandos descrito en xaos.info."
+
+#########################################################
+#Para el fichero barnsley.xaf
+
+intro4 "Una introducción a los fractales
+
+Capítulo 5 - Fórmula de Barnsley"
+
+barnsley1 "Otra fórmula de
+Michael Barnsley"
+
+barnsley2 "genera un estraño fractal."
+
+barnsley3 "No es muy interesante para
+explorar,"
+
+barnsley4 "pero tiene maravillosos julias"
+
+barnsley5 "Es interesante por su estructura
+cristalina,"
+
+barnsley6 "Mejor que la estructura orgánica
+encontrada en otros muchos fractales."
+
+#########################################################
+#Para el fichero filter.xaf
+
+filter "Características de XaoS
+
+filtros"
+
+#########################################################
+#Para el fichero filter.xhf
+
+filter1 "Filtro es un efecto que
+se aplica a cada frame tras el
+cálculo del fractal."
+
+filter2 "XaoS implementa los
+siguientes filtros:"
+
+motblur "motion blur,"
+
+edge "2 filtros detectores de bordes"
+
+edge2 "(el primero hace líneas gruesas
+y es útil a resoluciones altas, ..."
+
+edge3 " ... el segundo hace líneas
+más delgadas);"
+
+star "filtro star-field,"
+
+interlace "filtro de entrelazado (aumenta la
+velocidad y brinda un efecto similar al
+motion blur en resoluciones altas);"
+
+stereo "filtro RDS (genera estereogramas)"
+
+stereo2 "(si no puedes ver nada en las
+siguientes imagenes y sueles ser capaz
+de ver estereogramas, probablemente
+tengas un tamaño de pantalla mal
+configurado--pon 'xaos -help'para más
+información),
+-help' for more information),"
+
+emboss1 "filtro emboss (de repujado)" #NEW
+
+palettef1 "filtro que emula la paleta
+(permite rotación del color en
+dispositivos truecolor)" #NEW
+
+truecolorf "filtro true color (permite
+generar imagenes true color en
+dispositivos de 8bpp)."
+
+#########################################################
+#Para el fichero fractal.xaf
+
+end "Fin"
+
+fcopyright "La introducción a los fractales
+fue hecha por Jan Hubicka en Julio 1997
+# Add your copyright here if you are translating/correcting this file
+Y traducido al castellano por:
+ César Pérez cpt2@geocities.com
+suggestions
+Por favor envía tus ideas,
+sugerencias, agradecimientos, reproches
+e informes de errores a
+
+xaos-discuss@lists.sourceforge.net
+
+Gracias."
+
+#########################################################
+#Para el fichero incolor.xaf
+
+incolor1 "Normalmente, los puntos dentro
+del conjunto se ponen usando un único
+color solido."
+
+incolor2 "Esto hace los límites del
+conjunto muy visibles, pero las áreas
+dentro del conjunto son muy aburridas."
+
+incolor3 "Para hacerlas un poco más
+interesantes, puedes usar el valor de
+la última orbita para asignar el
+color de los puntos dentro del
+conjunto."
+
+incolor4 "XaoS tiene diez formas
+diferentes de hacerlo. Se denominan
+\"in coloring modes\"."
+
+zmag "zmag
+
+El color se calcula a traves de la
+magnitud de la última órbita."
+
+#########################################################
+#Para el fichero innew.xaf
+
+innew1 "Parecido a decomposition
+
+Este modo funciona como
+la descomposición del color
+en los modos outside coloring"
+
+innew2 "Real / Imag
+
+El color es calculado a partir
+de la parte real de la última
+órbita dividido por la parte
+imaginaria."
+
+innew3 "Los 6 siguientes modos son
+fórmulas elegidas aleatoriamente,
+o copiadas de otros programas."
+
+#########################################################
+#Para el fichero intro.xaf
+
+fractal "...Fractales..."
+fractal1 "¿Qué es un fractal?"
+
+fractal2 "Definición de Benoit Mandelbrot:
+un fractal es un conjunto en el que
+su dimensión Hausdorff Besicovich
+excede extrictamente la dimensión
+topológica."
+
+fractal3 "¿Todavía en tinieblas?"
+
+fractal4 "No te preocupes.
+Esta definición sólo es importante
+si eres un matemático."
+
+fractal5 "Un fractal es, simplemente,
+una figura"
+
+fractal6 "que es construida a partir de
+piezas"
+
+fractal7 "cada una de las cuales es
+aproximadamente una copia reducida
+del fractal completo."
+fractal8 "Este proceso se repite"
+fractal9 "hasta completar el fractal."
+facts "Hay muchos hechos sorprendentes
+sobre los fractales:"
+
+fact1 "son independientes de la escala,"
+fact2 "son autosimilares,"
+fact3 "y recuerdan objetos encontrados
+en la naturaleza"
+fact4 "como nubes, montañas,
+o costas."
+fact5 "Hay muchas estructuras
+matemáticas que son
+fractales,"
+fact6 "como el que ves en la pantalla."
+
+fmath4 "Muchos fractales son creados por
+un proceso iterativo"
+fmath5 "por ejemplo: el fractal conocido
+como la \"curva de von Koch\"."
+fmath6 "es creada dividiendo una línea"
+fmath7 "hasta obtener 4 líneas."
+fmath8 "Esta es la primera iteración
+del proceso."
+fmath9 "Luego repetimos este cambio"
+fmath10 "luego de 2 iteraciones..."
+fmath11 "... de 3 iteraciones..."
+fmath12 "luego de 4 iteraciones..."
+fmath13 "y luego de una cantidad infinita
+de iteraciones, obtenemos un fractal."
+fmath14 "Su forma se parece a la tercera
+parte de un copo de nieve."
+tree1 "Muchas otras figuras pueden ser
+construídas por métodos similares."
+tree2 "Por ejemplo, cambiando una línea
+de manera distinta"
+tree3 "Obtenemos un árbol."
+nstr "Las iteraciones pueden ser introducir
+posiblemente algo de ruido aletario en
+un fractal"
+nstr2 "dividiendo una línea en dos líneas"
+nstr3 "y agregando un poco de error"
+nstr4 "puedes obtener fractales que se
+parezcan a una costa de playa."
+nstr5 "Un proceso similar podría crear
+nubes, montañas, y muchas otras formas
+de la naturaleza."
+
+#######################################################
+## mset.xaf
+fact7 "Sin lugar a dudas el fractal
+más famoso es..."
+
+mset "El conjunto Mandelbrot"
+mset1 "Es generado por una fórmula
+muy simple,"
+mset2 "pero es uno de los fractales
+más hermosos."
+mset3 "Puesto que el conjunto Mandelbrot
+es un fractal,"
+mset4 "sus límites contienen"
+mset5 "pequeñas copias del conjunto
+completo."
+mset6 "Esta es la más grande, aprox.
+50 veces más pequeña que el
+conjunto original."
+mset7 "El conjunto Mandelbrot no es
+completamente autosimilar,"
+mset8 "luego cada copia pequeña es
+diferente."
+mset9 "Este es 76000 veces más pequeño
+que el completo."
+mset10 "Otras copias en las distintas
+partes del conjunto difieren más."
+
+nat "Los límites no sólo contienen
+copias del conjunto,"
+nat1 "sino una verdadera variedad de
+figuras diferentes."
+nat2 "Algunas de ellas son sorprendentemente
+similares a aquellas encontradas en la
+naturaleza:"
+nat3 "puedes ver árboles,"
+nat4 "rios con lagos,"
+nat5 "galaxias,"
+nat6 "y cascadas."
+nat7 "El conjunto Mandelbrot también
+contiene figuras completamente
+nuevas."
+###############################################################################
+############
+juliach "Una introducción a los fractales
+
+Capítulo 2 - Conjuntos Julia"
+
+julia "El conjunto Mandelbrot no es el
+único fractal generado por la
+fórmula z=z^2+c."
+julia1 "El otro es..."
+julia2 "el conjunto Julia"
+julia3 "No hay un único conjunto
+Julia,"
+julia4 "sino una variedad infinita
+de ellos."
+julia5 "Cada uno es construido a partir
+de una \"semilla\","
+julia6 "que es un punto elegido del
+conjunto Mandelbrot."
+julia7 "El conjunto Mandelbrot puede
+considerarse como un mapa de varios
+conjuntos Julia."
+julia8 "Puntos dentro del conjunto
+Mandelbrot corresponden a Julias con grandes
+áreas negras conexas,"
+julia9 "mientras que los puntos fuera
+del conjunto Mandelbrot corresponden
+a Julias inconexos."
+julia10 "Los Julias más interesantes
+tienen su semilla en los límites del
+conjunto Mandelbrot."
+
+theme "El tema de un conjunto Julia
+también depende fuertemente de
+la semilla que escojas."
+theme1 "Cuando te aproximas al
+conjunto Mandelbrot, obtendras
+un fractal temáticamente muy similar"
+theme2 "cuando cambias a su correspondiente
+Julia."
+theme3 "aléjate denuevo, y descubres"
+theme4 "que estas en un fractal completamete
+diferente."
+theme5 "Los conjuntos Julia pueden parecer
+aburridos puesto que no cambian de tema"
+theme6 "y permanecen fieles a la
+semilla elegida del conjunto Mandelbrot."
+theme7 "Pero si eliges cuidadosamente
+la semilla puedes generar"
+theme8 "preciosas imagenes."
+
+#########################################################
+#Para el fichero keys.xhf
+
+keys "Teclas:
+
+q - detiene la animación
+Espacio - saltar frame
+ (puede demorar un poco)
+Izq/Der - ajuste de la velocidad
+ de los subtítulos."
+
+#########################################################
+#Para el fichero magnet.xaf
+
+intro7 "Una introducción a los fractales
+
+Capítulo 8 - Magnet"
+
+magnet "Este no es el conjunto Mandelbrot."
+magnet1 "Este fractal se llama \"magnet\"
+ya que su fórmula viene de la
+física teórica."
+magnet2 "Es derivado del estudio
+de rejillas teóricas en el contexto
+de transformaciones magnéticas."
+
+similiar "Su similitud con el conjunto
+Mandelbrot es interesante debido a que
+es una fórmula del mundo real."
+
+magjulia "Sus conjuntos Julia son
+bastantes inusuales."
+
+#########################################################
+#Para el fichero new.xaf
+
+new "¿Qué hay de nuevo en la
+versión 3.0?"
+speed "1. Mayor velocidad"
+speed1 "Los bucles de los cálculos
+principales estan \"desenrrollados\"
+y realizan chequeos periódicos."
+speed2 "Las nuevas imágenes son
+calculadas usando detección
+de límites."
+speed3 "luego el cálculo de nuevas
+imágenes es mucho más rápido."
+speed4 "Por ejemplo, cálculo del
+conjunto Mandelbrot en
+1 000 000 iteraciones..."
+speed5 "calculando..."
+speed6 "Terminado."
+speed7 "XaoS tiene una heurística
+que inhabilita automáticamente las
+chequeos periódicos cuando no
+espera que el punto esté dentro del
+conjunto (cuando todos alrededor no
+lo están)."
+speed8 "También las principales
+rutinas de zoom han sido optimizadas,
+luego el acercamiento es el doble de
+rápido."
+speed9 "XaoS alcanza 130FPS
+en mi Pentium 130Mhz."
+
+new2 "2. Filtros."
+new3 "3. Nueve modos out-coloring."
+new4 "4. Nuevos modos in-coloring."
+new5 "5. Modos de coloreamiento True-color."
+new6 "6. Guardar y repetir animaciones."
+newend "Y muchas otras mejoras, tal como
+rotación de la imagen, mejor generación
+de la paleta... mira ChangeLog para encontrar
+una completa lista de cambios." #NEW
+
+#########################################################
+#Para le fichero newton.xaf
+
+intro3 "Una introducción a los fractales
+Capítulo 4 - El método Newton"
+
+newton "Este fractal es generado por
+una fórmula completamente
+diferente:"
+newton1 "El método numérico de Newton
+para encontrar las raices de un polinomio
+x^3=1."
+newton2 "Cuenta el número de iteraciones
+requeridas para conseguir la raíz
+aproximada."
+newton3 "Se pueden ver las tres raices
+como círculos azules."
+newton4 "Las partes más interesantes
+estan donde el punto de inicio es
+equidistante de dos o tres raices."
+newton5 "Este fractal es muy autosimilar
+y no muy interesante para explorar."
+newton6 "Pero XaoS puede generar conjuntos
+similares a los Julias,"
+newton7 "donde el error en la aproximación
+es la semilla."
+newton8 "Esto hace al fractal Newton más
+interesante."
+
+#########################################################
+#Para el fichero octo.xaf
+intro6 "Una introducción a los fractales
+
+Capítulo 7 - Octo"
+octo "Octo es un fractal menos conocido."
+octo1 "Lo hemos escogido para XaoS por
+su figura inusual."
+octo2 "XaoS Tambien puede generar
+conjuntos similares a los Julias, de
+una manera similar al Newton."
+
+#########################################################
+#Para el fichero outcolor.xaf
+
+outcolor "Modos out coloring"
+outcolor1 "El conjunto Mandelbrot es
+un aburrido lago negro en mitad
+de la pantalla."
+outcolor2 "Las líneas de color a su
+alrededor son los límites del conjunto."
+outcolor3 "Normalmente el color estsá
+basado en el número de iteraciones
+requeridas para alcanzar el valor de
+liberación \"bail-out\"."
+outcolor4 "Pero hay otras formas de
+hacerlo."
+outcolor5 "XaoS las llama
+modos out-coloring."
+
+iterreal "iter+real
+
+Este modo pinta los límites añadiendo
+la parte real de la última órbita al
+número de iteraciones."
+iterreal1 "Puedes usarlo para hacer imágenes
+bastante aburridas más interesantes."
+
+iterimag "iter+imag es similar a iter+real."
+iterimag2 "La única diferencia es que
+usa la parte imaginaria de la última
+órbita."
+
+iprdi "iter+real/imag
+
+Este modo pinta los límites añadiendo
+el número de iteraciones a la parte
+real de la última órbita y
+dividiendolo por la parte imaginaria."
+
+sum "iter+real+imag+real/imag
+
+es la suma de todos los modos previos."
+
+decomp "descomposición binaria
+
+Cuando la parte imaginaria es mayor
+que cero, este modo utiliza el número
+de iteraciones; en otro caso usa el
+máximo número de iteraciones menos
+la descomposición binaria del número
+de iteraciones."
+
+bio "biomorphs
+
+Este modo se llama así ya que
+hace parecer a los fractales
+animales celulares."
+
+#########################################################
+#Para el fichero outnew.xhf
+
+potential "potencial
+
+Este modo da buenos
+resultados en true-color
+para imagenes sin ampliar."
+
+cdecom "descomposición del color"
+cdecom2 "En este modo, el color es calculado
+a partir del ángulo de la última
+órbita."
+cdecom3 "Es similar a la
+descomposición binaria pero
+interpola los colores más
+suavemente."
+cdecom4 "Para el tipo Newton, puede
+ser usado para pintar el conjunto
+basandose en que raíz es encontrada,
+en vez de en el número de iteraciones."
+
+smooth "smooth
+
+El modo Smooth pretende quitar las
+líneas causadas por iteraciones y
+hacer grados más suaves."
+smooth1 "No funciona en el Newton y
+Magnet ya que tienen atractores finitos."
+smooth2 "Y sólo funciona para true-color y
+displays de muchos colores. Luego, si tienes
+8bpp, necesitarás habilitar el filtro
+true color."
+
+#########################################################
+#Para el fichero outnew.xhf
+
+intro5 "Una introducción a los fractales
+
+Capítulo 6 - Phoenix"
+
+phoenix "Este es el conjunto Mandelbrot para
+una fórmula conocida como Phoenix."
+
+phoenix1 "Parece muy diferente a otros fractales
+en XaoS, pero se puede encontrar alguna
+similitud con el conjunto Mandelbrot."
+
+phoenix2 "el conjunto Phoenix también tiene
+una \"cola\" con pequeñas copias del conjunto,"
+
+phoenix3 "hay todavía una correspondencia de
+\"tema\" entre la versión Mandelbrot y los
+Julias,"
+
+phoenix4 "pero los Julias son muy diferentes."
+
+#########################################################
+#Para el fichero plane.xaf
+
+plane1 "Normalmente, la parte real de
+un punto en el plano complejo es mapeada
+a la coordenada x de la pantalla; y la
+parte imaginaria es mapeada a la
+coordenada y:"
+
+plane2 "XaoS proporciona 6 modos de
+mapeo alternativos"
+plane3 "1/mu
+
+Esta es una inversión - áreas desde
+el infinito pasan a 0 y de 0 al infinito.
+Esto te permite ver que le pasa al fractal
+cuando nos alejamos de él infinitamente."
+plane4 "Este el el Mandelbrot normal..."
+plane5 "y este el invertido."
+plane6 "Como puedes ver, el conjunto estaba
+en el medio y ahora esta alrededor.
+La infinita área azul alrededor del
+conjunto es mapeada en un pequeño
+círculo alrededor de 0."
+plane7 "Las próximas imágenes serán
+presentadas en modo normal e inverso
+para demostrarte qué pasa."
+
+plane8 "1/mu+0.25
+
+Este es otro método invertido,
+pero con un centro de inversión
+diferente."
+plane9 "Ya que el centro de inversión
+está en el límite del conjunto
+Mandelbrot, puedes ver infinitos límites
+parabólicos."
+plane10 "Tiene un interesante efecto en otros
+fractales, ya que suele romper su simetría."
+
+lambda "El plano lambda procura una vista
+completamente diferente."
+
+ilambda "1/lambda
+
+Esta es una combinación de
+Inversión y el plano lambda."
+
+imlambda "1/(lambda-1)
+
+Esta es una combinación de lambda,
+movimiento e inversión."
+
+imlambda2 "Proporciona una muy interesante
+deformación del conjunto Mandelbrot."
+
+mick "1/(mu-1.40115)
+
+Este es, otra vez, una inversión con el
+centro desplazado. El centro se encuentra
+ubicado en puntos Feigenbaum - puntos donde
+el comjunto Mandelbrot es autosimilar. Esto
+amplia altamente los detalles alrededor del
+punto."
+
+#########################################################
+#Para el fichero power.xaf
+
+intro2 "Una introducción a los fractales
+
+Capítulo 3 - Conjuntos Mandelbrot
+de potencias superiores"
+
+power "z^2+c no es la única
+fórmula que genera fractales."
+power2 "Sólo una pequeña modificación: x^3+c
+genera un fractal similar."
+power3 "Y hay copias completas del conjunto
+principal."
+
+power4 "Fractales similares pueden ser generados
+cambiando ligeramente las fórmulas"
+
+pjulia "y cada uno tiene sus correspondientes
+conjuntos Julia."
+
+#########################################################
+#Para el fichero truecolor.xaf
+
+truecolor "Modos de coloreamiento True-color"
+truecolor1 "Normalmente los fractales son
+coloreados usando una paleta. En el modo true-color,
+la paleta es emulada."
+truecolor2 "La única diferencia es que la paleta
+es mayor y los colores son interpolados suavemente
+en los modos de coloreamiento."
+
+truecolor3 "El modo True-color utiliza
+una técnica completamente diferente.
+Usa varios parámetros para el cálculo"
+truecolor4 "para generar el color exacto -
+no solo un índice en la paleta."
+
+truecolor5 "Esto posibilita tener 4 valores
+para cada pixel."
+truecolor6 "El modo True color requiere,
+evidentemente, true color. Luego en dispositivos
+8bpp, necesitarás habilitar el filtro
+true-color."
+
+#########################################################
+#Para el fichero pert.xaf #NEW (up to end of file)
+
+pert0 "Perturbación"
+pert1 "Como las fórmulas de los Julia
+utilizan diferentes semillas para generar
+varios Julias a partir de una fórmula,"
+pert2 "puedes cambiar el valor de perturbación
+para los conjuntos Mandelbrot."
+pert3 "Esto cambia la posición de inicio
+de la órbita desde el valor por defecto, 0."
+pert4 "Su valor no afecta al resultado
+del fractal tanto como la semilla lo hace
+en los Julias, pero es útil cuando quieres
+hacer el fractal más aleatorio."
+
+##########################################################
+#Para el fichero palette.xaf
+
+pal "Paletas aleatorias"
+pal0 "XaoS no tiene una gran biblioteca
+de paletas predefinidas como otros
+programas, pero genera paletas aleatorias."
+pal1 "Luego puedes mantener pulsada
+'P'hasta que XaoS genere una paleta que te
+guste para tu fractal."
+pal2 "Se utiliza tres algoritmos diferentes:"
+pal3 "el primero hace líneas que van de
+algún color a negro,"
+pal4 "el segundo hace líneas que van de
+algún color a blanco,"
+pal5 "el tercero esta inspirado en pinturas
+cubistas."
+
+###########################################################
+#Para el fichero other.xaf
+
+auto1 "Piloto automático"
+auto2 "Si eres un vago, puedes utilizar
+el piloto automático para permitir
+que XaoS explore un fractal automáticamente."
+fastjulia1 "Modo de visionamiento de Julias
+más veloz"
+fastjulia2 "Este modo te permite varias la
+semilla del Julia."
+fastjulia3 "También es útil como una
+visión previa antes de ampliarlo - debido a
+la correspondencia temática entre el Julia
+y el punto que elijas, puedes ver el tema
+aproximado alrededor del punto antes de
+ampliarlo."
+rotation "Rotación de la imagen"
+cycling "Color cíclico"
+
+##############################################
+#for file trice.xaf
+
+trice1 "Triceratops and Catseye fractals"
+trice2 "If you change the bailout value"
+trice3 "of an escape-time fractal"
+trice4 "to a smaller value,"
+trice5 "you will get an other fractal."
+trice6 "With this method we can get"
+trice7 "very interesting patterns"
+trice8 "with separate areas of one color."
+trice9 "The Triceratops fractal"
+trice10 "is also made with this method."
+trice11 "Many similar pictures can be"
+trice12 "made of Triceratops."
+trice13 "The Catseye fractal"
+trice14 "is like an eye of a cat."
+trice15 "But if we raise the bailout value..."
+trice16 "...we get a more interesting fractal..."
+trice17 "...with bubbles..."
+trice18 "...and beautiful Julias."
+
+##############################################
+#for file fourfr.xaf
+
+fourfr1 "Mandelbar, Lambda, Manowar and Spider"
+fourfr2 "This is the Mandelbar set."
+fourfr3 "It's formula is: z = (conj(z))^2 + c"
+fourfr4 "Some of its Julias are interesting."
+fourfr5 "But let's see other fractals now."
+fourfr6 "The Lambda fractal has a structure"
+fourfr7 "similar to Mandelbrot's."
+fourfr8 "It's like the Mandelbrot set on the lambda plane."
+fourfr9 "But Lambda is a Julia set, here is MandelLambda."
+fourfr10 "...fast Julia mode..."
+fourfr11 "This is the fractal Manowar."
+fourfr12 "It was found by a user of Fractint."
+fourfr13 "It has Julias similar to the whole set."
+fourfr14 "This fractal is called Spider."
+fourfr15 "It was found by a user of Fractint, too."
+fourfr16 "And it has Julias similar to the whole set, too."
+
+##############################################
+#for file classic.xaf
+
+classic1 "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+classic2 "This is the famous Sierpinski Gasket fractal."
+classic3 "And this is the escape-time variant of it."
+classic4 "You can change its shape by selecting"
+classic5 "another 'Julia seed'"
+classic6 "This fractal is the Sierpinski Carpet."
+classic7 "And here is it's escape-time variant."
+classic8 "This is famous, too."
+classic9 "And finally, this is the escape-time variant"
+classic10 " of the Koch Snowflake."
+
+##############################################
+#for file otherfr.xaf
+
+otherfr1 "Other fractal types in XaoS"
diff --git a/catalogs/francais.cat b/catalogs/francais.cat
new file mode 100644
index 0000000..5a3e6ba
--- /dev/null
+++ b/catalogs/francais.cat
@@ -0,0 +1,1074 @@
+# Catalogue des fichiers textes requis pour relire la présentation
+# de Xaos en version française traduite de l'anglais. v 0.4 11/9/97
+#
+# Copyright (C) 1997 by Jan Hubicka
+#
+# Quelques remarques à savoir si vous désirez changer ou
+# traduire ce fichier.
+#
+# Le format de ce catalogue est :
+# identificateur[espace]"valeur"[espace]
+#
+# L'identificateur est un petit texte utilisé dans la présentation
+# ne le traduisez pas, traduisez juste la valeur.
+# Pour saisir le signe " utilisez \" et pour \ utilisez \\
+# les signes \n ne doivent pas être utilisé pour remplacer entrée
+#
+# Si vous désirez traduire ce fichier dans un autre langage, faites-le
+# moi savoir. Vous pouvez (et c'est même recommandé) traduire ce texte
+# librement ainsi vous n'aurez pas à respecter exactement les phrases.
+# N'hesitez pas à rendre le texte plus drôle ou intéressant et à rajouter
+# de nouvelles informations.
+#
+# Vous pouvez utiliser des phrases de longueur différente, car XaoS
+# calculera automatiquement le temps d'affichage.
+#
+# Faite-moi parvenir vos suggestions pour améliorer ce texte
+# et la présentation. Si quelqu'un veut participer à la correction
+# de l'orthographe il est le bienvenu !
+#
+# En changeant ce fichier prenez garde à ne pas dépasser
+# 40 caractères par ligne de texte pour tenir dans un écran
+# de résolution 320x200
+#
+#########################################################
+#For file dimension.xaf
+
+fmath "Les Math à la base des fractales"
+fmath1 "Les fractales sont un domaine
+assez nouveau des math, ce qui fait
+qu'il y a encore des tas de questions
+non résolues."
+fmath2 "Même les définitions ne sont pas claires"
+fmath3 "On appelle souvent un objet fractale
+s'il possède un certain degré
+d'auto-similarité."
+
+def1 "Une des définitions est la suivante..."
+#Definition from the intro.xaf is displayed here.
+#If it is a problem in your langage catalog, let me
+#know and I will create a special key
+def2 "Qu'est-ce que ça veut bien dire?"
+def3 "Pour expliquer ça, il faut d'abord
+comprendre ce que sont la dimension
+topologique et la dimension
+de Hausdorff Besicovich."
+
+topo1 "La dimension topologique
+est la dimension \"normale\"."
+topo2 "Un point a 0 dimensions"
+topo3 "Une ligne en a 1"
+topo4 "Une surface en a 2, etc..."
+
+hb1 "La définition de la dimension
+de Hausdorff Besicovich repose
+sur les observations suivantes:"
+hb2 "La taille (longueur) d'un segment
+zoomé dans le rapport 2 croît aussi
+dans le rapport 2."
+hb3 "Par ailleurs, la taille (surface)
+d'un carré zoomé dans le rapport 2
+croît d'un facteur 4."
+hb4 "Une règle identique s'applique
+en toute dimension."
+hb5 "Pour calculer le nombre de
+dimensions à partir de ce fait, on
+peut utiliser l'équation suivante:"
+hb6 "dimension = log s / log z
+où z est le rapport d'homothétie du
+zoom et s le rapport des tailles."
+hb7 "Pour un segment zoomé dans le,
+rapport 2, le changement de taille
+est aussi dans le rapport 2.
+log 2 / log 2 = 1"
+hb8 "Pour un carré zoomé dans le rapport
+2, le rapport des tailles est 4.
+log 4 / log 2 = 2"
+hb9 "Ainsi, cette définition donne
+les mêmes résultats que la dimension
+topologique pour des formes \"normales\"."
+hb10 "Les choses deviennent beaucoup plus
+intéressantes avec les fractales..."
+
+hb11 "Considérons le \"flocon de neige\"
+appelée aussi courbe de von Koch,"
+hb12 "créée en remplaçant de façon infiniment
+répétée un segment par quatre segments
+de droite formant une ligne brisée."
+hb13 "Chaque nouveau segment a 1/3 de la
+taille du segment initial."
+hb14 "En zoomant 3 fois, chacun de ces
+segments aura exactement la même
+taille que le segment initial."
+hb15 "A cause de l'auto-similarité
+engendrée par le processus de
+répétition infinie de la construction,"
+hb15b "chacune des 4 parties deviendra
+une réplique exacte de la fractale
+prise dans sa totalité."
+hb16 "Comme il y a quatre telles parties,
+la taille de la fractale croît 4 fois"
+hb17 "En remplaçant ces valeurs dans la
+formule de la dimension, on trouve:
+log 4 / log 3 = 1.261"
+hb18 "On obtient une valeur plus grande
+que 1, qui est la dimension topologique
+de la courbe."
+hb19 "La dimension de Hausdorff Besicovich
+(1.261) est donc ici plus grande que la
+dimension topologique."
+hb20 "D'après la définition que nous avons
+donnée, le flocon de neige est une
+fractale."
+
+defe1 "Cette définition, cependant, est
+imparfaite car elle exclut quantité de
+formes qui peuvent cependant être
+considérés comme des fractales."
+defe2 "Mais elle montre en tout cas une
+des propriétés intéressantes
+des fractales,"
+defe3 "et elle est assez courante."
+defe4 "La dimension de Hausdorff Besicovich
+est aussi souvent appelée
+\"dimension fractale\"."
+
+#########################################################
+#For file escape.xaf
+escape "Les Math à la base des fractales
+
+Chapitre 2 - Fractales à temps de fuite"
+
+escape1 "Certaines fractales (comme le
+flocon de neige) sont créées de
+manière simple."
+escape2 "XaoS peut générer une catégorie
+différente de fractales - appelées ici
+fractales à temps de fuite."
+escape3 "La méthode utilisée pour les
+engendrer est quelque peu différente,
+mais elle repose aussi sur un
+mécanisme d'itérations."
+escape4 "On considère l'écran tout entier
+comme un plan complexe."
+escape5 "L'axe réel est placé horizontalement"
+escape6 "et l'axe imaginaire verticalement."
+escape7 "Chaque point a sa propre orbite"
+escape8 "La trajectoire d'un point est calculée
+en itérant une certaine fonction f(z,c)
+où z représente la position précédente,
+z'=f(z,c) la nouvelle position, et où
+c est un paramètre (valeur donnée)."
+escape9 "Par exemple, dans l'ensemble de
+Mandelbrot, la fonction itérative est
+f(z,c)=z^2+c."
+orbit1 "Supposons par exemple qu'on
+examine le point complexe 0 - 0.6i"
+orbit2 "On assigne alors cette valeur au
+paramètre c"
+orbit3 "Le calcul itératif de l'orbite
+démarre par convention à z=0+0i"
+orbit3b "On calcule ensuite de façon
+répétitive la fonction f(z,c), en
+remplaçant z par z=f(z,c) à chaque
+nouvelle itération."
+orbit4 "Par définition, un point c
+est dans l'esnemble de Mandelbrot si
+l'orbite du point z reste à distance
+finie."
+orbit5 "Ici, c'est bien ce qui se passe..."
+orbit6 "Ce point est donc dans l'ensemble."
+orbit7 "Dans d'autre cas, le point z peut
+\"fuir\" rapidement vers l'infini."
+orbit8 "(par exemple, pour la valeur c=10+0i,
+la première itération donne 110,
+la deuxième 12110 etc..)"
+orbit9 "De tels points sont donc en dehors
+de l'ensemble de Mandelbrot."
+
+bail1 "Nous en sommes à parler de
+quantités infinies, et de nombre
+infini d'itérations..."
+bail2 "Mais les ordinateurs sont des machines
+finies, et ne peuvent donc calculer
+exactement les fractales."
+bail3 "On peut cependant montrer, que dans
+le cas où la distance de l'orbite à
+zéro est grande que 2, l'orbite
+s'échappe toujours vers l'infini."
+bail4 "Ainsi, on peut interrompre les calculs
+dès que l'orbite sort du cercle de
+rayon 2.
+(Ce test est appelé test de sortie)."
+bail5 "Dans les cas où des points calculés
+sont situés en dehors du cercle de
+rayon 2, on n'a plus besoin que d'un
+nombre fini d'itérations."
+bail6 "Ceci permet aussi de créer les zones
+colorées entourant l'ensemble."
+bail7 "Celles-ci sont colorées en fonction
+du nombre d'itérations de l'orbite
+nécessaires pour tomber dans la
+\"zone d'abandon\" (extérieur du cercle
+de rayon 2)."
+
+iter1 "A l'intérieur du cercle, on peut
+événtuellement avoir besoin de faire
+un nombre infini d'itérations."
+iter2 "La seule façon de s'en sortir est
+d'interrompre les calculs après un
+certain nombre d'itérations et de se
+contenter du résultat approximatif."
+iter3 "Le nombre maximal d'itérations
+va donc déterminer la précision de
+l'approximation."
+iter4 "Si on n'effectuait pas d'itérations, on
+observerait juste un cercle de rayon 2
+(d'après la condition de sortie)."
+iter5 "Un plus grand nombre d'itérations rend
+le calcul plus précis, mais réclame
+aussi un temps de calcul plus long."
+limit1 "XaoS, par défaut, calcule
+170 itérations."
+limit2 "Dans certaines zones, on peut zoomer
+très longtemps sans jamais atteindre
+cette limite."
+limit3 "Dans d'autres zones, on peut au
+contraire aboutir assez vite à des
+résultats imprécis ou inexacts."
+limit4 "Dans ce cas, les images perdent de
+leur netteté et deviennent ennuyeuses."
+limit5 "Mais si on augmente de nouveau le
+nombre d'itérations, on retrouve de
+nouveau des tas de détails excitants."
+ofracts1 "Les autres fractales de XaoS sont
+calculées à partir de formules et de
+tests de sortie différents, mais la
+méthode est toujours à peu près
+la même."
+ofracts2 "Il y a une telle quantité de calculs
+à accomplir que XaoS doit effectuer
+des tas d'optimisations pour gagner
+du temps...
+
+Si vous le souhaitez, vous pouvez lire
+plus de détails dans le fichier:
+doc/xaos.info"
+
+#########################################################
+#pour anim.xaf
+anim "Présentation des fonctions de XaoS
+
+Fichier d'animations et de positions"
+
+#########################################################
+#For file anim.xhf
+
+anim2 "Comme vous l'avez remarqué, XaoS
+est capable de rejouer des animations
+et des formations"
+
+anim3 "Elles peuvent être enregistrées
+directement depuis XaoS"
+
+languag1 "Comme les fichiers d'animations
+et de positions sont stockés avec
+un langage de commande simple"
+
+languag2 "(Les positions sont
+des animations d'une seule image)"
+
+languag3 "Les animations peuvent être
+éditées manuellement pour obtenir
+un résultat plus professionnel"
+
+languag4 "La plupart des animations de
+cette présentation ont été écrites
+complètement à la main en utilisant
+des fichiers de position"
+
+modif1 "Une petite modification
+dans ce fichier de position simple"
+
+modif2 "Doit générer un zoom arrière"
+modif3 "Et celle-ci un zoom avant"
+
+newanim "Vous pouvez aussi écrire des animations
+ou effets complètement nouveaux"
+
+examples "XaoS est fourni avec
+de nombreux fichiers exemples,
+à charger avec le menu save/load"
+
+examples2 "Utilisez les fichiers de position
+pour échanger des coordonnées avec
+d'autres programmes"
+
+examples3 "La seule limitation est votre
+imagination et le language de commande
+décrit dans le fichier xaos.info"
+
+#########################################################
+#For file barnsley.xaf
+
+intro4 "Une introduction aux fractales
+
+Chapitre 5 - la formule de Barnsley"
+
+barnsley1 "Une autre formule, découverte
+par Michael Barnsley"
+
+barnsley2 "Crée de très étranges fractales"
+
+barnsley3 "Peu intéressantes à explorer"
+
+barnsley4 "Mais qui pointe sur de
+superbes \"Julias\"!"
+
+barnsley5 "C'est intéressant car les structures
+sont \"cristallines\" "
+
+barnsley6 "au lieu des formes \"organiques\"
+des autres fractales"
+
+#########################################################
+#For file filter.xaf
+
+filter "Présentation des fonctions de XaoS
+
+Les filtres"
+
+#########################################################
+#For file filter.xhf
+
+filter1 "Les filtres sont des effets appliqués
+à chaque image fractale, après calcul"
+
+filter2 "Les filtres suivants sont présents
+dans XaoS"
+
+motblur "Flou de déplacement"
+
+edge "détection de bord"
+
+edge2 "Le premier fait des
+lignes larges et est utilisable de
+préférence en haute résolution"
+
+edge3 "Le second écrase les lignes"
+
+star "filtre \"champ d'étoiles\" "
+
+interlace "L'entrelacement accélère
+les calculs et donne un effet de
+flou de vitesse en haute résolution"
+
+stereo "Et le filtre stéréogramme"
+
+stereo2 "Si vous voyez d'habitude
+les stéréogrammes et si les images
+suivantes n'apparaissent pas en 3D,
+les paramètres de taille écran
+doivent être reconfigurés.
+La commande xaos -help
+indique de plus amples informations"
+
+emboss1 "Filtre de relief" #NEW
+
+palettef1 "Filtre de rotation de palette
+(active la rotation des couleurs
+en couleurs réelles, 16 bits et plus)" #NEW
+
+truecolorf "Un filtre 24 bit (génère
+des images en couleurs réelles
+avec un affichage en 256 couleurs)"
+
+#########################################################
+#For file fractal.xaf
+
+end "-=- Fin -=-"
+
+fcopyright "Cette introduction aux fractales
+a été écrite par Jan Hubicka
+in Juillet 1997 et traduite
+en Français par
+Eric Courteau [ecourteau@cplus.fr]
+et
+JP Demailly [demailly@ujf-grenoble.fr]"
+# Add your copyright here if you are translating/correcting this file
+
+suggestions "
+Envoyez vos idées,
+suggestions, remerciements,
+reproches et rapports
+d'erreurs à :
+
+xaos-discuss@lists.sourceforge.net
+
+Merci"
+
+#########################################################
+#For file incolor.xaf
+
+incolor1 "Normalement les points à
+l'intérieur de l'ensemble sont
+d'une seule couleur."
+
+incolor2 "Cela rend les frontières
+bien visibles mais peut cacher
+certains détails"
+
+incolor3 "Il est possible de coloriser
+les points à l'intérieur de l'ensemble
+pour rendre intéressantes à regarder
+certaines zones"
+
+incolor4 "Xaos utilise dix méthodes
+différentes pour le faire. Elles sont
+appelées les colorations internes."
+
+zmag "zmag
+
+La couleur est calculée d'après
+la valeur de la dernière orbite"
+
+#########################################################
+#For file innew.xaf
+
+innew1 "Décomposition
+
+Même méthode que pour
+l'ensemble externe."
+
+innew2 "real/imag
+
+La couleur dépend de la partie réelle
+de la dernière orbite divisée par
+la partie imaginaire"
+
+innew3 "les 6 méthodes de coloration
+suivantes sont choisis au hasard ou
+repris du logiciel Flarium."
+
+#########################################################
+#For file intro.xaf
+
+fractal "...Fractales..."
+fractal1 "Qu'est ce que c'est ?"
+
+fractal2 "Définition de Benoît Mandelbrot:
+les fractales sont des ensembles dont
+la dimension de Hausdorff Besicovitch
+est supérieure à la dimension
+topologique."
+
+fractal3 "Vous ne comprenez toujours pas?"
+
+fractal4 "Ne vous inquiétez pas :
+Cette définition est discutable."
+
+fractal5 "Plus simplement :
+Une fractale est une forme"
+
+fractal6 "composée d'éléments"
+
+fractal7 "qui sont chacun une copie en
+réduction de la forme générale"
+
+fractal8 "ce processus répété à l'infini"
+
+fractal9 "construit la fractale en entier."
+
+facts "Les fractales possèdent des
+propriétés surprenantes."
+
+fact1 "Elles sont indépendantes de
+l'échelle choisie pour les visualiser."
+fact2 "l' Auto-similarité."
+fact3 "Elles ressemblent à des
+objets naturels."
+fact4 "Comme les nuages, les montagnes
+ou les côtes."
+fact5 "De nombreux objets mathématiques
+sont des fractales"
+fact6 "Comme celle-ci"
+
+fmath4 "La plupart des fractales sont
+crées à l'aide d'un procédé itératif"
+fmath5 "par exemple la fractale connue
+sous le nom de courbe de von Koch"
+fmath6 "est crée en transformant un
+segment de droite"
+fmath7 "en quatre segments"
+fmath8 "Voici la première
+itération du processus"
+fmath9 "On répète ensuite cette transformation"
+fmath10 "après 2 itérations..."
+fmath11 "après 3 itérations..."
+fmath12 "après 4 itérations.."
+fmath13 "et après une infinité d'itérations
+on obtient la fractale achevée."
+fmath14 "Sa forme est celle d'un flocon de
+neige qui serait coupé en trois."
+tree1 "Quantités d'autres formes peuvent
+être construites par des méthodes
+voisines."
+tree2 "Par exemple, en transformant un
+segment de manière différente"
+tree3 "on aboutit à un arbre."
+nstr "Les itérations peuvent éventuellement
+introduire des décalages aléatoires."
+nstr2 "En remplaçant 1 segment par 2 segments"
+nstr3 "et en introduisant une petite erreur,"
+nstr4 "on peut obtenir une fractale
+ressemblant à une côte découpée."
+nstr5 "Des procédés semblables peuvent
+servir à créer des nuages, des
+montagnes, et quantités d'autres
+formes présentes dans la nature."
+
+#######################################################
+## mset.xaf
+
+fact7 "Sans aucun doute, la plus fameuse est..."
+
+mset "l'ensemble de Mandelbrot"
+mset1 "créée par une formule
+très simple."
+mset2 "Mais l'une des plus
+belle des fractales"
+mset3 "Comme l'ensemble de Mandelbrot
+est une fractale"
+mset4 "ses frontières recèlent des"
+mset5 "copies en miniature de
+l'ensemble complet"
+mset6 "celui-ci est le plus grand,
+à peu près 50 fois plus petit."
+mset7 "Comme l'ensemble de Mandelbrot
+n'est pas strictement auto-similaire"
+mset8 "chaque copie est subtilement
+différente de l'original"
+mset9 "Celle-ci est 76000 fois plus petite."
+mset10 "Des copies situées ailleurs peuvent
+différer encore plus"
+
+nat "Les frontières ne contiennent pas que
+des copies de l'ensemble, mais aussi"
+nat1 "des variations infinies de
+diverses structures"
+nat2 "Certaines sont étonnamment
+proches de formes naturelles"
+nat3 "cela ressemble à des arbres"
+nat4 "des rivières et des lacs"
+nat5 "des galaxies"
+nat6 "et des chutes d'eau"
+nat7 "l'ensemble contient de nombreuses
+formes complètement originales"
+
+###############################################################################
+############
+
+juliach "An introduction to fractals"
+
+julia "l'ensemble de Mandelbrot n'est pas
+la seule fractale générée par la
+formule z=z^2+c"
+julia1 "une autre souvent utilisée"
+julia2 "est l'ensemble de Julia"
+julia3 "il existe non pas un
+seul ensemble de Julia,"
+julia4 "mais une infinité de variations"
+julia5 "et chacune diffère juste du
+nombre complexe qui leur sert
+de valeur initiale:"
+julia6 "un point choisi dans l'ensemble
+de Mandelbrot."
+julia7 "la fractale de Mandelbrot peut être vue
+comme une carte des Julias"
+julia8 "les points à l'intérieur forment des
+Julias avec de grandes zones sombres"
+julia9 "à l'extérieur, cela fait
+un nuage de points"
+julia10 "Les plus intéressantes sont
+situées juste à la frontière"
+
+theme "la forme générale de l'ensemble de Julia
+dépend beaucoup du point choisi"
+theme1 "en zoomant, vous verrez
+que le thème de l'ensemble d'origine
+est reproduit"
+theme2 "en affichant le Julia correspondant "
+theme3 "Mais en voyant l'image dans
+sa totalité"
+theme4 "l'image est très différente"
+theme5 "Les Julias peuvent sembler moins
+riches"
+theme6 "car elle imitent une seule forme"
+theme7 "mais en choisissant avec soin
+votre point de départ "
+theme8 "dans l'ensemble de Mandelbrot,
+de belles surprises peuvent arriver."
+
+#########################################################
+#For file keys.xhf
+
+keys "Touches:
+
+S - Stopper l'animation
+Espace - passer à l'image
+ suivante
+ (peut prendre du temps)
+gauche/droite - règle la vitesse
+ du texte "
+
+#########################################################
+#For file magnet.xaf
+
+intro7 "Une introduction aux fractales
+
+Chapitre 8 - Magnet"
+
+magnet "Ceci n'est PAS l'ensemble de Mandelbrot"
+magnet1 "Cette fractale est appellée Magnet
+car elle provient d'une formule
+de physique théorique"
+magnet2 "dérivé de l'étude des
+champs magnétiques"
+
+similiar "Sa similarité
+avec l'ensemble de Mandelbrot
+est intéressante car elle
+vient du monde réel."
+
+magjulia "Les Julias qui en dépendent sont
+étonnants "
+
+#########################################################
+#For file new.xaf
+
+new "Les nouveauté de la version 3.0"
+speed "1. accélération"
+speed1 "La boucle de calcul est
+améliorée et fait des test
+de périodicité"
+speed2 "les nouvelles images sont calculées
+avec la méthode de detection des
+frontières"
+speed3 "ce qui accélère grandement
+l'affichage de nouvelles images"
+speed4 "par exemple, le calcul
+de l'ensemble de Mandelbrot avec une
+précision de 1 000 000 boucles"
+speed5 "calcul en cours"
+speed6 "Calculé !"
+speed7 "XaoS utilise l'heuristique et
+désactive automatiquement le test de
+périodicité si le point n'est pas à
+l'intérieur de l'ensemble."
+speed8 "La routine de zoom principale
+est optimisée pour être deux
+fois plus rapide qu'avant."
+speed9 "Ainsi, XaoS atteint les
+130 images/secondes sur mon
+Pentium 130Mhz"
+
+new2 "2. les filtres"
+new3 "3. neuf méthodes de coloration
+de l'extérieur"
+new4 "4. De nouvelles méthodes pour
+coloriser l'intérieur"
+new5 "5. Le mode 24 bits
+pour la vidéo"
+new6 "6. sauvegarde et chargement
+d'animations"
+newend "et beaucoup d'autres améliorations,
+comme le défilement d'image, une
+meilleure gestion des palettes de
+couleurs...
+Voir le fichier ChangeLog pour une
+liste complète des changements." #NEW
+
+#########################################################
+#For file newton.xaf
+
+intro3 "Une introduction aux fractales
+
+Chapitre 4 - La méthode de Newton"
+newton "La formule de celle-ci est
+très différente."
+newton1 "L'approximation de Newton
+pour trouver les racines de
+polynomes cubique du type x^3=1"
+newton2 "Elle compte le nombre de cycles requis
+pour atteindre une racine assez juste"
+newton3 "Les trois racines sont
+représentées par des cercles bleus"
+newton4 "Les parties intéressantes
+sont aux endroits où il est difficile
+de déterminer quelle est la racine
+la plus proche"
+newton5 "Cette fractale est trop
+répétitive pour être intéressante
+à explorer"
+newton6 "Mais XaoS est capable de
+générer des \"Julias\" dérivés."
+newton7 "l'origine utilisée
+est l'erreur de l'approximation"
+newton8 "Cela rend cette fractale
+plus intéressante"
+
+#########################################################
+#For file octo.xaf
+intro6 "Une introduction aux fractales
+
+Chapitre 7 - Octo"
+octo "Octo est une fractale
+générée par une formule
+moins couramment utilisée"
+octo1 "Elle a été choisie à cause
+de sa forme inhabituelle"
+octo2 "Xaos est capable
+de créer des Julias
+à partir de ce type de fractale."
+
+#########################################################
+#For file outcolor.xaf
+
+outcolor "Modes de coloration externe"
+outcolor1 "L'ensemble de Mandelbrot
+est juste la partie noire et ennuyeuse
+située au centre de la courbe"
+outcolor2 "Les bandes de couleurs qui
+l'entourent forment la frontière"
+outcolor3 "La méthode classique
+pour afficher leur couleur est
+le nombre de boucles nécessaires pour
+determiner qu'elles sont à l'extérieur"
+outcolor4 "mais d'autres méthodes existent."
+outcolor5 "Xaos les appelle les modes
+de colorisation externes"
+
+iterreal "iter+real
+
+On rajoute la partie réelle du dernier
+orbite au nombre d'itérations"
+iterreal1 "Cela rend plus belles des images
+a priori un peu ennuyeuses"
+
+iterimag "La seconde méthode de colorisation
+iter+imag donne des résultats très
+proches"
+iterimag2 "c'est juste la partie imaginaire qui est
+utilisée au lieu de la partie réelle"
+
+iprdi "iter+real/imag
+
+la partie réelle du dernier orbite est
+divisée par la partie imaginaire."
+
+sum "iter+real+imag+real/imag
+
+on ajoute tout ensemble."
+
+decomp "Décomposition binaire
+
+Si la partie imaginaire est
+plus grande que zéro, c'est
+le nombre d'itérations sinon
+on soustrait le nombre
+d'itérations de la
+décomposition binaire."
+
+bio "Biomorphs
+
+Cette méthode porte son nom en
+raison du fait qu'elle produit
+des structures ressemblant aux
+animaux unicellulaires."
+
+#########################################################
+#For file outnew.xhf
+
+potential "Potentiel
+
+Cette technique de colorisation
+fonctionne particulièrement
+bien sur les images
+non zoomée."
+
+cdecom "Decomposition des couleurs"
+cdecom2 "la couleur est calculée à
+partir de l'angle du dernier orbite"
+cdecom3 "C'est proche de la
+decomposition binaire mais
+les couleurs sont plus adoucies"
+cdecom4 "A utiliser plus
+particulièrement avec la
+fractale de Newton"
+
+smooth "Adoucir
+
+Ce mode enlève les bandes de couleur
+et les remplace par des transitions
+en douceur."
+smooth1 "Cela ne fonctionne pas avec Newton
+et Magnet à cause de leurs attracteurs
+finis"
+smooth2 "vous devrez l'utiliser avec les modes
+écran supérieurs à 256 couleurs
+ou activer le filtre de simulation
+24 bit"
+
+#########################################################
+#For file outnew.xhf
+
+intro5 "Une introduction aux fractales
+
+Chapitre 6 - Phoenix"
+
+phoenix "Ceci est l'ensemble de Mandelbrot
+pour la formule nommée Phoenix"
+
+phoenix1 "Elles est très différente
+des autres formules disponibles
+dans XaoS, mais elle ressemble
+par certains côtés à l'ensemble
+de Mandelbrot"
+
+phoenix2 "Elle aussi contient des copies
+réduite de la totalité"
+
+phoenix3 "Il y a toujours des correspondances de
+thème entre les Julias et leur point
+de départ."
+
+phoenix4 "Mais les Julias sont très différents"
+
+#########################################################
+#For file plane.xaf
+
+plane1 "Normalement, la partie réelle d'un
+point est placée sur l'axe des x
+et la partie imaginaire sur l'axe Y"
+
+plane2 "XaoS fournit 6 autres façons
+de placer les points dans le plan"
+plane3 "1/mu
+
+C'est une inversion - la zone
+à l'infini se retrouve au 0
+et inversement."
+plane4 "Mandelbrot classique"
+plane5 "Mandelbrot inversé"
+plane6 "L'ensemble est maintenant à la
+périphérie alors qu'il ètait
+au centre de l'écran avant."
+plane7 "les images suivantes vont être
+affichée successivement en mode
+normal puis inversé"
+plane8 "1/mu+0.25
+
+
+Le centre d'inversion est déplacé"
+plane9 "Comme le centre est situé a la
+frontière de l'ensemble, vous voyez une
+infinité de frontières paraboliques."
+plane10 "L'effet est intéressant sur les
+autres fractales, mais en général elles
+perdent leur symétrie."
+
+lambda "les plans lambda forment une vue
+Complètement differente"
+
+ilambda "1/lambda
+
+la combinaison des plans lambda
+et de l'inversion"
+
+imlambda "1/(lambda-1)
+
+la combinaison de lambda,
+déplacement et inversion"
+
+imlambda2 "l'effet sur Mandelbrot
+est très intéressant"
+
+mick "1/(mu-1.40115)
+
+Une inversion avec le centre déplacé
+sur un point de Feigenbaum - point
+où Mandelbrot est auto-similaire.
+Cela augmente énormément
+les détails autour de ce point"
+
+#########################################################
+#For file power.xaf
+
+intro2 "Une introduction aux fractales
+
+Chapitre 3 - Ensemble de Mandelbrot
+des fonctions puissances plus élevées"
+
+power "z^2+c n'est pas la seule formule
+qui génère des fractales"
+power2 "En la modifiant très peu - x^3+c
+par exemple, une autre fractale
+apparaît."
+power3 "Elle contient encore beaucoup de
+copies en miniature de l'ensemble dans
+son entier"
+
+power4 "Des fractales similaires peuvent être
+engendrées par des formules voisines"
+
+pjulia "et à chacune correspond une famille
+d'ensemble de Julia correspondants."
+
+#########################################################
+#For file truecolor.xaf
+
+truecolor "couleurs réelles (24 bit)"
+truecolor1 "habituellement les fractales
+sont colorées à l'aide d'une palette.
+En mode 24 bit la palette est émulée."
+truecolor2 "la seule différence
+est que la palette est plus grande
+et que les couleurs successives sont
+plus nombreuses"
+truecolor3 "Le mode 24 bit peut utiliser
+la couleur pour afficher divers
+résultats de calculs"
+truecolor4 "pour calculer une couleur exacte
+et non plus un index sur une palette"
+truecolor5 "Cela permet d'afficher
+jusqu'à quatre valeurs par pixel"
+truecolor6 "Le mode 24 bit nécessite un écran
+équivalent ou alors il faut
+valider le filtre 24 bit pour afficher
+les images produites en 256 couleurs."
+
+#########################################################
+#for file pert.xaf #NEW (up to end of file)
+
+pert0 "Perturbation"
+pert1 "Comme pour la formule générant
+l'ensemble de Julia, qui utilise
+différentes valeurs initiales pour
+produire différents ensembles à
+partir d'une même formule,"
+pert2 "vous pouvez changer la valeur de
+perturbation pour les ensembles de
+Mandelbrot."
+pert3 "Cela change la position initiale
+de l'orbite, en une valeur autre que
+0 par défaut."
+pert4 "Sa valeur n'affecte pas la
+fractale qui en résulte autant
+que le choix de la valeur initiale
+pour les Julias, mais elle est
+utile pour obtenir des fractales
+plus aléatoires."
+
+##########################################################
+#for file palette.xaf
+
+pal "Palettes aléatoires"
+pal0 "XaoS ne possède pas une vaste
+librairie de palettes prédéfinies
+comme beaucoup d'autres programs,
+mais génère des palettes aléatoires."
+pal1 "Ainsi vous pouvez simplement
+presser 'P' jusqu'à ce que XaoS
+génère une palette agréable à
+l'oeil pour votre fractale."
+pal2 "Trois différents algorithmes
+sont utilisés:"
+pal3 "le premier produit des bandes depuis
+une certaine couleur jusqu'au noir,"
+pal4 "le second produit des bandes depuis
+le noir jusqu'à une certaine couleur
+puis jusqu'au blanc,"
+pal5 "le troisième est inspiré de
+certains tableaux cubistes."
+
+###########################################################
+#for file other.xaf
+
+auto1 "Autopilote"
+auto2 "Si vous êtes paresseux, vous
+pouvez activer l'autopilote pour
+que XaoS explore les fractales
+automatiquement."
+fastjulia1 "Mode d'exploration rapide Julia"
+fastjulia2 "Ce mode permet de faire varier
+la valeur initiale du Julia."
+fastjulia3 "Il est aussi utile pour prévisualiser
+une zone avant de zoomer - parce que
+dans la correspondance thématique
+entre le Julia et le point que
+vous choisissez, vous pouvez voir
+le thème approximatif près d'un
+point avant de zoomer."
+rotation "Défilement d'images"
+cycling "Défilement de couleurs"
+
+##############################################
+#for file trice.xaf
+
+trice1 "Triceratops and Catseye fractals"
+trice2 "If you change the bailout value"
+trice3 "of an escape-time fractal"
+trice4 "to a smaller value,"
+trice5 "you will get an other fractal."
+trice6 "With this method we can get"
+trice7 "very interesting patterns"
+trice8 "with separate areas of one color."
+trice9 "The Triceratops fractal"
+trice10 "is also made with this method."
+trice11 "Many similar pictures can be"
+trice12 "made of Triceratops."
+trice13 "The Catseye fractal"
+trice14 "is like an eye of a cat."
+trice15 "But if we raise the bailout value..."
+trice16 "...we get a more interesting fractal..."
+trice17 "...with bubbles..."
+trice18 "...and beautiful Julias."
+
+##############################################
+#for file fourfr.xaf
+
+fourfr1 "Mandelbar, Lambda, Manowar and Spider"
+fourfr2 "This is the Mandelbar set."
+fourfr3 "It's formula is: z = (conj(z))^2 + c"
+fourfr4 "Some of its Julias are interesting."
+fourfr5 "But let's see other fractals now."
+fourfr6 "The Lambda fractal has a structure"
+fourfr7 "similar to Mandelbrot's."
+fourfr8 "It's like the Mandelbrot set on the lambda plane."
+fourfr9 "But Lambda is a Julia set, here is MandelLambda."
+fourfr10 "...fast Julia mode..."
+fourfr11 "This is the fractal Manowar."
+fourfr12 "It was found by a user of Fractint."
+fourfr13 "It has Julias similar to the whole set."
+fourfr14 "This fractal is called Spider."
+fourfr15 "It was found by a user of Fractint, too."
+fourfr16 "And it has Julias similar to the whole set, too."
+
+##############################################
+#for file classic.xaf
+
+classic1 "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+classic2 "This is the famous Sierpinski Gasket fractal."
+classic3 "And this is the escape-time variant of it."
+classic4 "You can change its shape by selecting"
+classic5 "another 'Julia seed'"
+classic6 "This fractal is the Sierpinski Carpet."
+classic7 "And here is it's escape-time variant."
+classic8 "This is famous, too."
+classic9 "And finally, this is the escape-time variant"
+classic10 " of the Koch Snowflake."
+
+##############################################
+#for file otherfr.xaf
+
+otherfr1 "Other fractal types in XaoS"
diff --git a/catalogs/italiano.cat b/catalogs/italiano.cat
new file mode 100644
index 0000000..76265d6
--- /dev/null
+++ b/catalogs/italiano.cat
@@ -0,0 +1,1105 @@
+# Message catalog file required to replay XaoS tutorials in
+# English language
+#
+# Copyright (C) 1997 by Jan Hubicka
+#
+# Corrected by Tim Goowin
+# Further corrections by David Meleedy
+# And some more by Nix
+#
+# There are a few things you should know if you want to change or
+# translate this file.
+#
+# The format of this catalog is identifier[blanks]"value"[blanks]
+#
+# Identifier is a key used by the program. Do not translate it! Only
+# translate the value. If you want a quote character `"' in the text,
+# use `\"'. For `\' use `\\'. Don't use `\n' for enter; use a literal
+# newline.
+#
+# If you wish to translate this file into any new language, please let
+# me know. You should translate this text freely: you don't need to use
+# exactly the same sentences as here, if you have idea how to make text
+# more funny, interesting, or add some information, do it.
+#
+# You can use longer or shorter sentences, since XaoS will automatically
+# calculate time for each subtitle.
+#
+# Also, please let me have any suggestions for improving this text and
+# the tutorials.
+#
+# Tutorial text needs to fit into a 320x200 screen. So all lines must be
+# shorter than 40 characters. This is 40 characters:
+#234567890123456789012345678901234567890
+# And thats not much! Be careful!
+# Please check that your updated tutorials work in 320x200 to ensure
+# that everything is OK.
+#########################################################
+#For file dimension.xaf
+
+fmath "La matematica che sta dietro ai frattali"
+fmath1 "I frattali sono un campo piuttosto nuovo
+della matematica, per cui ci sono ancora
+molte questioni irrisolte."
+fmath2 "Perfino le definizioni non sono precise."
+fmath3 "Solitamente viene chiamato frattale
+un oggetto contenente una qualche
+autosomiglianza."
+
+
+def1 "Una delle possibili definizioni è..."
+#Definition from the intro.xaf is displayed here.
+#If it is a problem in your langage catalog, let me
+#know and I will create a special key
+def2 "Cosa significa tutto ciò?"
+def3 "Per spiegarlo dobbiamo prima capire cosa
+sono le dimensioni topologiche e le
+dimensioni di Hausdorff Besicovich."
+
+topo1 "La dimensione topologica
+è la \"normale\" dimensione."
+topo2 "Un punto ha 0 dimensioni."
+topo3 "Una linea ha 1 dimensione."
+topo4 "Una superficie ha 2 dimensioni, ecc..."
+
+hb1 "La definizione di
+dimensione di Hausdorff Besicovich
+deriva dal semplice fatto che:"
+hb2 "Un segmento ingrandito due volte risulta
+lungo il doppio della misura iniziale."
+hb3 "Per contro, la dimensione di un
+quadrato ingrandito allo stesso modo
+aumenta di quattro volte."
+hb4 "Regole simili funzionano anche per
+dimensioni maggiori."
+hb5 "Per calcolare le dimensioni che
+si ottengono da tutto ciò, si può
+utilizzare la seguente equazione:"
+hb6 "dimensione = log s / log z
+dove z è l'ingrandimento e
+s è la variazione di misura"
+hb7 "per un segmento con ingrandimento 2,
+la variazione di misura è anch'essa 2.
+log 2 / log 2 = 1"
+hb8 "per un quadrato con ingrandimento 2,
+la variazione di misura risulta 4.
+log 4 / log 2 = 2"
+hb9 "Questa definizione dà poi gli stessi
+risultati per le forme tradizionali."
+hb10 "Le cose diventeranno più interessanti
+con i frattali..."
+
+hb11 "Consideriamo una curva a fiocco di neve,"
+hb12 "creata frazionando ripetutamente
+un segmento in quattro segmenti."
+hb13 "I nuovi segmenti misurano 1/3
+del segmento originale."
+hb14 "Dopo averli ingranditi 3 volte,
+risulteranno lunghi esattamente
+come le linee originali."
+hb15 "A causa della autosomiglianza
+creata dalla ripetizione infinita
+di questa metamorfosi,"
+hb15b "ognuna di queste parti
+diventerà una copia esatta
+del frattale originale."
+hb16 "Dato che esistono 4 di queste copie, la
+misura del frattale cresce di 4 volte."
+hb17 "Mettendo questi valori nell'equazione:
+log 4 / log 3 = 1.261"
+hb18 "otteniamo un valore maggiore di 1
+(La dimensione topologica
+della curva)."
+hb19 "La dimensione di Hausdorff Besicovich
+(1.261) è maggiore della
+dimensione topologica."
+hb20 "In accordo con questa definizione,
+il fiocco di neve è un frattale."
+
+defe1 "Questa definizione comunque
+non è perfetta, dato che esclude un
+gran numero di forme che sono frattali."
+defe2 "Però mette in mostra una delle
+proprietà interessanti dei frattali,"
+defe3 "che risulta piuttosto nota."
+defe4 "La dimensione di Hausdorff Besicovich
+viene spesso chiamata anche
+\"dimensione frattale\""
+
+#########################################################
+#For file escape.xaf
+escape "La matematica che sta dietro ai frattali
+
+capitolo 2 - Frattali con tempo di fuga"
+escape1 "Alcuni frattali (come il fiocco di neve)
+sono creati attraverso semplici
+suddivisioni e ripetizioni."
+escape2 "XaoS può generare una diversa
+categoria di frattali, chiamati
+frattali con tempo di fuga."
+escape3 "Il metodo per ottenerli è
+in qualche modo diverso, ma è basato
+anche sull'utilizzo di iterazioni."
+escape4 "Questi frattali considerano l'intero
+schermo come un piano complesso."
+escape5 "L'asse reale è posto orizzontalmente"
+escape6 "e quello immaginario verticalmente."
+escape7 "Ogni punto possiede la sua orbita,"
+escape8 "la traiettoria della quale è calcolata
+usando la funzione iterativa f(z,c),
+dove z è la posizione precedente
+e c è la nuova posizione sullo schermo."
+escape9 "Nell'insieme di Mandelbrot, ad esempio,
+la funzione iterativa è z=z^c+c"
+orbit1 "Nel caso volessimo esaminare
+il punto 0 - 0.6i,"
+orbit2 "assegniamo il valore stesso a c."
+orbit3 "L'iterazione dell'orbita
+inizia a z=0+0i,"
+orbit3b "quindi calcoliamo ripetutamente
+la funzione iterativa, ottenendo ad ogni
+passaggio un nuovo valore z da
+utilizzare nell'iterazione successiva."
+orbit4 "Delimitiamo il punto appartenente
+all'insieme, nel caso in cui l'orbita
+risulti finita."
+orbit5 "In questo caso lo è..."
+orbit6 "Questo punto, quindi, risulta
+interno all'insieme."
+orbit7 "In altri casi sarebbe andato
+velocemente all'infinito."
+orbit8 "(ad esempio con il valore 10+0i
+La prima iterazione risulta 110,
+la seconda 12110, ecc..)"
+orbit9 "Tali punti sono esterni all'insieme."
+
+bail1 "Stiamo ancora parlando di
+numeri infiniti e iterazioni
+di numeri infiniti..."
+bail2 "Ma i computer sono
+finiti, quindi non possono
+calcolare i frattali in maniera esatta."
+bail3 "Si può dimostrare che nel caso
+in cui la distanza dell'orbita dal punto
+zero risulti maggiore di 2, l'orbita
+stessa andrà sempre all'infinito."
+bail4 "Possiamo quindi interrompere i calcoli
+quando l'orbita fallisce questo test.
+(Questo è chiamato il test di bailout)"
+bail5 "Se dobbiamo calcolare punti esterni
+all'insieme, è ora necessario solo
+un numero finito di iterazioni."
+bail6 "Tutto questo genera anche le strisce
+colorate intorno all'insieme."
+bail7 "La colorazione viene effettuata in base
+al numero di iterazioni delle orbite
+che servono a rientrare nell'insieme
+di bailout."
+iter1 "All'interno dell'insieme sono ancora
+necessari un numero infinito di calcoli."
+iter2 "L'unica via praticabile risulta
+l'interruzione dei calcoli dopo un
+dato numero di iterazioni, utilizzando
+poi i risultati approssimati."
+iter3 "Il numero massimo di iterazioni
+specifica dunque quanto sarà
+esatta l'approssimazione."
+iter4 "Senza alcuna iterazione viene
+creato solo un cerchio di raggio 2.
+(a causa della condizione di bailout)"
+iter5 "Un maggior numero di iterazioni dà
+approssimazioni migliori, ma necessita
+di tempi di calcolo più lunghi."
+limit1 "XaoS, in maniera predefinita, calcola
+170 iterazioni."
+limit2 "In alcune aree è possibile effettuare
+molti ingrandimenti senza mai
+raggiungere questo limite."
+limit3 "In altre zone risultati inesatti sono
+raggiunti abbastanza presto."
+limit4 "Le immagini, in questo caso,
+non sono molto interessanti."
+limit5 "Ma incrementando il numero di
+iterazioni, otteniamo tanti
+nuovi ed eccitanti dettagli."
+ofracts1 "Gli altri frattali in XaoS sono
+calcolati usando differenti formule
+e test di bailout, ma il metodo
+utilizzato è principalmente lo stesso."
+ofracts2 "Sono richiesti così tanti calcoli
+che XaoS deve eseguire molte
+ottimizzazioni.
+
+Per maggiori dettagli a riguardo
+consultare il file
+doc/xaos.info"
+
+#########################################################
+#For file anim.xaf
+anim "Panoramica delle caratteristiche di XaoS
+
+Animazioni e file di posizione"
+
+#########################################################
+#For file anim.xhf
+
+anim2 "Come probabilmente avrete notato,
+XaoS è in grado di riprodurre guide
+e animazioni."
+
+anim3 "Possono essere registrati
+direttamente da XaoS,"
+
+languag1 "dal momento che le animazioni e
+i file di posizione sono memorizzati
+in un semplice linguaggio a comandi."
+
+languag2 "(i file di posizione sono solamente
+singoli fotogrammi di una animazione)."
+
+languag3 "Le animazioni possono essere modificate
+a posteriori, in maniera manuale, per
+ottenere risultati più professionali."
+
+languag4 "Quasi tutte le animazioni di queste
+guide sono state create manualmente
+partendo solo da un file di posizione."
+
+modif1 "Un semplice modifica"
+
+modif2 "genera un filmato
+di \"rimpicciolimento\","
+modif3 "mentre quest'altra un filmato
+di \"ingrandimento\"."
+
+newanim "È anche possibile creare animazioni
+ed effetti completamente nuovi."
+
+examples "XaoS contiene inoltre molti
+file di esempio, che possono essere
+caricati in maniera casuale dal
+menù salva / carica."
+
+examples2 "È anche possibile usare i file di
+posizione per scambiare informazioni
+con altri programmi."
+
+examples3 "L'unico limite è la propria
+immaginazione e il linguaggio a
+comandi descritto in xaos.info."
+
+#########################################################
+#For file barnsley.xaf
+
+intro4 "Una introduzione ai frattali
+
+Capitolo 5-La formula di Barnsley"
+
+barnsley1 "Un'altra formula,
+introdotta da Michael Barnsley,"
+
+barnsley2 "genera questo strano frattale."
+
+barnsley3 "Non è molto interessante
+da esplorare,"
+
+barnsley4 "ma contiene bellissimi Julia!"
+
+barnsley5 "È interessante perché ha
+una struttura \"cristallina\","
+
+barnsley6 "a differenza della struttura
+\"organica\" che che si trova
+in molti altri frattali."
+
+barnsley7 "Michael Barnsley ha anche introdotto
+altre formule."
+
+barnsley8 "Una di queste genera questo frattale."
+
+#########################################################
+#For file filter.xaf
+
+filter "Panoramica delle caratteristiche di XaoS
+
+filtri"
+
+#########################################################
+#For file filter.xhf
+
+filter1 "Un filtro è un effetto applicato
+ad ogni fotogramma dopo che il frattale
+viene calcolato."
+
+filter2 "XaoS implementa i
+seguenti filtri:"
+
+motblur "motion blur,"
+
+edge "filtri di rilevamento due bordi,"
+
+edge2 "(il primo crea linee ampie ed è
+utile ad alte risoluzioni,"
+
+edge3 "il secondo crea
+linee più strette),"
+
+star "un filtro campo stellato semplice,"
+
+interlace "Un filtro incrociato, (Velocizza
+i calcoli e produce un effetto
+\"motion blur\" a risoluzioni più alte),"
+
+stereo "Un filtro stereogramma a
+punti casuali,"
+
+stereo2 "(se le prossime immagini non sono
+visualizzate bene, ma solitamente gli
+stereogrammi a punti casuali sono
+visibili, è probabile che la dimensione
+dello schermo non sia configurata
+correttamente - usa `xaos -help'
+per maggiori informazioni),"
+
+emboss1 "un filtro rilievo," #NEWe
+
+palettef1 "un filtro di emulazione tavolozza,
+(abilita il ciclo dei colori su
+schermi truecolor)" #NEW
+
+truecolorf "un filtro truecolor, (crea
+immagini truecolor su schermi con 8bpp)."
+
+#########################################################
+#For file fractal.xaf
+
+end "Fine."
+
+fcopyright "L'introduzione ai frattali è stata
+creata da Jan Hubicka nel Luglio 1997 e
+successivamente modificata e aggiornata
+per le nuove versioni di XaoS.
+
+Correzioni a cura di:
+Tim Goodwin <tgoodwin@cygnus.co.uk>
+e
+David Meleedy <dmm@skepsis.com>
+e
+Nix <nix@esperi.demon.co.uk>"
+# Add your copyright here if you are translating/correcting this file
+
+suggestions "
+Tradotto in italiano da:
+Sergio Zanchetta <primes2h@gmail.com>
+
+Inviare qualunque idea,
+consiglio, ringraziamento, lamentela
+e segnalazione bug a:
+
+jh@ucw.cz
+
+Grazie"
+
+#########################################################
+#For file incolor.xaf
+
+incolor1 "Di solito i punti interni dell'insieme
+sono visualizzati utilizzando un singolo
+colore a tinta unita."
+
+incolor2 "Ciò rende molto visibili i contorni
+dell'insieme, ma le aree interne
+all'insieme stesso risultano
+piuttosto soporifere."
+
+incolor3 "Per rendere il tutto un po' più
+interessante, è possibile utilizzare il
+valore dell'ultima orbita per assegnare
+un colore ai punti interni all'insieme."
+
+incolor4 "XaoS ha dieci modi
+differenti per farlo. Sono chiamati
+\"modi di colorazione interna\"."
+
+zmag "zmag
+
+Il colore viene calcolato a partire
+dall'ampiezza dell'ultima orbita."
+
+#########################################################
+#For file innew.xaf
+
+innew1 "Genere scomposizione
+
+Funziona allo stesso modo
+della scomposizione colore
+per i modi di colorazione esterna.
+"
+
+innew2 "Real / Imag
+
+Il colore viene calcolato a partire
+dalla divisione tra la parte reale
+dell'ultima orbita e la sua parte
+immaginaria."
+
+innew3 "I prossimi 6 modi di colorazione sono
+per la maggior parte formule scelte a
+caso o copiate da altri programmi."
+
+#########################################################
+#For file intro.xaf
+
+
+fractal "...Frattali..."
+fractal1 "Cos'è un frattale?"
+
+fractal2 "Definizione di Benoit Mandelbrot:
+un frattale è un insieme per il quale
+la dimensione di Hausdorff Besicovich
+è strettamente maggiore della
+dimensione topologica."
+
+fractal3 "Brancolate nel buio?"
+
+fractal4 "Non preoccupatevi.
+Questa definizione è importante solo se
+siete dei matematici."
+
+fractal5 "In termini pratici,
+un frattale è una forma"
+
+fractal6 "costituita da parti"
+
+fractal7 "ognuna delle quali è approssimativamente
+una copia in misura ridotta dell'intero
+frattale."
+
+fractal8 "Questo processo si ripete all'infinito"
+
+fractal9 "per creare l'intero frattale."
+
+facts "I frattali sono caratterizzati
+da proprietà sorprendenti:"
+
+fact1 "I frattali non dipendono dalla scala,"
+fact2 "sono autosomiglianti,"
+fact3 "e spesso riproducono oggetti
+che si trovano in natura."
+#fact4 "come nuvole, montagne,
+#o linee costiere."
+fact5 "Esistono anche molte
+strutture matematiche
+che definiscono i frattali,"
+fact6 "come quello visualizzato sullo schermo."
+fmath4 "La maggior parte dei frattali
+sono creati con processi iterativi,"
+fmath5 "come ad esempio quello noto
+come la curva di von Koch"
+fmath6 "che viene creata trasformando
+un segmento"
+fmath7 "in quattro segmenti."
+fmath8 "Questa rappresenta la prima
+iterazione del processo."
+fmath9 "Quindi il processo stesso viene ripetuto"
+fmath10 "...dopo 2 iterazioni..."
+fmath11 "...dopo 3 iterazioni..."
+fmath12 "...dopo 4 iterazioni..."
+fmath13 "...e dopo un infinito numero
+di iterazioni otteniamo un frattale."
+fmath14 "La sua forma è simile a quella
+di un terzo di un fiocco di neve."
+tree1 "Utilizzando metodi simili è possibile
+costruire molte altre forme."
+tree2 "Ad esempio modificando un segmento
+in un altro modo"
+tree3 "possiamo ottenere un albero."
+nstr "Può darsi che le iterazioni introducano
+disturbi casuali all'interno del frattale."
+nstr2 "Passando da un segmento a due segmenti"
+nstr3 "e aggiungendo qualche piccolo errore,"
+nstr4 "è possibile ottenere frattali che
+ricordano una linea costiera."
+nstr5 "Un processo simile potrebbe creare
+nuvole, montagne e molte altre forme
+presenti in natura."
+
+#######################################################
+## mset.xaf
+
+fact7 "Indubbiamente il frattale più famoso è..."
+
+mset "...l'insieme di Mandelbrot."
+mset1 "È generato da
+una formula molto semplice"
+mset2 "ma risulta uno dei
+frattali più belli."
+mset3 "Dato che l'insieme di Mandelbrot
+è un frattale,"
+mset4 "i suoi contorni contengono"
+mset5 "copie in miniatura
+dell'intero insieme."
+mset6 "Questa è la copia più grande, circa 50
+volte più piccola dell'intero insieme."
+mset7 "L'insieme di Mandelbrot non è
+completamente autosomigliante,"
+mset8 "quindi ogni copia in miniatura
+risulta diversa."
+mset9 "Questa è circa 76.000 volte
+più piccola di tutto l'intero."
+mset10 "Altre copie, che si trovano in zone
+diverse dell'insieme, sono ancora
+più differenti."
+
+nat "I contorni non contengono solamente
+copie dell'intero insieme,"
+nat1 "ma una vera e propria varietà infinita
+di forme differenti."
+nat2 "Alcune di queste sono sorprendentemente
+simili a quelle presenti in natura:"
+nat3 "si vedono alberi,"
+nat4 "fiumi con laghi,"
+nat5 "galassie"
+nat6 "e cascate."
+nat7 "L'insieme di Mandelbrot contiene anche
+molte forme fiabesche."
+
+###############################################################################
+############
+
+juliach "Una introduzione ai frattali
+
+Capitolo 2-Julia"
+
+julia "L'insieme di Mandelbrot non è l'unico
+frattale generato dalla formula:
+z=z^2+c"
+julia1 "L'altro è..."
+julia2 "l'insieme di Julia"
+julia3 "Non esiste un unico insieme di Julia,"
+julia4 "ma ce ne sono un'infinita
+varietà."
+julia5 "Ognuno è creato partendo da un \"seme\","
+julia6 "che non è altro che un punto selezionato
+da un insieme di Mandelbrot."
+julia7 "L'insieme di Mandelbrot può essere visto
+come una mappa di vari insiemi di Julia."
+julia8 "Punti interni all'insieme di Mandelbrot
+corrispondono a insiemi di Julia
+con grandi aree nere connesse,"
+julia9 "mentre punti esterni all'insieme stesso
+corrispondono a Julia non connessi."
+julia10 "Gli insiemi di Julia più interessanti
+hanno i loro semi proprio sui confini
+dell'insieme di Mandelbrot."
+
+theme "Il tema di un insieme di Julia
+dipende moltissimo dal punto in cui
+viene scelto il seme."
+theme1 "Quando un insieme di Mandelbrot
+viene ingrandito, passando all'insieme
+di Julia corrispondente"
+theme2 "otteniamo un frattale
+con una tema molto simile."
+theme3 "Ma rimpicciolendo nuovamente,"
+theme4 "scopriamo di essere
+in un frattale completamente differente."
+theme5 "Gli insiemi di Julia
+possono sembrare piuttosto noiosi
+dato che non cambiano tematica"
+theme6 "e restano fedeli al seme scelto
+dall'insieme di Mandelbrot."
+theme7 "Ma scegliendo con cura
+il punto di seme,"
+theme8 "si possono generare bellissime immagini."
+
+#########################################################
+#For file keys.xhf
+
+keys "Tasti:
+
+q - ferma riproduzione
+Spazio - salta fotogramma
+ (può richiedere tempo)
+Sin./Dest. - varia velocità sottotitoli"
+
+#########################################################
+#For file magnet.xaf
+
+
+intro7 "Una introduzione ai frattali
+
+Capitolo 8-Magnet"
+
+magnet "Questo NON è l'insieme di Mandelbrot."
+magnet1 "Questo frattale è chiamato \"magnet\"
+perchè la sua formula viene
+dalla fisica teorica."
+magnet2 "Deriva dallo studio di reticoli teorici
+nel contesto delle trasformazioni di
+rinormalizzazione magnetica."
+
+similiar "La sua somiglianza con l'insieme di
+Mandelbrot è interessante, visto che
+è una formula del mondo reale."
+
+magjulia "I suoi insiemi di Julia sono insoliti."
+
+magnet3 "Esiste anche un secondo frattale magnet."
+
+#########################################################
+#For file new.xaf
+
+new "Novità della versione 3.0"
+speed "1. Maggiore velocità"
+speed1 "I cicli principali di calcolo
+vengono ora \"svolti\" ed
+effettuano controlli di periodicità."
+speed2 "Le nuove immagini sono calcolate usando
+il rilevamento dei contorni,"
+speed3 "quindi il calcolo delle nuove immagini
+risulta ora molto più veloce."
+speed4 "Ad esempio: calcolo
+dell'insieme di Mandelbrot a
+1,000,000 iterazioni..."
+speed5 "calcolo in corso..."
+speed6 "finito."
+speed7 "XaoS ha una euristica che disabilita
+automaticamente il controllo di
+periodicità quando non ci si attende
+che il punto calcolato sia interno
+all'insieme (quando non lo sono neanche
+tutti i punti circostanti)."
+speed8 "Sono state ottimizzate anche le routine
+principali di ingrandimento,
+raddoppiando circa la velocità
+di ingrandimento stessa."
+speed9 "Adesso XaoS raggiunge 130FPS
+su un Pentium 130Mhz."
+
+new2 "2. Filtri."
+new3 "3. Nove modi di colorazione esterna."
+new4 "4. Nuovi modi di colorazione interna."
+new5 "5. Modi di colorazione truecolor."
+new6 "6. Salvataggio/riproduzione animazioni."
+newend "E molto altro ancora come rotazione
+dell'immagine, generazione delle
+tavolozze migliorata... Consultare
+il ChangeLog per l'elenco completo." #NEW
+
+#########################################################
+#For file newton.xaf
+
+intro3 "Una introduzione ai frattali
+
+Capitolo 4-Metodo di Newton"
+newton "Questo frattale è generato
+da una formula completamente differente:"
+newton1 "metodo numerico di Newton per
+trovare le radici di un polinomio x^3=1."
+newton2 "Vengono contate le iterazioni richieste
+per ottenere la radice approssimata."
+newton3 "I cerchi blu corrispondono
+alle tre radici."
+newton4 "Le parti più interessanti sono nelle
+zone in cui il punto di partenza è
+quasi equidistante a due o a tre radici."
+newton5 "Questo frattale è molto autosomigliante
+e non è molto interessante da esplorare."
+newton6 "Ma XaoS è capace di
+generare insiemi \"tipo Julia\""
+newton7 "dove viene utilizzato l'errore
+di approssimazione come seme."
+newton8 "Questo rende il frattale di Newton
+molto più interessante."
+newton9 "XaoS può anche generare
+un altro frattale di Newton."
+newton10 "Metodo numerico di Newton per
+trovare le radici di un polinomio x^4=1."
+newton11 "I cerchi blu corrispondono
+alle quattro radici."
+
+#########################################################
+#For file octo.xaf
+intro6 "Una introduzione ai frattali
+
+Capitolo 7-Octo"
+octo "Octo è un frattale molto meno noto."
+octo1 "È stato scelto per XaoS
+a causa della sua insolita forma."
+octo2 "XaoS è anche in grado di
+generare insiemi \"tipo Julia\"
+simili a quelli dell'insieme di Newton."
+
+#########################################################
+#For file outcolor.xaf
+
+outcolor "Modi di colorazione esterna"
+outcolor1 "L'insieme di Mandelbrot
+è solo il noioso lago nero
+che si trova al centro dello schermo"
+outcolor2 "Le parti colorate
+che si trovano intorno
+sono i confini dell'insieme stesso."
+outcolor3 "Normalmente, la colorazione è basata
+sul numero di iterazioni richieste
+per raggiungere il valore di bailout."
+outcolor4 "Ma esistono anche altri metodi
+per eseguire la colorazione."
+outcolor5 "In XaoS vengono chiamati
+modi di colorazione esterna."
+
+iterreal "iter+real
+
+Questo modo colora i contorni
+aggiungendo la parte reale dell'ultima
+orbita al numero di iterazioni."
+iterreal1 "Può essere utilizzato per rendere più
+interessanti immagini piuttosto noiose."
+
+iterimag "iter+imag è simile a iter+real."
+iterimag2 "L'unica differenza è che viene
+utilizzata la parte immaginaria
+dell'ultima orbita."
+
+iprdi "iter+real/imag
+
+Questo modo colora i contorni
+aggiungendo al numero di iterazioni la
+divisione tra la parte reale e la parte
+immaginaria dell'ultima orbita."
+
+sum "iter+real+imag+real/imag
+
+è la somma di tutti precedenti modi di
+colorazione."
+
+decomp "scomposizione binaria
+
+Quando la parte immaginaria è maggiore
+di zero questo modo utilizza il numero
+di iterazioni, altrimenti utilizza il
+numero massimo di iterazioni meno
+il numero di iterazioni della
+scomposizione binaria."
+
+bio "biomorphs
+
+Questo modo di colorazione è chiamato
+così perché rende alcuni frattali simili
+a organismi unicellulari."
+
+#########################################################
+#For file outnew.xhf
+
+potential "potenziale
+
+Questo modo di colorazione rende
+molto bene per immagini rimpicciolite
+utilizzando colori truecolor."
+
+cdecom "decomposizione del colore"
+cdecom2 "In questo modalità, il colore
+è calcolato a partire dall'angolo
+dell'ultima orbita."
+cdecom3 "È simile alla scomposizione
+binaria, ma in questo caso i colori
+sono interpolati in maniera equilibrata."
+cdecom4 "Nei frattali di tipo Newton
+può essere usato per colorare l'insieme
+relativo alla radice trovata, piuttosto
+che al numero di iterazioni."
+
+smooth "uniforme
+
+Il modo di colorazione uniforme cerca
+di eliminare le righe prodotte dalle
+iterazioni creando sfumature uniformi."
+smooth1 "Non può essere applicato all'insieme
+di Newton e alle formule magnet,
+dato che possiedono attrattori finiti."
+smooth2 "Funziona solo con modi di
+visualizzazione truecolor e highcolor.
+In presenza di 8bpp, quindi, bisogna
+abilitare il filtro truecolor."
+
+#########################################################
+#For file outnew.xhf
+
+intro5 "Una introduzione ai frattali
+
+Capitolo 6-Phoenix"
+
+phoenix "Questo è l'insieme di Mandelbrot
+di una formula conosciuta come Phoenix."
+
+phoenix1 "Sembra diverso dagli altri frattali
+di XaoS, ma è possibile trovare alcune
+somiglianze con l'insieme di Mandelbrot:"
+
+phoenix2 "L'insieme di Phoenix
+contiene anche una \"coda\" con copie
+in miniatura dell'intero insieme,"
+
+phoenix3 "esiste ancora una corrispondenza di
+\"tema\" tra la versione Mandelbrot
+e gli Julia,"
+
+phoenix4 "ma gli Julia risultano molto diversi."
+
+#########################################################
+#For file plane.xaf
+
+plane1 "Di solito nel piano complesso la
+parte reale di un punto è mappata sulla
+coordinata x dello schermo mentre la
+parte immaginaria è mappata sulla
+coordinata y."
+
+plane2 "XaoS fornisce 6 modi alternativi
+di mappatura"
+plane3 "1/mu
+
+Questa è un'inversione: le aree
+all'infinito vanno a 0 e 0 è mappato
+all'infinito. In questo modo si vede ciò
+che accade a un frattale quando viene
+rimpicciolito infinitamente."
+plane4 "Questo è un Mandelbrot normale..."
+plane5 "...e questo è un Mandelbrot invertito."
+plane6 "Come si può vedere,
+prima l'insieme era al centro
+e ora si trova tutto intorno.
+L'area blu infinitamente grande intorno
+all'insieme è mappata all'interno del
+piccolo cerchio intorno a 0."
+plane7 "Le prossime immagini verranno
+prima mostrate in modalità normale
+e poi in modalità invertita
+per mostrare ciò che accade."
+
+plane8 "1/mu+0.25
+
+Questo è un altro modo invertito, ma
+con un centro di inversione differente.
+"
+plane9 "Dato che il centro di inversione cade
+sul confine dell'insieme di Mandelbrot,
+sono ora visibili confini
+parabolici infiniti."
+plane10 "Produce un effetto interessante anche
+su altri frattali, dato che solitamente
+rompe la loro simmetria."
+
+lambda "Il piano lambda fornisce una
+visione completamente diversa."
+
+ilambda "1/lambda
+
+Questa è una combinazione tra il piano
+invertito e il piano lambda."
+
+imlambda "1/(lambda-1)
+
+Questa è una combinazione tra piano
+lambda, spostamento e inversione."
+
+imlambda2 "Fornisce una deformazione molto
+interessante dell'insieme di Mandelbrot."
+
+mick "1/(mu-1.40115)
+
+Questa è ancora una inversione con un
+centro spostato. Il centro è ora piazzato
+dentro i punti di Feigenbaum, punti
+nei quali l'insieme di Mandelbrot è
+autosomigliante. Ciò esalta enormemente
+i dettagli intorno a questo punto."
+
+#########################################################
+#For file power.xaf
+
+intro2 "Una introduzione ai frattali
+
+Capitolo 3-Mandelbrot a potenze superiori"
+
+power "z^2+c non è l'unica formula
+che genera frattali."
+power2 "Con una leggermente modificata, x^3+c,
+otteniamo un frattale simile,"
+power3 "che naturalmente è pieno
+di copie dell'insieme principale."
+
+power4 "Frattali simili possono essere generati
+usando formule leggermente modificate"
+
+pjulia "e ognuno di essi possiede una serie
+di insiemi di Julia corrispondenti."
+
+#########################################################
+#For file truecolor.xaf
+
+truecolor "Modi di colorazione truecolor"
+truecolor1 "Di solito i frattali sono colorati
+usando una tavolozza. Nel modo truecolor
+la tavolozza stessa è emulata."
+truecolor2 "L'unica differenza è che la
+tavolozza è più grande e i colori
+vengono interpolati in maniera uniforme
+in modi di colorazione."
+truecolor3 "Il modo di colorazione truecolor
+usa una tecnica completamente
+differente. Vengono utilizzati vari
+parametri estratti dai calcoli"
+truecolor4 "per generare un colore
+esatto e non solamente un indice
+all'interno della tavolozza."
+truecolor5 "Questo permette di visualizzare fino
+a quattro valori dentro ogni pixel."
+truecolor6 "Il modo di colorazione truecolor
+richiede ovviamente colori truecolor.
+Con schermi da 8bpp, quindi, bisogna
+abilitare il filtro truecolor."
+
+#########################################################
+#for file pert.xaf #NEW (up to end of file)
+
+pert0 "Perturbazioni"
+pert1 "Nello stesso modo in cui semi differenti
+producono vari insiemi di Julia
+partendo da un unica formula,"
+pert2 "l'insieme di Mandelbrot
+può essere modificato attraverso
+il valore di perturbazione."
+pert3 "Quest'ultimo cambia la posizione di
+partenza dell'orbita, predefinita a 0."
+pert4 "Il valore di perturbazione non influenza
+il frattale tanto quanto il seme nei
+confronti degli insiemi di Julia,
+ma è utile per ottenere un frattale
+più casuale."
+
+##########################################################
+#for file palette.xaf
+
+pal "Tavolozze casuali"
+pal0 "XaoS non contiene una grande libreria
+di tavolozze predefinite come avviene
+in molti altri programmi, ma è in grado
+di generare tavolozze casuali."
+pal1 "Ad ogni pressione del tasto \"P\"
+XaoS genera una nuova tavolozza da
+usare a piacere nel proprio frattale."
+pal2 "Sono utilizzati tre
+differenti algoritmi:"
+pal3 "Il primo crea strisce che vanno da
+alcuni colori al nero."
+pal4 "Il secondo produce strisce che vanno
+dal nero, a diversi colori e al bianco."
+pal5 "Il terzo è ispirato a dipinti
+cubisti."
+
+###########################################################
+#for file other.xaf
+
+auto1 "Pilota automatico"
+auto2 "Per le persone pigre è possibile
+abilitare il pilota automatico,
+per lasciare che XaoS esplori
+un frattale in maniera automatica."
+fastjulia1 "Modo di esplorazione Julia veloce"
+fastjulia2 "Questo modo permette la trasformazione
+dell'insieme di Julia in accordo con
+il seme attuale."
+fastjulia3 "È anche utile come anteprima di
+un'area prima dell'ingrandimento: a
+causa della corrispondenza tematica tra
+l'insieme di Julia e il punto scelto,
+è possibile vedere il tema approssimato
+intorno ad un punto prima di ingrandire."
+rotation "Rotazione dell'immagine"
+cycling "Ciclo dei colori"
+bailout "Bailout"
+bailout1 "Questo è l'insieme di Mandelbrot con un
+modo di colorazione esterna \"uniforme\"."
+bailout2 "Incrementando a 64 il valore di bailout,
+otteniamo una variazione graduale
+del colore."
+bailout3 "Per quasi tutti i frattali, diversi
+valori di bailout danno frattali simili."
+bailout4 "Questo non vale
+per i frattali di Barnsley."
+
+
+
+
+##############################################
+#for file trice.xaf
+
+trice1 "Frattali Triceratopo e Occhi di gatto"
+trice2 "Portando il valore di bailout"
+trice3 "di un frattale con tempo di fuga"
+trice4 "ad un valore più piccolo,"
+trice5 "si otterrà un altro frattale."
+trice6 "Con questo metodo possiamo creare"
+trice7 "trame molto interessanti"
+trice8 "con aree a tinta unita separate."
+trice9 "Anche il frattale Triceratopo"
+trice10 "è creato con questo metodo."
+trice11 "Molte immagini simili"
+trice12 "si possono creare con il Triceratopo."
+trice13 "Il frattale Occhi di gatto"
+trice14 "è come l'occhio di un gatto."
+trice15 "Ma se innalziamo il valore di bailout"
+trice16 "otteniamo un frattale più interessante.."
+trice17 "..con bolle.."
+trice18 "..e bellissimi Julia."
+
+##############################################
+#for file fourfr.xaf
+
+fourfr1 "Mandelbar, Lambda, Manowar e Spider"
+fourfr2 "Questo è l'insieme di Mandelbar."
+fourfr3 "La sua formula è: z = (conj(z))^2 + c"
+fourfr4 "Alcuni suoi Julia sono interessanti."
+fourfr5 "Ma ora vediamo altri frattali."
+fourfr6 "Il frattale Lambda ha una struttura"
+fourfr7 "simile al frattale di Mandelbrot."
+fourfr8 "È come un insieme di Mandelbrot
+in un piano lambda."
+fourfr9 "Ma Lambda è un insieme di Julia...
+...e questo è MandelLambda."
+fourfr10 "...modo di Julia veloce..."
+fourfr11 "Questo è il frattale Manowar."
+fourfr12 "È stato scoperto da un utente del
+programma Fractint."
+fourfr13 "Contiene Julia simili a tutto l'insieme."
+fourfr14 "Questo frattale è chiamato Spider."
+fourfr15 "Anche questo è stato scoperto
+da un utente del programma Fractint."
+fourfr16 "Ed anche questo contiene Julia simili
+all'intero insieme."
+
+##############################################
+#for file classic.xaf
+
+classic1 "Triangolo e Tappeto di Sierpinski,
+Fiocco di neve di Koch"
+classic2 "Questo è il famoso frattale chiamato
+Triangolo di Sierpinski."
+classic3 "E questa è la sua
+variante con tempo di fuga."
+classic4 "La sua forma può essere modificata"
+classic5 "selezionando un altro \"seme di Julia\"."
+classic6 "Questo è il Tappeto di Sierpinski."
+classic7 "E questa è la sua
+variante con tempo di fuga."
+classic8 "Anche questo è famoso."
+classic9 "E infine, questa è
+la variante con tempo di fuga"
+classic10 "del Fiocco di neve di Koch."
+
+##############################################
+#for file otherfr.xaf
+
+otherfr1 "Altri tipi di frattali in XaoS"
diff --git a/catalogs/magyar.cat b/catalogs/magyar.cat
new file mode 100644
index 0000000..cb371a6
--- /dev/null
+++ b/catalogs/magyar.cat
@@ -0,0 +1,1183 @@
+# Message catalog file required to replay XaoS tutorials in
+# Hungarian language
+#
+# Copyright (C) 1997 by Jan Hubicka
+# , ,
+# Hungarian translation by Kovacs Zoltan (kovzol@math.u-szeged.hu)
+# $Revision: 1.6 $
+#
+# This is a Latin2 encoded file
+# , , , , ,,
+# Ez a fajl Latin2-kodolasu (Windowsban vagy Unixban/Linuxban szerkesztheto).
+# Ha módosítod, néhány dolgot nem árt tudnod.
+#
+# A katalógus formátuma: azonosító[szóközök]"érték"[szóközök]
+#
+# Az azonosító tulajdonképpen a program által használt kulcs.
+# Ezt ne fordítsd le, csak az értékét! Az idézőjel karakterek helyett
+# -- amennyiben szükséges -- `\"'-t használj! A backslash jel helyett `\\'
+# írandó. A `\n' nem használható, helyette a szokásos módon új sorba
+# kell írni a következő sorba szánt szöveget.
+#
+# Az új nyelvre fordítást kérem, hogy jelezd nekem. Nem muszáj szó
+# szerint fordítanod; ha kedved tartja, nyugodtan változtass a szövegen,
+# ha ezzel érdekesebbé vagy mókásabbá teszed azt.
+#
+# Hosszabb és rövidebb mondatok is beírhatók. A XaoS program automatikusan
+# számítja a megjelenítéshez szükséges időt.
+#
+# Bármiféle megjegyzést örömmel fogadok.
+#
+# A szövegnek el kell férnie a 320x200-as képernyőn, emiatt minden
+# feliratnak 40 karakternél rövidebbnek kell lennie. Ez itt pont 40 karakter:
+#234567890123456789012345678901234567890
+# Vigyázat, ez nem sok! Légy óvatos!
+# A kész fordítást próbáld ki ,,élesben'' is!
+#########################################################
+encoding "2"
+#dimension.xaf
+
+fmath "A fraktálok matematikája"
+fmath1 "A fraktálokkal foglalkozó tudomány nem
+régóta része a matematikának, s számos
+megválaszolatlan kérdést rejteget."
+fmath2 "Még a definíciók sem
+teljesen tisztázottak."
+fmath3 "Rendszerint akkor nevezünk
+fraktálnak valamit, ha önhasonló."
+
+def1 "Egy lehetséges definíció..."
+#Itt az intro.xaf-ban leírt definíció fog megjelenni.
+#Ha az általad fordított nyelven ez problémát okoz,
+#írj egy levelet nekem, s generálok egy plusz kulcsot.
+def2 "Mit is jelent ez?"
+def3 "Ennek megértéséhez először is
+különbséget kell tennünk topologikus
+dimenzió és az ún. Hausdorff-Besicovich
+dimenzió fogalma között."
+
+topo1 "A topologikus dimenzió
+a \"normális\" dimenziószám."
+topo2 "A pont 0 dimenziós,"
+topo3 "az egyenes szakasz 1 dimenziós alakzat."
+topo4 "A felületek 2 dimenziósak,
+és így tovább..."
+
+hb1 "A Hausdorff-Besicovich dimenzió
+fogalma a következőképpen adható meg:"
+hb2 "Minden kétszeresére nagyított
+szakasz kétszer hosszabb az eredetinél."
+hb3 "Viszont egy kétszeresére
+nagyított négyzet területe
+négyszerese az eredeti méretnek."
+hb4 "Több dimenzióban is
+hasonló szabályok érvényesek."
+hb5 "A dimenziószám kiszámítására
+általában a következő
+képlet alkalmazható:"
+hb6 "dimenzió = log m / log n,
+ahol n a nagyítás mértéke és
+m a méret változása."
+hb7 "Példa: a vonal esetében
+a nagyítás 2-szeres,
+a méretváltozás is 2-szeres:
+log 2 / log 2 = 1."
+hb8 "Négyzet esetében a nagyítás 2-szeres,
+a méret változása 4-szeres:
+log 4 / log 2 = 2."
+hb9 "Látható, hogy tényleg a \"normális\"
+dimenziószámot kapjuk eredményül,
+ha a szokásos alakzatokat vizsgáljuk."
+hb10 "A dolog igazán érdekessé
+a fraktálok vizsgálata során válik..."
+
+hb11 "Vegyük szemügyre a hópehely-görbét!"
+hb12 "Ez úgy készül, hogy minden vonalat
+négy másikkal helyettesítünk."
+hb13 "Minden új vonal az eredeti
+vonal hosszának harmada."
+hb14 "Háromszoros nagyításnál ezek
+a vonalak pontosan ugyanakkorák,
+mint az eredetiek."
+hb15 "Ha végtelen sokszor hajtjuk
+végre ezt az átalakítást,
+a kapott alakzat önhasonló lesz:"
+hb15b "minden egyes rész a
+teljes fraktál pontos mása."
+hb16 "Mivel pontosan négy másolat készült,
+a fraktál mérete 4-szeresére változott."
+hb17 "Ezt az előbbi egyenlőségbe beírva:
+log 4 / log 3 = 1,261..."
+hb18 "Most 1-nél nagyobb számot kaptunk!
+(A görbe topologikus dimenziója 1.)"
+hb19 "A Hausdorff-Besicovich dimenzió
+(1,261...) jelen esetben nagyobb,
+mint a topologikus dimenzió."
+hb20 "Definíciónk szerint tehát
+a hópehely-görbe fraktál."
+
+defe1 "Sajnos, definíciónk nem tökéletes,
+mert nem illik számos más alakzatra,
+amelyeket különben fraktálnak
+szokás nevezni."
+defe2 "Viszont rámutat a fraktálok
+egy érdekes tulajdonságára,"
+defe3 "mely a matematikusok táborán
+kívül is nagyon népszerű."
+defe4 "A Hausdorff-Besicovich dimenziót
+\"fraktáldimenzió\"-nak is hívják."
+
+#########################################################
+#escape.xaf
+escape "A fraktálok matematikája
+
+2. fejezet
+\"Szökési sebesség\" típusú fraktálok"
+escape1 "Bizonyos fraktálok
+(pl. a hópehely-görbe)
+egyszerű módon készülnek."
+escape2 "A XaoS programmal más típusú
+fraktálok gyárthatók:
+az ún. szökési sebességen
+alapuló fraktálok."
+escape3 "Kicsit másképpen hozhatók
+létre, de az eljárás lényege
+itt is az iteráció."
+#escape4 "They treat the whole screen as
+#a complex plane"
+escape4 "Képzeljük el a számítógép képernyőjét
+úgy, mintha az a komplex számsík lenne!"
+escape5 "A valós tengely (a szokásos
+számegyenes) vízszintesen,"
+escape6 "a képzetes tengely függőlegesen
+helyezkedik el."
+escape7 "Minden egyes ponthoz
+egy-egy pálya tartozik."
+escape8 "Ezt a pályát az f(z,c) függvénnyel
+számítjuk ki iteratív módon, ahol
+z a pálya előző pozícióját, c pedig
+a következő pozíciót jelenti
+komplex számban kifejezve a képernyő
+koordináta-rendszerében."
+escape9 "Például a Mandelbrot-halmaz esetében
+az iteratív függvény a z=z^2+c."
+orbit1 "Képzeljük el, hogy a 0-0.6i
+komplex számhoz tartozó pályát
+akarjuk bejárni!"
+orbit2 "Ezt a számot először c-be tesszük."
+orbit3 "A függvény első iteráltja a
+z=0+0i komplex szám:
+a pálya az origóból indul."
+orbit3b "Ezután ismételten kiszámítjuk az
+iterációt, minden egyes lépésben
+újabb z számokat kapva."
+orbit4 "Ha a pálya véges területen belül
+marad, a c számot bevesszük a halmazba,
+ellenkező esetben nem.
+Ez a Mandelbrot-halmaz definíciója."
+orbit5 "Esetünkben ez történt."
+orbit6 "Világosan látszik, hogy
+definíciónk alapján
+a c számot reprezentáló pont
+a halmaz belsejében van."
+orbit7 "Más esetekben gyakran
+a végtelenbe tart az iteráció,
+sok esetben igen gyorsan"
+orbit8 "(például a 10+0i szám
+első iteráltja 110, a második
+12110 és így tovább...)"
+orbit9 "A végtelenbe tartó pályák
+c pontjai kívül esnek a halmazon."
+
+bail1 "Bár eddig végtelen sok számról,
+s ezen végtelen sok szám
+iterációjáról volt szó,"
+bail2 "mégis, mivel a számítógépek
+csak véges mennyiségekben tudnak
+\"gondolkozni\", a fraktálokat
+nem tudjuk pontosan előállítani,
+csak közelítőleg."
+bail3 "Bebizonyítható, hogy ha a pálya
+az origótól 2 egységnél távolabbra
+távozik el, akkor az a pálya egészen
+biztosan a végtelenbe tart."
+bail4 "Ezért minden esetben abbahagyjuk
+a számolást, amint a pálya az előző,
+ún. kilépési teszten elbukik."
+bail5 "Ha tehát egy pont a halmazon
+kívül esik, egészen biztos,
+hogy csak véges sok lépésnyi
+számítást kell elvégeznünk."
+bail6 "Ãgy készül a halmaz körüli
+csodálatos színkavalkád."
+bail7 "A külső pontokat olyan sorszámú
+színnel festjük be, ahány lépés után
+a pálya kilép a 2 sugarú origó
+körüli körből."
+iter1 "A halmaz belsejében viszont
+továbbra is végtelen sok számítást
+kéne elvégeznünk."
+iter2 "Hogy ezt elkerüljük, egy bizonyos
+lépésszám után mindenképpen leállítjuk
+a számolást, s a közelítő eredményt
+rajzoljuk ki a képernyőre."
+iter3 "Ezáltal az iteráció lépésszámának
+maximuma meghatározza, hogy a
+közelítő rajz mennyire lesz pontos."
+iter4 "Ha a maximális lépésszám 0,
+azaz egyáltalán nincs iteráció,
+egyetlen, 2 sugarú kört kapnánk
+az origó körül."
+iter5 "Ha a maximális pályahosszot
+egyre nagyobb lépésszámokkal határozzuk
+meg, a megjelenő kép egyre pontosabban
+adja vissza a halmazt, de a számítások
+időtartama is jóval hosszabb lesz."
+limit1 "A XaoS program alaphelyzetben
+170 lépésnyi iterációval dolgozik."
+limit2 "Vannak olyan területek, ahová
+sokáig belenagyíthatunk anélkül, hogy
+elérnénk ezt a maximumot."
+limit3 "Más helyeken elég hamar
+pontatlan, durva részleteket kapunk."
+limit4 "Ilyenkor a kép kevésbé látványos."
+limit5 "Ellenben ha az iterációk lehetséges
+maximumát megnöveljük, nagyon sok új,
+érdekes részletet láthatunk meg."
+ofracts1 "A XaoS program többi fraktáljához
+más formulák és kilépési tesztek
+tartoznak, de a számolási eljárás
+lényegében ugyanez mindenütt."
+ofracts2 "Olyan sok számításra van szükség,
+hogy a XaoS programba számos
+optimalizációs eljárást is
+be kellett építeni.
+
+Ezekről az eljárásokról részletesen a
+doc/xaos.info
+fájlban olvashat az
+érdeklődő felhasználó."
+
+#########################################################
+#anim.xhf
+anim "Mit tud a XaoS...?
+
+Animációk és pozíciófájlok"
+
+anim2 "Talán észrevetted már, hogy
+a XaoS program képes animációk és
+bemutatók, leírások visszajátszására."
+
+anim3 "Ezeket közvetlenül a XaoS
+segítségével rögzítettük."
+
+languag1 "Az animációk és a pozíció-fájlok
+egy egyszerű parancsnyelv
+segítségével adhatók meg"
+
+languag2 "(a pozíció-fájlok lényegében
+egy képkockát tartalmazó animációk)."
+
+languag3 "Az animációkat a későbbiekben
+\"kézzel\" át is lehet alakítani,
+ha még professzionálisabb
+hatást kívánunk elérni."
+
+languag4 "A XaoS program legtöbb animációja
+teljes egészében manuálisan készült,
+egyetlen pozíció-fájlból kiindulva."
+
+modif1 "A következő módosítással"
+
+modif2 "távolodó hatást érünk el,"
+modif3 "ezzel pedig felnagyítjuk a halmazt."
+
+newanim "Teljesen új animációk és
+effektusok is készíthetők."
+
+examples "A XaoS programban számos
+beépített animáció van, melyek
+a save/load menüből
+véletlenszerűen betölthetők."
+
+examples2 "Pozíciófájlok módosításával
+egyéb segédprogramok segítségével
+további bemutatók
+állíthatók össze."
+
+examples3 "Korlátokat csak
+a fantáziád szabhat
+- és a beépített parancsnyelv,
+melyet a xaos.info fájl
+ír le részletesen."
+
+#########################################################
+#barnsley.xaf
+
+intro4 "Bevezetés a fraktálok világába
+
+5. fejezet
+Barnsley formulája"
+
+barnsley1 "A Michael Barnsley
+által bevezetett formula"
+
+barnsley2 "generálja ezt a furcsa fraktált."
+
+barnsley3 "Belenagyítani nem
+annyira izgalmas,"
+
+barnsley4 "de szép Julia-halmazai vannak!"
+
+barnsley5 "Érdekessége az ún.
+kristályvonal-struktúra,"
+
+barnsley6 "ami eltér a szokásos
+\"organikus\" struktúrától."
+
+barnsley7 "Michael Barnsley nevéhez
+további fraktálok is fűződnek."
+
+barnsley8 "A most látható is ezek egyike."
+
+#########################################################
+#filter.xaf
+
+filter "Mit tud a XaoS...?
+
+Szűrők"
+
+#########################################################
+#filter.xhf
+
+filter1 "Szűrőnek nevezzük azokat
+az effektusokat, melyeket az egyes
+fraktálok kiszámítása után
+hajthatunk végre, kissé módosítva
+ezzel a megjelenő képet."
+
+filter2 "A XaoS programba beépített
+szűrők a következők:"
+
+motblur "motion blur (elkent mozgás);"
+
+edge "kétféle edge detection
+(szél-felismerés):"
+
+edge2 "az elsővel vastagabb vonalak
+készíthetők, melyet nagy felbontásnál
+érdemes használni,"
+
+edge3 "a másikkal vékonyabb vonalak
+jelennek meg;"
+
+star "csillagmező-szűrő (star-field);"
+
+interlace "ún. interlace-szűrő:
+használatával a számítások
+felgyorsíthatók, s nagyobb
+felbontásnál a motion blur-höz
+hasonló effektust kapunk;"
+
+stereo "véletlen pontokból összeállított
+(random dot) sztereogram-szűrő"
+
+stereo2 "(ha a következő képeken semmit
+sem látsz, de máskor a sztereogramok
+működni szoktak, akkor talán
+a képernyő mérete nincs jól
+beállítva - futtasd a XaoS-t
+\"-help\" paraméterrel és olvasd
+el az ott leírt információkat);"
+
+emboss1 "dombormű (emboss);" #ÚJ
+
+palettef1 "paletta-emulátor
+(true-color képernyőkön
+színforgatásra ad módot);" #ÚJ
+
+truecolorf "true-color szűrő
+(true-color képeket generál
+8 bites színmélységnél is)."
+
+#########################################################
+#fractal.xaf
+
+end "Vége."
+
+fcopyright "Bevezetés a fraktálok világába
+
+Ãrta: Jan HubiÄka 1997 júliusában,
+illetve később további
+módosításokat eszközölt
+
+Magyar fordítás:
+Kovács Zoltán <kovzol@math.u-szeged.hu>"
+
+suggestions "
+Bármiféle megjegyzést, ötletet,
+javaslatot, köszönetnyilvánítást,
+és hibajelentést a
+
+xaos-discuss@lists.sourceforge.net
+
+címre várunk. Köszönjük!"
+
+#########################################################
+#incolor.xaf
+
+incolor1 "Ãltalában a halmaz belsejében
+lévő pontokat ugyanazzal
+a színnel ábrázoljuk."
+
+incolor2 "A halmaz határai ily módon
+jól láthatóak, de a halmaz
+belseje unalmas látvány."
+
+incolor3 "Érdekesebbé tehető a kép,
+ha a pálya utoljára számított
+pontjának koordinátái alapján
+rendelünk színt a belső pontokhoz."
+
+incolor4 "A XaoS program 10-féle
+lehetőséget kínál ennek
+megvalósítására. Ezek az ún.
+belső színezési módok
+(\"in coloring modes\")."
+
+zmag "zmag (z-nagyság)
+
+A pálya utolsó pontjának
+abszolút értéke alapján
+színezzük a belső pontot."
+
+#########################################################
+#innew.xaf
+
+innew1 "Decomposition like
+(dekompozíciószerű)
+
+Lásd a külső színezéseket,
+ez teljesen ugyanaz,
+mint az ott leírt.
+"
+
+innew2 "real/imag
+(valós/képzetes)
+
+A pálya utolsó pontjának
+valós részét elosztjuk
+a képzetes résszel,
+s ez alapján színezünk."
+
+innew3 "A következő hatféle színezési
+mód formulái vagy véletlenszerűek,
+vagy más programokból
+lettek átvéve."
+
+#########################################################
+#intro.xaf
+
+fractal "Fraktálok..."
+fractal1 "Mit is nevezünk fraktálnak?"
+
+fractal2 "Benoit Mandelbrot definíciója:
+fraktálnak olyan halmazt nevezünk,
+melynek Hausdorff-Besicovich dimenziója
+határozottan nagyobb, mint
+topologikus dimenziója."
+
+fractal3 "Még mindig nem világos?"
+
+fractal4 "Semmi baj!
+Ez a definíció csupán
+matematikusok számára fontos."
+
+fractal5 "Hétköznapi fogalmazással
+a fraktál olyan alakzat"
+
+fractal6 "mely bizonyos részekből áll,"
+
+fractal7 "minden egyes rész
+az egész fraktálhoz nagyon
+hasonló kicsinyített kópia."
+
+fractal8 "Ez az eljárás
+önmagát ismétli:"
+
+fractal9 "így épül fel a teljes fraktál."
+
+facts "A fraktálok számos meglepő
+tulajdonsággal rendelkeznek:"
+
+fact1 "nemigen változnak,
+ha kicsinyítjük vagy
+nagyítjuk őket,"
+fact2 "önhasonlók,"
+fact3 "és olyan, a természetben
+is előforduló alakzatokhoz
+hasonlítanak, mint
+például a felhők, hegyek
+vagy a partvonalak."
+# Az előbbi két sor majd fact4-ként kell, hogy álljon!
+# Last two lines will be cited as fact4. KZ
+
+fact5 "Nagyon sok matematikai
+struktúra fraktált
+határoz meg,"
+fact6 "olyasmit, ami a képernyőn
+is látható."
+fmath4 "A legtöbb fraktál
+iteratív eljárással készül:
+egy egyszerű lépés
+sokszori alkalmazásával."
+fmath5 "Ilyen például a Koch-görbe
+néven ismert fraktál,"
+fmath6 "melyet egyetlen vonal
+átalakításával kapunk
+oly módon,"
+fmath7 "hogy négy másikkal
+helyettesítjük."
+fmath8 "Ez az iteráció első lépése."
+fmath9 "Ezt az átalakítást azután
+megismételjük."
+fmath10 "Az alakzat két iteráció után..."
+fmath11 "3 iteráció után..."
+fmath12 "4 iteráció után..."
+fmath13 "A végtelen sok iteráció
+után keletkezett alakzatot
+tekintjük fraktálnak."
+fmath14 "A kapott alakzat hasonlít egy
+hópehely-forma harmadrészéhez."
+tree1 "Sok más alakzat készíthető
+hasonló eljárásokkal."
+tree2 "Például ha egy vonalat
+egy kicsit más módon alakítunk át,"
+tree3 "egy fát kapunk."
+nstr "Az egyes iterációk során
+a fraktálokban véletlen zajokat,
+hibákat is létrehozhatunk."
+nstr2 "Egy vonalat két vonallá"
+nstr3 "alakítva, s kis zajt hozzáadva"
+nstr4 "partvonalhoz hasonló
+fraktálok jöhetnek létre."
+nstr5 "Talán hasonló módon születnek
+a felhők, hegyek és a természet
+sok más alakzata."
+
+#######################################################
+## mset.xaf
+
+fact7 "A legismertebb fraktál
+kétségtelenül a..."
+
+mset "...Mandelbrot-halmaz,"
+mset1 "melyet egy nagyon
+egyszerű képlet:"
+mset2 "generál - mégis ez az egyik
+legszebb fraktál."
+mset3 "Mivel a Mandelbrot-halmaz fraktál,"
+mset4 "a határán"
+mset5 "a teljes halmaz miniatűr
+másai láthatók."
+mset6 "Ez közülük a legnagyobb.
+Kb. 50-szer kisebb
+a teljes halmaz méreténél."
+mset7 "A Mandelbrot-halmaz
+nem teljesen önhasonló:"
+mset8 "minden miniatűr kópia
+egy kicsit más."
+mset9 "Ez itt kb. 76000-szer
+kisebb a teljes halmaznál."
+mset10 "A halmaz más és más
+részén az eltérések is
+különfélék lehetnek."
+
+nat "A halmaz határán nem csak
+a teljes halmaz másait
+figyelhetjük meg,"
+nat1 "hanem ténylegesen végtelen sok
+lényegesen különböző formát!"
+nat2 "Néhány közülük meglepően
+hasonlít természeti képződményekre:"
+nat3 "láthatunk fákat,"
+nat4 "folyókat tavakkal,"
+nat5 "galaxisokat"
+nat6 "és vízeséseket."
+nat7 "A Mandelbrot-halmaz egyes
+részletei sci-fi novellák hőseire
+is emlékeztethetnek..."
+
+###############################################################################
+############
+
+juliach "Bevezetés a fraktálok világába
+
+2. fejezet
+Julia-halmazok"
+
+julia "Nem csak a Mandelbrot-halmaz
+képlete a z=z^2+c
+formula, hanem"
+julia1 "egy másiké is..."
+julia2 "...a Julia-halmazé."
+julia3 "Nem csupán egy Julia-halmaz létezik,"
+julia4 "hanem végtelen sok."
+julia5 "Mindegyiket más és más \"mag\"
+segítségével hozzuk létre,"
+julia6 "a magot pedig
+a Mandelbrot-halmazból választjuk."
+julia7 "A Mandelbrot-halmaz úgy is
+tekinthető, mint különböző
+Julia-halmazok térképe."
+julia8 "A Mandelbrot-halmaz belső
+mag-pontjaihoz olyan Julia-halmazok
+tartoznak, melyeknek nagy,
+összefüggő fekete területeik vannak."
+julia9 "A Mandelbrot-halmaz külső
+pontjaihoz ún. \"nem összefüggő\"
+Julia-halmazok tartoznak."
+julia10 "A legérdekesebb Julia-halmazoknál
+a mag-pontot a Mandelbrot-halmaz
+határáról választjuk."
+
+theme "A Julia-halmazok részletei,
+\"témája\" általában azon múlik, hogy
+hol választjuk a mag-pontot."
+theme1 "A Mandelbrot-halmazba belenagyítva
+a látott \"témához\" nagyon hasonló
+fraktált kapunk, ha"
+theme2 "átkapcsolunk a megfelelő
+Julia-halmazra."
+theme3 "De a nagyítást visszaállítva"
+theme4 "azt tapasztaljuk, hogy
+egy teljesen más fraktált vizsgálunk."
+theme5 "Lehet, hogy úgy tűnik:
+a Julia-halmazok elég unalmasak,
+hiszen tematikájuk nemigen változik."
+theme6 "A mag-pont választásával
+már szinte minden meghatározott."
+theme7 "Azonban ügyesen megválasztott
+mag-pont segítségével"
+theme8 "szép képek hozhatók létre."
+
+#########################################################
+#keys.xhf
+
+keys "Irányítás (billentyűzetről):
+
+q - az animáció leállítása
+Szóköz - egy képkocka kihagyása
+ (lehet, hogy várni kell)
+Bal/Jobb - a feliratok megjelenési
+ időtartamának beállítása"
+
+#########################################################
+#magnet.xaf
+
+intro7 "Bevezetés a fraktálok világába
+
+8. fejezet
+Magnet (mágnes)"
+
+magnet "Ez NEM a Mandelbrot-halmaz."
+magnet1 "Az itt látható fraktált \"mágnesnek\"
+hívják, mivel a képletét a kísérleti
+fizikából vették át."
+magnet2 "Mágneses renormalizációs
+transzformációkkal kapcsolatos
+elméleti rácsok tanulmányozásakor
+fedezték fel."
+#Eredeti angol szöveg:
+#"It is derived from the study
+#of theoretical lattices in the
+#context of magnetic renormalization
+#transformations."
+#Kérném, hogy egy fizikus ellenőrizze! KZ
+#The translation should be verified by a physician! KZ
+
+similiar "Azért is érdekes a
+Mandelbrot-halmazhoz való hasonlósága,
+mert a fraktált előállító formula
+a valóságban is előfordul."
+
+magjulia "A hozzá tartozó Julia-halmazok
+nagyon szokatlanok."
+
+magnet3 "Van egy másik mágnes-fraktál is."
+
+#########################################################
+#new.xaf
+
+new "Mi új a 3.0-s verzióban?"
+speed "1. Gyorsabb működés"
+speed1 "A fő számítási ciklusokat
+\"kibontottuk\", s beépítettük a
+a periodicitás ellenőrzését."
+speed2 "Az új képeket szél-felismerési
+eljárással számítjuk ki."
+speed3 "Ãgy az újonnan számított képek
+megjelnítése sokkal gyorsabb lett."
+speed4 "Például ha a Mandelbrot-halmazt
+egymillió iterációval számítjuk ki..."
+speed5 "számítás kezdete..."
+speed6 "kész!"
+speed7 "A XaoS program tartalmaz
+egy olyan heurisztikát is, mellyel a
+periodicitás-ellenőrzés automatikusan
+kikapcsol, ha a számított pont
+valószínűleg a halmazon kívülre esik
+(amennyiben a szomszédos pontok közül
+mind a halmazon kívül van)."
+speed8 "A fő nagyító rutinokat is
+optimalizáltuk, ezzel kb. kétszeresére
+növelve a korábbi gyorsaságot."
+speed9 "A XaoS program most már
+130 FPS (kép/másodperc)
+lejátszási sebességre
+képes egy 130 Mhz-es Pentiumon."
+
+new2 "2. Szűrők (filters)"
+new3 "3. Kilenc külső színezési mód
+(out-coloring modes)"
+new4 "4. Új belső színezési módok
+(in-coloring modes)"
+new5 "5. True-color színezési módok"
+new6 "6. Animáció mentése és visszajátszása"
+newend "Továbbá számos egyéb fejlesztés,
+pl. a kép forgatása,
+jobb paletta-generálás...
+A ChangeLog fájlban követhetők
+az új változtatások." #ÚJ
+
+#########################################################
+#newton.xaf
+
+intro3 "Bevezetés a fraktálok világába
+
+4. fejezet
+A Newton-algoritmus"
+newton "Ezt a fraktált egy teljesen
+más képlet hozza létre:"
+newton1 "a Newton-féle numerikus gyökvonó
+eljárás, mellyel az x^3=1 egyenlet
+megoldásait keressük."
+newton2 "Azt vizsgáljuk, hogy hány
+iteráció szükséges ahhoz, hogy egy
+kiinduló számból eljussunk valamelyik
+gyök egy megfelelő közelítéséhez."
+newton3 "A három egységgyököt kék körök jelzik."
+newton4 "A legérdekesebbek azok a részek,
+ahol a kiinduló szám kb. egyforma
+távolságra van legalább
+két egységgyöktől."
+newton5 "Ez a fraktál túlságosan is önhasonló,
+ezért talán nem is annyira érdekes."
+newton6 "De a XaoS programmal
+\"Julia-szerű\" halmazok is készíthetők,"
+newton7 "melyben a mag-pont
+a közelítés hibája lesz."
+newton8 "Ezáltal a Newton-féle fraktál
+talán kicsit érdekesebb."
+newton9 "A XaoS program egy másik
+Newton-fraktált is ismer."
+newton10 "Ez a kép a Newton-féle 4.
+gyök-vonó algoritmust mutatja be."
+newton11 "A négy gyököt kék
+körök szemléltetik."
+
+#########################################################
+#octo.xaf
+intro6 "Bevezetés a fraktálok világába
+
+7. fejezet
+Octo"
+octo "Az Octo nem igazán ismert fraktál."
+octo1 "A XaoS programba szokatlan
+formája miatt került be."
+octo2 "A XaoS programmal a Newton-féle
+fraktálhoz hasonlóan itt is
+készíthetünk \"Julia-szerű\" halmazokat."
+
+#########################################################
+#outcolor.xaf
+
+outcolor "Külső színezési módok
+(out coloring modes)"
+outcolor1 "A Mandelbrot-halmaz unalmas
+fekete tó a képernyő közepén..."
+outcolor2 "Az őt körülvevő színes csíkok
+mutatják a halmaz határait."
+outcolor3 "Ãltalában a színezést a
+kilépési teszt elbukásának
+gyorsasága adja meg."
+outcolor4 "Vannak azonban másféle
+színezési lehetőségek is."
+outcolor5 "A XaoS programban ezeket
+külső színezési módoknak hívjuk."
+
+iterreal "iter+real
+(iteráció+valós)
+
+A határon lévő színeket úgy határozzuk
+meg, hogy a pálya utolsó pontjának
+valós részét hozzáadjuk az
+iterációk számához."
+iterreal1 "A kicsit unalmas képek ezzel a
+módszerrel érdekesebbé tehetők."
+
+iterimag "Az iter+imag (iteráció+képzetes)
+eljárás hasonló az
+iter+real módszerhez."
+iterimag2 "Az egyetlen különbség, hogy
+most a képzetes részt vesszük
+figyelembe a valós rész helyett."
+
+iprdi "iter+real/imag
+(iteráció+valós/képzetes)
+
+Ezzel a módszerrel a határhoz közel
+lévő pontok színezésénél az iterációk
+számához hozzáadjuk az utolsó pont
+valós és képzetes részének hányadosát."
+
+sum "iter+real+imag+real/imag
+(iteráció+valós+képzetes+
++valós/képzetes)
+
+Az előzőekhez analóg módon készül."
+
+decomp "binary decomposition
+(bináris dekompozíció)
+
+Ha a képzetes rész pozitív, ez az
+eljárás az iterációszámmal színez.
+Ellenkező esetben az iterációk
+maximális számából levonja a
+bináris dekompozíció iterációszámát."
+
+bio "biomorphs
+(élő alakok)
+
+Az ezzel készített fraktálok
+hasonlítanak az egysejtű élőlényekre:
+ezért a fenti név."
+
+#########################################################
+#outnew.xhf
+
+potential "potential
+(potenciál)
+
+Ez a színezési mód nagyon jól
+néz ki true-color üzemmódban,
+ha nem nagyítjuk ki a fraktált."
+
+cdecom "color decomposition
+(szín-dekompozíció)"
+cdecom2 "Ebben az eljárásban a pálya utolsó
+pontjának argumentumából
+számítjuk ki az aktuális színt."
+cdecom3 "A módszer hasonlít a bináris
+dekompozícióhoz, csak itt folytonos
+a színátmenet."
+cdecom4 "A Newton-féle fraktál esetében
+ezzel a színezéssel megállapítható,
+hogy a sorozat melyik
+gyökhöz konvergál."
+
+smooth "smooth
+(sima)
+
+Ez az eljárás megpróbálja eltávolítani
+az iterációk által okozott sávos
+színezést folytonos színátmenetek
+alkalmazásával."
+smooth1 "A Newton-halmazra nem működik,
+és a Mágnes fraktálra sem, mivel
+ezeknek ún. véges attraktoruk van."
+smooth2 "Emellett csak true-color üzemmódban
+használható nagyobb színmélységeknél.
+Tehát 8 bites színmélység használatánál
+be kell kapcsolni a true-color szűrőt."
+
+#########################################################
+#phoenix.xhf
+
+intro5 "Bevezetés a fraktálok világába
+
+6. fejezet
+Phoenix"
+
+phoenix "Az ábrán a Phoenix nevű formulához
+tartozó Mandelbrot-halmaz látható."
+
+phoenix1 "Nem hasonlít a XaoS programban
+látható többi fraktálhoz, de van némi
+hasonlóság a Mandelbrot-halmaz
+és eközött:"
+
+phoenix2 "a Phoenix-halmaznak is van egy
+\"farka\", mely a teljes halmaz
+miniatűr kópiáit tartalmazza,"
+
+phoenix3 "s láthatóan a Mandelbrot- és
+Julia-témákban is van hasonlatosság,"
+
+phoenix4 "ellenben a Julia-halmazok
+egészen másak, mint
+Mandelbrot-szerű megfelelőik."
+
+#########################################################
+#plane.xaf
+
+plane1 "A komplex síkon vizsgálódva egy pont
+valós részét rendszerint a képernyő
+x-koordinátájához, míg képzetes részét
+az y-koordinátához rendeljük."
+
+plane2 "A XaoS program 6 további
+hozzárendelést biztosít."
+plane3 "1/mü
+
+Inverzió. A végtelenhez \"közeli\"
+pontokat az origó közelébe, az origó
+környékén lévő pontokat a végtelen
+távoli pontok \"környékére\"
+transzformáljuk. A hozzárendelés
+érdekessége, hogy végtelenül le
+lehet kicsinyíteni a fraktált:
+soha nem \"tűnik el\" a képernyőről."
+plane4 "Az eredeti Mandelbrot-halmaz..."
+plane5 "illetve az invertált mása."
+plane6 "A halmaz eredetileg középen volt;
+most az egészet \"kifordítottuk\".
+A végtelenül nagy külső fekete terület
+az origó környékén lévő eredeti halmaz."
+plane7 "A következő néhány képen először
+normális hozzárendeléssel, majd
+inverzión keresztül láthatjuk a
+számítások eredményét."
+
+plane8 "1/mü+0.25
+
+Szintén inverzió, csak a pólust
+változtattuk meg."
+
+plane9 "Mivel az inverzió középpontja
+(pólusa) most a halmaz határán fekszik,
+végtelen parabolaszerű
+határokat láthatunk."
+plane10 "Alkalmazásával más fraktálokon is
+érdekes hatásokat érhetünk el, mivel
+az eljárás megtöri a szimmetriát."
+
+lambda "A lambda-sík egy egészen más
+nézetből mutatja a számított fraktált."
+
+ilambda "1/lambda
+
+A lambda-sík és
+az inverzió kombinációja."
+
+imlambda "1/(lambda-1)
+
+A lambda-sík, egy eltolás és
+az inverzió kombinációja."
+
+imlambda2 "Ez az eljárás nagyon érdekesen
+változtatja meg a Mandelbrot-halmazt."
+
+mick "1/(mü-1.40115)
+
+Szintén inverzió, de a pólust
+most egy Feigenbaum-pontba toltuk el.
+(A Mandelbrot-halmaz a
+Feigenbaum-pontokban kvázi-önhasonló.)
+Az önhasonlóság így
+jobban vizsgálható."
+
+#########################################################
+#power.xaf
+
+intro2 "Bevezetés a fraktálok világába
+
+3. fejezet
+Magasabbfokú Mandelbrot-halmazok"
+
+power "Nem csupán a z^2+c képlettel
+készíthetünk fraktálokat."
+power2 "Csak egy kissé módosítva képletünket:
+az x^3+c formula a Mandelbrot-halmazhoz
+hasonló fraktált hoz létre."
+power3 "Ez a fraktál is sok-sok példányban
+tartalmazza a teljes halmaz
+kicsinyített mását."
+
+power4 "Hasonló fraktálok gyárthatók,
+ha a képleteket kicsit megváltozatjuk."
+
+pjulia "Ezeknek a halmazoknak is
+létezik a megfelelő Julia-halmazuk."
+
+#########################################################
+#truecolor.xaf
+
+truecolor "True-color színezési módok"
+truecolor1 "A fraktálokat rendszerint egy
+rögzített színpaletta használatával
+festjük ki. A true-color üzemmódban
+paletta-emuláció történik."
+truecolor2 "Az egyetlen különbség az,
+hogy több színt tartalmazó palettát
+használunk, folytonos színátmenetekkel."
+truecolor3 "A true-color üzemmód egy egészen
+speciális technikát használ. A fraktál
+számításakor kapott paraméterek közül
+többet is felhasználunk,"
+truecolor4 "hogy egy konkrét színt legeneráljunk,
+s ne csak egyetlen színsorszámot
+hozzunk létre."
+truecolor5 "Ezzel a módszerrel egyetlen pixelhez
+négy számítási érték is hozzátartozhat."
+truecolor6 "A true-color üzemmódban
+természetesen \"valódi színekre\" van
+szükség. Ãgy a 8 bites színmélységű
+megjelenítésnél a true-color szűrőt
+is be kell kapcsolni."
+#########################################################
+#pert.xaf #ÚJ (egészen a fájl végéig)
+
+pert0 "Perturbáció"
+pert1 "A Julia-halmazoknál más és más
+mag-pontokkal más és más fraktálok
+hozhatók létre ugyanazon képlettel."
+pert2 "Ehhez hasonlóan a Mandelbrot-halmaz
+is parametrizálható perturbáció
+hozzáadásával."
+
+pert3 "A kiinduló z számot ily módon
+megváltoztathatjuk: az alapérték 0."
+pert4 "A perturbáció-változtatás a
+megjelenített képre nincs akkora
+hatással, mint a Julia-halmazok
+magpont-választása, de a fraktál
+ezáltal véletlenszerűbbé tehető."
+
+##########################################################
+#palette.xaf
+
+pal "Véletlenszerű paletták"
+pal0 "A XaoS programba nem építettünk
+be előre elkészített színpalettákat
+(ez más programoknál gyakori).
+A XaoS véletlenszerűen színez."
+pal1 "Egyszerűen nyomogasd a 'P' gombot,
+amíg a XaoS program olyan palettát
+generál, ami megfelel az általad
+vizsgált fraktál számára!"
+pal2 "Három különböző módszer használatos:"
+pal3 "Az egyikkel egy bizonyos színtől
+a feketéig készítünk árnyalatokat."
+pal4 "A másodikkal a fekete színtől egy
+bizonyos színen keresztül
+a fehérhez jutunk el."
+pal5 "A harmadik módszert kubista
+festmények inspirálták."
+
+###########################################################
+#other.xaf
+
+auto1 "Autopilot
+(Robotpilóta)"
+auto2 "A lusta felhasználók a robotpilóta
+segítségével hátradőlve nézhetik a XaoS
+program automatikus fraktál-bejárását."
+fastjulia1 "Gyors Julia-böngésző mód"
+fastjulia2 "Ebben az üzemmódban a
+Julia-halmaz közvetlenül vizsgálható
+a mag-pont interaktív választásával."
+fastjulia3 "A Julia-halmaz konkrét kirajzolása
+előtt érdemes használni, mivel
+közelítőleg máris látható, hogy a kép
+milyen témájú lesz belenagyítás után."
+rotation "Képforgatás"
+cycling "Színforgatás"
+bailout "Kilépési teszt"
+bailout1 "A képen a Mandelbrot-halmaz látható
+'smooth' külső színezéssel."
+bailout2 "Ha a kilépési értéket 64-re állítjuk,
+a színátmenetek finomabbak."
+bailout3 "A legtöbb fraktál csak kevéssé
+ölt más formát, ha a kilépési értéket
+megváltoztatjuk."
+bailout4 "A Barnsley-fraktálokra ez
+azonban nem igaz."
+
+##############################################
+#for file trice.xaf
+
+trice1 "A Triceratops és a Catseye (macskaszem)
+fraktálok"
+trice2 "A kilépési érték csökkentésekor"
+trice3 "a szökési idejű fraktálok"
+trice4 "rendszerint más formát adnak,"
+trice5 "mint az eredeti paraméternél."
+trice6 "Ezzel a módszerrel igen érdekes"
+trice7 "minták állíthatók elő ugyanazon szín"
+trice8 "különböző területen való megjelenésekor."
+trice9 "A Triceratops fraktál is"
+trice10 "ezen a módon készült."
+trice11 "Sok hasonló kép készíthető"
+trice12 "a Triceratops fraktálon belül."
+trice13 "Mint neve is mutatja,
+a Macskaszem fraktál"
+trice14 "egy macska szeméhez hasonlít."
+trice15 "Ha növeljük a kilépési értéket..."
+trice16 "...sokkal érdekesebb képhez jutunk..."
+trice17 "...buborékokkal..."
+trice18 "...és szép Julia halmazokkal."
+
+##############################################
+#for file fourfr.xaf
+
+fourfr1 "Mandelbar, Lambda, Manowar és Spider"
+fourfr2 "Ez a Mandelbar halmaz."
+fourfr3 "Képlete: z = (conj(z))^2 + c"
+fourfr4 "Néhány Julia halmaza érdekes."
+fourfr5 "De nézzünk más fraktálokat is."
+fourfr6 "A Lambda fraktál struktúrája"
+fourfr7 "nagyon hasonlít a Mandelbrotéhoz."
+fourfr8 "Olyan, mintha a Mandelbrot halmazt
+a lambda síkra vetítenénk."
+fourfr9 "De a Lambda fraktál maga
+egy Julia halmaz íme,
+itt az igazi MandelLambda halmaz."
+fourfr10 "...gyors Julia-mód..."
+fourfr11 "Ez pedig a Manowar fraktál."
+fourfr12 "Egy Fractint felhasználó találta."
+fourfr13 "Az egész halmazhoz hasonló
+Julia halmazai vannak."
+fourfr14 "Ez pedig a Spider."
+fourfr15 "Ezt is egy Fractint felhasználó találta."
+fourfr16 "Ennek is hasonlók
+a Julia halmazai az eredeti halmazhoz."
+
+##############################################
+#for file classic.xaf
+
+classic1 "Sierpinski-háromszög, Sierpinski szőnyeg,
+Koch-féle hópehely"
+classic2 "Ez a híres Sierpinski-háromszög."
+classic3 "Ez itt a szökési időn alapuló változata."
+classic4 "Az alakját más és más 'Julia maggal'"
+classic5 "lehet megváltoztatni."
+classic6 "Ez a fraktál a Sierpinski-szőnyeg."
+classic7 "Ãme a szökési idÅ‘n alapuló változata."
+classic8 "Híres fraktál ez is."
+classic9 "Végül pedig íme a Koch-féle hópehely"
+classic10 "szökési idejű változata."
+
+##############################################
+#for file otherfr.xaf
+otherfr1 "További fraktáltípusok a XaoS programban"
diff --git a/catalogs/portuguese.cat b/catalogs/portuguese.cat
new file mode 100644
index 0000000..6b08e94
--- /dev/null
+++ b/catalogs/portuguese.cat
@@ -0,0 +1,1103 @@
+# Mensagem do arquivo de catálogo necessária para reproduzir os tutoriais do XaoS na
+# língua Portuguesa
+#
+# Direitos autorais (C) 1997 por Jan Hubicka
+#
+# Corrigido por Tim Goowin
+# Correções adicionais por David Meleedy
+# E mais algumas por Nix
+#
+# Traduzido para o Português por Zélia Maria Horta Garcia
+# Contribuição de Lúcio Henrique de Araújo
+# Coordenação Multimeios/Pesquisa
+# Diretoria de Tecnologia Educacional
+# Secretaria de Estado da Educação do Paraná/Brasil
+# junho/2009
+#
+# Translated into Portuguese by Zélia Maria Horta Garcia
+# Contribution by Lúcio Henrique de Araújo
+# Coordenação Multimeios/Research
+# Educational Tecnological Department
+# Educational Department of Parana State/Brazil
+# june/2009
+#
+# Há algumas coisas que você deveria saber se quiser alterar ou
+# traduzir este arquivo.
+#
+# O formato deste catálogo é identificar[lacunas]"valor"[lacunas]
+#
+# Identificador é uma chave usada pelo programa. Não o tranduza! Apenas
+# traduza o valor. Se você quer um caracter de citação `"' no texto,
+# use `\"'. Para `\' use `\\'. Não use `\n' para enter; use a
+# nova linha.
+#
+# Se você quiser traduzir este arquivo para uma nova língua, por favor,
+# me avise. Você deve traduzir este texto livremente: não precisa usar
+# exatamente as mesmas frases como essas, se você sabe como escrever textos
+# mais engraçados, interessantes, ou adicionar mais informações, faça isso.
+#
+# Você pode usar frases mais longas ou mais curtas, que o XaoS calculará automaticamente
+# o tempo de cada legenda.
+#
+# Por favor,envie para mim quaisquer sugestões para melhorar este texto e
+# os tutoriais.
+#
+# O texto do tutorial precisa caber numa tela de 320x200. Então as linhas precisam ter
+# menos de 40 caracteres. Isto são 40 caracteres:
+#234567890123456789012345678901234567890
+# E não é muito! Tome cuidado!
+# Por favor verifique suas atualizações dos tutoriais em 320x200 para assegurar
+# que está tudo OK.
+#########################################################
+#For file dimension.xaf
+
+fmath "A matemática por trás dos fractais"
+fmath1 "Os fractais fazem parte de um campo novo
+da matemática, então ainda há muitas
+questões a serem resolvidas."
+fmath2 "Ainda que as definições não sejam claras"
+fmath3 "Nós geralmente chamamos algo de fractal
+se possui alguma auto-semelhança"
+
+
+def1 "Uma possível definição é..."
+#Definition from the intro.xaf is displayed here.
+#If it is a problem in your langage catalog, let me
+#know and I will create a special key
+def2 "O que isso significa?"
+def3 "Para explicar, primeiramente precisamos
+entender o que é dimensão topológica e
+dimensão de Hausdorff Besicovich."
+
+topo1 "A dimensão topológica
+é a \"dimensão\" normal."
+topo2 "Um ponto tem dimensão 0"
+topo3 "Uma linha tem 1"
+topo4 "Uma superfície tem 2, etc..."
+
+hb1 "A definição de
+dimensão de Hausdorff Besicovich
+vem do simples fato de que:"
+hb2 "Uma linha quando ampliada dobra
+seu comprimento original em duas vezes."
+hb3 "Por outro lado, o tamanho
+de um quadrado quando ampliado
+aumenta em quatro vezes."
+hb4 "Regras similares funcionam em
+dimensões maiores também."
+hb5 "Para calcular dimensões
+desse fato, você pode utilizar a
+seguinte equação:"
+hb6 "dimensão = log s / log z
+onde z é a troca de zoom e
+s é a troca de tamanho"
+hb7 "para uma linha com zoom 2,
+a troca de tamanho também é 2.
+log 2 / log 2 = 1"
+hb8 "para um quadrado com zoom 2,
+a troca de tamanho é 4.
+log 4 / log 2 = 2"
+hb9 "Então, essa definição apresenta
+resultados iguais para tamanhos normais"
+hb10 "As coisas ficarão mais interessantes
+com os fractais..."
+
+hb11 "Considere uma curva de floco de neve"
+hb12 "que é criada pela divisão repetida
+de uma linha em quatro."
+hb13 "As novas linhas possuem 1/3 do tamanho da
+linha original"
+hb14 "Após serem ampliadas por 3 vezes, elas
+passarão a ter o tamanho das
+linhas originais."
+hb15 "Por causa da auto-semelhança criada
+pela repetição infinita
+dessa metamorfose,"
+hb15b "cada uma dessas partes
+se tornará um cópia exata do fractal
+original."
+hb16 "Como há quatro cópias, o
+tamanho do fractal aumenta por 4X"
+hb17 "Após transformar valores em equações:
+log 4 / log 3 = 1.261"
+hb18 "Nós obtemos um valor maior que 1
+(A dimensão topológica
+da curva)"
+hb19 "A dimensão de Hausdorff Besicovich
+(1.261) é maior do que a
+dimensão topológica."
+hb20 "De acordo com essa definição,
+o floco de neve é um fractal."
+
+defe1 "Essa definição, contudo, não é
+perfeita pois ela exclui muitas
+formas que são fractais."
+defe2 "Mas ela mostra uma das
+propriedades interesantes dos fractais,"
+defe3 "e que é bastante conhecida."
+defe4 "A dimensão de Hausdorff Besicovich
+também é frequentemente chamada de uma
+\"dimensão fractal \""
+
+#########################################################
+#For file escape.xaf
+escape "A matemática por trás dos fractais
+
+chapter 2 - Fractais escape time"
+escape1 "Alguns fractais (como o floco de neve)
+são criados pela simples subdivisão
+e repetição."
+escape2 "O XaoS pode gerar uma categoria
+diferente de fractais - chamados
+fractais escape time."
+escape3 "O método que os gera
+é um tanto diferente, mas também é
+baseado no uso de iterações."
+escape4 "Eles tratam a tela toda como
+um plano complexo"
+escape5 "O eixo real se encontra horizontalmente"
+escape6 "e o imaginário verticalmente"
+escape7 "Cada ponto tem sua p´ropria órbita"
+escape8 "A trajetória que é calculada
+utizando a função iterativa, f(z,c)
+onde z é a posição anterior e c
+é a nova posição na tela."
+escape9 "Por exemplo no conjunto Mandelbrot,
+a função iterativa é z=z^c+c"
+orbit1 "No caso de querermos examinar
+o ponto 0 - 0.6i"
+orbit2 "Nós atribuímos o parâmetro para c"
+orbit3 "Iteração da órbita
+começa em z=0+0i"
+orbit3b "Então repetidamente nós calculamos
+a função iterativa e
+repetidamente obtemos um novo valor
+z para a próxima iteração."
+orbit4 "Nós definimos o ponto que pertence ao
+conjunto, se a
+órbita permanecer finita."
+orbit5 "Nesse caso, ela permanece..."
+orbit6 "Então esse ponto está dentro do conjunto."
+orbit7 "Em outros casos ele poderia
+escapar rapidamente para o infinito."
+orbit8 "(por exemple, o valor 10+0i
+A primeira iteração é 110,
+a segunda 12110 etc..)"
+orbit9 "Tais pontos estão fora do conjunto."
+
+bail1 "Nós ainda estamos falando sobre
+números infinitos e iterações
+de números infinitos..."
+bail2 "Mas computadores são
+finitos, então eles não podem
+calcular os fractais de forma exata."
+bail3 "Isso prova que no
+caso onde a distância da órbita do
+zero é maior que 2, a órbita
+sempre escapa para o infinito."
+bail4 "Então podemos interromper os cálculos
+após a órbita falhar nesse teste.
+(Isso é chamado de teste bailout)"
+bail5 "Nos casos onde calculamos pontos
+fora do conjunto, precisamos de um
+número finito de iterações."
+bail6 "Isso também cria listras
+coloridas ao redor do conjunto."
+bail7 "Elas são coloridas de acordo com o
+nº de iterações da órbita necessário
+para cair no conjunto bailout."
+iter1 "Dentro do conjunto nós ainda
+precisamos de infinitos nº de cálculos"
+iter2 "O único modo é interrompendo
+os cálculos após um certo
+número de iterações e
+utilizar os resultados aproximados"
+iter3 "O número máximo de iterações
+portanto especifica quão exata
+será a aproximação."
+iter4 "Sem iterações você criaria
+apenas um círculo com uma raio 2
+(por causa da condição do bailout)"
+iter5 "Números maiores de iterações faz
+aproximações mais exatas, mas
+demora mais para serem calculadas."
+limit1 "O XaoS, por padrão, calcula
+170 iteratições."
+limit2 "Em algumas áreas você amplia por um
+longo tempo sem alcançar esse limite."
+limit3 "Em outras áreas você chega
+a resultados inexatos mais rapidamente."
+limit4 "As imagens tornam-se feias
+quando isso acontece"
+limit5 "Mas após acrescentar o número
+de iterações, você obterá muitos
+detalhes novos e interessantes."
+ofracts1 "Outros fractais no XaoS são
+calculados por fórmulas diferentes
+e testes bailout, mas o método
+é basicamente o mesmo."
+ofracts2 "Então muitos cálculos são necessários
+para que o Xaos execute muitas
+otimizações.
+
+Você pode ler sobre
+isso no arquivo
+doc/xaos.info"
+
+#########################################################
+#For file anim.xaf
+anim "Resumo das características do XaoS
+
+Animações e arquivos de posição"
+
+#########################################################
+#For file anim.xhf
+
+anim2 "Como você deve ter notado,
+o XaoS é capaz de repetir as animações
+e tutoriais."
+
+anim3 "Eles podem ser gravados diretamente
+do XaoS,"
+
+languag1 "desde que as animações e
+arquivos de posição estejam armazenados
+em um comando de linguagem simples"
+
+languag2 "(arquivos de posição são
+animações de apenas um frame)."
+
+languag3 "As animações podem ser editadas
+manualmente em outro momento para que
+alcancem um resultado
+mais profissional."
+
+languag4 "A maioria das animações desses tutoriais
+foram escritos de forma manual,
+iniciando por um arquivo de posição."
+
+modif1 "Uma modificação simples"
+
+modif2 "gera um \"filme\"reduzido,"
+modif3 "e essa modificação, um \"filme\" ampliado."
+
+newanim "Você também pode escrever
+novas animações e efeitos."
+
+examples "O Xaos também vem com
+muitos arquivos de exemplos, que podem
+ser carregados aleatoriamente pelo
+menu salvar / carregar."
+
+examples2 "Você também pode utilizar arquivos de
+posição para modificar coordenadas com
+outros programas."
+
+examples3 "O único limite é a sua
+imaginação, e a linguagem
+de comando descrita no xaos.info."
+
+#########################################################
+#For file barnsley.xaf
+
+intro4 "Uma introdução aos fractais
+
+Chapter 5-Fórmula de Barnsley"
+
+barnsley1 "Uma outra fórmula
+introduzida por Michael Barnsley"
+
+barnsley2 "gera este fractal estranho."
+
+barnsley3 "Ele não é muito interesante
+para ser explorado,"
+
+barnsley4 "mas ele tem lindos conjuntos Julia!"
+
+barnsley5 "Ele é interessante porque tem
+uma \"estrutura\" cristalina,"
+
+barnsley6 "em vez da \"estrutura\"
+orgânica encontrada em muitos outros
+fractais."
+
+barnsley7 "Michael Barnsley também introduziu
+outras fórmulas."
+
+barnsley8 "Uma delas gera este fractal."
+
+#########################################################
+#For file filter.xaf
+
+filter "Resumo das características do Xaos
+
+filters"
+
+#########################################################
+#For file filter.xhf
+
+filter1 "Um filtro é um efeito aplicado
+em cada frame após o fractal
+ser calculado."
+
+filter2 "O XaoS executa os
+seguintes filtros:"
+
+motblur "desfoque de movimento,"
+
+edge "corretores de linha de contorno (2),"
+
+edge2 "(o primeiro faz linhas largas e é
+utilizado para altas resoluções,"
+
+edge3 "o segundo faz
+linhas mais finas),"
+
+star "um filtro de campo estelar simples,"
+
+interlace "um filtro interlaçador, (ele acelera
+os cálculos e dá o efeito de
+desfoque de movimento
+em altas resoluções),"
+
+stereo "um filtro de estereograma de pontos
+aleatórios,"
+
+stereo2 "(se você não conseguir ver nada
+nas próximas imagens e começar a
+ver estereogramas de pontos aleatórios,
+provavelmente o tamanho da tela
+está desconfigurado---utilize o `xaos
+-help' para mais informações),"
+
+emboss1 "um filtro relevo," #NEW
+
+palettef1 "um filtro de simulação de paleta,
+(habilita a troca de cor no modo de
+exibição truecolor )" #NEW
+
+truecolorf "um filtro true color, (cria
+imagens true-color em exibições 8bpp)."
+
+#########################################################
+#For file fractal.xaf
+
+end "Fim."
+
+fcopyright "Uma introdução aos fractais
+foi feita por Jan Hubicka em 07/1997
+e mais tarde, modificada e atualizada
+para novas versões do XaoS
+
+Correções de:
+Tim Goodwin <tgoodwin@cygnus.co.uk>
+e
+David Meleedy <dmm@skepsis.com>
+e
+Nix <nix@esperi.demon.co.uk>"
+# Add your copyright here if you are translating/correcting this file
+
+sugestões "
+Por favor envie todo tipo de ideias,
+sugestões, agradecimentos
+e relatórios de problemas para:
+
+xaos-discuss@lists.sourceforge.net
+
+Obrigado"
+
+#########################################################
+#For file incolor.xaf
+
+incolor1 "Em geral,pontos internos do conjunto são
+exibidos utilizando uma única cor
+sólida."
+
+incolor2 "Isso torna os perímetros do conjunto
+visíveis, mas as áreas internas do
+conjunto, desinteressantes."
+
+incolor3 "Para torná-las um pouco mais
+interesantes, você pode utilizar o
+valor da última órbita para especificar
+a cor dos pontos internos do conjunto."
+
+incolor4 "O XaoS tem dez maneiras
+para isso. Elas são chamadas
+\"modos de cor interna\"."
+
+zmag "zmag
+
+A cor é calculada pela
+magnitude da última órbita."
+
+#########################################################
+#For file innew.xaf
+
+innew1 "Modo de decomposição
+
+Funciona da mesma maneira
+que a decomposição de cores
+do modo de cor externa
+"
+
+innew2 "Real / Imag
+
+A cor é calculada pela
+parte real da última órbita dividida
+pela parte imaginária."
+
+innew3 "Os próximos 6 modos de cor são
+fórmulas escolhidas ao acaso ou
+copiadas de outros programas."
+
+#########################################################
+#For file intro.xaf
+
+fractal "...Fractais..."
+fractal1 "O que é um fractal?"
+
+fractal2 "A definição de Benoit Mandelbrot:
+um fractal é um conjunto cuja
+dimensão Hausdorff Besicovich
+excede rigorosamente a sua
+dimensão topológica."
+
+fractal3 "Ainda não entendeu?"
+
+fractal4 "Não se preocupe.
+Essa definição só será importante se
+você for um matemático."
+
+fractal5 "Em inglês,
+um fractal é uma forma"
+
+fractal6 "que é construída de fragmentos"
+
+fractal7 "sendo que cada fragmento é uma
+cópia reduzida de todo o
+fractal."
+
+fractal8 "Esse processo se repete"
+
+fractal9 "até construir um fractal completo."
+
+facts "Há muitos fatos surpreendentes
+sobre os fractais:"
+
+fact1 "Os fractais são independentes de escala,"
+fact2 "eles são auto-similares,"
+fact3 "e eles geralmente assemelham-se a objetos
+encontrados na natureza"
+#fact4 "como nuvens, montanhas,
+#ou linhas costeiras."
+fact5 "Há também muitas
+estruturas matemáticas
+que definem fractais,"
+fact6 "como a que você vê na sua tela."
+fmath4 "A maioria dos fractais são
+criados por um processo repetitivo"
+fmath5 "por exemplo o fractal conhecido
+como a curva de Koch"
+fmath6 "que é criada pela alteração
+de uma linha"
+fmath7 "em duas"
+fmath8 "Esta é a primeira
+iteratição do processo"
+fmath9 "Então repetimos essa alteração"
+fmath10 "após 2 iterações..."
+fmath11 "após 3 iterações..."
+fmath12 "após 4 iterações.."
+fmath13 "e após um número infinito de
+iterações obtemos um fractal."
+fmath14 "Sua forma é semelhante a um terço de
+um floco de neve."
+tree1 "Várias outras formas poderiam
+ser construídas por métodos similares."
+tree2 "Por exemplo ao modificar uma linha
+de uma maneira diferente"
+tree3 "Nós obtemos uma árvore."
+nstr "Iterações podem possivelmente
+introduzir ruídos ao acaso num fractal"
+nstr2 "Ao transformar uma linha em duas"
+nstr3 "e adicionar um pequeno erro"
+nstr4 "você pode obter fractais parecidos
+com uma linha costeira."
+nstr5 "Um processo similar poderia
+criar nuvens, montanhas, e muitas
+outras formas da natureza"
+
+#######################################################
+## mset.xaf
+
+fact7 "Sem dúvida o fractal mais famoso é.."
+
+mset "O Conjunto Mandelbrot"
+mset1 "Ele é gerado por
+uma fórmula muito simples,"
+mset2 "mas ele é um dos
+fractais mais lindos."
+mset3 "Visto que ele é um fractal,"
+mset4 "seus perímetros contém"
+mset5 "minicópias de
+todo o conjunto."
+mset6 "Este é o maior, cerca de 50
+vezes menor que o conjunto todo."
+mset7 "O conjunto Mandelbrot não é
+completamente autossemelhante,"
+mset8 "então cada minicópia
+é diferente."
+mset9 "Esta é aproximadamente 76,000 vezes
+menor que o conjunto."
+mset10 "Cópias em partes diferentes
+do conjunto diferem ainda mais."
+
+nat "Os perímetros não contém apenas
+cópias de todo o conjunto,"
+nat1 "como também uma variedade infinita
+de formas diferentes."
+nat2 "Algumas delas são surpreendentemente
+similares às formas da natureza:"
+nat3 "você pode ver árvores,"
+nat4 "rios com lagos,"
+nat5 "galáxias,"
+nat6 "e quedas d'água."
+nat7 "O onjunto Mandelbrot também contem
+formas completamente fora do comum."
+###############################################################################
+############
+
+juliach "Uma introdução aos fractais
+
+Chapter 2-Julia"
+
+julia "O conjunto Mandelbrot não é o único
+fractal gerado pela fórmula:
+z=z^2+c"
+julia1 "O outro é..."
+julia2 "o conjunto Julia"
+julia3 "Não há apenas um conjunto Julia,"
+julia4 "mas uma variedade
+infinita deles."
+julia5 "Cada um é construído por uma \"semente\","
+julia6 "que é um ponto selecionado
+do conjunto Mandelbrot."
+julia7 "O conjunto Mandelbrot pode ser visto
+como um mapa de vários conjuntos Julia."
+julia8 "Os pontos internos do conjunto Mandelbrot
+correspondem aos Julia com grandes
+áreas negras conectadas,"
+julia9 "enquanto que os externos ao
+conjunto Mandelbrot
+correspondem aos Julia desconectados."
+julia10 "Os Julia mais interessantes têm
+sua semente nos perímetros do
+conjunto Mandelbrot."
+
+theme "O tema do conjunto Julia também
+depende diretamente do ponto da semente
+escolhido."
+theme1 "Se você ampliar
+o conjunto Mandelbrot, você obterá
+um fractal tematicamente muito similar"
+theme2 "a sua alteração para o
+correspondente em Julia."
+theme3 "Mas ao desfazer o zoom, você descobrirá"
+theme4 "que está num fractal completamente
+diferente."
+theme5 "Conjuntos Julia podem ser muito
+feios porque não alteram os temas"
+theme6 "e permanecem fiéis à
+semente escolhida (Mandelbrot)."
+theme7 "Mas ao escolher cuidadosamente o
+ponto da semente você poderá gerar"
+theme8 "lindas imagens."
+
+#########################################################
+#For file keys.xhf
+
+keys "chaves:
+
+q - pausa
+Space - pula
+ (demora um pouco)
+Left/Right - ajusta a velocidade"
+
+#########################################################
+#For file magnet.xaf
+
+intro7 "Uma introdução aos fractais
+
+Chapter 8-Magnet"
+
+magnet "Este não é o conjunto Mandelbrot."
+magnet1 "Este fractal é chamado \"magnet\"
+porque sua fórmula vem
+da física teórica."
+magnet2 "Ele é derivado do estudo
+da teoria das estruturas no
+contexto da renomartização magnética
+das transformações."
+
+similiar "Sua semelhança com o conjunto Mandelbrot
+é interessante porque é uma
+fórmula do mundo real."
+
+magjulia "Seus conjuntos Julia são bastante
+fora do comum."
+
+magnet3 "Há ainda um segundo fractal magnet."
+
+#########################################################
+#For file new.xaf
+
+new "Quais as novidades da versão 3.0?"
+speed "1. Aceleradores"
+speed1 "As sequências do cálculo principal
+estão agora desenroladas e
+executam verificações periódicas."
+speed2 "Novas imagens são calculadas utilizando
+a correção de perímetro,"
+speed3 "então calcular novas imagens
+está agora mais rápido."
+speed4 "Por exemplo, cálculo
+do conjunto Mandelbrot em
+1,000,000 iterações..."
+speed5 "calculando..."
+speed6 "finalizado."
+speed7 "O XaoS tem uma heurística que
+desabilita automaticamente verificações
+periódicas quando ele não excede o
+ponto calculado dentro do conjunto
+(quando não há pontos ao redor dele)."
+speed8 "As rotinas principais de ampliação também
+foram melhoradas então ela ficou
+aproximadamente duas vezes mais rápida."
+speed9 "O XaoS agora alcança 130FPS
+em um Pentium 130Mhz."
+
+new2 "2. Filtros."
+new3 "3. Nove modos de cor externa."
+new4 "4. Novos modos de cor interna."
+new5 "5. Modos de cor true-color."
+new6 "6. Salvar/repetir animação."
+newend "E muitos outros acessórios, como
+rotação de imagem, geração de melhores
+paletas.Leia o ChangeLog e conheça
+a lista completa de alterações." #NEW
+
+#########################################################
+#For file newton.xaf
+
+intro3 "Uma introdução aos fractais
+
+Chapter 4-Método de Newton"
+newton "Este fractal é gerado por
+uma fórumla completamente diferente:"
+newton1 "O método num.de Newton para achar
+as raízes de um polinômio x^3=1."
+newton2 "Ele conta o número de iterações
+necessárias para obter a
+raiz aproximada."
+newton3 "Você pode ver três raízes
+nos círculos azuis."
+newton4 "As partes mais bonitas estão
+onde o ponto inicial está quase
+equidistante de duas ou três raízes."
+newton5 "Este fractal é bastante autossemelhante
+e não muito interessante para explorar."
+newton6 "Mas o XaoS é capaz de
+gerar \"conjuntos\" parecidos com Julias,"
+newton7 "onde ele utiliza o erro na
+aproximação como a semente."
+newton8 "Isso torna o fractal de Newton
+mais interessante."
+newton9 "O XaoS pode ainda gerar um outro
+fractal de Newton."
+newton10 "O método num.de Newton para achar
+as raízes do polinômio x^4=1."
+newton11 "Você pode ver as quatro raízes
+nos círculos azuis."
+
+#########################################################
+#For file octo.xaf
+intro6 "Uma introdução aos fractais
+
+Chapter 7-Octo"
+octo "O octo é o fractal menos conhecido."
+octo1 "Nós o escolhemos para o XaoS
+por causa do seu formato incomum."
+octo2 "O XaoS também é capaz
+de gerar \"conjuntos\" Julia,
+similares aos do conjunto Newton."
+
+#########################################################
+#For file outcolor.xaf
+
+outcolor "Modos de cor externa"
+outcolor1 "O conjunto Mandelbrot é apenas
+o lago negro
+no meio da tela"
+outcolor2 "As listras coloridas
+ao seu redor são os perímetros
+do conjunto."
+outcolor3 "Normalmente a colorização é
+baseada no número de iterações
+necessárias para chegar ao
+valor bail-out."
+outcolor4 "Mas há outras
+maneiras para fazer a colorização."
+outcolor5 "No XaoS elas são chamadas de
+modos de cor externa."
+
+iterreal "iter+real
+
+Este modo colore os perímetros
+pela adição da parte real da última
+órbita ao número de iterações."
+iterreal1 "Você pode usar este modo para tornar
+as imagens mais bonitas."
+
+iterimag "iter+imag é similar a iter+real."
+iterimag2 "A única diferença é que este modo utiliza
+a parte imaginária da última
+órbita."
+
+iprdi "iter+real/imag
+
+Este modo colore os perímetros
+adicionando o número de iterações à
+parte real da última órbita
+dividida pela parte imaginária."
+
+sum "iter+real+imag+real/imag
+
+é o resumo dos modos anteriores
+de cor."
+
+decomp "decomposição binária
+
+Quando a parte imaginária é maior
+que zero, este modo utiliza o número
+de iterações; fora isso ele utiliza o
+número máximo de iterações menos
+o número de iterações da decomposição
+binária."
+
+bio "biotransformação
+
+Este modo de cor é assim chamado porque
+ele deixa alguns fractais parecidos com
+micro-organismos."
+
+#########################################################
+#For file outnew.xhf
+
+potential "potência
+
+Este modo de cor é
+muito bom em imagens true-color
+não ampliadas."
+
+cdecom "decomposição de cores"
+cdecom2 "Neste modo, a cor é calculada
+pelo ângulo da última órbita."
+cdecom3 "Ele é similar à
+decomposição binária mas
+interpola cores suavemente."
+cdecom4 "Para o fractal de Newton, pode ser usado
+para colorir o conjunto baseado na raiz
+encontrada, ao invés do número de
+iterações."
+
+smooth "suavização
+
+O modo de suavização de cores remove
+as listras causadas pelas iterações e
+faz gradações suaves."
+smooth1 "Ele não funciona no conjunto de Newton
+e na fórmula magnet porque eles têm
+atratores finitos."
+smooth2 "E ele só funciona nos modos true color e
+high color. Então se você
+tem 8bpp, precisará habilitar
+o filtro true color."
+
+#########################################################
+#For file outnew.xhf
+
+intro5 "Uma introdução aos fractais
+
+Chapter 6-Phoenix"
+
+phoenix "Este é o conjunto Mandelbrot para
+a fórmula conhecida como Phoenix."
+
+phoenix1 "Ele é diferente dos outros
+fractais do XaoS, mas alguma semelhança
+com o Mandelbrot pode ser vista:"
+
+phoenix2 "o conjunto Phoenix também contem uma
+\"cauda\" com minicópias do
+conjunto inteiro,"
+
+phoenix3 "há ainda uma correspondência do
+\"tema\" entre a versão Mandelbrot
+e a versão Julia,"
+
+phoenix4 "mas os Julia são muito diferentes."
+
+#########################################################
+#For file plane.xaf
+
+plane1 "Geralmente, a parte real de um ponto
+no plano complexo é tracejado na
+coordenada x da tela; a
+parte imaginária na
+coordenada y."
+
+plane2 "O XaoS dispõe de 6 modos alternativos
+para mapeamento"
+plane3 "1/mu
+
+Esta é uma inversão - áreas do
+infinito vêm para 0 e 0 é tracejado
+para o infinito. Isso permite ver o que
+acontece a um fractal quando ele é
+infinitamente reduzido."
+plane4 "Este é um Mandelbrot normal..."
+plane5 "e este é uma invensão."
+plane6 "Como você pode ver, o conjunto estava
+no centro e agora está ao seu redor.
+A área azul infinitamente
+grande ao redor do conjunto
+está dentro do pequeno
+círculo ao redor do 0."
+plane7 "As próximas imagens serão
+vistas no modo normal,
+depois no invertido
+para que você perceba
+o que acontece"
+
+plane8 "1/mu+0.25
+
+Este é um outro modo invertido, mas
+com um centro diferente de inversão.
+"
+plane9 "Como o centro de inversão encontra-se
+nos perímetros do conjunto Mandelbrot,
+você consegue ver infinitos perímetros
+parabólicos."
+plane10 "Este modo causa um efeito interessante em
+outros fractais, pois ele
+quebra suas simetrias."
+
+lambda "O plano lambda oferece uma
+visão completamente diferente."
+
+ilambda "1/lambda
+
+Esta é uma combinação de
+inversão e o plano lambda."
+
+imlambda "1/(lambda-1)
+
+Esta é uma combinação de lambda,
+movimento, e inversão."
+
+imlambda2 "Ela causa uma deformação muito
+interessante no conjunto Mandelbrot."
+
+mick "1/(mu-1.40115)
+
+Novamente, uma inversão com um centro
+movido. Agora o centro encontra-se
+dentro dos pontos Feigenbaum - pontos
+onde conjunto Mandelbrot é
+autossemelhante. Os detalhes altamente
+magníficos estão ao redor desse ponto."
+
+#########################################################
+#For file power.xaf
+
+intro2 "Uma introdução aos fractais
+
+Chapter 3-Os
+Mandelbrot de maior potência"
+
+power "z^2+c não é a única
+fórmula que gera fractals."
+power2 "Apenas uma mudança maior: x^3+c
+gera um fractal similar."
+power3 "E ele, é claro, também é
+cheio de cópias do conjunto todo."
+
+power4 "Fractais similares podem ser gerados
+por uma fórmula mais modificada"
+
+pjulia "e cada um tem uma série correspondente
+dos conjuntos Julia também."
+
+#########################################################
+#For file truecolor.xaf
+
+truecolor "Modos de cor true-color"
+truecolor1 "Em geral,fractais são coloridos usando
+uma paleta. No modo true-color, a
+paleta está simulada."
+truecolor2 "A única diferença é que a
+paleta é maior e as cores são
+suavemente interpoladas nos modos de
+cor."
+truecolor3 "O modo de cor true-color
+utiliza uma técnica completamente
+diferente. Usa vários parâmetros
+de cálculo"
+truecolor4 "para gerar uma cor
+exata - não apenas um índice
+dentro da paleta."
+truecolor5 "Isto possibilita exibir acima de
+quatro valores para cada pixel."
+truecolor6 "O modo de cor true color
+requer true color. Em exibições 8bpp,
+você necessita habilitar o
+filtro true-color."
+
+#########################################################
+#for file pert.xaf #NEW (up to end of file)
+
+pert0 "Distorção"
+pert1 "Assim como as fórmulas Julia utilizam
+diferentes sementes para gerar
+vários Julias a partir de uma fórmula,"
+pert2 "você pode alterar o valor da distorção
+para os conjuntos Mandelbrot."
+pert3 "Isso troca a posição inicial da
+órbita a partir do valor padrão 0."
+pert4 "Seu valor não afeta o
+fractal resultante assim como a semente
+dos Julias, mas é útil
+quando você quer fazer um fractal mais
+casual."
+
+##########################################################
+#for file palette.xaf
+
+pal "Paletas aleatórias"
+pal0 "O XaoS não vem com uma biblioteca
+vasta de paletas predefinidas
+como muitos outros programas, mas
+gera paletas aleatórias."
+pal1 "Então mantenha a tecla 'P' pressionada
+até que o XaoS gere uma paleta que
+satisfaça o seu fractal."
+pal2 "São utilizados três algoritmos
+diferentes:"
+pal3 "O primeiro faz listras indo de
+alguma cor ao preto."
+pal4 "O segundo faz listras do preto
+para alguma cor para o branco."
+pal5 "O terceiro é inspirado nas pinturas
+cubistas."
+
+###########################################################
+#for file other.xaf
+
+auto1 "Piloto automático"
+auto2 "Se estiver cansado, você
+pode habilitar o piloto automático para
+deixar que o XaoS explore um fractal
+automaticamente."
+fastjulia1 "Modo rápido de navegação Julia"
+fastjulia2 "Este modo permite transformar
+o conjunto Julia de acordo com a
+semente atual."
+fastjulia3 "Ele também serve como uma previsão de uma
+área antes da ampliação - por causa da
+correspondência temática entre
+o Julia e o ponto escolhido,
+você visualiza o tema aproximado
+ao redor do ponto antes de ampliá-lo."
+rotation "Rotação de imagem"
+cycling "Alteração de cor"
+bailout "Bailout"
+bailout1 "Esse é o conjunto Mandelbrot com um
+modo de cor externa 'suave.'"
+bailout2 "Ampliando o valor para 64, obtemos
+transições de cores mais balanceadas."
+bailout3 "Para a maioria dos fractais,
+valores diferentes
+resultam em fractais similares."
+bailout4 "Isso não vale para os Barnsley."
+
+
+
+
+##############################################
+#for file trice.xaf
+
+trice1 "Fractais Triceratops e Catseye"
+trice2 "Se alterar o valor bailout"
+trice3 "de um fractal escape-time"
+trice4 "para um valor menor,"
+trice5 "você obterá um outro fractal."
+trice6 "Com esse método podemos obter"
+trice7 "padrões muito interesantes"
+trice8 "com áreas separadas de uma cor."
+trice9 "O fractal Triceratops"
+trice10 "também é feito com esse método."
+trice11 "Muitas figuras similares podem ser"
+trice12 "feitas do Triceratops."
+trice13 "O fractal Catseye"
+trice14 "é parecido com um olho de gato."
+trice15 "Mas se aumentarmos o valor bailout..."
+trice16 "...obtemos um fractal mais interesante..."
+trice17 "...com bolhas..."
+trice18 "...e lindos Julias."
+
+##############################################
+#for file fourfr.xaf
+
+fourfr1 "Mandelbar, Lambda, Manowar e Spider"
+fourfr2 "Este é o conjunto Mandelbar."
+fourfr3 "Sua fórmula é: z = (conj(z))^2 + c"
+fourfr4 "Alguns de seus Julia são interessantes."
+fourfr5 "Mas agora vamos ver outros fractais."
+fourfr6 "O fractal Lambda tem uma estrutura"
+fourfr7 "parecida com os Mandelbrot."
+fourfr8 "É como o conjunto Mandelbrott
+no plano lambda."
+fourfr9 "Mas o Lambda é um conjunto Julia,
+aqui temos o MandelLambda."
+fourfr10 "...modo rápido Julia..."
+fourfr11 "Este é o fractal Manowar,"
+fourfr12 "descoberto por usuário do Fractint."
+fourfr13 "Ele tem Julias similares ao conjunto."
+fourfr14 "Este fractal é chamado Spider,"
+fourfr15 "também descolberto por
+usuário do Fractint."
+fourfr16 "E ele tem Julias similares
+ao conjunto todo, também."
+
+##############################################
+#for file classic.xaf
+
+classic1 "Sierpinski Gasket, S.Carpet,
+Koch Snowflake"
+classic2 "Este é o famoso
+fractal Sierpinski Gasket."
+classic3 "E este é o seu
+variante escape-time."
+classic4 "Você altera seu formato selecionando"
+classic5 "uma outra 'semente Julia'"
+classic6 "Este fractal é o Sierpinski Carpet."
+classic7 "E aqui está seu variante escape-time."
+classic8 "Este é famoso, também."
+classic9 "E finalmente, este é o
+variante escape-time"
+classic10 "do floco de neve Koch."
+
+##############################################
+#for file otherfr.xaf
+
+otherfr1 "Outros tipos de fractais no XaoS"
diff --git a/catalogs/romanian.cat b/catalogs/romanian.cat
new file mode 100644
index 0000000..9812251
--- /dev/null
+++ b/catalogs/romanian.cat
@@ -0,0 +1,1140 @@
+# Message catalog file required to replay XaoS tutorials in
+# English language
+#
+# Copyright (C) 1997 by Jan Hubicka
+#
+# Corrected by Tim Goowin
+# Further corrections by David Meleedy
+# And some more by Nix
+#
+# There are a few things you should know if you want to change or
+# translate this file.
+#
+# The format of this catalog is identifier[blanks]"value"[blanks]
+#
+# Identifier is a key used by the program. Do not translate it! Only
+# translate the value. If you want a quote character `"' in the text,
+# use `\"'. For `\' use `\\'. Don't use `\n' for enter; use a literal
+# newline.
+#
+# If you wish to translate this file into any new language, please let
+# me know. You should translate this text freely: you don't need to use
+# exactly the same sentences as here, if you have idea how to make text
+# more funny, interesting, or add some information, do it.
+#
+# You can use longer or shorter sentences, since XaoS will automatically
+# calculate time for each subtitle.
+#
+# Also, please let me have any suggestions for improving this text and
+# the tutorials.
+#
+# Tutorial text needs to fit into a 320x200 screen. So all lines must be
+# shorter than 40 characters. This is 40 characters:
+#234567890123456789012345678901234567890
+# And thats not much! Be careful!
+# Please check that your updated tutorials work in 320x200 to ensure
+# that everything is OK.
+#########################################################
+#For file dimension.xaf
+
+fmath "Matematica de la baza fractalilor"
+fmath1 "Fractalii sunt un nou domeniu al
+matematicii, asa că mai există încă
+multe intrebări la care nu s-a găsit
+răspuns."
+fmath2 "Chiar si definitiile sunt inexacte"
+fmath3 "De obicei numim ceva un fractal dacă
+prezintă o anumită auto-similaritate"
+
+
+def1 "Una din posibilele definitii este..."
+#Definition from the intro.xaf is displayed here.
+#If it is a problem in your langage catalog, let me
+#know and I will create a special key
+def2 "Ce inseamna aceasta?"
+def3 "Pentru a explica trebuie mai intai
+sa intelegem ce inseamna dimensiunea
+topologica si dimensiunea
+Hausdorff Besicovich."
+
+topo1 "Dimensiunea topologica
+este dimensiunea \"normala\"."
+topo2 "Un punct are dimensiunea 0"
+topo3 "O linie are dimensiunea 1"
+topo4 "O suprafata are 2, etc..."
+
+hb1 "Definitia dimensiunii
+Hausdorff Besicovich provine de la
+simplul fapt ca:"
+hb2 "O linie pe care o marim astfel incat
+isi dubleaza lungimea, este de doua ori
+mai lunga decat era."
+
+hb3 "Pe de alta parte, daca marim un patrat
+in mod similar, dimensiunea acestuia
+creste de patru ori."
+hb4 "Reguli asemanatoare sunt valabile si in
+dimensiuni mai mari."
+hb5 "Plecand de la acest fapt, pentru a
+calcula dimensiuni se poate folosi
+urmatoarea ecuatie:"
+hb6 "dimensiune = log s / log z
+unde z este schimbarea de marire si
+s este schimbarea dimensiunii"
+hb7 "pentru o linie pe care o marim de 2 ori,
+schimbarea dimensiunii este tot 2
+(dimensiunea se dubleaza).
+log 2 / log 2 = 1"
+hb8 "pentru un patrat pe care il marim de 2 ori,
+schimbarea dimensiunii este 4
+(dimensiunea creste de 4 ori).
+log 4 / log 2 = 2"
+hb9 "Deci aceasta definitie da aceleasi
+rezultate pentru forme normale"
+hb10 "Lucrurile devin mai interesante
+la fractali..."
+
+hb11 "Sa luam in considerare o curba a
+unui fulg de zapada"
+hb12 "care se creeaza prin impartirea
+repetata a unei linii in 4 linii."
+hb13 "Noile linii au lungimea egala cu 1/3
+din lungimea liniei originale"
+hb14 "Daca marim de 3 ori, aceste linii vor fi
+exact la fel de mari ca si liniile
+originale."
+hb15 "Din cauza auto-similaritatii create
+prin repetarea infinita a acestei
+metamorfoze,"
+hb15b "fiecare din aceste parti va deveni
+o copie exacta a fractalului original."
+hb16 "Pentru ca exista 4 astfel de copii,
+dimensiunea fractalului creste de 4X"
+hb17 "Dupa ce punem aceste valori in
+ecuatii:
+log 4 / log 3 = 1.261"
+hb18 "Obtinem o valoare mai mare decat 1
+(Dimensiunea topologica a curbei)"
+hb19 "Dimensiunea Hausdorff Besicovich
+(1.261) este mai mare decat dimensiunea
+topologica."
+hb20 "Considerand aceasta definitie,
+fulgul de zapada este un fractal."
+
+defe1 "Dar totusi, aceasta definitie nu
+este perfecta deoarece exclude multe
+forme care sunt de fapt fractali."
+defe2 "Dar arata una din interesantele
+proprietati ale fractalilor,"
+defe3 "si este destul de populara."
+defe4 "Dimensiunea Hausdorff Besicovich
+este numita deseori si
+\"dimensiunea fractala\""
+
+#########################################################
+#For file escape.xaf
+escape "Matematica de la baza fractalilor
+
+Capitolul 2 - Fractalii Escape time "
+escape1 "Unii fractali (ca si fulgul de zapada)
+se pot crea prin simpla divizare si
+repetite."
+escape2 "XaoS poate genera o alta
+categorie de fractali - numiti
+fractali escape time."
+escape3 "Metoda pentru generarea acestora
+este un pic diferita, dar se bazeaza
+tot pe iteratie."
+escape4 "Ei considera tot ecranul ca
+un plan complex"
+escape5 "Axa reala este plasata orizontal"
+escape6 "si cea imaginara este plasata vertical"
+escape7 "Fiecare punct are propria orbita"
+escape8 "Traiectoria orbitei se calculeaza
+folosind functia iterativa, f(z,c)
+unde z este pozitia anterioara si c
+este noua pozitie de pe ecran."
+escape9 "De exemplu pentru multimea Mandelbrot,
+functia iterativa este z=z^c+c"
+orbit1 "In cazul in care dorim sa studiem
+punctul 0 - 0.6i"
+orbit2 "Atribuim acest parametru la c"
+orbit3 "Iteratia orbitei incepe
+la z=0+0i"
+orbit3b "Apoi calculam in mod repetat
+functia iterativa, si obtinem in mod
+repetat o noua valoare z pentru
+iteratia urmatoare."
+orbit4 "Definim punctul care apartine multimii,
+in cazul in care orbita ramane finita."
+orbit5 "In acest caz ramane..."
+orbit6 "Asa ca acest punct apartine multimii."
+orbit7 "In alte cazuri ar tinde repede
+la infinit."
+orbit8 "(de exemplu, valoarea 10+0i
+Prima iteratie este 110,
+a doua 12110 etc..)"
+orbit9 "Asa ca astfel de puncte se afla in
+afara multimii."
+
+bail1 "Vorbim tot despre numere infinite si
+iteratii ale numerelor infinite..."
+bail2 "Dar calculatoarele sunt finite,
+asa ca nu pot calcula exact fractalii."
+bail3 "Se poate demonstra ca, in cazul in
+care distanta dintre orbita si zero
+este mai mare decat 2, orbita va tinde
+intotdeauna la inifinit."
+bail4 "Asa ca putem intrerupe calculele
+dupa ce orbita pica acest test.
+(Acesta se numeste testul de salvare
+- bailout)"
+bail5 "In cazurile in care calculam
+puncte din afara multimii, avem nevoie
+acum doar de un numar finit de
+iteratii."
+bail6 "Acestui fapt se datoreaza aparitia
+dungilor colorate din jurul multimii."
+#bail7 "They are colored according to the
+#number of iterations of orbits needed
+#to fall in the bailout set."
+bail7 "Ele sunt colorate in concordanta
+cu numarul iteratiilor orbitelor necesar
+pentru a cadea in multimea de salvare
+(bailout)."
+iter1 "In interiorul multimii avem
+in continuare nevoie de un numar
+infinit de calcule"
+iter2 "Singura metoda de a face acest lucru
+este sa intrerupem calculele dupa un
+numar dat de iteratii si sa folosim
+rezultatele aproximative"
+iter3 "Astfel, numarul maxim de iteratii
+determina cat de exacta va fi
+aproximarea."
+iter4 "Fara nici o iteratie, s-ar crea doar
+un cerc cu raza 2
+(din cauza conditiei de salvare
+(bailout))"
+iter5 "Cresterea numarului de iteratii va
+determina aproximari mai exacte, dar va
+lua si mai mult timp pentru calculare."
+limit1 "XaoS calculeaza implicit
+170 de iteratii."
+limit2 "Unele zone se pot mari mult timp
+fara a se ajunge la aceasta limita."
+limit3 "In alte zone se obtin rezultate
+inexacte destul de repede."
+limit4 "Imaginile devin destul de
+plictisitoare cand se intampla acest
+lucru."
+limit5 "Dar dupa cresterea numarului de
+iteratii, se obtin multe detalii
+noi si interesante."
+ofracts1 "Alti fractali din XaoS se
+calculeaza folosind alte formule si alte
+teste de salvare (bailout), dar la baza
+este aceeasi metoda."
+ofracts2 "Deoarece este nevoie de atat de multe
+calcule, XaoS face foarte multe
+optimizari.
+
+Daca doriti, puteti citi despre acestea
+in fisierul doc/xaos.info"
+
+#########################################################
+#For file anim.xaf
+anim "Privire generala
+a caracteristicilor XaoS
+
+Fisiere de animatii si de pozitie "
+
+#########################################################
+#For file anim.xhf
+
+anim2 "Dupa cum ati observat,
+XaoS poate reda animatii si
+tutoriale."
+
+anim3 "Ele se pot incarca direct
+din XaoS,"
+
+languag1 "deoarece animatiile si
+fisierele de pozitie sunt stocate
+intr-un limbaj de comenzi simplu"
+
+languag2 "(fisierele de pozitie sunt
+animatii cu un singur cadru)."
+
+languag3 "Animatiile pot fi editate
+manual mai tarziu pentru a obtine
+rezultate si mai profesioniste."
+
+languag4 "Majoritatea animatiilor din aceste
+tutoriale au fost scrise complet manual,
+incepand de la un singur fisier de
+pozitie."
+
+modif1 "O simpla modificare"
+
+modif2 "genereaza un film de micsoare
+(\"unzoom\"),"
+modif3 "si aceasta modificare, un film de
+marire (\"zoom\")."
+
+newanim "De asemenea, se pot scrie animatii
+si efecte complet noi."
+
+examples "XaoS vine si cu multe fisiere cu
+exemple, care pot fi incarcate aleator
+din meniul salveaza/incarca."
+
+examples2 "De asemenea, poti folosi fisierele
+de pozitie pentru a schimba date cu
+alte programe."
+
+examples3 "Singurele limite sunt propria
+imaginatie, si limbajul de comenzi
+descris in xaos.info."
+
+#########################################################
+#For file barnsley.xaf
+
+intro4 "Fractali - O introducere
+
+Capitolul 5-Formula lui Barnsley"
+
+barnsley1 "Inca o formula a lui
+Michael Barnsley"
+
+barnsley2 "genereaza acest fractal ciudat."
+
+barnsley3 "Nu este foarte interesant de
+explorat,"
+
+barnsley4 "dar are multimi Julia foarte frumoase!"
+
+barnsley5 "Este interesant pentru ca are
+o structura \"cristalina\","
+
+barnsley6 "mai degraba decat o structura
+\"organica\" gasita in multi alti
+fractali."
+
+barnsley7 "Michael Barnsley a descoperit si
+alte formule."
+
+barnsley8 "Una dintre ele genereaza acest fractal."
+
+#########################################################
+#For file filter.xaf
+
+filter "Privire generala
+a caracteristicilor XaoS
+
+filtre"
+
+
+#########################################################
+#For file filter.xhf
+
+filter1 "Un filtru este un efect aplicat
+fiecarui cadru, dupa ce se calculeaza
+fractalul."
+
+filter2 "XaoS implementeaza urmatoarele
+filtre:"
+
+motblur "estomparea miscarii,"
+
+edge "doua filtre pentru detectatrea
+marginilor,"
+
+edge2 "(primul face linii groase si este
+util la rezolutii mari,"
+
+edge3 "al doilea face linii mai inguste),"
+
+star "a filtru simplu \"star-field\","
+
+interlace "un filtru de intretesere
+(\"interlace\"), (acesta
+mareste viteaza de calcul si da un
+efect de estompare a miscarii la
+rezolutii mai mari),"
+
+stereo "un filtru de stereograma (random dot
+stereogram),"
+
+stereo2 "(daca nu puteti vedea nimic in
+urmatoarele imagini si in mod normal
+puteti vedea stereograme (random dot),
+probabil ati configurat gresit
+dimensiunea ecranului---folositi `xaos
+-ajutor' pentru mai multe informatii),"
+
+emboss1 "un filtru de reliefare," #NEW
+
+palettef1 "un filtru de emulare a paletei,
+(activeaza ciclarea culorilor pe
+monitoare truecolor)" #NEW
+
+truecolorf "un filtru true color, (creaza
+imagini true-color pe monitoare 8bpp)."
+
+#########################################################
+#For file fractal.xaf
+
+end "Sfarsit."
+
+fcopyright "Introducerea la fractali
+a fost facuta de Jan Hubicka in iulie
+1997, modificata si actualizata
+ulterior pentru versiuni noi
+ale XaoS
+
+Corecturi de catre:
+Tim Goodwin <tgoodwin@cygnus.co.uk>
+si
+David Meleedy <dmm@skepsis.com>
+si
+Nix <nix@esperi.demon.co.uk>"
+# Add your copyright here if you are translating/correcting this file
+
+suggestions "
+Please send all ideas,
+suggestion, thanks, flames
+and bug-reports to:
+
+xaos-discuss@lists.sourceforge.net
+
+Thank You"
+
+#########################################################
+#For file incolor.xaf
+
+incolor1 "De obicei, punctele care apartin
+multimii se afiseaza folosind o singura
+culoare."
+
+incolor2 "Acest lucru face granita multimii
+foarte vizibila, dar zonele din
+interiorul multimii sunt destul de
+plictisitoare."
+
+incolor3 "Pentru a le face mai interesante,
+puteti folosi valoarea ultimei orbite
+pentru a atribui o culoare punctelor
+din interiorul multimii."
+
+incolor4 "XaoS are zece feluri diferite de
+a face aceasta. Ele se numesc
+\"moduri de colorare interioara\"."
+
+zmag "zmag
+
+Culoarea se calculeaza folosind
+magnitudinea ultimei orbite."
+
+#########################################################
+#For file innew.xaf
+
+innew1 "Descompunere
+
+Aceasta functioneaza la fel ca
+descompunerea culorilor din modurile
+de colorare exterioara
+"
+
+innew2 "Real / Imag
+
+Culoarea se calculeaza din partea reala
+a ultimei orbite, impartita la
+partea imaginara."
+
+innew3 "Urmatoarele 6 moduri de colorare
+sunt formule alese aleator sau copiate
+din alte programe."
+
+#########################################################
+#For file intro.xaf
+
+fractal "...Fractalii..."
+fractal1 "Ce este un fractal?"
+
+fractal2 "Definitia lui Benoit Mandelbrot:
+un fractal este o multime a carei
+dimensiune Hausdorff Besicovich
+este strict mai mare decat
+dimensiunea topologica."
+
+fractal3 "Esti inca in bezna?"
+
+fractal4 "Nu te ingrijora.
+Aceasta definitie este importanta numai
+daca esti matematician."
+
+fractal5 "In romana,
+un fractal este o forma"
+
+fractal6 "care se construieste din bucati,"
+
+fractal7 "si fiecare dintre aceste bucati
+este o copie aproximativa la scara
+redusa a intregului fractal."
+
+fractal8 "Acest proces se repeta"
+
+fractal9 "pentru a construi fractalul complet."
+
+facts "Exista multe lucruri surprinzatoare
+despre fractali:"
+
+fact1 "Fractalii nu depind de scala,"
+fact2 "sunt auto-similari,"
+fact3 "si de multe ori se aseamana unor
+obiecte din natura"
+#fact4 "such as clouds, mountains,
+#or coastlines."
+#fact4 "cum ar fi norii, muntii,
+#sau linia tarmului."
+fact5 "Exista si multe structuri
+matematice care definesc fractalii,"
+fact6 "ca cele pe care le vezi pe ecran."
+fmath4 "Cei mai multi fractali sunt creati
+printr-un proces iterativ"
+fmath5 "de exemplu, fractalul conoscut
+drept curba lui von Koch"
+fmath6 "se creeaza prin schimbarea unei linii"
+fmath7 "in patru linii"
+fmath8 "Aceasta este prima iteratie
+a procesului"
+fmath9 "Apoi repetam aceasta schimbare"
+fmath10 "dupa 2 iteratii..."
+fmath11 "dupa 3 iteratii..."
+fmath12 "dupa 4 iteratii.."
+fmath13 "si dupa un numar infinit de
+iteratii obtinem un fractal."
+fmath14 "Forma lui arata ca o treime
+dintr-un fulg de zapada."
+tree1 "Prin metode asemanatoare se pot
+construi si multe alte forme."
+tree2 "De exemplu prin schimbarea liniei
+in alt fel"
+tree3 "Putem obtine un copac."
+nstr "Iteratiile pot introduce
+zgomot aleator intr-un fractal"
+nstr2 "Prin schimbarea unei linii in doua
+linii"
+nstr3 "si adaugand o mica eroare"
+nstr4 "poti obtine fractali care arata ca
+o linie de coasta."
+nstr5 "Un proces asemanator ar putea crea
+nori, munti, si multe atle forme din
+natura"
+
+#######################################################
+## mset.xaf
+
+fact7 "Fara nici un dubiu, cel mai faimos
+fractal este.."
+
+mset "Multimea Mandelbrot"
+mset1 "Este generat dintr-o formula
+foarte simpla,"
+mset2 "dar este unul dintre cei mai
+frumosi fractali."
+mset3 "Deoarece multimea Mandelbrot este un
+fractal,"
+mset4 "granitele sale contin"
+mset5 "copii in miniatura a intregii
+multimi."
+mset6 "Aceasta este cea mai mare, cam de
+50 de ori mai mica decat intreaga
+multime."
+mset7 "Multimea Mandelbrot nu este complet
+auto-similara,"
+mset8 "astfel incat fiecare copie in
+miniatura este diferita."
+mset9 "Aceasa este cam de 76,000 de ori
+mai mica decat intregul."
+mset10 "Copii din diferite zone ale
+multimii difera si mai mult."
+
+nat "Granitele nu contin doar copii ale
+intregii multimi,"
+nat1 "ci o varietate cu adevarat infinita
+de forme diferite."
+nat2 "Unele dintre acestea seamana
+surprinzator cu cele gasite in natura:"
+nat3 "puteti vedea copaci,"
+nat4 "rauri cu lacuri,"
+nat5 "galaxii,"
+nat6 "si cascade."
+nat7 "Multimea Mandelbrot contine si multe forme
+complet noi."
+
+###############################################################################
+############
+
+juliach "Fractali - O introducere
+
+Capitolul 2-Julia"
+
+julia "Multimea Mandelbrot nu este singurul
+fractal generat de formula:
+z=z^2+c"
+julia1 "Celalalt este..."
+julia2 "multimea Julia"
+julia3 "Nu este doar o singura multime Julia,"
+julia4 "ci o varietate infinita de
+multimi Julia."
+julia5 "Fiecare se construieste dintr-o
+\"samanta\" (valoare initiala),"
+julia6 "care este un punct selectat
+din multimea Mandelbrot."
+julia7 "Multimea Mandelbrot poate fi vazuta
+ca o harta formata din mai multe
+multimi Julia."
+julia8 "Puncte din interiorul multimii
+Mandelbrot corespund multimilor Julia
+cu zone negre mari conectate intre ele,"
+julia9 "si punctele din exteriorul multimii
+Mandelbrot corespund unor multimi Julia
+neconectate."
+julia10 "Cele mai interesante multimi Julia
+isi au samanta (valoarea initiala)
+exact pe granita multimii Mandelbrot."
+
+theme "Tema unei multimi Julia
+depinde tare de punctul pe care il
+alegi drept samanta (valoare initiala)."
+theme1 "Cand maresti multimea Mandelbrot,
+obtii un fractal foarte similar
+tematic"
+theme2 "cand ne uitam la multimea
+Julia corespunzatoare."
+theme3 "Dar daca micsorezi inapoi, dupa marire,
+descoperi"
+theme4 "ca te afli intr-un fractal
+complet diferit."
+theme5 "Multimile Julia pot parea destul
+de plictisitoare, deoarece nu-si
+schimba tema"
+theme6 "si raman fidele samantei (valorii
+initiale) alese din multimea
+Mandelbrot."
+theme7 "Dar daca alegi cu atentie samanta,
+(valoarea initiala) poti genera"
+theme8 "imagini frumoase."
+
+#########################################################
+#For file keys.xhf
+
+keys "Taste:
+
+q - stop redare
+Space - sari peste cadru
+ (poate dura un timp)
+Stanga/Dreapta - ajusteaza viteza subtitrarii"
+
+#########################################################
+#For file magnet.xaf
+
+intro7 "Fractali - O introducere
+
+Capitolul 8-Magnet"
+
+magnet "Aceasta NU ESTE multimea Mandelbrot."
+magnet1 "Acest fractal se numeste \"magnet\"
+pentru ca formula lui provine din
+fizica teoretica."
+magnet2 "Este derivat din studiul
+laticelor teoretice in contextul
+transformarilor renormalizatoare
+magnetice."
+
+similiar "Asemanarea sa cu multimea Mandelbrot
+este interesanta deoarece este o
+formula din lumea reala."
+
+magjulia "Multimile Julia ale sale sunt
+destul de deosebite."
+
+magnet3 "Exista si un al doilea fractal magnet."
+
+#########################################################
+#For file new.xaf
+
+new "Ce aduce nou versiunea 3.0?"
+speed "1. Metode de marire a vitezei"
+speed1 "Buclele principale de calcul
+verifica acum periodicitatea."
+speed2 "Se calculeaza imagini noi
+prin detectarea marginilor,"
+speed3 "astfel incat calcularea iamginilor
+noi este mult mai rapida."
+speed4 "De exemplu, calcularea
+multimii Mandelbrot la
+1,000,000 iteratii..."
+speed5 "calculare..."
+speed6 "terminat."
+speed7 "XaoS are o euristica care
+deseteaza automat verificarea
+periodicitatii cand se asteapta ca
+punctul calculat sa fie in afara multimii
+(cand toate punctele din jurul lui
+sunt in afara multimii)."
+speed8 "Si rutinele principale de marire
+au fost optimizate astfel incat
+marirea se face de aproximativ
+doua ori mai repede."
+speed9 "XaoS atinge acum 130FPS
+pe 130Mhz Pentium."
+
+new2 "2. Filtre."
+new3 "3. Noua moduri de colorare
+exterioara."
+new4 "4. Moduri noi de colorare
+interioara."
+new5 "5. Moduri de colorare true-color."
+new6 "6. Salveaza animatia/reda animatia."
+newend "Si multe altele, cum ar fi
+rotirea imaginilor, o mai buna generare a
+paletei de culori... Vezi ChangeLog pentru
+o lista completa a schimbarilor." #NEW
+
+#########################################################
+#For file newton.xaf
+
+intro3 "Fractali - O introducere
+
+Capitolul 4-Metoda lui Newton"
+newton "Acest fractal se genereaza printr-o
+formula complet diferita:"
+newton1 "Metoda numerica a lui Newton pentru
+gasirea radacinilor ecuatiei polnomiale
+x^3=1."
+newton2 "Numara iteratiile necesare pentru
+gasirea radacinii aproximante."
+newton3 "Poti vedea cele trei radacini ca
+cercuri albastre."
+newton4 "Cele mai interesante zone sunt
+locurile in care punctul de plecare
+este aproape echidistant fata de doua
+sau trei radacini."
+newton5 "Acest fractal este foarte auto-
+similar si nu prea interesant de
+cercetat."
+newton6 "Dar XaoS poate genera multimi
+asemanatoare cu multimile Julia,"
+newton7 "unde foloseste eroarea de aproximare
+drept samanta (valoare initiala)."
+newton8 "Acest lucru face ca fractalul Newton
+sa devina mai interesant."
+newton9 "XaoS poate genera si un alt
+fractal Newton."
+newton10 "Metoda numerica a lui Newton pentru
+gasirea radacinilor ecuatiei polinomoale
+x^4=1."
+newton11 "Poti vedea cele patru radacini
+drept cercuri albastre."
+
+#########################################################
+#For file octo.xaf
+intro6 "Fractali - O introducere
+
+Capitolul 7-Octo"
+octo "Octo este un fractal mai putin
+cunoscut."
+octo1 "L-am ales pentru XaoS din cauza
+formei sale neobisnuite."
+octo2 "XaoS poate genera multimi
+asemanatoare cu multimile Julia,
+similare cu cele din multimea
+Newton."
+
+#########################################################
+#For file outcolor.xaf
+
+outcolor "Moduri de colorare exterioara"
+outcolor1 "Multimea Mandelbrot este doar lacul
+negru si plictisitor din
+mijlocul ecranului"
+outcolor2 "Dungile colorate dimprejurul lui
+sunt garnitele multimii."
+outcolor3 "In mod normal, colorarea se bazeaza
+pe numarul de iteratii necesare
+pentru a atinge valoarea de salvare
+(bail-out)."
+outcolor4 "Dar exista si ale modalitati
+de colorare."
+outcolor5 "XaoS le numeste moduri
+de colorare exterioara."
+
+iterreal "iter+real
+
+Acest mod coloreaza granitele prin
+adunarea partii reale a ultimei orbite
+la numarul de iteratii."
+iterreal1 "Il poti utiliza pentru a transforma
+imaginile plictisitoare in imagini mult
+mai interesante."
+
+iterimag "iter+imag este asemanator cu iter+real."
+iterimag2 "Singura diferenta este ca foloseste
+partea imaginara a ultimei orbite."
+
+iprdi "iter+real/imag
+
+Acest mod coloreaza granitele
+prin adunarea numarului de iteratii la
+partea reala a ultimei orbite,
+impartind apoi la partea imaginara."
+
+sum "iter+real+imag+real/imag
+
+este suma tuturor modurilor anterioare
+de colorare."
+
+decomp "descompunere binara
+
+cand partea imaginara este mai mare
+decat zero, acest mod foloseste numarul
+de iteratii; altfel foloseste
+numarul maxim de iteratii minus
+numarul de iteratii de descompunere
+binara."
+
+bio "biomorphs
+
+Acest mod de colorare se numeste astfel
+deoarece face unii fractali sa arate
+ca niste organisme unicelulare."
+
+#########################################################
+#For file outnew.xhf
+
+potential "potential
+
+Acest mod de colorare arata
+forte bine in true-color
+pentru imagini nemarite."
+
+cdecom "descompunearea culorilor"
+cdecom2 "In acest mod, culorile se calculeaza
+pornind de la unghiul ultimei orbite."
+cdecom3 "Este asemanator cu descompunearea
+binara dar interpoleaza culorile
+mai neted."
+cdecom4 "Pentru tipul Newton, se poate folosi
+pentru colorarea multimii bazandu-se
+pe radacina conoscuta, mai degraba decat pe
+numarul de iteratii."
+
+smooth "neted
+
+Modul de colorare neteda incearca
+sa elimine dungile cauzate de iteratii
+si sa faca gradatii netede."
+smooth1 "Nu functioneaza pentru multimea
+Newton si nici pentru formule magnet din
+cauza ca acestea au atractori finiti."
+smooth2 "Functioneaza numai pentru true color
+si modurile high color ale monitorului.
+Asa ca daca ai 8bpp, va trebui sa
+setezi filtrul true color."
+
+#########################################################
+#For file outnew.xhf
+
+intro5 "Fractali -O introducere
+
+Capitolul 6-Phoenix"
+
+phoenix "Aceasta este multimea Mandelbrot
+pentru o formula conoscuta ca Phoenix."
+
+phoenix1 "Arata altfel decat ceilalti fractali
+din XaoS, dar se poate gasi o anumita
+asemanare cu multimea Mandelbrot:"
+
+phoenix2 "multimea Phoenix contine si ea o
+\"coada\" cu copii in miniatura a
+intregii multimi,"
+
+phoenix3 "exista totusi o corespondenta
+de \"tema\" intre versiunea Mandelbrot
+si multimile Julia,"
+
+phoenix4 "dar multimie Julia sunt foarte diferite."
+
+#########################################################
+#For file plane.xaf
+
+plane1 "De obicei, partea reala a unui punct
+din planul complex se reprezinta
+pe coordonata x de pe ecran; partea
+imaginara se reprezinta pe
+coordonata y."
+
+plane2 "XaoS ofera 6 moduri alternative
+de reprezentare"
+plane3 "1/mu
+
+Aceasta este o inversiune - zone de la
+infinit sunt aduse la 0 si 0 se reprezinta
+la infinit. Prin aceasta se poate
+vedea ce se intampla cu un fractal
+cand acesta este de-marit (unzoomed)
+de un numar infinit de ori."
+plane4 "Aceasta este o multime Mandelbrot
+normala..."
+plane5 "si aceasta este una inversata."
+plane6 "Dupa cum poti observa, multimea
+a fost in mijloc si acum este peste tot.
+Zona albastra infinit de mare din
+jurul multimii se mapeaza pe cercul mic
+din jurul punctului 0."
+plane7 "Urmatoarele cateva imagini vor fi
+aratate in modul normal, si dupa aceea
+in modul inversat pentru ca sa
+vezi ce se intampla"
+
+plane8 "1/mu+0.25
+
+Acesta este alt mod de inversiune, dar
+are un alt centru de inversiune.
+"
+plane9 "Fiindca centrul inversiunii se afla
+pe granita multimii Mandelbrot,
+poti vedea acum granite parabolice
+infinite."
+plane10 "Are un efect interesant si asupra
+altor fractali, deoarece de obicei le strica
+simetria."
+
+lambda "Planul lambda ofera o vedere
+complet diferita."
+
+ilambda "1/lambda
+
+Aceasta este o combinatie a
+inversiunii cu planul lambda."
+
+imlambda "1/(lambda-1)
+
+Aceasta este o combinatie de lambda,
+miscare, si inversiune."
+
+imlambda2 "Ofera o deformare foarte
+interesanta a multimii Mandelbrot."
+
+mick "1/(mu-1.40115)
+
+Aceasta este din nou o inversiune
+cu un centru mutat. Centrul este acum
+plasat in puncte Feigenbaum - puncte
+unde multimea Mandelbrot este auto-
+similara. Acest lucru mareste foarte tare
+detaliile din jurul acestui punct."
+
+#########################################################
+#For file power.xaf
+
+intro2 "Fractali - O introducere
+
+Capitolul 3-Multimi Mandelbrot de ordin superior"
+
+power "z^2+c nu este singura formula
+care genereaza fractali."
+power2 "Una doar putin modificata: x^3+c
+genereaza un fractal asemanator."
+power3 "Si contine, desigur, multe
+copii ale multimii principale."
+
+power4 "Fractali asemanatori pot fi generati
+de formule putin modificate"
+
+pjulia "si fiecare dintre ei are si un sir
+corespunzator de multimi Julia."
+
+#########################################################
+#For file truecolor.xaf
+
+truecolor "Moduri de colorare true-color"
+truecolor1 "De obicei fractalii se coloreaza
+utilizand o paleta de culori. In modul
+true-color, paleta se emuleaza."
+truecolor2 "Singura diferenta este ca
+paleta este mai vasta si colurile sunt
+interpolate neted in modurile de
+colorare."
+truecolor3 "Modul de colorare true-color
+utilizeaza o tehnica complet diferita.
+Foloseste diversi parametri din calcule"
+truecolor4 "pentru a genera o culoare
+anume - nu doar un index la
+paleta."
+truecolor5 "Acest lucru face posibila prezentarea
+a pana la patru valori in fiecare pixel."
+truecolor6 "Modul de colorare true-color
+are desigur nevoie de true color. Asa ca pe
+ecrane 8bpp, trebuie sa setezi filtrul
+de true-color."
+
+#########################################################
+#for file pert.xaf #NEW (up to end of file)
+
+pert0 "Perturbarea"
+pert1 "Asa cum formula Julia foloseste
+diferite seminte (valori initiale)
+pentru a genera diferite multimi
+Julia dintr-o singura formula,"
+pert2 "la fel poti schimba valoarea de
+perturbare pentru multimile Mandelbrot."
+pert3 "Se schimba pozitia de inceput a
+orbitei de la valoarea implicita 0."
+pert4 "Valoarea ei nu afecteaza
+fractalul rezultat atat de tare precum afecteaza
+samanta (valoarea initiala) multimile
+Julia, dar este folositor cand doresti
+sa faci astfel incat un fractal sa fie
+mai aleator."
+
+##########################################################
+#for file palette.xaf
+
+pal "Palete aleatoare"
+pal0 "XaoS nu vine cu biblioteci mari
+de palete predefinite ca multe alte
+programe, dar genereaza
+palete aleatoare."
+pal1 "Asa ca poti pur si simplu sa
+apesi tasta 'P' pana cand XaoS
+genereaza paleta pe care o doresti
+pentru fractalul tau."
+pal2 "Se utilizeaza trei algoritmi
+diferiti:"
+pal3 "Primul face dungi pornind de la o
+culoare oarecare la negru."
+pal4 "Al doilea face dungi pornind de la negru
+margand la o culoare oarecare si
+ajungand la alb."
+pal5 "Al treilea se inspira din picturi
+cubiste."
+
+###########################################################
+#for file other.xaf
+
+auto1 "Pilot automat"
+auto2 "Daca esti lenes, poti seta pilotul
+automat pentru a lasa XaoS
+sa exploreze un fractal in mod
+automat."
+fastjulia1 "Modul de parcurgere rapida
+a unei multimi Julia"
+fastjulia2 "Acest mod iti da voie sa \"morph\"
+multimea Julia in concordanta cu
+samanta (valoarea initiala) curenta."
+fastjulia3 "Este folositor de asemenea si ca
+avanpremiera a unei zone inainte sa
+o maresti - din cauza corespondentei
+tematice intre Julia si punctul ales,
+poti vedea tema aproximtiva din jurul
+unui punct inainte sa maresti."
+rotation "Rotirea imaginilor"
+cycling "Ciclarea culorilor"
+bailout "Salvare (bailout)"
+bailout1 "Aceasta este multimea Mandelbrot
+cu modul de colorare exterioara 'neted.'"
+bailout2 "Prin marirea valorii de salvare
+(bailout) la 64, obtii
+tranzitii mai echilibrate de culoare."
+bailout3 "Pentru majoritatea tipurilor de
+fractali, valori diferite de salvare
+(bailout) dau ca rezultat fractali
+asemanatori."
+bailout4 "Acest lucru nu este adevarat pentru
+fractalii Barnsley."
+
+##############################################
+#for file trice.xaf
+
+trice1 "Fractali Triceratops si Catseye (ochi de pisica)"
+trice2 "Daca schimbi valoarea de salvare
+(bailout)"
+trice3 "a unui fractal escape-time"
+trice4 "la o valoare mai mica,"
+trice5 "vei obtine un alt fractal."
+trice6 "Cu aceasta metoda putem obtine"
+trice7 "sabloane foarte interesante"
+trice8 "cu zone separate colorate intr-o
+singura culoare."
+trice9 "Fractalul Triceratops"
+trice10 "este si el facut prin aceasta metoda."
+trice11 "Se pot face multe poze asemanatoare"
+trice12 "din Triceratops."
+trice13 "Fractalul Catseye (ochi de pisica)"
+trice14 "arata ca un ochi de pisica."
+trice15 "Dar daca marim valoarea de salvare
+(bailout)..."
+trice16 "...obtinem un fractal si mai
+interesant..."
+trice17 "...cu bule..."
+trice18 "...si multimi Julia foarte frumoase."
+
+##############################################
+#for file fourfr.xaf
+
+fourfr1 "Mandelbar, Lambda, Manowar si Spider"
+fourfr2 "Aceasta este multimea Mandelbar."
+fourfr3 "Formula ei este: z = (conj(z))^2 + c"
+fourfr4 "Cateva din multimile ei Julia sunt
+interesante."
+fourfr5 "Dar sa vedem alti fractali acum."
+fourfr6 "Fractalul Lambda are o structura"
+fourfr7 "asemanatoare cu cea a lui Mandelbrot."
+fourfr8 "Este ca multimea Mandelbrot
+in planul lambda."
+fourfr9 "Dar Lambda este o multime Julia,
+aici este MandelLambda."
+fourfr10 "...modul rapid Julia..."
+fourfr11 "Acesta este fractalul Manowar."
+fourfr12 "A fost gasit de catre un utilizator
+al Fractint."
+fourfr13 "Are multimi Julia asemanatoare
+cu intreaga multime."
+fourfr14 "Acest fractal se numeste Spider
+(paianjen)."
+fourfr15 "A fost gasit tot de catre un
+utilizator al Fractint."
+fourfr16 "Si are si el multimi Julia asemanatoare
+cu intreaga multime."
+
+##############################################
+#for file classic.xaf
+
+classic1 "Sierpinski Gasket, S.Carpet,
+Koch Snowflake(fulgul de zapada al
+lui Koch)"
+classic2 "Acesta este faimosul fractal
+Sierpinski Gasket."
+classic3 "Si aceasta este varianta
+escape-time a sa."
+classic4 "Ii poti schimba forma prin selectarea"
+classic5 "unei alte 'seminte (valori
+initiale) Julia'"
+classic6 "Acesta este fractalul Sierpinski Carpet."
+classic7 "Si aici este varianta
+escape-time a sa."
+classic8 "Si acesta este conoscut."
+classic9 "Si, in sfarsit, aceasta este varianta
+escape-time"
+classic10 "a fractalului Koch Snowflake
+(fulgul de zapada al lui Koch)."
+
+##############################################
+#for file otherfr.xaf
+
+otherfr1 "Alte tipuri de fractali in XaoS"
diff --git a/config.guess b/config.guess
new file mode 100755
index 0000000..0f0fe71
--- /dev/null
+++ b/config.guess
@@ -0,0 +1,1516 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2007-03-06'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 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 General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Originally written by Per Bothner <per@bothner.com>.
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub. If it succeeds, it prints the system name on stdout, and
+# exits with 0. Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help" >&2
+ exit 1 ;;
+ * )
+ break ;;
+ esac
+done
+
+if test $# != 0; then
+ echo "$me: too many arguments$help" >&2
+ exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,) echo "int x;" > $dummy.c ;
+ for c in cc gcc c89 c99 ; do
+ if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+ CC_FOR_BUILD="$c"; break ;
+ fi ;
+ done ;
+ if test x"$CC_FOR_BUILD" = x ; then
+ CC_FOR_BUILD=no_compiler_found ;
+ fi
+ ;;
+ ,,*) CC_FOR_BUILD=$CC ;;
+ ,*,*) CC_FOR_BUILD=$HOST_CC ;;
+esac ; set_cc_for_build= ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi@noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+ PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+ *:NetBSD:*:*)
+ # NetBSD (nbsd) targets should (where applicable) match one or
+ # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+ # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
+ # switched to ELF, *-*-netbsd* would select the old
+ # object file format. This provides both forward
+ # compatibility and a consistent mechanism for selecting the
+ # object file format.
+ #
+ # Note: NetBSD doesn't particularly care about the vendor
+ # portion of the name. We always set it to "unknown".
+ sysctl="sysctl -n hw.machine_arch"
+ UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+ /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+ case "${UNAME_MACHINE_ARCH}" in
+ armeb) machine=armeb-unknown ;;
+ arm*) machine=arm-unknown ;;
+ sh3el) machine=shl-unknown ;;
+ sh3eb) machine=sh-unknown ;;
+ sh5el) machine=sh5le-unknown ;;
+ *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+ esac
+ # The Operating System including object format, if it has switched
+ # to ELF recently, or will in the future.
+ case "${UNAME_MACHINE_ARCH}" in
+ arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+ eval $set_cc_for_build
+ if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+ | grep __ELF__ >/dev/null
+ then
+ # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+ # Return netbsd for either. FIX?
+ os=netbsd
+ else
+ os=netbsdelf
+ fi
+ ;;
+ *)
+ os=netbsd
+ ;;
+ esac
+ # The OS release
+ # Debian GNU/NetBSD machines have a different userland, and
+ # thus, need a distinct triplet. However, they do not need
+ # kernel version information, so it can be replaced with a
+ # suitable tag, in the style of linux-gnu.
+ case "${UNAME_VERSION}" in
+ Debian*)
+ release='-gnu'
+ ;;
+ *)
+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+ ;;
+ esac
+ # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+ # contains redundant information, the shorter form:
+ # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+ echo "${machine}-${os}${release}"
+ exit ;;
+ *:OpenBSD:*:*)
+ UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
+ echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
+ exit ;;
+ *:ekkoBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
+ exit ;;
+ *:SolidBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE}
+ exit ;;
+ macppc:MirBSD:*:*)
+ echo powerpc-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ *:MirBSD:*:*)
+ echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE}
+ exit ;;
+ alpha:OSF1:*:*)
+ case $UNAME_RELEASE in
+ *4.0)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+ ;;
+ *5.*)
+ UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'`
+ ;;
+ esac
+ # According to Compaq, /usr/sbin/psrinfo has been available on
+ # OSF/1 and Tru64 systems produced since 1995. I hope that
+ # covers most systems running today. This code pipes the CPU
+ # types through head -n 1, so we only detect the type of CPU 0.
+ ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+ case "$ALPHA_CPU_TYPE" in
+ "EV4 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "EV4.5 (21064)")
+ UNAME_MACHINE="alpha" ;;
+ "LCA4 (21066/21068)")
+ UNAME_MACHINE="alpha" ;;
+ "EV5 (21164)")
+ UNAME_MACHINE="alphaev5" ;;
+ "EV5.6 (21164A)")
+ UNAME_MACHINE="alphaev56" ;;
+ "EV5.6 (21164PC)")
+ UNAME_MACHINE="alphapca56" ;;
+ "EV5.7 (21164PC)")
+ UNAME_MACHINE="alphapca57" ;;
+ "EV6 (21264)")
+ UNAME_MACHINE="alphaev6" ;;
+ "EV6.7 (21264A)")
+ UNAME_MACHINE="alphaev67" ;;
+ "EV6.8CB (21264C)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8AL (21264B)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.8CX (21264D)")
+ UNAME_MACHINE="alphaev68" ;;
+ "EV6.9A (21264/EV69A)")
+ UNAME_MACHINE="alphaev69" ;;
+ "EV7 (21364)")
+ UNAME_MACHINE="alphaev7" ;;
+ "EV7.9 (21364A)")
+ UNAME_MACHINE="alphaev79" ;;
+ esac
+ # A Pn.n version is a patched version.
+ # A Vn.n version is a released version.
+ # A Tn.n version is a released field test version.
+ # A Xn.n version is an unreleased experimental baselevel.
+ # 1.2 uses "1.2" for uname -r.
+ echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ exit ;;
+ Alpha\ *:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # Should we change UNAME_MACHINE based on the output of uname instead
+ # of the specific Alpha model?
+ echo alpha-pc-interix
+ exit ;;
+ 21064:Windows_NT:50:3)
+ echo alpha-dec-winnt3.5
+ exit ;;
+ Amiga*:UNIX_System_V:4.0:*)
+ echo m68k-unknown-sysv4
+ exit ;;
+ *:[Aa]miga[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-amigaos
+ exit ;;
+ *:[Mm]orph[Oo][Ss]:*:*)
+ echo ${UNAME_MACHINE}-unknown-morphos
+ exit ;;
+ *:OS/390:*:*)
+ echo i370-ibm-openedition
+ exit ;;
+ *:z/VM:*:*)
+ echo s390-ibm-zvmoe
+ exit ;;
+ *:OS400:*:*)
+ echo powerpc-ibm-os400
+ exit ;;
+ arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+ echo arm-acorn-riscix${UNAME_RELEASE}
+ exit ;;
+ arm:riscos:*:*|arm:RISCOS:*:*)
+ echo arm-unknown-riscos
+ exit ;;
+ SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+ echo hppa1.1-hitachi-hiuxmpp
+ exit ;;
+ Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+ # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+ if test "`(/bin/universe) 2>/dev/null`" = att ; then
+ echo pyramid-pyramid-sysv3
+ else
+ echo pyramid-pyramid-bsd
+ fi
+ exit ;;
+ NILE*:*:*:dcosx)
+ echo pyramid-pyramid-svr4
+ exit ;;
+ DRS?6000:unix:4.0:6*)
+ echo sparc-icl-nx6
+ exit ;;
+ DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*)
+ case `/usr/bin/uname -p` in
+ sparc) echo sparc-icl-nx7; exit ;;
+ esac ;;
+ sun4H:SunOS:5.*:*)
+ echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+ echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ i86pc:SunOS:5.*:*)
+ echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:6*:*)
+ # According to config.sub, this is the proper way to canonicalize
+ # SunOS6. Hard to guess exactly what SunOS6 will be like, but
+ # it's likely to be more like Solaris than SunOS4.
+ echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ sun4*:SunOS:*:*)
+ case "`/usr/bin/arch -k`" in
+ Series*|S4*)
+ UNAME_RELEASE=`uname -v`
+ ;;
+ esac
+ # Japanese Language versions have a version number like `4.1.3-JL'.
+ echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+ exit ;;
+ sun3*:SunOS:*:*)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ exit ;;
+ sun*:*:4.2BSD:*)
+ UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+ test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+ case "`/bin/arch`" in
+ sun3)
+ echo m68k-sun-sunos${UNAME_RELEASE}
+ ;;
+ sun4)
+ echo sparc-sun-sunos${UNAME_RELEASE}
+ ;;
+ esac
+ exit ;;
+ aushp:SunOS:*:*)
+ echo sparc-auspex-sunos${UNAME_RELEASE}
+ exit ;;
+ # The situation for MiNT is a little confusing. The machine name
+ # can be virtually everything (everything which is not
+ # "atarist" or "atariste" at least should have a processor
+ # > m68000). The system name ranges from "MiNT" over "FreeMiNT"
+ # to the lowercase version "mint" (or "freemint"). Finally
+ # the system name "TOS" denotes a system which is actually not
+ # MiNT. But MiNT is downward compatible to TOS, so this should
+ # be no problem.
+ atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+ echo m68k-atari-mint${UNAME_RELEASE}
+ exit ;;
+ milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+ echo m68k-milan-mint${UNAME_RELEASE}
+ exit ;;
+ hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+ echo m68k-hades-mint${UNAME_RELEASE}
+ exit ;;
+ *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+ echo m68k-unknown-mint${UNAME_RELEASE}
+ exit ;;
+ m68k:machten:*:*)
+ echo m68k-apple-machten${UNAME_RELEASE}
+ exit ;;
+ powerpc:machten:*:*)
+ echo powerpc-apple-machten${UNAME_RELEASE}
+ exit ;;
+ RISC*:Mach:*:*)
+ echo mips-dec-mach_bsd4.3
+ exit ;;
+ RISC*:ULTRIX:*:*)
+ echo mips-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ VAX*:ULTRIX*:*:*)
+ echo vax-dec-ultrix${UNAME_RELEASE}
+ exit ;;
+ 2020:CLIX:*:* | 2430:CLIX:*:*)
+ echo clipper-intergraph-clix${UNAME_RELEASE}
+ exit ;;
+ mips:*:*:UMIPS | mips:*:*:RISCos)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h> /* for printf() prototype */
+ int main (int argc, char *argv[]) {
+#else
+ int main (argc, argv) int argc; char *argv[]; {
+#endif
+ #if defined (host_mips) && defined (MIPSEB)
+ #if defined (SYSTYPE_SYSV)
+ printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_SVR4)
+ printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+ #endif
+ #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+ printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+ #endif
+ #endif
+ exit (-1);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c &&
+ dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` &&
+ SYSTEM_NAME=`$dummy $dummyarg` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo mips-mips-riscos${UNAME_RELEASE}
+ exit ;;
+ Motorola:PowerMAX_OS:*:*)
+ echo powerpc-motorola-powermax
+ exit ;;
+ Motorola:*:4.3:PL8-*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+ echo powerpc-harris-powermax
+ exit ;;
+ Night_Hawk:Power_UNIX:*:*)
+ echo powerpc-harris-powerunix
+ exit ;;
+ m88k:CX/UX:7*:*)
+ echo m88k-harris-cxux7
+ exit ;;
+ m88k:*:4*:R4*)
+ echo m88k-motorola-sysv4
+ exit ;;
+ m88k:*:3*:R3*)
+ echo m88k-motorola-sysv3
+ exit ;;
+ AViiON:dgux:*:*)
+ # DG/UX returns AViiON for all architectures
+ UNAME_PROCESSOR=`/usr/bin/uname -p`
+ if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+ then
+ if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+ [ ${TARGET_BINARY_INTERFACE}x = x ]
+ then
+ echo m88k-dg-dgux${UNAME_RELEASE}
+ else
+ echo m88k-dg-dguxbcs${UNAME_RELEASE}
+ fi
+ else
+ echo i586-dg-dgux${UNAME_RELEASE}
+ fi
+ exit ;;
+ M88*:DolphinOS:*:*) # DolphinOS (SVR3)
+ echo m88k-dolphin-sysv3
+ exit ;;
+ M88*:*:R3*:*)
+ # Delta 88k system running SVR3
+ echo m88k-motorola-sysv3
+ exit ;;
+ XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+ echo m88k-tektronix-sysv3
+ exit ;;
+ Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+ echo m68k-tektronix-bsd
+ exit ;;
+ *:IRIX*:*:*)
+ echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+ exit ;;
+ ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+ echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id
+ exit ;; # Note that: echo "'`uname -s`'" gives 'AIX '
+ i*86:AIX:*:*)
+ echo i386-ibm-aix
+ exit ;;
+ ia64:AIX:*:*)
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:2:3)
+ if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <sys/systemcfg.h>
+
+ main()
+ {
+ if (!__power_pc())
+ exit(1);
+ puts("powerpc-ibm-aix3.2.5");
+ exit(0);
+ }
+EOF
+ if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy`
+ then
+ echo "$SYSTEM_NAME"
+ else
+ echo rs6000-ibm-aix3.2.5
+ fi
+ elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+ echo rs6000-ibm-aix3.2.4
+ else
+ echo rs6000-ibm-aix3.2
+ fi
+ exit ;;
+ *:AIX:*:[45])
+ IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+ if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+ IBM_ARCH=rs6000
+ else
+ IBM_ARCH=powerpc
+ fi
+ if [ -x /usr/bin/oslevel ] ; then
+ IBM_REV=`/usr/bin/oslevel`
+ else
+ IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+ fi
+ echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+ exit ;;
+ *:AIX:*:*)
+ echo rs6000-ibm-aix
+ exit ;;
+ ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+ echo romp-ibm-bsd4.4
+ exit ;;
+ ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and
+ echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to
+ exit ;; # report: romp-ibm BSD 4.3
+ *:BOSX:*:*)
+ echo rs6000-bull-bosx
+ exit ;;
+ DPX/2?00:B.O.S.:*:*)
+ echo m68k-bull-sysv3
+ exit ;;
+ 9000/[34]??:4.3bsd:1.*:*)
+ echo m68k-hp-bsd
+ exit ;;
+ hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+ echo m68k-hp-bsd4.4
+ exit ;;
+ 9000/[34678]??:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ case "${UNAME_MACHINE}" in
+ 9000/31? ) HP_ARCH=m68000 ;;
+ 9000/[34]?? ) HP_ARCH=m68k ;;
+ 9000/[678][0-9][0-9])
+ if [ -x /usr/bin/getconf ]; then
+ sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+ sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+ case "${sc_cpu_version}" in
+ 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+ 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+ 532) # CPU_PA_RISC2_0
+ case "${sc_kernel_bits}" in
+ 32) HP_ARCH="hppa2.0n" ;;
+ 64) HP_ARCH="hppa2.0w" ;;
+ '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
+ esac ;;
+ esac
+ fi
+ if [ "${HP_ARCH}" = "" ]; then
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+
+ #define _HPUX_SOURCE
+ #include <stdlib.h>
+ #include <unistd.h>
+
+ int main ()
+ {
+ #if defined(_SC_KERNEL_BITS)
+ long bits = sysconf(_SC_KERNEL_BITS);
+ #endif
+ long cpu = sysconf (_SC_CPU_VERSION);
+
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+ case CPU_PA_RISC2_0:
+ #if defined(_SC_KERNEL_BITS)
+ switch (bits)
+ {
+ case 64: puts ("hppa2.0w"); break;
+ case 32: puts ("hppa2.0n"); break;
+ default: puts ("hppa2.0"); break;
+ } break;
+ #else /* !defined(_SC_KERNEL_BITS) */
+ puts ("hppa2.0"); break;
+ #endif
+ default: puts ("hppa1.0"); break;
+ }
+ exit (0);
+ }
+EOF
+ (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+ test -z "$HP_ARCH" && HP_ARCH=hppa
+ fi ;;
+ esac
+ if [ ${HP_ARCH} = "hppa2.0w" ]
+ then
+ eval $set_cc_for_build
+
+ # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating
+ # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler
+ # generating 64-bit code. GNU and HP use different nomenclature:
+ #
+ # $ CC_FOR_BUILD=cc ./config.guess
+ # => hppa2.0w-hp-hpux11.23
+ # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess
+ # => hppa64-hp-hpux11.23
+
+ if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) |
+ grep __LP64__ >/dev/null
+ then
+ HP_ARCH="hppa2.0w"
+ else
+ HP_ARCH="hppa64"
+ fi
+ fi
+ echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+ exit ;;
+ ia64:HP-UX:*:*)
+ HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+ echo ia64-hp-hpux${HPUX_REV}
+ exit ;;
+ 3050*:HI-UX:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <unistd.h>
+ int
+ main ()
+ {
+ long cpu = sysconf (_SC_CPU_VERSION);
+ /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+ true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct
+ results, however. */
+ if (CPU_IS_PA_RISC (cpu))
+ {
+ switch (cpu)
+ {
+ case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+ case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+ default: puts ("hppa-hitachi-hiuxwe2"); break;
+ }
+ }
+ else if (CPU_IS_HP_MC68K (cpu))
+ puts ("m68k-hitachi-hiuxwe2");
+ else puts ("unknown-hitachi-hiuxwe2");
+ exit (0);
+ }
+EOF
+ $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+ echo unknown-hitachi-hiuxwe2
+ exit ;;
+ 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+ echo hppa1.1-hp-bsd
+ exit ;;
+ 9000/8??:4.3bsd:*:*)
+ echo hppa1.0-hp-bsd
+ exit ;;
+ *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+ echo hppa1.0-hp-mpeix
+ exit ;;
+ hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+ echo hppa1.1-hp-osf
+ exit ;;
+ hp8??:OSF1:*:*)
+ echo hppa1.0-hp-osf
+ exit ;;
+ i*86:OSF1:*:*)
+ if [ -x /usr/sbin/sysversion ] ; then
+ echo ${UNAME_MACHINE}-unknown-osf1mk
+ else
+ echo ${UNAME_MACHINE}-unknown-osf1
+ fi
+ exit ;;
+ parisc*:Lites*:*:*)
+ echo hppa1.1-hp-lites
+ exit ;;
+ C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+ echo c1-convex-bsd
+ exit ;;
+ C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+ echo c34-convex-bsd
+ exit ;;
+ C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+ echo c38-convex-bsd
+ exit ;;
+ C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+ echo c4-convex-bsd
+ exit ;;
+ CRAY*Y-MP:*:*:*)
+ echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*[A-Z]90:*:*:*)
+ echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+ -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*TS:*:*:*)
+ echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*T3E:*:*:*)
+ echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ CRAY*SV1:*:*:*)
+ echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ *:UNICOS/mp:*:*)
+ echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+ exit ;;
+ F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+ FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+ echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ 5000:UNIX_System_V:4.*:*)
+ FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+ FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'`
+ echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+ exit ;;
+ i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+ echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+ exit ;;
+ sparc*:BSD/OS:*:*)
+ echo sparc-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:BSD/OS:*:*)
+ echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+ exit ;;
+ *:FreeBSD:*:*)
+ case ${UNAME_MACHINE} in
+ pc98)
+ echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ amd64)
+ echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ *)
+ echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;;
+ esac
+ exit ;;
+ i*:CYGWIN*:*)
+ echo ${UNAME_MACHINE}-pc-cygwin
+ exit ;;
+ *:MINGW*:*)
+ echo ${UNAME_MACHINE}-pc-mingw32
+ exit ;;
+ i*:windows32*:*)
+ # uname -m includes "-pc" on this system.
+ echo ${UNAME_MACHINE}-mingw32
+ exit ;;
+ i*:PW*:*)
+ echo ${UNAME_MACHINE}-pc-pw32
+ exit ;;
+ *:Interix*:[3456]*)
+ case ${UNAME_MACHINE} in
+ x86)
+ echo i586-pc-interix${UNAME_RELEASE}
+ exit ;;
+ EM64T | authenticamd)
+ echo x86_64-unknown-interix${UNAME_RELEASE}
+ exit ;;
+ esac ;;
+ [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+ echo i${UNAME_MACHINE}-pc-mks
+ exit ;;
+ i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+ # How do we know it's Interix rather than the generic POSIX subsystem?
+ # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+ # UNAME_MACHINE based on the output of uname instead of i386?
+ echo i586-pc-interix
+ exit ;;
+ i*:UWIN*:*)
+ echo ${UNAME_MACHINE}-pc-uwin
+ exit ;;
+ amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
+ echo x86_64-unknown-cygwin
+ exit ;;
+ p*:CYGWIN*:*)
+ echo powerpcle-unknown-cygwin
+ exit ;;
+ prep*:SunOS:5.*:*)
+ echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+ exit ;;
+ *:GNU:*:*)
+ # the GNU system
+ echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+ exit ;;
+ *:GNU/*:*:*)
+ # other systems with GNU libc and userland
+ echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu
+ exit ;;
+ i*86:Minix:*:*)
+ echo ${UNAME_MACHINE}-pc-minix
+ exit ;;
+ arm*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ avr32*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ cris:Linux:*:*)
+ echo cris-axis-linux-gnu
+ exit ;;
+ crisv32:Linux:*:*)
+ echo crisv32-axis-linux-gnu
+ exit ;;
+ frv:Linux:*:*)
+ echo frv-unknown-linux-gnu
+ exit ;;
+ ia64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m32r*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ m68*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ mips:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips
+ #undef mipsel
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mipsel
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ mips64:Linux:*:*)
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #undef CPU
+ #undef mips64
+ #undef mips64el
+ #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+ CPU=mips64el
+ #else
+ #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+ CPU=mips64
+ #else
+ CPU=
+ #endif
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^CPU/{
+ s: ::g
+ p
+ }'`"
+ test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; }
+ ;;
+ or32:Linux:*:*)
+ echo or32-unknown-linux-gnu
+ exit ;;
+ ppc:Linux:*:*)
+ echo powerpc-unknown-linux-gnu
+ exit ;;
+ ppc64:Linux:*:*)
+ echo powerpc64-unknown-linux-gnu
+ exit ;;
+ alpha:Linux:*:*)
+ case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+ EV5) UNAME_MACHINE=alphaev5 ;;
+ EV56) UNAME_MACHINE=alphaev56 ;;
+ PCA56) UNAME_MACHINE=alphapca56 ;;
+ PCA57) UNAME_MACHINE=alphapca56 ;;
+ EV6) UNAME_MACHINE=alphaev6 ;;
+ EV67) UNAME_MACHINE=alphaev67 ;;
+ EV68*) UNAME_MACHINE=alphaev68 ;;
+ esac
+ objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+ if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+ echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+ exit ;;
+ parisc:Linux:*:* | hppa:Linux:*:*)
+ # Look for CPU level
+ case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+ PA7*) echo hppa1.1-unknown-linux-gnu ;;
+ PA8*) echo hppa2.0-unknown-linux-gnu ;;
+ *) echo hppa-unknown-linux-gnu ;;
+ esac
+ exit ;;
+ parisc64:Linux:*:* | hppa64:Linux:*:*)
+ echo hppa64-unknown-linux-gnu
+ exit ;;
+ s390:Linux:*:* | s390x:Linux:*:*)
+ echo ${UNAME_MACHINE}-ibm-linux
+ exit ;;
+ sh64*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sh*:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ sparc:Linux:*:* | sparc64:Linux:*:*)
+ echo ${UNAME_MACHINE}-unknown-linux-gnu
+ exit ;;
+ vax:Linux:*:*)
+ echo ${UNAME_MACHINE}-dec-linux-gnu
+ exit ;;
+ x86_64:Linux:*:*)
+ echo x86_64-unknown-linux-gnu
+ exit ;;
+ xtensa:Linux:*:*)
+ echo xtensa-unknown-linux-gnu
+ exit ;;
+ i*86:Linux:*:*)
+ # The BFD linker knows what the default object file format is, so
+ # first see if it will tell us. cd to the root directory to prevent
+ # problems with other programs or directories called `ld' in the path.
+ # Set LC_ALL=C to ensure ld outputs messages in English.
+ ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+ | sed -ne '/supported targets:/!d
+ s/[ ][ ]*/ /g
+ s/.*supported targets: *//
+ s/ .*//
+ p'`
+ case "$ld_supported_targets" in
+ elf32-i386)
+ TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+ ;;
+ a.out-i386-linux)
+ echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+ exit ;;
+ coff-i386)
+ echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+ exit ;;
+ "")
+ # Either a pre-BFD a.out linker (linux-gnuoldld) or
+ # one that does not give us useful --help.
+ echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+ exit ;;
+ esac
+ # Determine whether the default compiler is a.out or elf
+ eval $set_cc_for_build
+ sed 's/^ //' << EOF >$dummy.c
+ #include <features.h>
+ #ifdef __ELF__
+ # ifdef __GLIBC__
+ # if __GLIBC__ >= 2
+ LIBC=gnu
+ # else
+ LIBC=gnulibc1
+ # endif
+ # else
+ LIBC=gnulibc1
+ # endif
+ #else
+ #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ LIBC=gnu
+ #else
+ LIBC=gnuaout
+ #endif
+ #endif
+ #ifdef __dietlibc__
+ LIBC=dietlibc
+ #endif
+EOF
+ eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n '
+ /^LIBC/{
+ s: ::g
+ p
+ }'`"
+ test x"${LIBC}" != x && {
+ echo "${UNAME_MACHINE}-pc-linux-${LIBC}"
+ exit
+ }
+ test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; }
+ ;;
+ i*86:DYNIX/ptx:4*:*)
+ # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+ # earlier versions are messed up and put the nodename in both
+ # sysname and nodename.
+ echo i386-sequent-sysv4
+ exit ;;
+ i*86:UNIX_SV:4.2MP:2.*)
+ # Unixware is an offshoot of SVR4, but it has its own version
+ # number series starting with 2...
+ # I am not positive that other SVR4 systems won't match this,
+ # I just have to hope. -- rms.
+ # Use sysv4.2uw... so that sysv4* matches it.
+ echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+ exit ;;
+ i*86:OS/2:*:*)
+ # If we were able to find `uname', then EMX Unix compatibility
+ # is probably installed.
+ echo ${UNAME_MACHINE}-pc-os2-emx
+ exit ;;
+ i*86:XTS-300:*:STOP)
+ echo ${UNAME_MACHINE}-unknown-stop
+ exit ;;
+ i*86:atheos:*:*)
+ echo ${UNAME_MACHINE}-unknown-atheos
+ exit ;;
+ i*86:syllable:*:*)
+ echo ${UNAME_MACHINE}-pc-syllable
+ exit ;;
+ i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+ echo i386-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ i*86:*DOS:*:*)
+ echo ${UNAME_MACHINE}-pc-msdosdjgpp
+ exit ;;
+ i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+ UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+ if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+ echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+ else
+ echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+ fi
+ exit ;;
+ i*86:*:5:[678]*)
+ # UnixWare 7.x, OpenUNIX and OpenServer 6.
+ case `/bin/uname -X | grep "^Machine"` in
+ *486*) UNAME_MACHINE=i486 ;;
+ *Pentium) UNAME_MACHINE=i586 ;;
+ *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+ esac
+ echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+ exit ;;
+ i*86:*:3.2:*)
+ if test -f /usr/options/cb.name; then
+ UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+ echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+ elif /bin/uname -X 2>/dev/null >/dev/null ; then
+ UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+ (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+ (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+ && UNAME_MACHINE=i586
+ (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+ && UNAME_MACHINE=i686
+ (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+ && UNAME_MACHINE=i686
+ echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+ else
+ echo ${UNAME_MACHINE}-pc-sysv32
+ fi
+ exit ;;
+ pc:*:*:*)
+ # Left here for compatibility:
+ # uname -m prints for DJGPP always 'pc', but it prints nothing about
+ # the processor, so we play safe by assuming i386.
+ echo i386-pc-msdosdjgpp
+ exit ;;
+ Intel:Mach:3*:*)
+ echo i386-pc-mach3
+ exit ;;
+ paragon:*:*:*)
+ echo i860-intel-osf1
+ exit ;;
+ i860:*:4.*:*) # i860-SVR4
+ if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+ echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+ else # Add other i860-SVR4 vendors below as they are discovered.
+ echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4
+ fi
+ exit ;;
+ mini*:CTIX:SYS*5:*)
+ # "miniframe"
+ echo m68010-convergent-sysv
+ exit ;;
+ mc68k:UNIX:SYSTEM5:3.51m)
+ echo m68k-convergent-sysv
+ exit ;;
+ M680?0:D-NIX:5.3:*)
+ echo m68k-diab-dnix
+ exit ;;
+ M68*:*:R3V[5678]*:*)
+ test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;;
+ 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0)
+ OS_REL=''
+ test -r /etc/.relid \
+ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+ /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
+ 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+ /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+ && { echo i486-ncr-sysv4; exit; } ;;
+ m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+ echo m68k-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ mc68030:UNIX_System_V:4.*:*)
+ echo m68k-atari-sysv4
+ exit ;;
+ TSUNAMI:LynxOS:2.*:*)
+ echo sparc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ rs6000:LynxOS:2.*:*)
+ echo rs6000-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+ echo powerpc-unknown-lynxos${UNAME_RELEASE}
+ exit ;;
+ SM[BE]S:UNIX_SV:*:*)
+ echo mips-dde-sysv${UNAME_RELEASE}
+ exit ;;
+ RM*:ReliantUNIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ RM*:SINIX-*:*:*)
+ echo mips-sni-sysv4
+ exit ;;
+ *:SINIX-*:*:*)
+ if uname -p 2>/dev/null >/dev/null ; then
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ echo ${UNAME_MACHINE}-sni-sysv4
+ else
+ echo ns32k-sni-sysv
+ fi
+ exit ;;
+ PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+ # says <Richard.M.Bartel@ccMail.Census.GOV>
+ echo i586-unisys-sysv4
+ exit ;;
+ *:UNIX_System_V:4*:FTX*)
+ # From Gerald Hewes <hewes@openmarket.com>.
+ # How about differentiating between stratus architectures? -djm
+ echo hppa1.1-stratus-sysv4
+ exit ;;
+ *:*:*:FTX*)
+ # From seanf@swdc.stratus.com.
+ echo i860-stratus-sysv4
+ exit ;;
+ i*86:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo ${UNAME_MACHINE}-stratus-vos
+ exit ;;
+ *:VOS:*:*)
+ # From Paul.Green@stratus.com.
+ echo hppa1.1-stratus-vos
+ exit ;;
+ mc68*:A/UX:*:*)
+ echo m68k-apple-aux${UNAME_RELEASE}
+ exit ;;
+ news*:NEWS-OS:6*:*)
+ echo mips-sony-newsos6
+ exit ;;
+ R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+ if [ -d /usr/nec ]; then
+ echo mips-nec-sysv${UNAME_RELEASE}
+ else
+ echo mips-unknown-sysv${UNAME_RELEASE}
+ fi
+ exit ;;
+ BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only.
+ echo powerpc-be-beos
+ exit ;;
+ BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only.
+ echo powerpc-apple-beos
+ exit ;;
+ BePC:BeOS:*:*) # BeOS running on Intel PC compatible.
+ echo i586-pc-beos
+ exit ;;
+ SX-4:SUPER-UX:*:*)
+ echo sx4-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-5:SUPER-UX:*:*)
+ echo sx5-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-6:SUPER-UX:*:*)
+ echo sx6-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-7:SUPER-UX:*:*)
+ echo sx7-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8:SUPER-UX:*:*)
+ echo sx8-nec-superux${UNAME_RELEASE}
+ exit ;;
+ SX-8R:SUPER-UX:*:*)
+ echo sx8r-nec-superux${UNAME_RELEASE}
+ exit ;;
+ Power*:Rhapsody:*:*)
+ echo powerpc-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Rhapsody:*:*)
+ echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+ exit ;;
+ *:Darwin:*:*)
+ UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown
+ case $UNAME_PROCESSOR in
+ unknown) UNAME_PROCESSOR=powerpc ;;
+ esac
+ echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+ exit ;;
+ *:procnto*:*:* | *:QNX:[0123456789]*:*)
+ UNAME_PROCESSOR=`uname -p`
+ if test "$UNAME_PROCESSOR" = "x86"; then
+ UNAME_PROCESSOR=i386
+ UNAME_MACHINE=pc
+ fi
+ echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+ exit ;;
+ *:QNX:*:4*)
+ echo i386-pc-qnx
+ exit ;;
+ NSE-?:NONSTOP_KERNEL:*:*)
+ echo nse-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ NSR-?:NONSTOP_KERNEL:*:*)
+ echo nsr-tandem-nsk${UNAME_RELEASE}
+ exit ;;
+ *:NonStop-UX:*:*)
+ echo mips-compaq-nonstopux
+ exit ;;
+ BS2000:POSIX*:*:*)
+ echo bs2000-siemens-sysv
+ exit ;;
+ DS/*:UNIX_System_V:*:*)
+ echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+ exit ;;
+ *:Plan9:*:*)
+ # "uname -m" is not consistent, so use $cputype instead. 386
+ # is converted to i386 for consistency with other x86
+ # operating systems.
+ if test "$cputype" = "386"; then
+ UNAME_MACHINE=i386
+ else
+ UNAME_MACHINE="$cputype"
+ fi
+ echo ${UNAME_MACHINE}-unknown-plan9
+ exit ;;
+ *:TOPS-10:*:*)
+ echo pdp10-unknown-tops10
+ exit ;;
+ *:TENEX:*:*)
+ echo pdp10-unknown-tenex
+ exit ;;
+ KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+ echo pdp10-dec-tops20
+ exit ;;
+ XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+ echo pdp10-xkl-tops20
+ exit ;;
+ *:TOPS-20:*:*)
+ echo pdp10-unknown-tops20
+ exit ;;
+ *:ITS:*:*)
+ echo pdp10-unknown-its
+ exit ;;
+ SEI:*:*:SEIUX)
+ echo mips-sei-seiux${UNAME_RELEASE}
+ exit ;;
+ *:DragonFly:*:*)
+ echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
+ exit ;;
+ *:*VMS:*:*)
+ UNAME_MACHINE=`(uname -p) 2>/dev/null`
+ case "${UNAME_MACHINE}" in
+ A*) echo alpha-dec-vms ; exit ;;
+ I*) echo ia64-dec-vms ; exit ;;
+ V*) echo vax-dec-vms ; exit ;;
+ esac ;;
+ *:XENIX:*:SysV)
+ echo i386-pc-xenix
+ exit ;;
+ i*86:skyos:*:*)
+ echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//'
+ exit ;;
+ i*86:rdos:*:*)
+ echo ${UNAME_MACHINE}-pc-rdos
+ exit ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+ /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed,
+ I don't know.... */
+ printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+ printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+ "4"
+#else
+ ""
+#endif
+ ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+ printf ("arm-acorn-riscix\n"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+ printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+ int version;
+ version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+ if (version < 4)
+ printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+ else
+ printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+ exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+ printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+ printf ("ns32k-encore-mach\n"); exit (0);
+#else
+ printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+ printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+ printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+ printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+ struct utsname un;
+
+ uname(&un);
+
+ if (strncmp(un.version, "V2", 2) == 0) {
+ printf ("i386-sequent-ptx2\n"); exit (0);
+ }
+ if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+ printf ("i386-sequent-ptx1\n"); exit (0);
+ }
+ printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+# include <sys/param.h>
+# if defined (BSD)
+# if BSD == 43
+ printf ("vax-dec-bsd4.3\n"); exit (0);
+# else
+# if BSD == 199006
+ printf ("vax-dec-bsd4.3reno\n"); exit (0);
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# endif
+# else
+ printf ("vax-dec-bsd\n"); exit (0);
+# endif
+# else
+ printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+ printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+ exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` &&
+ { echo "$SYSTEM_NAME"; exit; }
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+ case `getsysinfo -f cpu_type` in
+ c1*)
+ echo c1-convex-bsd
+ exit ;;
+ c2*)
+ if getsysinfo -f scalar_acc
+ then echo c32-convex-bsd
+ else echo c2-convex-bsd
+ fi
+ exit ;;
+ c34*)
+ echo c34-convex-bsd
+ exit ;;
+ c38*)
+ echo c38-convex-bsd
+ exit ;;
+ c4*)
+ echo c4-convex-bsd
+ exit ;;
+ esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.guess
+and
+ http://savannah.gnu.org/cgi-bin/viewcvs/*checkout*/config/config/config.sub
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches@gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo = `(hostinfo) 2>/dev/null`
+/bin/universe = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/config.rpath b/config.rpath
new file mode 100755
index 0000000..3f1bef3
--- /dev/null
+++ b/config.rpath
@@ -0,0 +1,571 @@
+#! /bin/sh
+# Output a system dependent set of variables, describing how to set the
+# run time search path of shared libraries in an executable.
+#
+# Copyright 1996-2005 Free Software Foundation, Inc.
+# Taken from GNU libtool, 2001
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+#
+# The first argument passed to this file is the canonical host specification,
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
+# should be set by the caller.
+#
+# The set of defined variables is at the end of this script.
+
+# Known limitations:
+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
+# than 256 bytes, otherwise the compiler driver will dump core. The only
+# known workaround is to choose shorter directory names for the build
+# directory and/or the installation directory.
+
+# All known linkers require a `.a' archive for static linking (except M$VC,
+# which needs '.lib').
+libext=a
+shrext=.so
+
+host="$1"
+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+cc_basename=`echo "$CC" | sed -e 's%^.*/%%'`
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
+
+wl=
+if test "$GCC" = yes; then
+ wl='-Wl,'
+else
+ case "$host_os" in
+ aix*)
+ wl='-Wl,'
+ ;;
+ darwin*)
+ case "$cc_basename" in
+ xlc*)
+ wl='-Wl,'
+ ;;
+ esac
+ ;;
+ mingw* | pw32* | os2*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ wl='-Wl,'
+ ;;
+ irix5* | irix6* | nonstopux*)
+ wl='-Wl,'
+ ;;
+ newsos6)
+ ;;
+ linux*)
+ case $cc_basename in
+ icc* | ecc*)
+ wl='-Wl,'
+ ;;
+ pgcc | pgf77 | pgf90)
+ wl='-Wl,'
+ ;;
+ ccc*)
+ wl='-Wl,'
+ ;;
+ como)
+ wl='-lopt='
+ ;;
+ esac
+ ;;
+ osf3* | osf4* | osf5*)
+ wl='-Wl,'
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ wl='-Wl,'
+ ;;
+ sunos4*)
+ wl='-Qoption ld '
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ wl='-Wl,'
+ ;;
+ sysv4*MP*)
+ ;;
+ unicos*)
+ wl='-Wl,'
+ ;;
+ uts4*)
+ ;;
+ esac
+fi
+
+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
+
+hardcode_libdir_flag_spec=
+hardcode_libdir_separator=
+hardcode_direct=no
+hardcode_minus_L=no
+
+case "$host_os" in
+ cygwin* | mingw* | pw32*)
+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ if test "$GCC" != yes; then
+ with_gnu_ld=no
+ fi
+ ;;
+ openbsd*)
+ with_gnu_ld=no
+ ;;
+esac
+
+ld_shlibs=yes
+if test "$with_gnu_ld" = yes; then
+ case "$host_os" in
+ aix3* | aix4* | aix5*)
+ # On AIX/PPC, the GNU linker is very broken
+ if test "$host_cpu" != ia64; then
+ ld_shlibs=no
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
+ # that the semantics of dynamic libraries on AmigaOS, at least up
+ # to version 4, is to share data among multiple programs linked
+ # with the same dynamic library. Since this doesn't match the
+ # behavior of shared libraries on other platforms, we cannot use
+ # them.
+ ld_shlibs=no
+ ;;
+ beos*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ cygwin* | mingw* | pw32*)
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec='-L$libdir'
+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ netbsd*)
+ ;;
+ solaris* | sysv5*)
+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
+ ld_shlibs=no
+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ sunos4*)
+ hardcode_direct=yes
+ ;;
+ linux*)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ *)
+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
+ :
+ else
+ ld_shlibs=no
+ fi
+ ;;
+ esac
+ if test "$ld_shlibs" = yes; then
+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
+ # option of GNU ld is called -rpath, not --rpath.
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ fi
+else
+ case "$host_os" in
+ aix3*)
+ # Note: this linker hardcodes the directories in LIBPATH if there
+ # are no directories specified by -L.
+ hardcode_minus_L=yes
+ if test "$GCC" = yes; then
+ # Neither direct hardcoding nor static linking is supported with a
+ # broken collect2.
+ hardcode_direct=unsupported
+ fi
+ ;;
+ aix4* | aix5*)
+ if test "$host_cpu" = ia64; then
+ # On IA64, the linker does run time linking by default, so we don't
+ # have to do anything special.
+ aix_use_runtimelinking=no
+ else
+ aix_use_runtimelinking=no
+ # Test if we are trying to use run time linking or normal
+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
+ # need to do runtime linking.
+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
+ for ld_flag in $LDFLAGS; do
+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
+ aix_use_runtimelinking=yes
+ break
+ fi
+ done
+ esac
+ fi
+ hardcode_direct=yes
+ hardcode_libdir_separator=':'
+ if test "$GCC" = yes; then
+ case $host_os in aix4.[012]|aix4.[012].*)
+ collect2name=`${CC} -print-prog-name=collect2`
+ if test -f "$collect2name" && \
+ strings "$collect2name" | grep resolve_lib_name >/dev/null
+ then
+ # We have reworked collect2
+ hardcode_direct=yes
+ else
+ # We have old collect2
+ hardcode_direct=unsupported
+ hardcode_minus_L=yes
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_libdir_separator=
+ fi
+ esac
+ fi
+ # Begin _LT_AC_SYS_LIBPATH_AIX.
+ echo 'int main () { return 0; }' > conftest.c
+ ${CC} ${LDFLAGS} conftest.c -o conftest
+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ if test -z "$aix_libpath"; then
+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
+}'`
+ fi
+ if test -z "$aix_libpath"; then
+ aix_libpath="/usr/lib:/lib"
+ fi
+ rm -f conftest.c conftest
+ # End _LT_AC_SYS_LIBPATH_AIX.
+ if test "$aix_use_runtimelinking" = yes; then
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ else
+ if test "$host_cpu" = ia64; then
+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
+ else
+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
+ fi
+ fi
+ ;;
+ amigaos*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ # see comment about different semantics on the GNU ld section
+ ld_shlibs=no
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ # When not using gcc, we currently assume that we are using
+ # Microsoft Visual C++.
+ # hardcode_libdir_flag_spec is actually meaningless, as there is
+ # no search path for DLLs.
+ hardcode_libdir_flag_spec=' '
+ libext=lib
+ ;;
+ darwin* | rhapsody*)
+ hardcode_direct=no
+ if test "$GCC" = yes ; then
+ :
+ else
+ case "$cc_basename" in
+ xlc*)
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+ fi
+ ;;
+ dgux*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ freebsd1*)
+ ld_shlibs=no
+ ;;
+ freebsd2.2*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ freebsd2*)
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ freebsd* | kfreebsd*-gnu | dragonfly*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ hpux9*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ hpux10* | hpux11*)
+ if test "$with_gnu_ld" = no; then
+ case "$host_cpu" in
+ hppa*64*)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=no
+ ;;
+ ia64*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=no
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
+ hardcode_libdir_separator=:
+ hardcode_direct=yes
+ # hardcode_minus_L: Not really in the search PATH,
+ # but as the default location of the library.
+ hardcode_minus_L=yes
+ ;;
+ esac
+ fi
+ ;;
+ irix5* | irix6* | nonstopux*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ netbsd*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ hardcode_direct=yes
+ ;;
+ newsos6)
+ hardcode_direct=yes
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ openbsd*)
+ hardcode_direct=yes
+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ else
+ case "$host_os" in
+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ *)
+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
+ ;;
+ esac
+ fi
+ ;;
+ os2*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_minus_L=yes
+ ;;
+ osf3*)
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ hardcode_libdir_separator=:
+ ;;
+ osf4* | osf5*)
+ if test "$GCC" = yes; then
+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
+ else
+ # Both cc and cxx compiler support -rpath directly
+ hardcode_libdir_flag_spec='-rpath $libdir'
+ fi
+ hardcode_libdir_separator=:
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ hardcode_libdir_flag_spec='-R$libdir'
+ ;;
+ sunos4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ hardcode_direct=yes
+ hardcode_minus_L=yes
+ ;;
+ sysv4)
+ case $host_vendor in
+ sni)
+ hardcode_direct=yes # is this really true???
+ ;;
+ siemens)
+ hardcode_direct=no
+ ;;
+ motorola)
+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
+ ;;
+ esac
+ ;;
+ sysv4.3*)
+ ;;
+ sysv4*MP*)
+ if test -d /usr/nec; then
+ ld_shlibs=yes
+ fi
+ ;;
+ sysv4.2uw2*)
+ hardcode_direct=yes
+ hardcode_minus_L=no
+ ;;
+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
+ ;;
+ sysv5*)
+ hardcode_libdir_flag_spec=
+ ;;
+ uts4*)
+ hardcode_libdir_flag_spec='-L$libdir'
+ ;;
+ *)
+ ld_shlibs=no
+ ;;
+ esac
+fi
+
+# Check dynamic linker characteristics
+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
+libname_spec='lib$name'
+case "$host_os" in
+ aix3*)
+ ;;
+ aix4* | aix5*)
+ ;;
+ amigaos*)
+ ;;
+ beos*)
+ ;;
+ bsdi[45]*)
+ ;;
+ cygwin* | mingw* | pw32*)
+ shrext=.dll
+ ;;
+ darwin* | rhapsody*)
+ shrext=.dylib
+ ;;
+ dgux*)
+ ;;
+ freebsd1*)
+ ;;
+ kfreebsd*-gnu)
+ ;;
+ freebsd*)
+ ;;
+ gnu*)
+ ;;
+ hpux9* | hpux10* | hpux11*)
+ case "$host_cpu" in
+ ia64*)
+ shrext=.so
+ ;;
+ hppa*64*)
+ shrext=.sl
+ ;;
+ *)
+ shrext=.sl
+ ;;
+ esac
+ ;;
+ irix5* | irix6* | nonstopux*)
+ case "$host_os" in
+ irix5* | nonstopux*)
+ libsuff= shlibsuff=
+ ;;
+ *)
+ case $LD in
+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
+ *) libsuff= shlibsuff= ;;
+ esac
+ ;;
+ esac
+ ;;
+ linux*oldld* | linux*aout* | linux*coff*)
+ ;;
+ linux*)
+ ;;
+ knetbsd*-gnu)
+ ;;
+ netbsd*)
+ ;;
+ newsos6)
+ ;;
+ nto-qnx*)
+ ;;
+ openbsd*)
+ ;;
+ os2*)
+ libname_spec='$name'
+ shrext=.dll
+ ;;
+ osf3* | osf4* | osf5*)
+ ;;
+ sco3.2v5*)
+ ;;
+ solaris*)
+ ;;
+ sunos4*)
+ ;;
+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
+ ;;
+ sysv4*MP*)
+ ;;
+ uts4*)
+ ;;
+esac
+
+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
+
+LC_ALL=C sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
+
+# How to pass a linker flag through the compiler.
+wl="$escaped_wl"
+
+# Static library suffix (normally "a").
+libext="$libext"
+
+# Shared library suffix (normally "so").
+shlibext="$shlibext"
+
+# Flag to hardcode \$libdir into a binary during linking.
+# This must work even if \$libdir does not exist.
+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
+
+# Whether we need a single -rpath flag with a separated argument.
+hardcode_libdir_separator="$hardcode_libdir_separator"
+
+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
+# resulting binary.
+hardcode_direct="$hardcode_direct"
+
+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
+# resulting binary.
+hardcode_minus_L="$hardcode_minus_L"
+
+EOF
diff --git a/config.sub b/config.sub
new file mode 100755
index 0000000..5defff6
--- /dev/null
+++ b/config.sub
@@ -0,0 +1,1622 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation,
+# Inc.
+
+timestamp='2007-01-18'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine. It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 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 General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA
+# 02110-1301, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+
+# Please send patches to <config-patches@gnu.org>. Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support. The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+ $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+ -h, --help print this help, then exit
+ -t, --time-stamp print date of last modification, then exit
+ -v, --version print version number, then exit
+
+Report bugs and patches to <config-patches@gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+Free Software Foundation, Inc.
+
+This is free software; see the source for copying conditions. There is NO
+warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+ case $1 in
+ --time-stamp | --time* | -t )
+ echo "$timestamp" ; exit ;;
+ --version | -v )
+ echo "$version" ; exit ;;
+ --help | --h* | -h )
+ echo "$usage"; exit ;;
+ -- ) # Stop option processing
+ shift; break ;;
+ - ) # Use stdin as input.
+ break ;;
+ -* )
+ echo "$me: invalid option $1$help"
+ exit 1 ;;
+
+ *local*)
+ # First pass through any local machine types.
+ echo $1
+ exit ;;
+
+ * )
+ break ;;
+ esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+ exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+ exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+ nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
+ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \
+ storm-chaos* | os2-emx* | rtmk-nova*)
+ os=-$maybe_os
+ basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+ ;;
+ *)
+ basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+ if [ $basic_machine != $1 ]
+ then os=`echo $1 | sed 's/.*-/-/'`
+ else os=; fi
+ ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work. We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+ -sun*os*)
+ # Prevent following clause from handling this invalid input.
+ ;;
+ -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+ -apple | -axis | -knuth | -cray)
+ os=
+ basic_machine=$1
+ ;;
+ -sim | -cisco | -oki | -wec | -winbond)
+ os=
+ basic_machine=$1
+ ;;
+ -scout)
+ ;;
+ -wrs)
+ os=-vxworks
+ basic_machine=$1
+ ;;
+ -chorusos*)
+ os=-chorusos
+ basic_machine=$1
+ ;;
+ -chorusrdb)
+ os=-chorusrdb
+ basic_machine=$1
+ ;;
+ -hiux*)
+ os=-hiuxwe2
+ ;;
+ -sco6)
+ os=-sco5v6
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5)
+ os=-sco3.2v5
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco4)
+ os=-sco3.2v4
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2.[4-9]*)
+ os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco3.2v[4-9]*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco5v6*)
+ # Don't forget version if it is 3.2v4 or newer.
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -sco*)
+ os=-sco3.2v2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -udk*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -isc)
+ os=-isc2.2
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -clix*)
+ basic_machine=clipper-intergraph
+ ;;
+ -isc*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+ ;;
+ -lynx*)
+ os=-lynxos
+ ;;
+ -ptx*)
+ basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+ ;;
+ -windowsnt*)
+ os=`echo $os | sed -e 's/windowsnt/winnt/'`
+ ;;
+ -psos*)
+ os=-psos
+ ;;
+ -mint | -mint[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+ # Recognize the basic CPU types without company name.
+ # Some are omitted here because they have special meanings below.
+ 1750a | 580 \
+ | a29k \
+ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+ | am33_2.0 \
+ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \
+ | bfin \
+ | c4x | clipper \
+ | d10v | d30v | dlx | dsp16xx \
+ | fido | fr30 | frv \
+ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+ | i370 | i860 | i960 | ia64 \
+ | ip2k | iq2000 \
+ | m32c | m32r | m32rle | m68000 | m68k | m88k \
+ | maxq | mb | microblaze | mcore | mep \
+ | mips | mipsbe | mipseb | mipsel | mipsle \
+ | mips16 \
+ | mips64 | mips64el \
+ | mips64vr | mips64vrel \
+ | mips64orion | mips64orionel \
+ | mips64vr4100 | mips64vr4100el \
+ | mips64vr4300 | mips64vr4300el \
+ | mips64vr5000 | mips64vr5000el \
+ | mips64vr5900 | mips64vr5900el \
+ | mipsisa32 | mipsisa32el \
+ | mipsisa32r2 | mipsisa32r2el \
+ | mipsisa64 | mipsisa64el \
+ | mipsisa64r2 | mipsisa64r2el \
+ | mipsisa64sb1 | mipsisa64sb1el \
+ | mipsisa64sr71k | mipsisa64sr71kel \
+ | mipstx39 | mipstx39el \
+ | mn10200 | mn10300 \
+ | mt \
+ | msp430 \
+ | nios | nios2 \
+ | ns16k | ns32k \
+ | or32 \
+ | pdp10 | pdp11 | pj | pjl \
+ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+ | pyramid \
+ | score \
+ | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \
+ | sh64 | sh64le \
+ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
+ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
+ | spu | strongarm \
+ | tahoe | thumb | tic4x | tic80 | tron \
+ | v850 | v850e \
+ | we32k \
+ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
+ | z8k)
+ basic_machine=$basic_machine-unknown
+ ;;
+ m6811 | m68hc11 | m6812 | m68hc12)
+ # Motorola 68HC11/12.
+ basic_machine=$basic_machine-unknown
+ os=-none
+ ;;
+ m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+ ;;
+ ms1)
+ basic_machine=mt-unknown
+ ;;
+
+ # We use `pc' rather than `unknown'
+ # because (1) that's what they normally are, and
+ # (2) the word "unknown" tends to confuse beginning users.
+ i*86 | x86_64)
+ basic_machine=$basic_machine-pc
+ ;;
+ # Object if more than one company name word.
+ *-*-*)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+ # Recognize the basic CPU types with company name.
+ 580-* \
+ | a29k-* \
+ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \
+ | avr-* | avr32-* \
+ | bfin-* | bs2000-* \
+ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+ | clipper-* | craynv-* | cydra-* \
+ | d10v-* | d30v-* | dlx-* \
+ | elxsi-* \
+ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \
+ | h8300-* | h8500-* \
+ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+ | i*86-* | i860-* | i960-* | ia64-* \
+ | ip2k-* | iq2000-* \
+ | m32c-* | m32r-* | m32rle-* \
+ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+ | m88110-* | m88k-* | maxq-* | mcore-* \
+ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+ | mips16-* \
+ | mips64-* | mips64el-* \
+ | mips64vr-* | mips64vrel-* \
+ | mips64orion-* | mips64orionel-* \
+ | mips64vr4100-* | mips64vr4100el-* \
+ | mips64vr4300-* | mips64vr4300el-* \
+ | mips64vr5000-* | mips64vr5000el-* \
+ | mips64vr5900-* | mips64vr5900el-* \
+ | mipsisa32-* | mipsisa32el-* \
+ | mipsisa32r2-* | mipsisa32r2el-* \
+ | mipsisa64-* | mipsisa64el-* \
+ | mipsisa64r2-* | mipsisa64r2el-* \
+ | mipsisa64sb1-* | mipsisa64sb1el-* \
+ | mipsisa64sr71k-* | mipsisa64sr71kel-* \
+ | mipstx39-* | mipstx39el-* \
+ | mmix-* \
+ | mt-* \
+ | msp430-* \
+ | nios-* | nios2-* \
+ | none-* | np1-* | ns16k-* | ns32k-* \
+ | orion-* \
+ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+ | pyramid-* \
+ | romp-* | rs6000-* \
+ | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \
+ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \
+ | sparclite-* \
+ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
+ | tahoe-* | thumb-* \
+ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+ | tron-* \
+ | v850-* | v850e-* | vax-* \
+ | we32k-* \
+ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
+ | xstormy16-* | xtensa-* \
+ | ymp-* \
+ | z8k-*)
+ ;;
+ # Recognize the various machine names and aliases which stand
+ # for a CPU type and a company and sometimes even an OS.
+ 386bsd)
+ basic_machine=i386-unknown
+ os=-bsd
+ ;;
+ 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+ basic_machine=m68000-att
+ ;;
+ 3b*)
+ basic_machine=we32k-att
+ ;;
+ a29khif)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ abacus)
+ basic_machine=abacus-unknown
+ ;;
+ adobe68k)
+ basic_machine=m68010-adobe
+ os=-scout
+ ;;
+ alliant | fx80)
+ basic_machine=fx80-alliant
+ ;;
+ altos | altos3068)
+ basic_machine=m68k-altos
+ ;;
+ am29k)
+ basic_machine=a29k-none
+ os=-bsd
+ ;;
+ amd64)
+ basic_machine=x86_64-pc
+ ;;
+ amd64-*)
+ basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ amdahl)
+ basic_machine=580-amdahl
+ os=-sysv
+ ;;
+ amiga | amiga-*)
+ basic_machine=m68k-unknown
+ ;;
+ amigaos | amigados)
+ basic_machine=m68k-unknown
+ os=-amigaos
+ ;;
+ amigaunix | amix)
+ basic_machine=m68k-unknown
+ os=-sysv4
+ ;;
+ apollo68)
+ basic_machine=m68k-apollo
+ os=-sysv
+ ;;
+ apollo68bsd)
+ basic_machine=m68k-apollo
+ os=-bsd
+ ;;
+ aux)
+ basic_machine=m68k-apple
+ os=-aux
+ ;;
+ balance)
+ basic_machine=ns32k-sequent
+ os=-dynix
+ ;;
+ c90)
+ basic_machine=c90-cray
+ os=-unicos
+ ;;
+ convex-c1)
+ basic_machine=c1-convex
+ os=-bsd
+ ;;
+ convex-c2)
+ basic_machine=c2-convex
+ os=-bsd
+ ;;
+ convex-c32)
+ basic_machine=c32-convex
+ os=-bsd
+ ;;
+ convex-c34)
+ basic_machine=c34-convex
+ os=-bsd
+ ;;
+ convex-c38)
+ basic_machine=c38-convex
+ os=-bsd
+ ;;
+ cray | j90)
+ basic_machine=j90-cray
+ os=-unicos
+ ;;
+ craynv)
+ basic_machine=craynv-cray
+ os=-unicosmp
+ ;;
+ cr16c)
+ basic_machine=cr16c-unknown
+ os=-elf
+ ;;
+ crds | unos)
+ basic_machine=m68k-crds
+ ;;
+ crisv32 | crisv32-* | etraxfs*)
+ basic_machine=crisv32-axis
+ ;;
+ cris | cris-* | etrax*)
+ basic_machine=cris-axis
+ ;;
+ crx)
+ basic_machine=crx-unknown
+ os=-elf
+ ;;
+ da30 | da30-*)
+ basic_machine=m68k-da30
+ ;;
+ decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+ basic_machine=mips-dec
+ ;;
+ decsystem10* | dec10*)
+ basic_machine=pdp10-dec
+ os=-tops10
+ ;;
+ decsystem20* | dec20*)
+ basic_machine=pdp10-dec
+ os=-tops20
+ ;;
+ delta | 3300 | motorola-3300 | motorola-delta \
+ | 3300-motorola | delta-motorola)
+ basic_machine=m68k-motorola
+ ;;
+ delta88)
+ basic_machine=m88k-motorola
+ os=-sysv3
+ ;;
+ djgpp)
+ basic_machine=i586-pc
+ os=-msdosdjgpp
+ ;;
+ dpx20 | dpx20-*)
+ basic_machine=rs6000-bull
+ os=-bosx
+ ;;
+ dpx2* | dpx2*-bull)
+ basic_machine=m68k-bull
+ os=-sysv3
+ ;;
+ ebmon29k)
+ basic_machine=a29k-amd
+ os=-ebmon
+ ;;
+ elxsi)
+ basic_machine=elxsi-elxsi
+ os=-bsd
+ ;;
+ encore | umax | mmax)
+ basic_machine=ns32k-encore
+ ;;
+ es1800 | OSE68k | ose68k | ose | OSE)
+ basic_machine=m68k-ericsson
+ os=-ose
+ ;;
+ fx2800)
+ basic_machine=i860-alliant
+ ;;
+ genix)
+ basic_machine=ns32k-ns
+ ;;
+ gmicro)
+ basic_machine=tron-gmicro
+ os=-sysv
+ ;;
+ go32)
+ basic_machine=i386-pc
+ os=-go32
+ ;;
+ h3050r* | hiux*)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ h8300hms)
+ basic_machine=h8300-hitachi
+ os=-hms
+ ;;
+ h8300xray)
+ basic_machine=h8300-hitachi
+ os=-xray
+ ;;
+ h8500hms)
+ basic_machine=h8500-hitachi
+ os=-hms
+ ;;
+ harris)
+ basic_machine=m88k-harris
+ os=-sysv3
+ ;;
+ hp300-*)
+ basic_machine=m68k-hp
+ ;;
+ hp300bsd)
+ basic_machine=m68k-hp
+ os=-bsd
+ ;;
+ hp300hpux)
+ basic_machine=m68k-hp
+ os=-hpux
+ ;;
+ hp3k9[0-9][0-9] | hp9[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k2[0-9][0-9] | hp9k31[0-9])
+ basic_machine=m68000-hp
+ ;;
+ hp9k3[2-9][0-9])
+ basic_machine=m68k-hp
+ ;;
+ hp9k6[0-9][0-9] | hp6[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hp9k7[0-79][0-9] | hp7[0-79][0-9])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k78[0-9] | hp78[0-9])
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+ # FIXME: really hppa2.0-hp
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][13679] | hp8[0-9][13679])
+ basic_machine=hppa1.1-hp
+ ;;
+ hp9k8[0-9][0-9] | hp8[0-9][0-9])
+ basic_machine=hppa1.0-hp
+ ;;
+ hppa-next)
+ os=-nextstep3
+ ;;
+ hppaosf)
+ basic_machine=hppa1.1-hp
+ os=-osf
+ ;;
+ hppro)
+ basic_machine=hppa1.1-hp
+ os=-proelf
+ ;;
+ i370-ibm* | ibm*)
+ basic_machine=i370-ibm
+ ;;
+# I'm not sure what "Sysv32" means. Should this be sysv3.2?
+ i*86v32)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv32
+ ;;
+ i*86v4*)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv4
+ ;;
+ i*86v)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-sysv
+ ;;
+ i*86sol2)
+ basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+ os=-solaris2
+ ;;
+ i386mach)
+ basic_machine=i386-mach
+ os=-mach
+ ;;
+ i386-vsta | vsta)
+ basic_machine=i386-unknown
+ os=-vsta
+ ;;
+ iris | iris4d)
+ basic_machine=mips-sgi
+ case $os in
+ -irix*)
+ ;;
+ *)
+ os=-irix4
+ ;;
+ esac
+ ;;
+ isi68 | isi)
+ basic_machine=m68k-isi
+ os=-sysv
+ ;;
+ m88k-omron*)
+ basic_machine=m88k-omron
+ ;;
+ magnum | m3230)
+ basic_machine=mips-mips
+ os=-sysv
+ ;;
+ merlin)
+ basic_machine=ns32k-utek
+ os=-sysv
+ ;;
+ mingw32)
+ basic_machine=i386-pc
+ os=-mingw32
+ ;;
+ miniframe)
+ basic_machine=m68000-convergent
+ ;;
+ *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+ basic_machine=m68k-atari
+ os=-mint
+ ;;
+ mips3*-*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+ ;;
+ mips3*)
+ basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+ ;;
+ monitor)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ morphos)
+ basic_machine=powerpc-unknown
+ os=-morphos
+ ;;
+ msdos)
+ basic_machine=i386-pc
+ os=-msdos
+ ;;
+ ms1-*)
+ basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'`
+ ;;
+ mvs)
+ basic_machine=i370-ibm
+ os=-mvs
+ ;;
+ ncr3000)
+ basic_machine=i486-ncr
+ os=-sysv4
+ ;;
+ netbsd386)
+ basic_machine=i386-unknown
+ os=-netbsd
+ ;;
+ netwinder)
+ basic_machine=armv4l-rebel
+ os=-linux
+ ;;
+ news | news700 | news800 | news900)
+ basic_machine=m68k-sony
+ os=-newsos
+ ;;
+ news1000)
+ basic_machine=m68030-sony
+ os=-newsos
+ ;;
+ news-3600 | risc-news)
+ basic_machine=mips-sony
+ os=-newsos
+ ;;
+ necv70)
+ basic_machine=v70-nec
+ os=-sysv
+ ;;
+ next | m*-next )
+ basic_machine=m68k-next
+ case $os in
+ -nextstep* )
+ ;;
+ -ns2*)
+ os=-nextstep2
+ ;;
+ *)
+ os=-nextstep3
+ ;;
+ esac
+ ;;
+ nh3000)
+ basic_machine=m68k-harris
+ os=-cxux
+ ;;
+ nh[45]000)
+ basic_machine=m88k-harris
+ os=-cxux
+ ;;
+ nindy960)
+ basic_machine=i960-intel
+ os=-nindy
+ ;;
+ mon960)
+ basic_machine=i960-intel
+ os=-mon960
+ ;;
+ nonstopux)
+ basic_machine=mips-compaq
+ os=-nonstopux
+ ;;
+ np1)
+ basic_machine=np1-gould
+ ;;
+ nsr-tandem)
+ basic_machine=nsr-tandem
+ ;;
+ op50n-* | op60c-*)
+ basic_machine=hppa1.1-oki
+ os=-proelf
+ ;;
+ openrisc | openrisc-*)
+ basic_machine=or32-unknown
+ ;;
+ os400)
+ basic_machine=powerpc-ibm
+ os=-os400
+ ;;
+ OSE68000 | ose68000)
+ basic_machine=m68000-ericsson
+ os=-ose
+ ;;
+ os68k)
+ basic_machine=m68k-none
+ os=-os68k
+ ;;
+ pa-hitachi)
+ basic_machine=hppa1.1-hitachi
+ os=-hiuxwe2
+ ;;
+ paragon)
+ basic_machine=i860-intel
+ os=-osf
+ ;;
+ pbd)
+ basic_machine=sparc-tti
+ ;;
+ pbb)
+ basic_machine=m68k-tti
+ ;;
+ pc532 | pc532-*)
+ basic_machine=ns32k-pc532
+ ;;
+ pc98)
+ basic_machine=i386-pc
+ ;;
+ pc98-*)
+ basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium | p5 | k5 | k6 | nexgen | viac3)
+ basic_machine=i586-pc
+ ;;
+ pentiumpro | p6 | 6x86 | athlon | athlon_*)
+ basic_machine=i686-pc
+ ;;
+ pentiumii | pentium2 | pentiumiii | pentium3)
+ basic_machine=i686-pc
+ ;;
+ pentium4)
+ basic_machine=i786-pc
+ ;;
+ pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+ basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumpro-* | p6-* | 6x86-* | athlon-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+ basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pentium4-*)
+ basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ pn)
+ basic_machine=pn-gould
+ ;;
+ power) basic_machine=power-ibm
+ ;;
+ ppc) basic_machine=powerpc-unknown
+ ;;
+ ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppcle | powerpclittle | ppc-le | powerpc-little)
+ basic_machine=powerpcle-unknown
+ ;;
+ ppcle-* | powerpclittle-*)
+ basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64) basic_machine=powerpc64-unknown
+ ;;
+ ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+ basic_machine=powerpc64le-unknown
+ ;;
+ ppc64le-* | powerpc64little-*)
+ basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+ ;;
+ ps2)
+ basic_machine=i386-ibm
+ ;;
+ pw32)
+ basic_machine=i586-unknown
+ os=-pw32
+ ;;
+ rdos)
+ basic_machine=i386-pc
+ os=-rdos
+ ;;
+ rom68k)
+ basic_machine=m68k-rom68k
+ os=-coff
+ ;;
+ rm[46]00)
+ basic_machine=mips-siemens
+ ;;
+ rtpc | rtpc-*)
+ basic_machine=romp-ibm
+ ;;
+ s390 | s390-*)
+ basic_machine=s390-ibm
+ ;;
+ s390x | s390x-*)
+ basic_machine=s390x-ibm
+ ;;
+ sa29200)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ sb1)
+ basic_machine=mipsisa64sb1-unknown
+ ;;
+ sb1el)
+ basic_machine=mipsisa64sb1el-unknown
+ ;;
+ sde)
+ basic_machine=mipsisa32-sde
+ os=-elf
+ ;;
+ sei)
+ basic_machine=mips-sei
+ os=-seiux
+ ;;
+ sequent)
+ basic_machine=i386-sequent
+ ;;
+ sh)
+ basic_machine=sh-hitachi
+ os=-hms
+ ;;
+ sh5el)
+ basic_machine=sh5le-unknown
+ ;;
+ sh64)
+ basic_machine=sh64-unknown
+ ;;
+ sparclite-wrs | simso-wrs)
+ basic_machine=sparclite-wrs
+ os=-vxworks
+ ;;
+ sps7)
+ basic_machine=m68k-bull
+ os=-sysv2
+ ;;
+ spur)
+ basic_machine=spur-unknown
+ ;;
+ st2000)
+ basic_machine=m68k-tandem
+ ;;
+ stratus)
+ basic_machine=i860-stratus
+ os=-sysv4
+ ;;
+ sun2)
+ basic_machine=m68000-sun
+ ;;
+ sun2os3)
+ basic_machine=m68000-sun
+ os=-sunos3
+ ;;
+ sun2os4)
+ basic_machine=m68000-sun
+ os=-sunos4
+ ;;
+ sun3os3)
+ basic_machine=m68k-sun
+ os=-sunos3
+ ;;
+ sun3os4)
+ basic_machine=m68k-sun
+ os=-sunos4
+ ;;
+ sun4os3)
+ basic_machine=sparc-sun
+ os=-sunos3
+ ;;
+ sun4os4)
+ basic_machine=sparc-sun
+ os=-sunos4
+ ;;
+ sun4sol2)
+ basic_machine=sparc-sun
+ os=-solaris2
+ ;;
+ sun3 | sun3-*)
+ basic_machine=m68k-sun
+ ;;
+ sun4)
+ basic_machine=sparc-sun
+ ;;
+ sun386 | sun386i | roadrunner)
+ basic_machine=i386-sun
+ ;;
+ sv1)
+ basic_machine=sv1-cray
+ os=-unicos
+ ;;
+ symmetry)
+ basic_machine=i386-sequent
+ os=-dynix
+ ;;
+ t3e)
+ basic_machine=alphaev5-cray
+ os=-unicos
+ ;;
+ t90)
+ basic_machine=t90-cray
+ os=-unicos
+ ;;
+ tic54x | c54x*)
+ basic_machine=tic54x-unknown
+ os=-coff
+ ;;
+ tic55x | c55x*)
+ basic_machine=tic55x-unknown
+ os=-coff
+ ;;
+ tic6x | c6x*)
+ basic_machine=tic6x-unknown
+ os=-coff
+ ;;
+ tx39)
+ basic_machine=mipstx39-unknown
+ ;;
+ tx39el)
+ basic_machine=mipstx39el-unknown
+ ;;
+ toad1)
+ basic_machine=pdp10-xkl
+ os=-tops20
+ ;;
+ tower | tower-32)
+ basic_machine=m68k-ncr
+ ;;
+ tpf)
+ basic_machine=s390x-ibm
+ os=-tpf
+ ;;
+ udi29k)
+ basic_machine=a29k-amd
+ os=-udi
+ ;;
+ ultra3)
+ basic_machine=a29k-nyu
+ os=-sym1
+ ;;
+ v810 | necv810)
+ basic_machine=v810-nec
+ os=-none
+ ;;
+ vaxv)
+ basic_machine=vax-dec
+ os=-sysv
+ ;;
+ vms)
+ basic_machine=vax-dec
+ os=-vms
+ ;;
+ vpp*|vx|vx-*)
+ basic_machine=f301-fujitsu
+ ;;
+ vxworks960)
+ basic_machine=i960-wrs
+ os=-vxworks
+ ;;
+ vxworks68)
+ basic_machine=m68k-wrs
+ os=-vxworks
+ ;;
+ vxworks29k)
+ basic_machine=a29k-wrs
+ os=-vxworks
+ ;;
+ w65*)
+ basic_machine=w65-wdc
+ os=-none
+ ;;
+ w89k-*)
+ basic_machine=hppa1.1-winbond
+ os=-proelf
+ ;;
+ xbox)
+ basic_machine=i686-pc
+ os=-mingw32
+ ;;
+ xps | xps100)
+ basic_machine=xps100-honeywell
+ ;;
+ ymp)
+ basic_machine=ymp-cray
+ os=-unicos
+ ;;
+ z8k-*-coff)
+ basic_machine=z8k-unknown
+ os=-sim
+ ;;
+ none)
+ basic_machine=none-none
+ os=-none
+ ;;
+
+# Here we handle the default manufacturer of certain CPU types. It is in
+# some cases the only manufacturer, in others, it is the most popular.
+ w89k)
+ basic_machine=hppa1.1-winbond
+ ;;
+ op50n)
+ basic_machine=hppa1.1-oki
+ ;;
+ op60c)
+ basic_machine=hppa1.1-oki
+ ;;
+ romp)
+ basic_machine=romp-ibm
+ ;;
+ mmix)
+ basic_machine=mmix-knuth
+ ;;
+ rs6000)
+ basic_machine=rs6000-ibm
+ ;;
+ vax)
+ basic_machine=vax-dec
+ ;;
+ pdp10)
+ # there are many clones, so DEC is not a safe bet
+ basic_machine=pdp10-unknown
+ ;;
+ pdp11)
+ basic_machine=pdp11-dec
+ ;;
+ we32k)
+ basic_machine=we32k-att
+ ;;
+ sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+ basic_machine=sh-unknown
+ ;;
+ sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
+ basic_machine=sparc-sun
+ ;;
+ cydra)
+ basic_machine=cydra-cydrome
+ ;;
+ orion)
+ basic_machine=orion-highlevel
+ ;;
+ orion105)
+ basic_machine=clipper-highlevel
+ ;;
+ mac | mpw | mac-mpw)
+ basic_machine=m68k-apple
+ ;;
+ pmac | pmac-mpw)
+ basic_machine=powerpc-apple
+ ;;
+ *-unknown)
+ # Make sure to match an already-canonicalized machine name.
+ ;;
+ *)
+ echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+ *-digital*)
+ basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+ ;;
+ *-commodore*)
+ basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+ ;;
+ *)
+ ;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+ # First match some system type aliases
+ # that might get confused with valid system types.
+ # -solaris* is a basic system type, with this one exception.
+ -solaris1 | -solaris1.*)
+ os=`echo $os | sed -e 's|solaris1|sunos4|'`
+ ;;
+ -solaris)
+ os=-solaris2
+ ;;
+ -svr4*)
+ os=-sysv4
+ ;;
+ -unixware*)
+ os=-sysv4.2uw
+ ;;
+ -gnu/linux*)
+ os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+ ;;
+ # First accept the basic system types.
+ # The portable systems comes first.
+ # Each alternative MUST END IN A *, to match a version number.
+ # -sysv* is not here because it comes later, after sysvr4.
+ -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+ | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+ | -aos* \
+ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
+ | -openbsd* | -solidbsd* \
+ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
+ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+ | -chorusos* | -chorusrdb* \
+ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+ | -uxpv* | -beos* | -mpeix* | -udk* \
+ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \
+ | -skyos* | -haiku* | -rdos* | -toppers* | -drops*)
+ # Remember, each alternative MUST END IN *, to match a version number.
+ ;;
+ -qnx*)
+ case $basic_machine in
+ x86-* | i*86-*)
+ ;;
+ *)
+ os=-nto$os
+ ;;
+ esac
+ ;;
+ -nto-qnx*)
+ ;;
+ -nto*)
+ os=`echo $os | sed -e 's|nto|nto-qnx|'`
+ ;;
+ -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \
+ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+ ;;
+ -mac*)
+ os=`echo $os | sed -e 's|mac|macos|'`
+ ;;
+ -linux-dietlibc)
+ os=-linux-dietlibc
+ ;;
+ -linux*)
+ os=`echo $os | sed -e 's|linux|linux-gnu|'`
+ ;;
+ -sunos5*)
+ os=`echo $os | sed -e 's|sunos5|solaris2|'`
+ ;;
+ -sunos6*)
+ os=`echo $os | sed -e 's|sunos6|solaris3|'`
+ ;;
+ -opened*)
+ os=-openedition
+ ;;
+ -os400*)
+ os=-os400
+ ;;
+ -wince*)
+ os=-wince
+ ;;
+ -osfrose*)
+ os=-osfrose
+ ;;
+ -osf*)
+ os=-osf
+ ;;
+ -utek*)
+ os=-bsd
+ ;;
+ -dynix*)
+ os=-bsd
+ ;;
+ -acis*)
+ os=-aos
+ ;;
+ -atheos*)
+ os=-atheos
+ ;;
+ -syllable*)
+ os=-syllable
+ ;;
+ -386bsd)
+ os=-bsd
+ ;;
+ -ctix* | -uts*)
+ os=-sysv
+ ;;
+ -nova*)
+ os=-rtmk-nova
+ ;;
+ -ns2 )
+ os=-nextstep2
+ ;;
+ -nsk*)
+ os=-nsk
+ ;;
+ # Preserve the version number of sinix5.
+ -sinix5.*)
+ os=`echo $os | sed -e 's|sinix|sysv|'`
+ ;;
+ -sinix*)
+ os=-sysv4
+ ;;
+ -tpf*)
+ os=-tpf
+ ;;
+ -triton*)
+ os=-sysv3
+ ;;
+ -oss*)
+ os=-sysv3
+ ;;
+ -svr4)
+ os=-sysv4
+ ;;
+ -svr3)
+ os=-sysv3
+ ;;
+ -sysvr4)
+ os=-sysv4
+ ;;
+ # This must come after -sysvr4.
+ -sysv*)
+ ;;
+ -ose*)
+ os=-ose
+ ;;
+ -es1800*)
+ os=-ose
+ ;;
+ -xenix)
+ os=-xenix
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ os=-mint
+ ;;
+ -aros*)
+ os=-aros
+ ;;
+ -kaos*)
+ os=-kaos
+ ;;
+ -zvmoe)
+ os=-zvmoe
+ ;;
+ -none)
+ ;;
+ *)
+ # Get rid of the `-' at the beginning of $os.
+ os=`echo $os | sed 's/[^-]*-//'`
+ echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+ exit 1
+ ;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system. Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+ score-*)
+ os=-elf
+ ;;
+ spu-*)
+ os=-elf
+ ;;
+ *-acorn)
+ os=-riscix1.2
+ ;;
+ arm*-rebel)
+ os=-linux
+ ;;
+ arm*-semi)
+ os=-aout
+ ;;
+ c4x-* | tic4x-*)
+ os=-coff
+ ;;
+ # This must come before the *-dec entry.
+ pdp10-*)
+ os=-tops20
+ ;;
+ pdp11-*)
+ os=-none
+ ;;
+ *-dec | vax-*)
+ os=-ultrix4.2
+ ;;
+ m68*-apollo)
+ os=-domain
+ ;;
+ i386-sun)
+ os=-sunos4.0.2
+ ;;
+ m68000-sun)
+ os=-sunos3
+ # This also exists in the configure program, but was not the
+ # default.
+ # os=-sunos4
+ ;;
+ m68*-cisco)
+ os=-aout
+ ;;
+ mep-*)
+ os=-elf
+ ;;
+ mips*-cisco)
+ os=-elf
+ ;;
+ mips*-*)
+ os=-elf
+ ;;
+ or32-*)
+ os=-coff
+ ;;
+ *-tti) # must be before sparc entry or we get the wrong os.
+ os=-sysv3
+ ;;
+ sparc-* | *-sun)
+ os=-sunos4.1.1
+ ;;
+ *-be)
+ os=-beos
+ ;;
+ *-haiku)
+ os=-haiku
+ ;;
+ *-ibm)
+ os=-aix
+ ;;
+ *-knuth)
+ os=-mmixware
+ ;;
+ *-wec)
+ os=-proelf
+ ;;
+ *-winbond)
+ os=-proelf
+ ;;
+ *-oki)
+ os=-proelf
+ ;;
+ *-hp)
+ os=-hpux
+ ;;
+ *-hitachi)
+ os=-hiux
+ ;;
+ i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+ os=-sysv
+ ;;
+ *-cbm)
+ os=-amigaos
+ ;;
+ *-dg)
+ os=-dgux
+ ;;
+ *-dolphin)
+ os=-sysv3
+ ;;
+ m68k-ccur)
+ os=-rtu
+ ;;
+ m88k-omron*)
+ os=-luna
+ ;;
+ *-next )
+ os=-nextstep
+ ;;
+ *-sequent)
+ os=-ptx
+ ;;
+ *-crds)
+ os=-unos
+ ;;
+ *-ns)
+ os=-genix
+ ;;
+ i370-*)
+ os=-mvs
+ ;;
+ *-next)
+ os=-nextstep3
+ ;;
+ *-gould)
+ os=-sysv
+ ;;
+ *-highlevel)
+ os=-bsd
+ ;;
+ *-encore)
+ os=-bsd
+ ;;
+ *-sgi)
+ os=-irix
+ ;;
+ *-siemens)
+ os=-sysv4
+ ;;
+ *-masscomp)
+ os=-rtu
+ ;;
+ f30[01]-fujitsu | f700-fujitsu)
+ os=-uxpv
+ ;;
+ *-rom68k)
+ os=-coff
+ ;;
+ *-*bug)
+ os=-coff
+ ;;
+ *-apple)
+ os=-macos
+ ;;
+ *-atari*)
+ os=-mint
+ ;;
+ *)
+ os=-none
+ ;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer. We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+ *-unknown)
+ case $os in
+ -riscix*)
+ vendor=acorn
+ ;;
+ -sunos*)
+ vendor=sun
+ ;;
+ -aix*)
+ vendor=ibm
+ ;;
+ -beos*)
+ vendor=be
+ ;;
+ -hpux*)
+ vendor=hp
+ ;;
+ -mpeix*)
+ vendor=hp
+ ;;
+ -hiux*)
+ vendor=hitachi
+ ;;
+ -unos*)
+ vendor=crds
+ ;;
+ -dgux*)
+ vendor=dg
+ ;;
+ -luna*)
+ vendor=omron
+ ;;
+ -genix*)
+ vendor=ns
+ ;;
+ -mvs* | -opened*)
+ vendor=ibm
+ ;;
+ -os400*)
+ vendor=ibm
+ ;;
+ -ptx*)
+ vendor=sequent
+ ;;
+ -tpf*)
+ vendor=ibm
+ ;;
+ -vxsim* | -vxworks* | -windiss*)
+ vendor=wrs
+ ;;
+ -aux*)
+ vendor=apple
+ ;;
+ -hms*)
+ vendor=hitachi
+ ;;
+ -mpw* | -macos*)
+ vendor=apple
+ ;;
+ -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+ vendor=atari
+ ;;
+ -vos*)
+ vendor=stratus
+ ;;
+ esac
+ basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+ ;;
+esac
+
+echo $basic_machine$os
+exit
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:
diff --git a/configure b/configure
new file mode 100755
index 0000000..1b41e7d
--- /dev/null
+++ b/configure
@@ -0,0 +1,15385 @@
+#! /bin/sh
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.63 for XaoS 3.5.
+#
+# Report bugs to <xaos-devel@lists.sourceforge.net>.
+#
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+if test "x$CONFIG_SHELL" = x; then
+ if (eval ":") 2>/dev/null; then
+ as_have_required=yes
+else
+ as_have_required=no
+fi
+
+ if test $as_have_required = yes && (eval ":
+(as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=\$LINENO
+ as_lineno_2=\$LINENO
+ test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" &&
+ test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; }
+") 2> /dev/null; then
+ :
+else
+ as_candidate_shells=
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ case $as_dir in
+ /*)
+ for as_base in sh bash ksh sh5; do
+ as_candidate_shells="$as_candidate_shells $as_dir/$as_base"
+ done;;
+ esac
+done
+IFS=$as_save_IFS
+
+
+ for as_shell in $as_candidate_shells $SHELL; do
+ # Try only shells that exist, to save several forks.
+ if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
+ { ("$as_shell") 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+_ASEOF
+}; then
+ CONFIG_SHELL=$as_shell
+ as_have_required=yes
+ if { "$as_shell" 2> /dev/null <<\_ASEOF
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+:
+(as_func_return () {
+ (exit $1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = "$1" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test $exitcode = 0) || { (exit 1); exit 1; }
+
+(
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; }
+
+_ASEOF
+}; then
+ break
+fi
+
+fi
+
+ done
+
+ if test "x$CONFIG_SHELL" != x; then
+ for as_var in BASH_ENV ENV
+ do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+ done
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+fi
+
+
+ if test $as_have_required = no; then
+ echo This script requires a shell more modern than all the
+ echo shells that I found on your system. Please install a
+ echo modern shell, or manually run the script under such a
+ echo shell if you do have one.
+ { (exit 1); exit 1; }
+fi
+
+
+fi
+
+fi
+
+
+
+(eval "as_func_return () {
+ (exit \$1)
+}
+as_func_success () {
+ as_func_return 0
+}
+as_func_failure () {
+ as_func_return 1
+}
+as_func_ret_success () {
+ return 0
+}
+as_func_ret_failure () {
+ return 1
+}
+
+exitcode=0
+if as_func_success; then
+ :
+else
+ exitcode=1
+ echo as_func_success failed.
+fi
+
+if as_func_failure; then
+ exitcode=1
+ echo as_func_failure succeeded.
+fi
+
+if as_func_ret_success; then
+ :
+else
+ exitcode=1
+ echo as_func_ret_success failed.
+fi
+
+if as_func_ret_failure; then
+ exitcode=1
+ echo as_func_ret_failure succeeded.
+fi
+
+if ( set x; as_func_ret_success y && test x = \"\$1\" ); then
+ :
+else
+ exitcode=1
+ echo positional parameters were not saved.
+fi
+
+test \$exitcode = 0") || {
+ echo No shell found that supports shell functions.
+ echo Please tell bug-autoconf@gnu.org about your system,
+ echo including any error possibly output before this message.
+ echo This can help us improve future autoconf versions.
+ echo Configuration will now proceed without shell functions.
+}
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+
+exec 7<&0 </dev/null 6>&1
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+#
+# Initializations.
+#
+ac_default_prefix=/usr/local
+ac_clean_files=
+ac_config_libobj_dir=.
+LIBOBJS=
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Identity of this package.
+PACKAGE_NAME='XaoS'
+PACKAGE_TARNAME='xaos'
+PACKAGE_VERSION='3.5'
+PACKAGE_STRING='XaoS 3.5'
+PACKAGE_BUGREPORT='xaos-devel@lists.sourceforge.net'
+
+gt_needs=
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#ifdef HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#ifdef STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# ifdef HAVE_STDLIB_H
+# include <stdlib.h>
+# endif
+#endif
+#ifdef HAVE_STRING_H
+# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
+# include <memory.h>
+# endif
+# include <string.h>
+#endif
+#ifdef HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+# include <inttypes.h>
+#endif
+#ifdef HAVE_STDINT_H
+# include <stdint.h>
+#endif
+#ifdef HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
+
+ac_subst_vars='LTLIBOBJS
+LIBOBJS
+POFILES
+ASM_CMPLX_O
+CMPLX_O_TARGET
+DRIVERDIRS
+DRIVERLIBS
+NASM
+GSL_CONFIG
+LOCALEDIR
+TOPDIR
+LIBPATH
+SRCPATH
+AR
+BINPATH
+REALTOPDIR
+DEPS_LIBS
+DEPS_CFLAGS
+PKG_CONFIG
+ALLOCA
+EGREP
+GREP
+X_EXTRA_LIBS
+X_LIBS
+X_PRE_LIBS
+X_CFLAGS
+CPP
+XMKMF
+RANLIB
+POSUB
+LTLIBINTL
+LIBINTL
+INTLLIBS
+INTL_MACOSX_LIBS
+XGETTEXT_EXTRA_OPTIONS
+MSGMERGE
+XGETTEXT_015
+XGETTEXT
+GMSGFMT_015
+MSGFMT_015
+GMSGFMT
+MSGFMT
+GETTEXT_MACRO_VERSION
+USE_NLS
+mkdir_p
+MKDIR_P
+INSTALL_DATA
+INSTALL_SCRIPT
+INSTALL_PROGRAM
+SET_MAKE
+LTLIBICONV
+LIBICONV
+PRTDIAG
+OBJEXT
+EXEEXT
+ac_ct_CC
+CPPFLAGS
+LDFLAGS
+CFLAGS
+CC
+host_os
+host_vendor
+host_cpu
+host
+build_os
+build_vendor
+build_cpu
+build
+target_alias
+host_alias
+build_alias
+LIBS
+ECHO_T
+ECHO_N
+ECHO_C
+DEFS
+mandir
+localedir
+libdir
+psdir
+pdfdir
+dvidir
+htmldir
+infodir
+docdir
+oldincludedir
+includedir
+localstatedir
+sharedstatedir
+sysconfdir
+datadir
+datarootdir
+libexecdir
+sbindir
+bindir
+program_transform_name
+prefix
+exec_prefix
+PACKAGE_BUGREPORT
+PACKAGE_STRING
+PACKAGE_VERSION
+PACKAGE_TARNAME
+PACKAGE_NAME
+PATH_SEPARATOR
+SHELL'
+ac_subst_files=''
+ac_user_opts='
+enable_option_checking
+enable_portable_binary
+with_gcc_arch
+with_gnu_ld
+enable_rpath
+with_libiconv_prefix
+enable_nls
+with_libintl_prefix
+with_long_double
+with_mitshm
+with_pthread
+with_png
+with_gsl
+with_sffe
+with_x11_driver
+with_gtk_driver
+with_win32_driver
+with_aa_driver
+with_x
+'
+ ac_precious_vars='build_alias
+host_alias
+target_alias
+CC
+CFLAGS
+LDFLAGS
+LIBS
+CPPFLAGS
+XMKMF
+CPP
+PKG_CONFIG
+DEPS_CFLAGS
+DEPS_LIBS'
+
+
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+ac_unrecognized_opts=
+ac_unrecognized_sep=
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
+site=
+srcdir=
+verbose=
+x_includes=NONE
+x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+# (The list follows the same order as the GNU Coding Standards.)
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datarootdir='${prefix}/share'
+datadir='${datarootdir}'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
+infodir='${datarootdir}/info'
+htmldir='${docdir}'
+dvidir='${docdir}'
+pdfdir='${docdir}'
+psdir='${docdir}'
+libdir='${exec_prefix}/lib'
+localedir='${datarootdir}/locale'
+mandir='${datarootdir}/man'
+
+ac_prev=
+ac_dashdash=
+for ac_option
+do
+ # If the previous option needs an argument, assign it.
+ if test -n "$ac_prev"; then
+ eval $ac_prev=\$ac_option
+ ac_prev=
+ continue
+ fi
+
+ case $ac_option in
+ *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+ *) ac_optarg=yes ;;
+ esac
+
+ # Accept the important Cygnus configure options, so we can diagnose typos.
+
+ case $ac_dashdash$ac_option in
+ --)
+ ac_dashdash=yes ;;
+
+ -bindir | --bindir | --bindi | --bind | --bin | --bi)
+ ac_prev=bindir ;;
+ -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+ bindir=$ac_optarg ;;
+
+ -build | --build | --buil | --bui | --bu)
+ ac_prev=build_alias ;;
+ -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+ build_alias=$ac_optarg ;;
+
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
+
+ -datadir | --datadir | --datadi | --datad)
+ ac_prev=datadir ;;
+ -datadir=* | --datadir=* | --datadi=* | --datad=*)
+ datadir=$ac_optarg ;;
+
+ -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
+ | --dataroo | --dataro | --datar)
+ ac_prev=datarootdir ;;
+ -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
+ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
+ datarootdir=$ac_optarg ;;
+
+ -disable-* | --disable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=no ;;
+
+ -docdir | --docdir | --docdi | --doc | --do)
+ ac_prev=docdir ;;
+ -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
+ docdir=$ac_optarg ;;
+
+ -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
+ ac_prev=dvidir ;;
+ -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
+ dvidir=$ac_optarg ;;
+
+ -enable-* | --enable-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid feature name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"enable_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval enable_$ac_useropt=\$ac_optarg ;;
+
+ -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+ | --exec | --exe | --ex)
+ ac_prev=exec_prefix ;;
+ -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+ | --exec=* | --exe=* | --ex=*)
+ exec_prefix=$ac_optarg ;;
+
+ -gas | --gas | --ga | --g)
+ # Obsolete; use --with-gas.
+ with_gas=yes ;;
+
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
+
+ -host | --host | --hos | --ho)
+ ac_prev=host_alias ;;
+ -host=* | --host=* | --hos=* | --ho=*)
+ host_alias=$ac_optarg ;;
+
+ -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
+ ac_prev=htmldir ;;
+ -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
+ | --ht=*)
+ htmldir=$ac_optarg ;;
+
+ -includedir | --includedir | --includedi | --included | --include \
+ | --includ | --inclu | --incl | --inc)
+ ac_prev=includedir ;;
+ -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+ | --includ=* | --inclu=* | --incl=* | --inc=*)
+ includedir=$ac_optarg ;;
+
+ -infodir | --infodir | --infodi | --infod | --info | --inf)
+ ac_prev=infodir ;;
+ -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+ infodir=$ac_optarg ;;
+
+ -libdir | --libdir | --libdi | --libd)
+ ac_prev=libdir ;;
+ -libdir=* | --libdir=* | --libdi=* | --libd=*)
+ libdir=$ac_optarg ;;
+
+ -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+ | --libexe | --libex | --libe)
+ ac_prev=libexecdir ;;
+ -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+ | --libexe=* | --libex=* | --libe=*)
+ libexecdir=$ac_optarg ;;
+
+ -localedir | --localedir | --localedi | --localed | --locale)
+ ac_prev=localedir ;;
+ -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
+ localedir=$ac_optarg ;;
+
+ -localstatedir | --localstatedir | --localstatedi | --localstated \
+ | --localstate | --localstat | --localsta | --localst | --locals)
+ ac_prev=localstatedir ;;
+ -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
+ localstatedir=$ac_optarg ;;
+
+ -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+ ac_prev=mandir ;;
+ -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+ mandir=$ac_optarg ;;
+
+ -nfp | --nfp | --nf)
+ # Obsolete; use --without-fp.
+ with_fp=no ;;
+
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n)
+ no_create=yes ;;
+
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ no_recursion=yes ;;
+
+ -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+ | --oldin | --oldi | --old | --ol | --o)
+ ac_prev=oldincludedir ;;
+ -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+ oldincludedir=$ac_optarg ;;
+
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ prefix=$ac_optarg ;;
+
+ -program-prefix | --program-prefix | --program-prefi | --program-pref \
+ | --program-pre | --program-pr | --program-p)
+ ac_prev=program_prefix ;;
+ -program-prefix=* | --program-prefix=* | --program-prefi=* \
+ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+ program_prefix=$ac_optarg ;;
+
+ -program-suffix | --program-suffix | --program-suffi | --program-suff \
+ | --program-suf | --program-su | --program-s)
+ ac_prev=program_suffix ;;
+ -program-suffix=* | --program-suffix=* | --program-suffi=* \
+ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+ program_suffix=$ac_optarg ;;
+
+ -program-transform-name | --program-transform-name \
+ | --program-transform-nam | --program-transform-na \
+ | --program-transform-n | --program-transform- \
+ | --program-transform | --program-transfor \
+ | --program-transfo | --program-transf \
+ | --program-trans | --program-tran \
+ | --progr-tra | --program-tr | --program-t)
+ ac_prev=program_transform_name ;;
+ -program-transform-name=* | --program-transform-name=* \
+ | --program-transform-nam=* | --program-transform-na=* \
+ | --program-transform-n=* | --program-transform-=* \
+ | --program-transform=* | --program-transfor=* \
+ | --program-transfo=* | --program-transf=* \
+ | --program-trans=* | --program-tran=* \
+ | --progr-tra=* | --program-tr=* | --program-t=*)
+ program_transform_name=$ac_optarg ;;
+
+ -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
+ ac_prev=pdfdir ;;
+ -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
+ pdfdir=$ac_optarg ;;
+
+ -psdir | --psdir | --psdi | --psd | --ps)
+ ac_prev=psdir ;;
+ -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
+ psdir=$ac_optarg ;;
+
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+
+ -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+ -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+ | --sbi=* | --sb=*)
+ sbindir=$ac_optarg ;;
+
+ -sharedstatedir | --sharedstatedir | --sharedstatedi \
+ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+ | --sharedst | --shareds | --shared | --share | --shar \
+ | --sha | --sh)
+ ac_prev=sharedstatedir ;;
+ -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+ | --sha=* | --sh=*)
+ sharedstatedir=$ac_optarg ;;
+
+ -site | --site | --sit)
+ ac_prev=site ;;
+ -site=* | --site=* | --sit=*)
+ site=$ac_optarg ;;
+
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ srcdir=$ac_optarg ;;
+
+ -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+ | --syscon | --sysco | --sysc | --sys | --sy)
+ ac_prev=sysconfdir ;;
+ -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+ sysconfdir=$ac_optarg ;;
+
+ -target | --target | --targe | --targ | --tar | --ta | --t)
+ ac_prev=target_alias ;;
+ -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+ target_alias=$ac_optarg ;;
+
+ -v | -verbose | --verbose | --verbos | --verbo | --verb)
+ verbose=yes ;;
+
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
+
+ -with-* | --with-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=\$ac_optarg ;;
+
+ -without-* | --without-*)
+ ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid package name: $ac_useropt" >&2
+ { (exit 1); exit 1; }; }
+ ac_useropt_orig=$ac_useropt
+ ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
+ case $ac_user_opts in
+ *"
+"with_$ac_useropt"
+"*) ;;
+ *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
+ ac_unrecognized_sep=', ';;
+ esac
+ eval with_$ac_useropt=no ;;
+
+ --x)
+ # Obsolete; use --with-x.
+ with_x=yes ;;
+
+ -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+ | --x-incl | --x-inc | --x-in | --x-i)
+ ac_prev=x_includes ;;
+ -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+ x_includes=$ac_optarg ;;
+
+ -x-libraries | --x-libraries | --x-librarie | --x-librari \
+ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+ ac_prev=x_libraries ;;
+ -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+ x_libraries=$ac_optarg ;;
+
+ -*) { $as_echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
+ ;;
+
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { $as_echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ eval $ac_envvar=\$ac_optarg
+ export $ac_envvar ;;
+
+ *)
+ # FIXME: should be removed in autoconf 3.0.
+ $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ ;;
+
+ esac
+done
+
+if test -n "$ac_prev"; then
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { $as_echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
+fi
+
+if test -n "$ac_unrecognized_opts"; then
+ case $enable_option_checking in
+ no) ;;
+ fatal) { $as_echo "$as_me: error: unrecognized options: $ac_unrecognized_opts" >&2
+ { (exit 1); exit 1; }; } ;;
+ *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
+ esac
+fi
+
+# Check all directory arguments for consistency.
+for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
+ datadir sysconfdir sharedstatedir localstatedir includedir \
+ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
+ libdir localedir mandir
+do
+ eval ac_val=\$$ac_var
+ # Remove trailing slashes.
+ case $ac_val in
+ */ )
+ ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
+ eval $ac_var=\$ac_val;;
+ esac
+ # Be sure to have absolute directory names.
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) continue;;
+ NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
+ esac
+ { $as_echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; }
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+ac_pwd=`pwd` && test -n "$ac_pwd" &&
+ac_ls_di=`ls -di .` &&
+ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
+ { $as_echo "$as_me: error: working directory cannot be determined" >&2
+ { (exit 1); exit 1; }; }
+test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
+ { $as_echo "$as_me: error: pwd does not report name of working directory" >&2
+ { (exit 1); exit 1; }; }
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+ ac_srcdir_defaulted=yes
+ # Try the directory containing this script, then the parent directory.
+ ac_confdir=`$as_dirname -- "$as_myself" ||
+$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_myself" : 'X\(//\)[^/]' \| \
+ X"$as_myself" : 'X\(//\)$' \| \
+ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_myself" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ srcdir=$ac_confdir
+ if test ! -r "$srcdir/$ac_unique_file"; then
+ srcdir=..
+ fi
+else
+ ac_srcdir_defaulted=no
+fi
+if test ! -r "$srcdir/$ac_unique_file"; then
+ test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
+ { $as_echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
+fi
+ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
+ac_abs_confdir=`(
+ cd "$srcdir" && test -r "./$ac_unique_file" || { $as_echo "$as_me: error: $ac_msg" >&2
+ { (exit 1); exit 1; }; }
+ pwd)`
+# When building in place, set srcdir=.
+if test "$ac_abs_confdir" = "$ac_pwd"; then
+ srcdir=.
+fi
+# Remove unnecessary trailing slashes from srcdir.
+# Double slashes in file names in object file debugging info
+# mess up M-x gdb in Emacs.
+case $srcdir in
+*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
+esac
+for ac_var in $ac_precious_vars; do
+ eval ac_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_env_${ac_var}_value=\$${ac_var}
+ eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
+ eval ac_cv_env_${ac_var}_value=\$${ac_var}
+done
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # 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 XaoS 3.5 to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
+ --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
+ --infodir=DIR info documentation [DATAROOTDIR/info]
+ --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
+ --mandir=DIR man documentation [DATAROOTDIR/man]
+ --docdir=DIR documentation root [DATAROOTDIR/doc/xaos]
+ --htmldir=DIR html documentation [DOCDIR]
+ --dvidir=DIR dvi documentation [DOCDIR]
+ --pdfdir=DIR pdf documentation [DOCDIR]
+ --psdir=DIR ps documentation [DOCDIR]
+_ACEOF
+
+ cat <<\_ACEOF
+
+X features:
+ --x-includes=DIR X include files are in DIR
+ --x-libraries=DIR X library files are in DIR
+
+System types:
+ --build=BUILD configure for building on BUILD [guessed]
+ --host=HOST cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+ case $ac_init_help in
+ short | recursive ) echo "Configuration of XaoS 3.5:";;
+ esac
+ cat <<\_ACEOF
+
+Optional Features:
+ --disable-option-checking ignore unrecognized --enable/--with options
+ --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
+ --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
+ --enable-portable-binary
+ disable compiler optimizations that would produce
+ unportable binaries
+ --disable-rpath do not hardcode runtime library paths
+ --disable-nls do not use Native Language Support
+
+Optional Packages:
+ --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
+ --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
+ --with-gcc-arch=<arch> use architecture <arch> for gcc -march/-mtune,
+ instead of guessing
+ --with-gnu-ld assume the C compiler uses GNU ld default=no
+ --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
+ --without-libiconv-prefix don't search for libiconv in includedir and libdir
+ --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
+ --without-libintl-prefix don't search for libintl in includedir and libdir
+ --with-long-double=yes/no enables/disables usage of long double
+ --with-mitshm=yes/no enables/disables MIT shared memory support
+ --with-pthread=yes enables SMP support (experimental)
+ --with-png=yes/no enables/disables PNG saving support
+ --with-gsl=yes/no enables/disables GSL complex routines
+ --with-sffe=yes/no enables/disables SFFE (user formula evaluator) support
+ --with-x11-driver=no disables x11 driver
+ --with-gtk-driver=no disables GTK driver
+ --with-win32-driver=no disables Win32 driver
+ --with-aa-driver=no disables aa-lib driver
+ --with-x use the X Window System
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ LIBS libraries to pass to the linker, e.g. -l<library>
+ CPPFLAGS C/C++/Objective C preprocessor flags, e.g. -I<include dir> if
+ you have headers in a nonstandard directory <include dir>
+ XMKMF Path to xmkmf, Makefile generator for X Window System
+ CPP C preprocessor
+ PKG_CONFIG path to pkg-config utility
+ DEPS_CFLAGS C compiler flags for DEPS, overriding pkg-config
+ DEPS_LIBS linker flags for DEPS, overriding pkg-config
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <xaos-devel@lists.sourceforge.net>.
+_ACEOF
+ac_status=$?
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d "$ac_dir" ||
+ { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
+ continue
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+ cd "$ac_dir" || { ac_status=$?; continue; }
+ # Check for guested configure.
+ if test -f "$ac_srcdir/configure.gnu"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure.gnu" --help=recursive
+ elif test -f "$ac_srcdir/configure"; then
+ echo &&
+ $SHELL "$ac_srcdir/configure" --help=recursive
+ else
+ $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi || ac_status=$?
+ cd "$ac_pwd" || { ac_status=$?; break; }
+ done
+fi
+
+test -n "$ac_init_help" && exit $ac_status
+if $ac_init_version; then
+ cat <<\_ACEOF
+XaoS configure 3.5
+generated by GNU Autoconf 2.63
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+2002, 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit
+fi
+cat >config.log <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by XaoS $as_me 3.5, which was
+generated by GNU Autoconf 2.63. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+exec 5>>config.log
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ $as_echo "PATH: $as_dir"
+done
+IFS=$as_save_IFS
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+ for ac_arg
+ do
+ case $ac_arg in
+ -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil)
+ continue ;;
+ *\'*)
+ ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case $ac_pass in
+ 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+ 2)
+ ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+ if test $ac_must_keep_next = true; then
+ ac_must_keep_next=false # Got value, back to normal.
+ else
+ case $ac_arg in
+ *=* | --config-cache | -C | -disable-* | --disable-* \
+ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+ | -with-* | --with-* | -without-* | --without-* | --x)
+ case "$ac_configure_args0 " in
+ "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+ esac
+ ;;
+ -* ) ac_must_keep_next=true ;;
+ esac
+ fi
+ ac_configure_args="$ac_configure_args '$ac_arg'"
+ ;;
+ esac
+ done
+done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Use '\'' to represent an apostrophe within the trap.
+# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+(
+ for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+ (set) 2>&1 |
+ case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ sed -n \
+ "s/'\''/'\''\\\\'\'''\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
+ ;; #(
+ *)
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+)
+ echo
+
+ cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_vars
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+
+ if test -n "$ac_subst_files"; then
+ cat <<\_ASBOX
+## ------------------- ##
+## File substitutions. ##
+## ------------------- ##
+_ASBOX
+ echo
+ for ac_var in $ac_subst_files
+ do
+ eval ac_val=\$$ac_var
+ case $ac_val in
+ *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
+ esac
+ $as_echo "$ac_var='\''$ac_val'\''"
+ done | sort
+ echo
+ fi
+
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ cat confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ $as_echo "$as_me: caught signal $ac_signal"
+ $as_echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core *.core core.conftest.* &&
+ rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -f -r conftest* confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer an explicitly selected file to automatically selected ones.
+ac_site_file1=NONE
+ac_site_file2=NONE
+if test -n "$CONFIG_SITE"; then
+ ac_site_file1=$CONFIG_SITE
+elif test "x$prefix" != xNONE; then
+ ac_site_file1=$prefix/share/config.site
+ ac_site_file2=$prefix/etc/config.site
+else
+ ac_site_file1=$ac_default_prefix/share/config.site
+ ac_site_file2=$ac_default_prefix/etc/config.site
+fi
+for ac_site_file in "$ac_site_file1" "$ac_site_file2"
+do
+ test "x$ac_site_file" = xNONE && continue
+ if test -r "$ac_site_file"; then
+ { $as_echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+$as_echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
+ . "$ac_site_file"
+ fi
+done
+
+if test -r "$cache_file"; then
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { $as_echo "$as_me:$LINENO: loading cache $cache_file" >&5
+$as_echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . "$cache_file";;
+ *) . "./$cache_file";;
+ esac
+ fi
+else
+ { $as_echo "$as_me:$LINENO: creating cache $cache_file" >&5
+$as_echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+gt_needs="$gt_needs "
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in $ac_precious_vars; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val=\$ac_cv_env_${ac_var}_value
+ eval ac_new_val=\$ac_env_${ac_var}_value
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ # differences in whitespace do not lead to failure.
+ ac_old_val_w=`echo x $ac_old_val`
+ ac_new_val_w=`echo x $ac_new_val`
+ if test "$ac_old_val_w" != "$ac_new_val_w"; then
+ { $as_echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ ac_cache_corrupted=:
+ else
+ { $as_echo "$as_me:$LINENO: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
+$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
+ eval $ac_var=\$ac_old_val
+ fi
+ { $as_echo "$as_me:$LINENO: former value: \`$ac_old_val'" >&5
+$as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
+ { $as_echo "$as_me:$LINENO: current value: \`$ac_new_val'" >&5
+$as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+ { $as_echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { $as_echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+$as_echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
+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_config_headers="$ac_config_headers src/include/aconfig.h src/include/version.h"
+
+
+ac_aux_dir=
+for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ if test -f "$ac_dir/install-sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install-sh -c"
+ break
+ elif test -f "$ac_dir/install.sh"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/install.sh -c"
+ break
+ elif test -f "$ac_dir/shtool"; then
+ ac_aux_dir=$ac_dir
+ ac_install_sh="$ac_aux_dir/shtool install -c"
+ break
+ fi
+done
+if test -z "$ac_aux_dir"; then
+ { { $as_echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5
+$as_echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+# These three variables are undocumented and unsupported,
+# and are intended to be withdrawn in a future Autoconf release.
+# They can cause serious problems if a builder's source tree is in a directory
+# whose full name contains unusual characters.
+ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
+ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
+ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
+
+
+# Make sure we can run config.sub.
+$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
+ { { $as_echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5
+$as_echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;}
+ { (exit 1); exit 1; }; }
+
+{ $as_echo "$as_me:$LINENO: checking build system type" >&5
+$as_echo_n "checking build system type... " >&6; }
+if test "${ac_cv_build+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_build_alias=$build_alias
+test "x$ac_build_alias" = x &&
+ ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
+test "x$ac_build_alias" = x &&
+ { { $as_echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+$as_echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+ { (exit 1); exit 1; }; }
+ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+$as_echo "$ac_cv_build" >&6; }
+case $ac_cv_build in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical build" >&5
+$as_echo "$as_me: error: invalid value of canonical build" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+build=$ac_cv_build
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_build
+shift
+build_cpu=$1
+build_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+build_os=$*
+IFS=$ac_save_IFS
+case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
+
+
+{ $as_echo "$as_me:$LINENO: checking host system type" >&5
+$as_echo_n "checking host system type... " >&6; }
+if test "${ac_cv_host+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "x$host_alias" = x; then
+ ac_cv_host=$ac_cv_build
+else
+ ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
+ { { $as_echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5
+$as_echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;}
+ { (exit 1); exit 1; }; }
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+$as_echo "$ac_cv_host" >&6; }
+case $ac_cv_host in
+*-*-*) ;;
+*) { { $as_echo "$as_me:$LINENO: error: invalid value of canonical host" >&5
+$as_echo "$as_me: error: invalid value of canonical host" >&2;}
+ { (exit 1); exit 1; }; };;
+esac
+host=$ac_cv_host
+ac_save_IFS=$IFS; IFS='-'
+set x $ac_cv_host
+shift
+host_cpu=$1
+host_vendor=$2
+shift; shift
+# Remember, the first character of IFS is used to create $*,
+# except with old shells:
+host_os=$*
+IFS=$ac_save_IFS
+case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
+
+
+# Force compilation without cygwin dependency
+case $host_os in
+ *cygwin*) CC='gcc -mno-cygwin' ;;
+esac
+
+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
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ fi
+fi
+if test -z "$CC"; then
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+ ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+if test $ac_prog_rejected = yes; then
+ # We found a bogon in the path, so make sure we never use it.
+ set dummy $ac_cv_prog_CC
+ shift
+ if test $# != 0; then
+ # We chose a different compiler from the bogus one.
+ # However, it has the same basename, so the bogon will be chosen
+ # first if we set CC to just the basename; use the full file name.
+ shift
+ ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+ fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl.exe
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ { $as_echo "$as_me:$LINENO: result: $CC" >&5
+$as_echo "$CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl.exe
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+$as_echo "$ac_ct_CC" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$ac_ct_CC" && break
+done
+
+ if test "x$ac_ct_CC" = x; then
+ CC=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ CC=$ac_ct_CC
+ fi
+fi
+
+fi
+
+
+test -z "$CC" && { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+
+# Provide some information about the compiler.
+$as_echo "$as_me:$LINENO: checking for C compiler version" >&5
+set X $ac_compile
+ac_compiler=$2
+{ (ac_try="$ac_compiler --version >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler --version >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -v >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -v >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (ac_try="$ac_compiler -V >&5"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compiler -V >&5") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+{ $as_echo "$as_me:$LINENO: checking for C compiler default output file name" >&5
+$as_echo_n "checking for C compiler default output file name... " >&6; }
+ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+
+# The possible output files:
+ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
+
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
+
+if { (ac_try="$ac_link_default"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link_default") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
+# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
+# in a Makefile. We should not override ac_cv_exeext if it was cached,
+# so that the user can short-circuit this test for compilers unknown to
+# Autoconf.
+for ac_file in $ac_files ''
+do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
+ ;;
+ [ab].out )
+ # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* )
+ if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
+ then :; else
+ ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ fi
+ # We set ac_cv_exeext here because the later test for it is not
+ # safe: cross compilers may not add the suffix if given an `-o'
+ # argument, so we may need to know it at that point already.
+ # Even if this section looks crufty: it has the advantage of
+ # actually working.
+ break;;
+ * )
+ break;;
+ esac
+done
+test "$ac_cv_exeext" = no && ac_cv_exeext=
+
+else
+ ac_file=''
+fi
+
+{ $as_echo "$as_me:$LINENO: result: $ac_file" >&5
+$as_echo "$ac_file" >&6; }
+if test -z "$ac_file"; then
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+$as_echo_n "checking whether the C compiler works... " >&6; }
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
+ else
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+ fi
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+
+rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check that the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+{ $as_echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+$as_echo_n "checking whether we are cross compiling... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $cross_compiling" >&5
+$as_echo "$cross_compiling" >&6; }
+
+{ $as_echo "$as_me:$LINENO: checking for suffix of executables" >&5
+$as_echo_n "checking for suffix of executables... " >&6; }
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+ test -f "$ac_file" || continue
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ break;;
+ * ) break;;
+ esac
+done
+else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+$as_echo "$ac_cv_exeext" >&6; }
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+{ $as_echo "$as_me:$LINENO: checking for suffix of object files" >&5
+$as_echo_n "checking for suffix of object files... " >&6; }
+if test "${ac_cv_objext+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in conftest.o conftest.obj conftest.*; do
+ test -f "$ac_file" || continue;
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+$as_echo "$ac_cv_objext" >&6; }
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+{ $as_echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_compiler_gnu=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_compiler_gnu=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+$as_echo "$ac_cv_c_compiler_gnu" >&6; }
+if test $ac_compiler_gnu = yes; then
+ GCC=yes
+else
+ GCC=
+fi
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+{ $as_echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+$as_echo_n "checking whether $CC accepts -g... " >&6; }
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_save_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ ac_cv_prog_cc_g=no
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ CFLAGS=""
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_c_werror_flag=$ac_save_c_werror_flag
+ CFLAGS="-g"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_g=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ ac_c_werror_flag=$ac_save_c_werror_flag
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+$as_echo "$ac_cv_prog_cc_g" >&6; }
+if test "$ac_test_CFLAGS" = set; then
+ CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+ if test "$GCC" = yes; then
+ CFLAGS="-g -O2"
+ else
+ CFLAGS="-g"
+ fi
+else
+ if test "$GCC" = yes; then
+ CFLAGS="-O2"
+ else
+ CFLAGS=
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5
+$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
+if test "${ac_cv_prog_cc_c89+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_prog_cc_c89=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+ char **p;
+ int i;
+{
+ return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+ char *s;
+ va_list v;
+ va_start (v,p);
+ s = g (p, va_arg (v,int));
+ va_end (v);
+ return s;
+}
+
+/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
+ function prototypes and stuff, but not '\xHH' hex character constants.
+ These don't provoke an error unfortunately, instead are silently treated
+ as 'x'. The following induces an error, until -std is added to get
+ proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
+ array size at least. It's necessary to write '\x00'==0 to get something
+ that's true only with -std. */
+int osf4_cc_array ['\x00' == 0 ? 1 : -1];
+
+/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
+ inside strings and character constants. */
+#define FOO(x) 'x'
+int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
+
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
+ ;
+ return 0;
+}
+_ACEOF
+for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
+ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+ CC="$ac_save_CC $ac_arg"
+ rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_prog_cc_c89=$ac_arg
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext
+ test "x$ac_cv_prog_cc_c89" != "xno" && break
+done
+rm -f conftest.$ac_ext
+CC=$ac_save_CC
+
+fi
+# AC_CACHE_VAL
+case "x$ac_cv_prog_cc_c89" in
+ x)
+ { $as_echo "$as_me:$LINENO: result: none needed" >&5
+$as_echo "none needed" >&6; } ;;
+ xno)
+ { $as_echo "$as_me:$LINENO: result: unsupported" >&5
+$as_echo "unsupported" >&6; } ;;
+ *)
+ CC="$CC $ac_cv_prog_cc_c89"
+ { $as_echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5
+$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
+esac
+
+
+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
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for C compiler vendor" >&5
+$as_echo_n "checking for C compiler vendor... " >&6; }
+if test "${ax_cv_c_compiler_vendor+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ax_cv_c_compiler_vendor=unknown
+ # note: don't check for gcc first since some other compilers define __GNUC__
+ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+ vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+#if !($vencpp)
+ thisisanerror;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ax_cv_c_compiler_vendor=`echo $ventest | cut -d: -f1`; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ax_cv_c_compiler_vendor" >&5
+$as_echo "$ax_cv_c_compiler_vendor" >&6; }
+
+
+
+
+
+
+# Check whether --enable-portable-binary was given.
+if test "${enable_portable_binary+set}" = set; then
+ enableval=$enable_portable_binary; acx_maxopt_portable=$withval
+else
+ acx_maxopt_portable=no
+fi
+
+
+# Try to determine "good" native compiler flags if none specified via CFLAGS
+if test "$ac_test_CFLAGS" != "set"; then
+ CFLAGS=""
+ case $ax_cv_c_compiler_vendor in
+ dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
+ if test "x$acx_maxopt_portable" = xno; then
+ CFLAGS="$CFLAGS -arch host"
+ fi;;
+
+ sun) CFLAGS="-native -fast -xO5 -dalign"
+ if test "x$acx_maxopt_portable" = xyes; then
+ CFLAGS="$CFLAGS -xarch=generic"
+ fi;;
+
+ hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
+ if test "x$acx_maxopt_portable" = xyes; then
+ CFLAGS="$CFLAGS +DAportable"
+ fi;;
+
+ ibm) if test "x$acx_maxopt_portable" = xno; then
+ xlc_opt="-qarch=auto -qtune=auto"
+ else
+ xlc_opt="-qtune=auto"
+ fi
+ { $as_echo "$as_me:$LINENO: checking whether C compiler accepts $xlc_opt" >&5
+$as_echo_n "checking whether C compiler accepts $xlc_opt... " >&6; }
+ax_save_FLAGS=$CFLAGS
+ CFLAGS="$xlc_opt"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_save_FLAGS
+eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$xlc_opt" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+$as_echo "$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+ CFLAGS="-O3 -qansialias -w $xlc_opt"
+else
+ CFLAGS="-O3 -qansialias -w"
+ echo "******************************************************"
+ echo "* You seem to have the IBM C compiler. It is *"
+ echo "* recommended for best performance that you use: *"
+ echo "* *"
+ echo "* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *"
+ echo "* ^^^ ^^^ *"
+ echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *"
+ echo "* CPU you have. (Set the CFLAGS environment var. *"
+ echo "* and re-run configure.) For more info, man cc. *"
+ echo "******************************************************"
+fi
+
+ ;;
+
+ intel) CFLAGS="-O3 -ansi_alias"
+ if test "x$acx_maxopt_portable" = xno; then
+ icc_archflag=unknown
+ icc_flags=""
+ case $host_cpu in
+ i686*|x86_64*)
+ # icc accepts gcc assembly syntax, so these should work:
+
+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
+
+{ $as_echo "$as_me:$LINENO: checking for x86 cpuid 0 output" >&5
+$as_echo_n "checking for x86 cpuid 0 output... " >&6; }
+if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ax_cv_gcc_x86_cpuid_0=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+
+ int op = 0, eax, ebx, ecx, edx;
+ FILE *f;
+ __asm__("cpuid"
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+ : "a" (op));
+ f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+ fclose(f);
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_0" >&5
+$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; }
+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=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
+
+{ $as_echo "$as_me:$LINENO: checking for x86 cpuid 1 output" >&5
+$as_echo_n "checking for x86 cpuid 1 output... " >&6; }
+if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ax_cv_gcc_x86_cpuid_1=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+
+ int op = 1, eax, ebx, ecx, edx;
+ FILE *f;
+ __asm__("cpuid"
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+ : "a" (op));
+ f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+ fclose(f);
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_1" >&5
+$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; }
+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
+
+
+ case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
+ *:756e6547:*:*) # Intel
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *6a?:*[234]:*:*|*6[789b]?:*:*:*) icc_flags="-xK";;
+ *f3[347]:*:*:*|*f41347:*:*:*) icc_flags="-xP -xN -xW -xK";;
+ *f??:*:*:*) icc_flags="-xN -xW -xK";;
+ esac ;;
+ esac ;;
+ esac
+ if test "x$icc_flags" != x; then
+ for flag in $icc_flags; do
+ { $as_echo "$as_me:$LINENO: checking whether C compiler accepts $flag" >&5
+$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
+ax_save_FLAGS=$CFLAGS
+ CFLAGS="$flag"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_save_FLAGS
+eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+$as_echo "$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+ icc_archflag=$flag; break
+else
+ :
+fi
+
+ done
+ fi
+ { $as_echo "$as_me:$LINENO: checking for icc architecture flag" >&5
+$as_echo_n "checking for icc architecture flag... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $icc_archflag" >&5
+$as_echo "$icc_archflag" >&6; }
+ if test "x$icc_archflag" != xunknown; then
+ CFLAGS="$CFLAGS $icc_archflag"
+ fi
+ fi
+ ;;
+
+ gnu)
+ # default optimization flags for gcc on all systems
+ # 2009-07-30 JB Langston
+ # removed -fomit-frame-pointer due to incompatibility with SFFE
+ CFLAGS="-O3"
+
+ # -malign-double for x86 systems
+ { $as_echo "$as_me:$LINENO: checking whether C compiler accepts -malign-double" >&5
+$as_echo_n "checking whether C compiler accepts -malign-double... " >&6; }
+if test "${ax_cv_c_flags__malign_double+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_save_FLAGS=$CFLAGS
+ CFLAGS="-malign-double"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ax_cv_c_flags__malign_double=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ax_cv_c_flags__malign_double=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags__malign_double
+{ $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+$as_echo "$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+ CFLAGS="$CFLAGS -malign-double"
+else
+ :
+fi
+
+
+ # -fstrict-aliasing for gcc-2.95+
+ { $as_echo "$as_me:$LINENO: checking whether C compiler accepts -fstrict-aliasing" >&5
+$as_echo_n "checking whether C compiler accepts -fstrict-aliasing... " >&6; }
+if test "${ax_cv_c_flags__fstrict_aliasing+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_save_FLAGS=$CFLAGS
+ CFLAGS="-fstrict-aliasing"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ax_cv_c_flags__fstrict_aliasing=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ax_cv_c_flags__fstrict_aliasing=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags__fstrict_aliasing
+{ $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+$as_echo "$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+ CFLAGS="$CFLAGS -fstrict-aliasing"
+else
+ :
+fi
+
+
+ # note that we enable "unsafe" fp optimization with other compilers, too
+ { $as_echo "$as_me:$LINENO: checking whether C compiler accepts -ffast-math" >&5
+$as_echo_n "checking whether C compiler accepts -ffast-math... " >&6; }
+if test "${ax_cv_c_flags__ffast_math+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ ax_save_FLAGS=$CFLAGS
+ CFLAGS="-ffast-math"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ax_cv_c_flags__ffast_math=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ax_cv_c_flags__ffast_math=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_save_FLAGS
+fi
+
+eval ax_check_compiler_flags=$ax_cv_c_flags__ffast_math
+{ $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+$as_echo "$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+ CFLAGS="$CFLAGS -ffast-math"
+else
+ :
+fi
+
+
+
+
+
+
+# Check whether --with-gcc-arch was given.
+if test "${with_gcc_arch+set}" = set; then
+ withval=$with_gcc_arch; ax_gcc_arch=$withval
+else
+ ax_gcc_arch=yes
+fi
+
+
+{ $as_echo "$as_me:$LINENO: checking for gcc architecture flag" >&5
+$as_echo_n "checking for gcc architecture flag... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: " >&5
+$as_echo "" >&6; }
+if test "${ax_cv_gcc_archflag+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ax_cv_gcc_archflag="unknown"
+
+if test "$GCC" = yes; then
+
+if test "x$ax_gcc_arch" = xyes; then
+ax_gcc_arch=""
+if test "$cross_compiling" = no; then
+case $host_cpu in
+ i[3456]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
+
+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
+
+{ $as_echo "$as_me:$LINENO: checking for x86 cpuid 0 output" >&5
+$as_echo_n "checking for x86 cpuid 0 output... " >&6; }
+if test "${ax_cv_gcc_x86_cpuid_0+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ax_cv_gcc_x86_cpuid_0=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+
+ int op = 0, eax, ebx, ecx, edx;
+ FILE *f;
+ __asm__("cpuid"
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+ : "a" (op));
+ f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+ fclose(f);
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ax_cv_gcc_x86_cpuid_0=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_0=unknown; rm -f conftest_cpuid
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_0" >&5
+$as_echo "$ax_cv_gcc_x86_cpuid_0" >&6; }
+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=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
+
+{ $as_echo "$as_me:$LINENO: checking for x86 cpuid 1 output" >&5
+$as_echo_n "checking for x86 cpuid 1 output... " >&6; }
+if test "${ax_cv_gcc_x86_cpuid_1+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ax_cv_gcc_x86_cpuid_1=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+
+ int op = 1, eax, ebx, ecx, edx;
+ FILE *f;
+ __asm__("cpuid"
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+ : "a" (op));
+ f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+ fclose(f);
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ax_cv_gcc_x86_cpuid_1=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_1=unknown; rm -f conftest_cpuid
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_1" >&5
+$as_echo "$ax_cv_gcc_x86_cpuid_1" >&6; }
+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
+
+
+ case $ax_cv_gcc_x86_cpuid_0 in
+ *:756e6547:*:*) # Intel
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *5[48]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
+ *5??:*:*:*) ax_gcc_arch=pentium ;;
+ *6[3456]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+ *6a?:*[01]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+ *6a?:*[234]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+ *6[9d]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
+ *6[78b]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+ *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
+ *f3[347]:*:*:*|*f41347:*:*:*)
+ case $host_cpu in
+ x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
+ *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
+ esac ;;
+ *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
+ esac ;;
+ *:68747541:*:*) # AMD
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *5[67]?:*:*:*) ax_gcc_arch=k6 ;;
+ *5[8d]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
+ *5[9]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
+ *60?:*:*:*) ax_gcc_arch=k7 ;;
+ *6[12]?:*:*:*) ax_gcc_arch="athlon k7" ;;
+ *6[34]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
+ *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
+ *6[68a]?:*:*:*)
+
+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
+
+{ $as_echo "$as_me:$LINENO: checking for x86 cpuid 0x80000006 output" >&5
+$as_echo_n "checking for x86 cpuid 0x80000006 output... " >&6; }
+if test "${ax_cv_gcc_x86_cpuid_0x80000006+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ax_cv_gcc_x86_cpuid_0x80000006=unknown
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdio.h>
+int
+main ()
+{
+
+ int op = 0x80000006, eax, ebx, ecx, edx;
+ FILE *f;
+ __asm__("cpuid"
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+ : "a" (op));
+ f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+ fclose(f);
+ return 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ax_cv_gcc_x86_cpuid_0x80000006=`cat conftest_cpuid`; rm -f conftest_cpuid
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ax_cv_gcc_x86_cpuid_0x80000006=unknown; rm -f conftest_cpuid
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_x86_cpuid_0x80000006" >&5
+$as_echo "$ax_cv_gcc_x86_cpuid_0x80000006" >&6; }
+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
+
+ # L2 cache size
+ case $ax_cv_gcc_x86_cpuid_0x80000006 in
+ *:*:*[1-9a-f]??????:*) # (L2 = ecx >> 16) >= 256
+ ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
+ *) ax_gcc_arch="athlon-4 athlon k7" ;;
+ esac ;;
+ *f[4cef8b]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
+ *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
+ *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
+ *f??:*:*:*) ax_gcc_arch="k8" ;;
+ esac ;;
+ *:746e6543:*:*) # IDT
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
+ *58?:*:*:*) ax_gcc_arch=winchip2 ;;
+ *6[78]?:*:*:*) ax_gcc_arch=c3 ;;
+ *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
+ esac ;;
+ esac
+ if test x"$ax_gcc_arch" = x; then # fallback
+ case $host_cpu in
+ i586*) ax_gcc_arch=pentium ;;
+ i686*) ax_gcc_arch=pentiumpro ;;
+ esac
+ fi
+ ;;
+
+ sparc*)
+ # Extract the first word of "prtdiag", so it can be a program name with args.
+set dummy prtdiag; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PRTDIAG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $PRTDIAG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PRTDIAG="$PRTDIAG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/"
+for as_dir in $as_dummy
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PRTDIAG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_PRTDIAG" && ac_cv_path_PRTDIAG="prtdiag"
+ ;;
+esac
+fi
+PRTDIAG=$ac_cv_path_PRTDIAG
+if test -n "$PRTDIAG"; then
+ { $as_echo "$as_me:$LINENO: result: $PRTDIAG" >&5
+$as_echo "$PRTDIAG" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
+ cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
+ case $cputype in
+ *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
+ *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
+ *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
+ *supersparc*|*tms390z5[05]*) ax_gcc_arch="supersparc v8" ;;
+ *hypersparc*|*rt62[056]*) ax_gcc_arch="hypersparc v8" ;;
+ *cypress*) ax_gcc_arch=cypress ;;
+ esac ;;
+
+ alphaev5) ax_gcc_arch=ev5 ;;
+ alphaev56) ax_gcc_arch=ev56 ;;
+ alphapca56) ax_gcc_arch="pca56 ev56" ;;
+ alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
+ alphaev6) ax_gcc_arch=ev6 ;;
+ alphaev67) ax_gcc_arch=ev67 ;;
+ alphaev68) ax_gcc_arch="ev68 ev67" ;;
+ alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
+ alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
+ alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
+
+ powerpc*)
+ cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
+ cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
+ case $cputype in
+ *750*) ax_gcc_arch="750 G3" ;;
+ *740[0-9]*) ax_gcc_arch="$cputype 7400 G4" ;;
+ *74[4-5][0-9]*) ax_gcc_arch="$cputype 7450 G4" ;;
+ *74[0-9][0-9]*) ax_gcc_arch="$cputype G4" ;;
+ *970*) ax_gcc_arch="970 G5 power4";;
+ *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
+ *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
+ 603ev|8240) ax_gcc_arch="$cputype 603e 603";;
+ *) ax_gcc_arch=$cputype ;;
+ esac
+ ax_gcc_arch="$ax_gcc_arch powerpc"
+ ;;
+esac
+fi # not cross-compiling
+fi # guess arch
+
+if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
+for arch in $ax_gcc_arch; do
+ if test "x$acx_maxopt_portable" = xyes; then # if we require portable code
+ flags="-mtune=$arch"
+ # -mcpu=$arch and m$arch generate nonportable code on every arch except
+ # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr.
+ case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
+ else
+ flags="-march=$arch -mcpu=$arch -m$arch"
+ fi
+ for flag in $flags; do
+ { $as_echo "$as_me:$LINENO: checking whether C compiler accepts $flag" >&5
+$as_echo_n "checking whether C compiler accepts $flag... " >&6; }
+ax_save_FLAGS=$CFLAGS
+ CFLAGS="$flag"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_save_FLAGS
+eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$flag" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+$as_echo "$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+ ax_cv_gcc_archflag=$flag; break
+else
+ :
+fi
+
+ done
+ test "x$ax_cv_gcc_archflag" = xunknown || break
+done
+fi
+
+fi # $GCC=yes
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for gcc architecture flag" >&5
+$as_echo_n "checking for gcc architecture flag... " >&6; }
+{ $as_echo "$as_me:$LINENO: result: $ax_cv_gcc_archflag" >&5
+$as_echo "$ax_cv_gcc_archflag" >&6; }
+if test "x$ax_cv_gcc_archflag" = xunknown; then
+ :
+else
+ CFLAGS="$CFLAGS $ax_cv_gcc_archflag"
+fi
+
+ ;;
+ esac
+
+ if test -z "$CFLAGS"; then
+ echo ""
+ echo "********************************************************"
+ echo "* WARNING: Don't know the best CFLAGS for this system *"
+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
+ echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
+ echo "********************************************************"
+ echo ""
+ CFLAGS="-O3"
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking whether C compiler accepts $CFLAGS" >&5
+$as_echo_n "checking whether C compiler accepts $CFLAGS... " >&6; }
+ax_save_FLAGS=$CFLAGS
+ CFLAGS="$CFLAGS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval `$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$ax_save_FLAGS
+eval ax_check_compiler_flags=$`$as_echo "ax_cv_c_flags_$CFLAGS" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: result: $ax_check_compiler_flags" >&5
+$as_echo "$ax_check_compiler_flags" >&6; }
+if test "x$ax_check_compiler_flags" = xyes; then
+ :
+else
+
+ echo ""
+ echo "********************************************************"
+ echo "* WARNING: The guessed CFLAGS don't seem to work with *"
+ echo "* your compiler. *"
+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
+ echo "********************************************************"
+ echo ""
+ CFLAGS=""
+
+fi
+
+
+fi
+
+
+
+
+ if test "X$prefix" = "XNONE"; then
+ acl_final_prefix="$ac_default_prefix"
+ else
+ acl_final_prefix="$prefix"
+ fi
+ if test "X$exec_prefix" = "XNONE"; then
+ acl_final_exec_prefix='${prefix}'
+ else
+ acl_final_exec_prefix="$exec_prefix"
+ fi
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-gnu-ld was given.
+if test "${with_gnu_ld+set}" = set; then
+ withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
+else
+ with_gnu_ld=no
+fi
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+ac_prog=ld
+if test "$GCC" = yes; then
+ # Check if gcc -print-prog-name=ld gives a path.
+ { $as_echo "$as_me:$LINENO: checking for ld used by GCC" >&5
+$as_echo_n "checking for ld used by GCC... " >&6; }
+ case $host in
+ *-*-mingw*)
+ # gcc leaves a trailing carriage return which upsets mingw
+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
+ *)
+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
+ esac
+ case $ac_prog in
+ # Accept absolute paths.
+ [\\/]* | [A-Za-z]:[\\/]*)
+ re_direlt='/[^/][^/]*/\.\./'
+ # Canonicalize the path of ld
+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
+ done
+ test -z "$LD" && LD="$ac_prog"
+ ;;
+ "")
+ # If it fails, then pretend we aren't using GCC.
+ ac_prog=ld
+ ;;
+ *)
+ # If it is relative, then search for the first ld in PATH.
+ with_gnu_ld=unknown
+ ;;
+ esac
+elif test "$with_gnu_ld" = yes; then
+ { $as_echo "$as_me:$LINENO: checking for GNU ld" >&5
+$as_echo_n "checking for GNU ld... " >&6; }
+else
+ { $as_echo "$as_me:$LINENO: checking for non-GNU ld" >&5
+$as_echo_n "checking for non-GNU ld... " >&6; }
+fi
+if test "${acl_cv_path_LD+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$LD"; then
+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
+ for ac_dir in $PATH; do
+ test -z "$ac_dir" && ac_dir=.
+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
+ acl_cv_path_LD="$ac_dir/$ac_prog"
+ # Check to see if the program is GNU ld. I'd rather use --version,
+ # but apparently some GNU ld's only accept -v.
+ # Break only if it was the GNU/non-GNU ld that we prefer.
+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
+ *GNU* | *'with BFD'*)
+ test "$with_gnu_ld" != no && break ;;
+ *)
+ test "$with_gnu_ld" != yes && break ;;
+ esac
+ fi
+ done
+ IFS="$ac_save_ifs"
+else
+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
+fi
+fi
+
+LD="$acl_cv_path_LD"
+if test -n "$LD"; then
+ { $as_echo "$as_me:$LINENO: result: $LD" >&5
+$as_echo "$LD" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+test -z "$LD" && { { $as_echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5
+$as_echo "$as_me: error: no acceptable ld found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+{ $as_echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5
+$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
+if test "${acl_cv_prog_gnu_ld+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ # I'd rather use --version here, but apparently some GNU ld's only accept -v.
+case `$LD -v 2>&1 </dev/null` in
+*GNU* | *'with BFD'*)
+ acl_cv_prog_gnu_ld=yes ;;
+*)
+ acl_cv_prog_gnu_ld=no ;;
+esac
+fi
+{ $as_echo "$as_me:$LINENO: result: $acl_cv_prog_gnu_ld" >&5
+$as_echo "$acl_cv_prog_gnu_ld" >&6; }
+with_gnu_ld=$acl_cv_prog_gnu_ld
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for shared library run path origin" >&5
+$as_echo_n "checking for shared library run path origin... " >&6; }
+if test "${acl_cv_rpath+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
+ . ./conftest.sh
+ rm -f ./conftest.sh
+ acl_cv_rpath=done
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5
+$as_echo "$acl_cv_rpath" >&6; }
+ wl="$acl_cv_wl"
+ acl_libext="$acl_cv_libext"
+ acl_shlibext="$acl_cv_shlibext"
+ acl_libname_spec="$acl_cv_libname_spec"
+ acl_library_names_spec="$acl_cv_library_names_spec"
+ acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
+ acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
+ acl_hardcode_direct="$acl_cv_hardcode_direct"
+ acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
+ # Check whether --enable-rpath was given.
+if test "${enable_rpath+set}" = set; then
+ enableval=$enable_rpath; :
+else
+ enable_rpath=yes
+fi
+
+
+
+ acl_libdirstem=lib
+ searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
+ if test -n "$searchpath"; then
+ acl_save_IFS="${IFS= }"; IFS=":"
+ for searchdir in $searchpath; do
+ if test -d "$searchdir"; then
+ case "$searchdir" in
+ */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
+ *) searchdir=`cd "$searchdir" && pwd`
+ case "$searchdir" in
+ */lib64 ) acl_libdirstem=lib64 ;;
+ esac ;;
+ esac
+ fi
+ done
+ IFS="$acl_save_IFS"
+ fi
+
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libiconv-prefix was given.
+if test "${with_libiconv_prefix+set}" = set; then
+ withval=$with_libiconv_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+
+fi
+
+ LIBICONV=
+ LTLIBICONV=
+ INCICONV=
+ LIBICONV_PREFIX=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='iconv '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ LIBICONV_PREFIX="$basedir"
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBICONV; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
+ done
+ fi
+
+
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:$LINENO: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ am_cv_func_iconv=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:$LINENO: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ if test "$cross_compiling" = yes; then
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_func_iconv_works=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+am_cv_func_iconv_works=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:$LINENO: checking for iconv declaration" >&5
+$as_echo_n "checking for iconv declaration... " >&6; }
+ if test "${am_cv_proto_iconv+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <stdlib.h>
+#include <iconv.h>
+extern
+#ifdef __cplusplus
+"C"
+#endif
+#if defined(__STDC__) || defined(__cplusplus)
+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
+#else
+size_t iconv();
+#endif
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ am_cv_proto_iconv_arg1=""
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ am_cv_proto_iconv_arg1="const"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"
+fi
+
+ am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
+ { $as_echo "$as_me:$LINENO: result: ${ac_t:-
+ }$am_cv_proto_iconv" >&5
+$as_echo "${ac_t:-
+ }$am_cv_proto_iconv" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define ICONV_CONST $am_cv_proto_iconv_arg1
+_ACEOF
+
+ fi
+
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+{ $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
+$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
+if test -z "$MKDIR_P"; then
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in mkdir gmkdir; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
+ case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
+ 'mkdir (GNU coreutils) '* | \
+ 'mkdir (coreutils) '* | \
+ 'mkdir (fileutils) '4.1*)
+ ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
+ break 3;;
+ esac
+ done
+ done
+done
+IFS=$as_save_IFS
+
+fi
+
+ if test "${ac_cv_path_mkdir+set}" = set; then
+ MKDIR_P="$ac_cv_path_mkdir -p"
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for MKDIR_P within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ test -d ./--version && rmdir ./--version
+ MKDIR_P="$ac_install_sh -d"
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $MKDIR_P" >&5
+$as_echo "$MKDIR_P" >&6; }
+
+mkdir_p="$MKDIR_P"
+case $mkdir_p in
+ [\\/$]* | ?:[\\/]*) ;;
+ */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
+esac
+
+
+ { $as_echo "$as_me:$LINENO: checking whether NLS is requested" >&5
+$as_echo_n "checking whether NLS is requested... " >&6; }
+ # Check whether --enable-nls was given.
+if test "${enable_nls+set}" = set; then
+ enableval=$enable_nls; USE_NLS=$enableval
+else
+ USE_NLS=yes
+fi
+
+ { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+
+
+
+
+ GETTEXT_MACRO_VERSION=0.17
+
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgfmt", so it can be a program name with args.
+set dummy msgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGFMT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGFMT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
+ ;;
+esac
+fi
+MSGFMT="$ac_cv_path_MSGFMT"
+if test "$MSGFMT" != ":"; then
+ { $as_echo "$as_me:$LINENO: result: $MSGFMT" >&5
+$as_echo "$MSGFMT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ # Extract the first word of "gmsgfmt", so it can be a program name with args.
+set dummy gmsgfmt; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GMSGFMT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $GMSGFMT in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
+ ;;
+esac
+fi
+GMSGFMT=$ac_cv_path_GMSGFMT
+if test -n "$GMSGFMT"; then
+ { $as_echo "$as_me:$LINENO: result: $GMSGFMT" >&5
+$as_echo "$GMSGFMT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+
+ case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
+ *) MSGFMT_015=$MSGFMT ;;
+ esac
+
+ case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
+ *) GMSGFMT_015=$GMSGFMT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "xgettext", so it can be a program name with args.
+set dummy xgettext; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_XGETTEXT+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case "$XGETTEXT" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
+ ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
+ ;;
+esac
+fi
+XGETTEXT="$ac_cv_path_XGETTEXT"
+if test "$XGETTEXT" != ":"; then
+ { $as_echo "$as_me:$LINENO: result: $XGETTEXT" >&5
+$as_echo "$XGETTEXT" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ rm -f messages.po
+
+ case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
+ '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
+ *) XGETTEXT_015=$XGETTEXT ;;
+ esac
+
+
+
+# Prepare PATH_SEPARATOR.
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conf$$.sh
+ echo "exit 0" >>conf$$.sh
+ chmod +x conf$$.sh
+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conf$$.sh
+fi
+
+# Find out how to test for executable files. Don't use a zero-byte file,
+# as systems may use methods other than mode bits to determine executability.
+cat >conf$$.file <<_ASEOF
+#! /bin/sh
+exit 0
+_ASEOF
+chmod +x conf$$.file
+if test -x conf$$.file >/dev/null 2>&1; then
+ ac_executable_p="test -x"
+else
+ ac_executable_p="test -f"
+fi
+rm -f conf$$.file
+
+# Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case "$MSGMERGE" in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
+ for ac_dir in $PATH; do
+ IFS="$ac_save_IFS"
+ test -z "$ac_dir" && ac_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
+ echo "$as_me: trying $ac_dir/$ac_word..." >&5
+ if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
+ ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
+ break 2
+ fi
+ fi
+ done
+ done
+ IFS="$ac_save_IFS"
+ test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
+ ;;
+esac
+fi
+MSGMERGE="$ac_cv_path_MSGMERGE"
+if test "$MSGMERGE" != ":"; then
+ { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ test -n "$localedir" || localedir='${datadir}/locale'
+
+
+ test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
+
+
+ ac_config_commands="$ac_config_commands po-directories"
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ { $as_echo "$as_me:$LINENO: checking for CFPreferencesCopyAppValue" >&5
+$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
+if test "${gt_cv_func_CFPreferencesCopyAppValue+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <CoreFoundation/CFPreferences.h>
+int
+main ()
+{
+CFPreferencesCopyAppValue(NULL, NULL)
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ gt_cv_func_CFPreferencesCopyAppValue=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_func_CFPreferencesCopyAppValue=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
+$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFPREFERENCESCOPYAPPVALUE 1
+_ACEOF
+
+ fi
+ { $as_echo "$as_me:$LINENO: checking for CFLocaleCopyCurrent" >&5
+$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
+if test "${gt_cv_func_CFLocaleCopyCurrent+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <CoreFoundation/CFLocale.h>
+int
+main ()
+{
+CFLocaleCopyCurrent();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ gt_cv_func_CFLocaleCopyCurrent=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ gt_cv_func_CFLocaleCopyCurrent=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$gt_save_LIBS"
+fi
+{ $as_echo "$as_me:$LINENO: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
+$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
+ if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_CFLOCALECOPYCURRENT 1
+_ACEOF
+
+ fi
+ INTL_MACOSX_LIBS=
+ if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
+ INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
+ fi
+
+
+
+
+
+
+ LIBINTL=
+ LTLIBINTL=
+ POSUB=
+
+ case " $gt_needs " in
+ *" need-formatstring-macros "*) gt_api_version=3 ;;
+ *" need-ngettext "*) gt_api_version=2 ;;
+ *) gt_api_version=1 ;;
+ esac
+ gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
+ gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
+
+ if test "$USE_NLS" = "yes"; then
+ gt_use_preinstalled_gnugettext=no
+
+
+ if test $gt_api_version -ge 3; then
+ gt_revision_test_code='
+#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
+#endif
+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
+'
+ else
+ gt_revision_test_code=
+ fi
+ if test $gt_api_version -ge 2; then
+ gt_expression_test_code=' + * ngettext ("", "", 0)'
+ else
+ gt_expression_test_code=
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking for GNU gettext in libc" >&5
+$as_echo_n "checking for GNU gettext in libc... " >&6; }
+if { as_var=$gt_func_gnugettext_libc; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern int *_nl_domain_bindings;
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$gt_func_gnugettext_libc=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$gt_func_gnugettext_libc=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$gt_func_gnugettext_libc'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
+
+
+
+
+
+ am_save_CPPFLAGS="$CPPFLAGS"
+
+ for element in $INCICONV; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+
+ { $as_echo "$as_me:$LINENO: checking for iconv" >&5
+$as_echo_n "checking for iconv... " >&6; }
+if test "${am_cv_func_iconv+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ am_cv_func_iconv="no, consider installing GNU libiconv"
+ am_cv_lib_iconv=no
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ am_cv_func_iconv=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ if test "$am_cv_func_iconv" != yes; then
+ am_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBICONV"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <iconv.h>
+int
+main ()
+{
+iconv_t cd = iconv_open("","");
+ iconv(cd,NULL,NULL,NULL,NULL);
+ iconv_close(cd);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ am_cv_lib_iconv=yes
+ am_cv_func_iconv=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$am_save_LIBS"
+ fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5
+$as_echo "$am_cv_func_iconv" >&6; }
+ if test "$am_cv_func_iconv" = yes; then
+ { $as_echo "$as_me:$LINENO: checking for working iconv" >&5
+$as_echo_n "checking for working iconv... " >&6; }
+if test "${am_cv_func_iconv_works+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+
+ am_save_LIBS="$LIBS"
+ if test $am_cv_lib_iconv = yes; then
+ LIBS="$LIBS $LIBICONV"
+ fi
+ if test "$cross_compiling" = yes; then
+ case "$host_os" in
+ aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
+ *) am_cv_func_iconv_works="guessing yes" ;;
+ esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+#include <iconv.h>
+#include <string.h>
+int main ()
+{
+ /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
+ returns. */
+ {
+ iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
+ if (cd_utf8_to_88591 != (iconv_t)(-1))
+ {
+ static const char input[] = "\342\202\254"; /* EURO SIGN */
+ char buf[10];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_utf8_to_88591,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if (res == 0)
+ return 1;
+ }
+ }
+#if 0 /* This bug could be worked around by the caller. */
+ /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
+ {
+ iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
+ if (cd_88591_to_utf8 != (iconv_t)(-1))
+ {
+ static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
+ char buf[50];
+ const char *inptr = input;
+ size_t inbytesleft = strlen (input);
+ char *outptr = buf;
+ size_t outbytesleft = sizeof (buf);
+ size_t res = iconv (cd_88591_to_utf8,
+ (char **) &inptr, &inbytesleft,
+ &outptr, &outbytesleft);
+ if ((int)res > 0)
+ return 1;
+ }
+ }
+#endif
+ /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
+ provided. */
+ if (/* Try standardized names. */
+ iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
+ /* Try IRIX, OSF/1 names. */
+ && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
+ /* Try AIX names. */
+ && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
+ /* Try HP-UX names. */
+ && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
+ return 1;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ am_cv_func_iconv_works=yes
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+am_cv_func_iconv_works=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+ LIBS="$am_save_LIBS"
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_func_iconv_works" >&5
+$as_echo "$am_cv_func_iconv_works" >&6; }
+ case "$am_cv_func_iconv_works" in
+ *no) am_func_iconv=no am_cv_lib_iconv=no ;;
+ *) am_func_iconv=yes ;;
+ esac
+ else
+ am_func_iconv=no am_cv_lib_iconv=no
+ fi
+ if test "$am_func_iconv" = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ICONV 1
+_ACEOF
+
+ fi
+ if test "$am_cv_lib_iconv" = yes; then
+ { $as_echo "$as_me:$LINENO: checking how to link with libiconv" >&5
+$as_echo_n "checking how to link with libiconv... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LIBICONV" >&5
+$as_echo "$LIBICONV" >&6; }
+ else
+ CPPFLAGS="$am_save_CPPFLAGS"
+ LIBICONV=
+ LTLIBICONV=
+ fi
+
+
+
+
+
+
+
+
+ use_additional=yes
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+
+# Check whether --with-libintl-prefix was given.
+if test "${with_libintl_prefix+set}" = set; then
+ withval=$with_libintl_prefix;
+ if test "X$withval" = "Xno"; then
+ use_additional=no
+ else
+ if test "X$withval" = "X"; then
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+
+ eval additional_includedir=\"$includedir\"
+ eval additional_libdir=\"$libdir\"
+
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ else
+ additional_includedir="$withval/include"
+ additional_libdir="$withval/$acl_libdirstem"
+ fi
+ fi
+
+fi
+
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ LIBINTL_PREFIX=
+ rpathdirs=
+ ltrpathdirs=
+ names_already_handled=
+ names_next_round='intl '
+ while test -n "$names_next_round"; do
+ names_this_round="$names_next_round"
+ names_next_round=
+ for name in $names_this_round; do
+ already_handled=
+ for n in $names_already_handled; do
+ if test "$n" = "$name"; then
+ already_handled=yes
+ break
+ fi
+ done
+ if test -z "$already_handled"; then
+ names_already_handled="$names_already_handled $name"
+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
+ eval value=\"\$HAVE_LIB$uppername\"
+ if test -n "$value"; then
+ if test "$value" = yes; then
+ eval value=\"\$LIB$uppername\"
+ test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
+ eval value=\"\$LTLIB$uppername\"
+ test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
+ else
+ :
+ fi
+ else
+ found_dir=
+ found_la=
+ found_so=
+ found_a=
+ eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
+ if test -n "$acl_shlibext"; then
+ shrext=".$acl_shlibext" # typically: shrext=.so
+ else
+ shrext=
+ fi
+ if test $use_additional = yes; then
+ dir="$additional_libdir"
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ case "$x" in
+ -L*)
+ dir=`echo "X$x" | sed -e 's/^X-L//'`
+ if test -n "$acl_shlibext"; then
+ if test -f "$dir/$libname$shrext"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext"
+ else
+ if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
+ ver=`(cd "$dir" && \
+ for f in "$libname$shrext".*; do echo "$f"; done \
+ | sed -e "s,^$libname$shrext\\\\.,," \
+ | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
+ | sed 1q ) 2>/dev/null`
+ if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
+ found_dir="$dir"
+ found_so="$dir/$libname$shrext.$ver"
+ fi
+ else
+ eval library_names=\"$acl_library_names_spec\"
+ for f in $library_names; do
+ if test -f "$dir/$f"; then
+ found_dir="$dir"
+ found_so="$dir/$f"
+ break
+ fi
+ done
+ fi
+ fi
+ fi
+ if test "X$found_dir" = "X"; then
+ if test -f "$dir/$libname.$acl_libext"; then
+ found_dir="$dir"
+ found_a="$dir/$libname.$acl_libext"
+ fi
+ fi
+ if test "X$found_dir" != "X"; then
+ if test -f "$dir/$libname.la"; then
+ found_la="$dir/$libname.la"
+ fi
+ fi
+ ;;
+ esac
+ if test "X$found_dir" != "X"; then
+ break
+ fi
+ done
+ fi
+ if test "X$found_dir" != "X"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
+ if test "X$found_so" != "X"; then
+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $found_dir"
+ fi
+ if test "$acl_hardcode_direct" = yes; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $found_dir"
+ fi
+ else
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$found_dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
+ fi
+ if test "$acl_hardcode_minus_L" != no; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ fi
+ else
+ if test "X$found_a" != "X"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
+ fi
+ fi
+ additional_includedir=
+ case "$found_dir" in
+ */$acl_libdirstem | */$acl_libdirstem/)
+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
+ LIBINTL_PREFIX="$basedir"
+ additional_includedir="$basedir/include"
+ ;;
+ esac
+ if test "X$additional_includedir" != "X"; then
+ if test "X$additional_includedir" != "X/usr/include"; then
+ haveit=
+ if test "X$additional_includedir" = "X/usr/local/include"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ for x in $CPPFLAGS $INCINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-I$additional_includedir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_includedir"; then
+ INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
+ fi
+ fi
+ fi
+ fi
+ fi
+ if test -n "$found_la"; then
+ save_libdir="$libdir"
+ case "$found_la" in
+ */* | *\\*) . "$found_la" ;;
+ *) . "./$found_la" ;;
+ esac
+ libdir="$save_libdir"
+ for dep in $dependency_libs; do
+ case "$dep" in
+ -L*)
+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
+ if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then
+ haveit=
+ if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then
+ if test -n "$GCC"; then
+ case $host_os in
+ linux* | gnu* | k*bsd*-gnu) haveit=yes;;
+ esac
+ fi
+ fi
+ if test -z "$haveit"; then
+ haveit=
+ for x in $LDFLAGS $LIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ haveit=
+ for x in $LDFLAGS $LTLIBINTL; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X-L$additional_libdir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ if test -d "$additional_libdir"; then
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
+ fi
+ fi
+ fi
+ fi
+ ;;
+ -R*)
+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
+ if test "$enable_rpath" != no; then
+ haveit=
+ for x in $rpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ rpathdirs="$rpathdirs $dir"
+ fi
+ haveit=
+ for x in $ltrpathdirs; do
+ if test "X$x" = "X$dir"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ ltrpathdirs="$ltrpathdirs $dir"
+ fi
+ fi
+ ;;
+ -l*)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
+ ;;
+ *.la)
+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
+ ;;
+ *)
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
+ ;;
+ esac
+ done
+ fi
+ else
+ LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
+ fi
+ fi
+ fi
+ done
+ done
+ if test "X$rpathdirs" != "X"; then
+ if test -n "$acl_hardcode_libdir_separator"; then
+ alldirs=
+ for found_dir in $rpathdirs; do
+ alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
+ done
+ acl_save_libdir="$libdir"
+ libdir="$alldirs"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ else
+ for found_dir in $rpathdirs; do
+ acl_save_libdir="$libdir"
+ libdir="$found_dir"
+ eval flag=\"$acl_hardcode_libdir_flag_spec\"
+ libdir="$acl_save_libdir"
+ LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
+ done
+ fi
+ fi
+ if test "X$ltrpathdirs" != "X"; then
+ for found_dir in $ltrpathdirs; do
+ LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
+ done
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking for GNU gettext in libintl" >&5
+$as_echo_n "checking for GNU gettext in libintl... " >&6; }
+if { as_var=$gt_func_gnugettext_libintl; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ gt_save_CPPFLAGS="$CPPFLAGS"
+ CPPFLAGS="$CPPFLAGS $INCINTL"
+ gt_save_LIBS="$LIBS"
+ LIBS="$LIBS $LIBINTL"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$gt_func_gnugettext_libintl=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$gt_func_gnugettext_libintl=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
+ LIBS="$LIBS $LIBICONV"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <libintl.h>
+$gt_revision_test_code
+extern int _nl_msg_cat_cntr;
+extern
+#ifdef __cplusplus
+"C"
+#endif
+const char *_nl_expand_alias (const char *);
+int
+main ()
+{
+bindtextdomain ("", "");
+return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ LIBINTL="$LIBINTL $LIBICONV"
+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
+ eval "$gt_func_gnugettext_libintl=yes"
+
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ fi
+ CPPFLAGS="$gt_save_CPPFLAGS"
+ LIBS="$gt_save_LIBS"
+fi
+ac_res=`eval 'as_val=${'$gt_func_gnugettext_libintl'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+ fi
+
+ if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+ || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
+ && test "$PACKAGE" != gettext-runtime \
+ && test "$PACKAGE" != gettext-tools; }; then
+ gt_use_preinstalled_gnugettext=yes
+ else
+ LIBINTL=
+ LTLIBINTL=
+ INCINTL=
+ fi
+
+
+
+ if test -n "$INTL_MACOSX_LIBS"; then
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+ LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
+ LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
+ fi
+ fi
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
+
+cat >>confdefs.h <<\_ACEOF
+#define ENABLE_NLS 1
+_ACEOF
+
+ else
+ USE_NLS=no
+ fi
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking whether to use NLS" >&5
+$as_echo_n "checking whether to use NLS... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $USE_NLS" >&5
+$as_echo "$USE_NLS" >&6; }
+ if test "$USE_NLS" = "yes"; then
+ { $as_echo "$as_me:$LINENO: checking where the gettext function comes from" >&5
+$as_echo_n "checking where the gettext function comes from... " >&6; }
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ gt_source="external libintl"
+ else
+ gt_source="libc"
+ fi
+ else
+ gt_source="included intl directory"
+ fi
+ { $as_echo "$as_me:$LINENO: result: $gt_source" >&5
+$as_echo "$gt_source" >&6; }
+ fi
+
+ if test "$USE_NLS" = "yes"; then
+
+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
+ if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
+ { $as_echo "$as_me:$LINENO: checking how to link with libintl" >&5
+$as_echo_n "checking how to link with libintl... " >&6; }
+ { $as_echo "$as_me:$LINENO: result: $LIBINTL" >&5
+$as_echo "$LIBINTL" >&6; }
+
+ for element in $INCINTL; do
+ haveit=
+ for x in $CPPFLAGS; do
+
+ acl_save_prefix="$prefix"
+ prefix="$acl_final_prefix"
+ acl_save_exec_prefix="$exec_prefix"
+ exec_prefix="$acl_final_exec_prefix"
+ eval x=\"$x\"
+ exec_prefix="$acl_save_exec_prefix"
+ prefix="$acl_save_prefix"
+
+ if test "X$x" = "X$element"; then
+ haveit=yes
+ break
+ fi
+ done
+ if test -z "$haveit"; then
+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
+ fi
+ done
+
+ fi
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETTEXT 1
+_ACEOF
+
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_DCGETTEXT 1
+_ACEOF
+
+ fi
+
+ POSUB=po
+ fi
+
+
+
+ INTLLIBS="$LIBINTL"
+
+
+
+
+
+
+ALL_LINGUAS="cs es hu fr de ro it pt"
+if test "x$USE_NLS" = xyes; then
+ # Extract the first word of "msgmerge", so it can be a program name with args.
+set dummy msgmerge; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_MSGMERGE+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $MSGMERGE in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+as_dummy="$PATH:../bin"
+for as_dir in $as_dummy
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_MSGMERGE="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+MSGMERGE=$ac_cv_path_MSGMERGE
+if test -n "$MSGMERGE"; then
+ { $as_echo "$as_me:$LINENO: result: $MSGMERGE" >&5
+$as_echo "$MSGMERGE" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "x$ac_cv_path_MSGMERGE" = x; then
+ { { $as_echo "$as_me:$LINENO: error: Install the msgmerge utility first for i18n
+ or re-configure XaoS with --disable-nls" >&5
+$as_echo "$as_me: error: Install the msgmerge utility first for i18n
+ or re-configure XaoS with --disable-nls" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ if test "x$POFILES" = x; then
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+ fi
+fi
+
+
+x11_linked=no
+x_driver_test=yes
+gtk_driver_test=no
+aa_driver_test=no
+win32_driver_test=yes
+long_double=yes
+pthread=no
+png=yes
+xshm=yes
+gsl=yes
+sffe=yes
+
+
+# Check whether --with-long-double was given.
+if test "${with_long_double+set}" = set; then
+ withval=$with_long_double;
+ if test x$withval = xyes; then
+ long_double=yes
+ fi
+ if test x$withval = xno; then
+ long_double=no
+ fi
+
+fi
+
+
+# Check whether --with-mitshm was given.
+if test "${with_mitshm+set}" = set; then
+ withval=$with_mitshm;
+ if test x$withval = xyes; then
+ xshm=yes
+ fi
+ if test x$withval = xno; then
+ xshm=no
+ fi
+
+fi
+
+
+# Check whether --with-pthread was given.
+if test "${with_pthread+set}" = set; then
+ withval=$with_pthread;
+ if test x$withval = xyes; then
+ pthread=test
+ fi
+ if test x$withval = xno; then
+ pthread=no
+ fi
+
+fi
+
+
+# Check whether --with-png was given.
+if test "${with_png+set}" = set; then
+ withval=$with_png;
+ if test x$withval = xyes; then
+ png=test
+ fi
+ if test x$withval = xno; then
+ png=no
+ fi
+
+fi
+
+
+# Check whether --with-gsl was given.
+if test "${with_gsl+set}" = set; then
+ withval=$with_gsl;
+ if test x$withval = xyes; then
+ gsl=yes
+ fi
+ if test x$withval = xno; then
+ gsl=no
+ fi
+
+fi
+
+
+# Check whether --with-sffe was given.
+if test "${with_sffe+set}" = set; then
+ withval=$with_sffe;
+ if test x$withval = xyes; then
+ sffe=yes
+ fi
+ if test x$withval = xno; then
+ sffe=no
+ fi
+
+fi
+
+
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
+set x ${MAKE-make}
+ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
+if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.make <<\_ACEOF
+SHELL = /bin/sh
+all:
+ @echo '@@@%%%=$(MAKE)=@@@%%%'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+case `${MAKE-make} -f conftest.make 2>/dev/null` in
+ *@@@%%%=?*=@@@%%%*)
+ eval ac_cv_prog_make_${ac_make}_set=yes;;
+ *)
+ eval ac_cv_prog_make_${ac_make}_set=no;;
+esac
+rm -f conftest.make
+fi
+if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ SET_MAKE=
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$RANLIB"; then
+ ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+ { $as_echo "$as_me:$LINENO: result: $RANLIB" >&5
+$as_echo "$RANLIB" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+ ac_ct_RANLIB=$RANLIB
+ # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$ac_ct_RANLIB"; then
+ ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_ac_ct_RANLIB="ranlib"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+$as_echo "$ac_ct_RANLIB" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_ct_RANLIB" = x; then
+ RANLIB=":"
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ RANLIB=$ac_ct_RANLIB
+ fi
+else
+ RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+
+
+DRIVERDIRS=""
+LOCALEDIR="/usr/share/locale"
+DRIVERLIBS="lib/libui.a lib/libui-hlp.a lib/libengine.a lib/libutil.a lib/libfilter.a"
+# Find a good install program. We prefer a C program (faster),
+# so one script is as good as another. But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# OS/2's system install, which has a completely different semantic
+# ./install, which can be erroneously created by make from ./install.sh.
+# Reject install programs that cannot install multiple files.
+{ $as_echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+$as_echo_n "checking for a BSD-compatible install... " >&6; }
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+ ./ | .// | /cC/* | \
+ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \
+ /usr/ucb/* ) ;;
+ *)
+ # OSF1 and SCO ODT 3.0 have their own names for install.
+ # Don't use installbsd from OSF since it installs stuff as root
+ # by default.
+ for ac_prog in ginstall scoinst install; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
+ if test $ac_prog = install &&
+ grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # AIX install. It has an incompatible calling convention.
+ :
+ elif test $ac_prog = install &&
+ grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+ # program-specific install script used by HP pwplus--don't use.
+ :
+ else
+ rm -rf conftest.one conftest.two conftest.dir
+ echo one > conftest.one
+ echo two > conftest.two
+ mkdir conftest.dir
+ if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
+ test -s conftest.one && test -s conftest.two &&
+ test -s conftest.dir/conftest.one &&
+ test -s conftest.dir/conftest.two
+ then
+ ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+ break 3
+ fi
+ fi
+ fi
+ done
+ done
+ ;;
+esac
+
+done
+IFS=$as_save_IFS
+
+rm -rf conftest.one conftest.two conftest.dir
+
+fi
+ if test "${ac_cv_path_install+set}" = set; then
+ INSTALL=$ac_cv_path_install
+ else
+ # As a last resort, use the slow shell script. Don't cache a
+ # value for INSTALL within a source directory, because that will
+ # break other packages using the cache if that directory is
+ # removed, or if the value is a relative name.
+ INSTALL=$ac_install_sh
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $INSTALL" >&5
+$as_echo "$INSTALL" >&6; }
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+
+# Check whether --with-x11-driver was given.
+if test "${with_x11_driver+set}" = set; then
+ withval=$with_x11_driver;
+ x_driver_test=$withval
+
+fi
+
+
+# Check whether --with-gtk-driver was given.
+if test "${with_gtk_driver+set}" = set; then
+ withval=$with_gtk_driver;
+ gtk_driver_test=$withval
+
+fi
+
+
+# Check whether --with-win32-driver was given.
+if test "${with_win32_driver+set}" = set; then
+ withval=$with_win32_driver;
+ win32_driver_test=$withval
+
+fi
+
+
+# Check whether --with-aa-driver was given.
+if test "${with_aa_driver+set}" = set; then
+ withval=$with_aa_driver;
+ aa_driver_test=$withval
+
+fi
+
+
+if test "$x_driver_test" = yes -o "$aa_driver_test" = yes; then
+ 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
+{ $as_echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+$as_echo_n "checking how to run the C preprocessor... " >&6; }
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+ CPP=
+fi
+if test -z "$CPP"; then
+ if test "${ac_cv_prog_CPP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ # Double quotes because CPP needs to be expanded
+ for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+ do
+ ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ break
+fi
+
+ done
+ ac_cv_prog_CPP=$CPP
+
+fi
+ CPP=$ac_cv_prog_CPP
+else
+ ac_cv_prog_CPP=$CPP
+fi
+{ $as_echo "$as_me:$LINENO: result: $CPP" >&5
+$as_echo "$CPP" >&6; }
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+ # Use a header file that comes with gcc, so configuring glibc
+ # with a fresh cross-compiler works.
+ # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ # <limits.h> exists even on freestanding compilers.
+ # On the NeXT, cc -E runs the code through the compiler's parser,
+ # not just through cpp. "Syntax error" is here to catch this case.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+ Syntax error
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Broken: fails on valid input.
+continue
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+ # OK, works on sane cases. Now check whether nonexistent headers
+ # can be detected and how.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # Broken: success on invalid input.
+continue
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+ :
+else
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+ { (exit 1); exit 1; }; }; }
+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
+
+
+{ $as_echo "$as_me:$LINENO: checking for X" >&5
+$as_echo_n "checking for X... " >&6; }
+
+
+# Check whether --with-x was given.
+if test "${with_x+set}" = set; then
+ withval=$with_x;
+fi
+
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+ # The user explicitly disabled X.
+ have_x=disabled
+else
+ case $x_includes,$x_libraries in #(
+ *\'*) { { $as_echo "$as_me:$LINENO: error: cannot use X directory names containing '" >&5
+$as_echo "$as_me: error: cannot use X directory names containing '" >&2;}
+ { (exit 1); exit 1; }; };; #(
+ *,NONE | NONE,*) if test "${ac_cv_have_x+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ # One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+ cd conftest.dir
+ cat >Imakefile <<'_ACEOF'
+incroot:
+ @echo incroot='${INCROOT}'
+usrlibdir:
+ @echo usrlibdir='${USRLIBDIR}'
+libdir:
+ @echo libdir='${LIBDIR}'
+_ACEOF
+ if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+ # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+ for ac_var in incroot usrlibdir libdir; do
+ eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+ done
+ # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+ for ac_extension in a so sl dylib la dll; do
+ if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+ test -f "$ac_im_libdir/libX11.$ac_extension"; then
+ ac_im_usrlibdir=$ac_im_libdir; break
+ fi
+ done
+ # Screen out bogus values from the imake configuration. They are
+ # bogus both because they are the default anyway, and because
+ # using them would break gcc on systems where it needs fixed includes.
+ case $ac_im_incroot in
+ /usr/include) ac_x_includes= ;;
+ *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+ esac
+ case $ac_im_usrlibdir in
+ /usr/lib | /usr/lib64 | /lib | /lib64) ;;
+ *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+ esac
+ fi
+ cd ..
+ rm -f -r conftest.dir
+fi
+
+# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+ # Guess where to find include files, by looking for Xlib.h.
+ # First, try using that file with no special directory specified.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/Xlib.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ # We can compile using X headers with no special include directory.
+ac_x_includes=
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ for ac_dir in $ac_x_header_dirs; do
+ if test -r "$ac_dir/X11/Xlib.h"; then
+ ac_x_includes=$ac_dir
+ break
+ fi
+done
+fi
+
+rm -f conftest.err conftest.$ac_ext
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+ # Check for the libraries.
+ # See if we find them without any special options.
+ # Don't add to $LIBS permanently.
+ ac_save_LIBS=$LIBS
+ LIBS="-lX11 $LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <X11/Xlib.h>
+int
+main ()
+{
+XrmInitialize ()
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ LIBS=$ac_save_LIBS
+for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+ # Don't even attempt the hair of trying to link an X program!
+ for ac_extension in a so sl dylib la dll; do
+ if test -r "$ac_dir/libX11.$ac_extension"; then
+ ac_x_libraries=$ac_dir
+ break 2
+ fi
+ done
+done
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi # $ac_x_libraries = no
+
+case $ac_x_includes,$ac_x_libraries in #(
+ no,* | *,no | *\'*)
+ # Didn't find X, or a directory has "'" in its name.
+ ac_cv_have_x="have_x=no";; #(
+ *)
+ # Record where we found X for the cache.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$ac_x_includes'\
+ ac_x_libraries='$ac_x_libraries'"
+esac
+fi
+;; #(
+ *) have_x=yes;;
+ esac
+ eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+ { $as_echo "$as_me:$LINENO: result: $have_x" >&5
+$as_echo "$have_x" >&6; }
+ no_x=yes
+else
+ # If each of the values was on the command line, it overrides each guess.
+ test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+ test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+ # Update the cache value to reflect the command line values.
+ ac_cv_have_x="have_x=yes\
+ ac_x_includes='$x_includes'\
+ ac_x_libraries='$x_libraries'"
+ { $as_echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5
+$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
+fi
+
+if test "$no_x" = yes; then
+ # Not all programs may use this symbol, but it does not hurt to define it.
+
+cat >>confdefs.h <<\_ACEOF
+#define X_DISPLAY_MISSING 1
+_ACEOF
+
+ X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+ if test -n "$x_includes"; then
+ X_CFLAGS="$X_CFLAGS -I$x_includes"
+ fi
+
+ # It would also be nice to do this for all -L options, not just this one.
+ if test -n "$x_libraries"; then
+ X_LIBS="$X_LIBS -L$x_libraries"
+ # For Solaris; some versions of Sun CC require a space after -R and
+ # others require no space. Words are not sufficient . . . .
+ { $as_echo "$as_me:$LINENO: checking whether -R must be followed by a space" >&5
+$as_echo_n "checking whether -R must be followed by a space... " >&6; }
+ ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+ ac_xsave_c_werror_flag=$ac_c_werror_flag
+ ac_c_werror_flag=yes
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ X_LIBS="$X_LIBS -R$x_libraries"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ LIBS="$ac_xsave_LIBS -R $x_libraries"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ X_LIBS="$X_LIBS -R $x_libraries"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: result: neither works" >&5
+$as_echo "neither works" >&6; }
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ ac_c_werror_flag=$ac_xsave_c_werror_flag
+ LIBS=$ac_xsave_LIBS
+ fi
+
+ # Check for system-dependent libraries X programs must link with.
+ # Do this before checking for the system-independent R6 libraries
+ # (-lICE), since we may need -lsocket or whatever for X linking.
+
+ if test "$ISC" = yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+ else
+ # Martyn Johnson says this is needed for Ultrix, if the X
+ # libraries were built with DECnet support. And Karl Berry says
+ # the Alpha needs dnet_stub (dnet does not exist).
+ ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XOpenDisplay ();
+int
+main ()
+{
+return XOpenDisplay ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
+if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_dnet_dnet_ntoa=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dnet_dnet_ntoa=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_dnet_ntoa" = x""yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
+fi
+
+ if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+ { $as_echo "$as_me:$LINENO: checking for dnet_ntoa in -ldnet_stub" >&5
+$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
+if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldnet_stub $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dnet_ntoa ();
+int
+main ()
+{
+return dnet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_dnet_stub_dnet_ntoa=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_dnet_stub_dnet_ntoa=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
+$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
+if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = x""yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
+fi
+
+ fi
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+ LIBS="$ac_xsave_LIBS"
+
+ # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+ # to get the SysV transport functions.
+ # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+ # needs -lnsl.
+ # The nsl library prevents programs from opening the X display
+ # on Irix 5.2, according to T.E. Dickey.
+ # The functions gethostbyname, getservbyname, and inet_addr are
+ # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+ { $as_echo "$as_me:$LINENO: checking for gethostbyname" >&5
+$as_echo_n "checking for gethostbyname... " >&6; }
+if test "${ac_cv_func_gethostbyname+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define gethostbyname to an innocuous variant, in case <limits.h> declares gethostbyname.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define gethostbyname innocuous_gethostbyname
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char gethostbyname (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef gethostbyname
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_gethostbyname || defined __stub___gethostbyname
+choke me
+#endif
+
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_gethostbyname=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_gethostbyname=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5
+$as_echo "$ac_cv_func_gethostbyname" >&6; }
+
+ if test $ac_cv_func_gethostbyname = no; then
+ { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5
+$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
+if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lnsl $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_nsl_gethostbyname=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_nsl_gethostbyname=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5
+$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
+if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
+fi
+
+ if test $ac_cv_lib_nsl_gethostbyname = no; then
+ { $as_echo "$as_me:$LINENO: checking for gethostbyname in -lbsd" >&5
+$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
+if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lbsd $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char gethostbyname ();
+int
+main ()
+{
+return gethostbyname ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_bsd_gethostbyname=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_bsd_gethostbyname=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_bsd_gethostbyname" >&5
+$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
+if test "x$ac_cv_lib_bsd_gethostbyname" = x""yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
+fi
+
+ fi
+ fi
+
+ # lieder@skyler.mavd.honeywell.com says without -lsocket,
+ # socket/setsockopt and other routines are undefined under SCO ODT
+ # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary
+ # on later versions), says Simon Leinen: it contains gethostby*
+ # variants that don't use the name server (or something). -lsocket
+ # must be given before -lnsl if both are needed. We assume that
+ # if connect needs -lnsl, so does gethostbyname.
+ { $as_echo "$as_me:$LINENO: checking for connect" >&5
+$as_echo_n "checking for connect... " >&6; }
+if test "${ac_cv_func_connect+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define connect to an innocuous variant, in case <limits.h> declares connect.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define connect innocuous_connect
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char connect (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef connect
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_connect || defined __stub___connect
+choke me
+#endif
+
+int
+main ()
+{
+return connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_connect=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_connect=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5
+$as_echo "$ac_cv_func_connect" >&6; }
+
+ if test $ac_cv_func_connect = no; then
+ { $as_echo "$as_me:$LINENO: checking for connect in -lsocket" >&5
+$as_echo_n "checking for connect in -lsocket... " >&6; }
+if test "${ac_cv_lib_socket_connect+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char connect ();
+int
+main ()
+{
+return connect ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_socket_connect=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_socket_connect=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5
+$as_echo "$ac_cv_lib_socket_connect" >&6; }
+if test "x$ac_cv_lib_socket_connect" = x""yes; then
+ X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
+fi
+
+ fi
+
+ # Guillermo Gomez says -lposix is necessary on A/UX.
+ { $as_echo "$as_me:$LINENO: checking for remove" >&5
+$as_echo_n "checking for remove... " >&6; }
+if test "${ac_cv_func_remove+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define remove to an innocuous variant, in case <limits.h> declares remove.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define remove innocuous_remove
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char remove (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef remove
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_remove || defined __stub___remove
+choke me
+#endif
+
+int
+main ()
+{
+return remove ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_remove=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_remove=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_remove" >&5
+$as_echo "$ac_cv_func_remove" >&6; }
+
+ if test $ac_cv_func_remove = no; then
+ { $as_echo "$as_me:$LINENO: checking for remove in -lposix" >&5
+$as_echo_n "checking for remove in -lposix... " >&6; }
+if test "${ac_cv_lib_posix_remove+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lposix $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char remove ();
+int
+main ()
+{
+return remove ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_posix_remove=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_posix_remove=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_posix_remove" >&5
+$as_echo "$ac_cv_lib_posix_remove" >&6; }
+if test "x$ac_cv_lib_posix_remove" = x""yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
+fi
+
+ fi
+
+ # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+ { $as_echo "$as_me:$LINENO: checking for shmat" >&5
+$as_echo_n "checking for shmat... " >&6; }
+if test "${ac_cv_func_shmat+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define shmat to an innocuous variant, in case <limits.h> declares shmat.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define shmat innocuous_shmat
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char shmat (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef shmat
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_shmat || defined __stub___shmat
+choke me
+#endif
+
+int
+main ()
+{
+return shmat ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_shmat=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_shmat=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_shmat" >&5
+$as_echo "$ac_cv_func_shmat" >&6; }
+
+ if test $ac_cv_func_shmat = no; then
+ { $as_echo "$as_me:$LINENO: checking for shmat in -lipc" >&5
+$as_echo_n "checking for shmat in -lipc... " >&6; }
+if test "${ac_cv_lib_ipc_shmat+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lipc $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char shmat ();
+int
+main ()
+{
+return shmat ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_ipc_shmat=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ipc_shmat=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ipc_shmat" >&5
+$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
+if test "x$ac_cv_lib_ipc_shmat" = x""yes; then
+ X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
+fi
+
+ fi
+ fi
+
+ # Check for libraries that X11R6 Xt/Xaw programs need.
+ ac_save_LDFLAGS=$LDFLAGS
+ test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+ # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+ # check for ICE first), but we must link in the order -lSM -lICE or
+ # we get undefined symbols. So assume we have SM if we have ICE.
+ # These have to be linked with before -lX11, unlike the other
+ # libraries we check for below, so use a different variable.
+ # John Interrante, Karl Berry
+ { $as_echo "$as_me:$LINENO: checking for IceConnectionNumber in -lICE" >&5
+$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
+if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lICE $X_EXTRA_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char IceConnectionNumber ();
+int
+main ()
+{
+return IceConnectionNumber ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_ICE_IceConnectionNumber=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_ICE_IceConnectionNumber=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
+$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
+if test "x$ac_cv_lib_ICE_IceConnectionNumber" = x""yes; then
+ X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
+fi
+
+ LDFLAGS=$ac_save_LDFLAGS
+
+fi
+
+fi
+
+
+if test "$win32_driver_test" = yes; then
+ win32_driver=no
+ case $host_os in
+ *mingw* | *cygwin*) win32_driver=yes
+ LIBS="$LIBS -lgdi32 -lmsvcrt -luser32 -lversion -lmingwex"
+ CFLAGS="$CFLAGS -mwindows"
+ ;;
+ esac
+fi
+
+
+if test x$pthread = xtest; then
+
+for ac_func in pthread_create
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ if test "x$ac_cv_func_pthread_create" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_PTHREAD 1
+_ACEOF
+
+ CFLAGS="$CFLAGS -D_REENTRANT"
+
+for ac_func in pthread_sighandler
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+
+{ $as_echo "$as_me:$LINENO: checking for pthread_create in -lpthread" >&5
+$as_echo_n "checking for pthread_create in -lpthread... " >&6; }
+if test "${ac_cv_lib_pthread_pthread_create+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpthread $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pthread_create ();
+int
+main ()
+{
+return pthread_create ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_pthread_pthread_create=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_pthread_pthread_create=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_pthread_pthread_create" >&5
+$as_echo "$ac_cv_lib_pthread_pthread_create" >&6; }
+if test "x$ac_cv_lib_pthread_pthread_create" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPTHREAD 1
+_ACEOF
+
+ LIBS="-lpthread $LIBS"
+
+fi
+
+ if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_PTHREAD 1
+_ACEOF
+
+ CFLAGS="$CFLAGS -D_REENTRANT"
+
+for ac_func in pthread_sighandler
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+ else
+ echo "No pthread library available! Cannot compile threaded version"
+ exit
+ fi
+ fi
+fi
+
+
+
+
+if test "$aa_driver_test" = yes; then
+ OLDLIBS="$LIBS"
+ OLDCFLAGS="$CFLAGS"
+
+ search_aalib=true;
+ if test "x$no_x" = x; then
+ LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS"
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ fi
+
+ if $search_aalib
+ then
+ if test -f /usr/include/aalib.h
+ then
+ LIBS1="$LIBS"
+ if test "x$no_x" = x; then
+ LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
+ fi
+ LIBS="$LIBS "
+ unset ac_cv_lib_aa_aa_init
+
+{ $as_echo "$as_me:$LINENO: checking for aa_init in -laa" >&5
+$as_echo_n "checking for aa_init in -laa... " >&6; }
+if test "${ac_cv_lib_aa_aa_init+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-laa $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char aa_init ();
+int
+main ()
+{
+return aa_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_aa_aa_init=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_aa_aa_init=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_aa_aa_init" >&5
+$as_echo "$ac_cv_lib_aa_aa_init" >&6; }
+if test "x$ac_cv_lib_aa_aa_init" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBAA 1
+_ACEOF
+
+ LIBS="-laa $LIBS"
+
+fi
+
+ if test "x$ac_cv_lib_aa_aa_init" = xyes; then
+ { $as_echo "$as_me:$LINENO: result: Found aalib on /usr/include/aalib.h" >&5
+$as_echo "Found aalib on /usr/include/aalib.h" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether aalib version >= 1.4" >&5
+$as_echo_n "checking whether aalib version >= 1.4... " >&6; }
+if test "${ac_cv_aalib_ver_ok+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ echo '#include <aalib.h>
+#include <aalib.h>
+void f(){
+#if AA_LIB_VERSIONCODE < 104000
+#error aa_lib is probably buggy
+/* I am using SuSE 7.3 and 8.0. Both contains version 1.3,
+ * however they report 102000 version code.
+ */
+#endif
+}' > conftest.c
+if test -z "`${CC-cc} -c conftest.c 2>&1`"; then
+ ac_cv_aalib_ver_ok=yes
+ else
+ ac_cv_aalib_ver_ok=no
+ fi
+ rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_aalib_ver_ok" >&5
+$as_echo "$ac_cv_aalib_ver_ok" >&6; }
+ if test $ac_cv_aalib_ver_ok = yes; then
+ #LIBS="$LIBS "
+ x11_linked=yes
+ CFLAGS="$CFLAGS "
+ search_aalib=false
+ aa_driver=true
+ else
+ unset ac_cv_lib_aa_aa_init
+ LIBS="$LIBS1"
+ fi
+ else
+ unset ac_cv_lib_aa_aa_init
+ LIBS="$LIBS1"
+ fi
+ fi
+ fi
+
+
+ if $search_aalib
+ then
+ if test -f /usr/local/include/aalib.h
+ then
+ LIBS1="$LIBS"
+ if test "x$no_x" = x; then
+ LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
+ fi
+ LIBS="$LIBS -L/usr/local/lib"
+ unset ac_cv_lib_aa_aa_init
+
+{ $as_echo "$as_me:$LINENO: checking for aa_init in -laa" >&5
+$as_echo_n "checking for aa_init in -laa... " >&6; }
+if test "${ac_cv_lib_aa_aa_init+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-laa $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char aa_init ();
+int
+main ()
+{
+return aa_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_aa_aa_init=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_aa_aa_init=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_aa_aa_init" >&5
+$as_echo "$ac_cv_lib_aa_aa_init" >&6; }
+if test "x$ac_cv_lib_aa_aa_init" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBAA 1
+_ACEOF
+
+ LIBS="-laa $LIBS"
+
+fi
+
+ if test "x$ac_cv_lib_aa_aa_init" = xyes; then
+ { $as_echo "$as_me:$LINENO: result: Found aalib on /usr/local/include/aalib.h" >&5
+$as_echo "Found aalib on /usr/local/include/aalib.h" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether aalib version >= 1.4" >&5
+$as_echo_n "checking whether aalib version >= 1.4... " >&6; }
+if test "${ac_cv_aalib_ver_ok+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ echo '#include <aalib.h>
+#include <aalib.h>
+void f(){
+#if AA_LIB_VERSIONCODE < 104000
+#error aa_lib is probably buggy
+/* I am using SuSE 7.3 and 8.0. Both contains version 1.3,
+ * however they report 102000 version code.
+ */
+#endif
+}' > conftest.c
+if test -z "`${CC-cc} -c conftest.c 2>&1`"; then
+ ac_cv_aalib_ver_ok=yes
+ else
+ ac_cv_aalib_ver_ok=no
+ fi
+ rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_aalib_ver_ok" >&5
+$as_echo "$ac_cv_aalib_ver_ok" >&6; }
+ if test $ac_cv_aalib_ver_ok = yes; then
+ #LIBS="$LIBS -L/usr/local/lib"
+ x11_linked=yes
+ CFLAGS="$CFLAGS -I/usr/local/include"
+ search_aalib=false
+ aa_driver=true
+ else
+ unset ac_cv_lib_aa_aa_init
+ LIBS="$LIBS1"
+ fi
+ else
+ unset ac_cv_lib_aa_aa_init
+ LIBS="$LIBS1"
+ fi
+ fi
+ fi
+
+ for name in ../aalib-*.*
+ do
+
+ if $search_aalib
+ then
+ if test -f $name/aalib.h
+ then
+ LIBS1="$LIBS"
+ if test "x$no_x" = x; then
+ LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
+ fi
+ LIBS="$LIBS "-L$name""
+ unset ac_cv_lib_aa_aa_init
+
+{ $as_echo "$as_me:$LINENO: checking for aa_init in -laa" >&5
+$as_echo_n "checking for aa_init in -laa... " >&6; }
+if test "${ac_cv_lib_aa_aa_init+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-laa $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char aa_init ();
+int
+main ()
+{
+return aa_init ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_aa_aa_init=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_aa_aa_init=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_aa_aa_init" >&5
+$as_echo "$ac_cv_lib_aa_aa_init" >&6; }
+if test "x$ac_cv_lib_aa_aa_init" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBAA 1
+_ACEOF
+
+ LIBS="-laa $LIBS"
+
+fi
+
+ if test "x$ac_cv_lib_aa_aa_init" = xyes; then
+ { $as_echo "$as_me:$LINENO: result: Found aalib on $name/aalib.h" >&5
+$as_echo "Found aalib on $name/aalib.h" >&6; }
+ { $as_echo "$as_me:$LINENO: checking whether aalib version >= 1.4" >&5
+$as_echo_n "checking whether aalib version >= 1.4... " >&6; }
+if test "${ac_cv_aalib_ver_ok+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ echo '#include <aalib.h>
+#include <aalib.h>
+void f(){
+#if AA_LIB_VERSIONCODE < 104000
+#error aa_lib is probably buggy
+/* I am using SuSE 7.3 and 8.0. Both contains version 1.3,
+ * however they report 102000 version code.
+ */
+#endif
+}' > conftest.c
+if test -z "`${CC-cc} -c conftest.c 2>&1`"; then
+ ac_cv_aalib_ver_ok=yes
+ else
+ ac_cv_aalib_ver_ok=no
+ fi
+ rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_aalib_ver_ok" >&5
+$as_echo "$ac_cv_aalib_ver_ok" >&6; }
+ if test $ac_cv_aalib_ver_ok = yes; then
+ #LIBS="$LIBS "-L$name""
+ x11_linked=yes
+ CFLAGS="$CFLAGS "-I$name""
+ search_aalib=false
+ aa_driver=true
+ else
+ unset ac_cv_lib_aa_aa_init
+ LIBS="$LIBS1"
+ fi
+ else
+ unset ac_cv_lib_aa_aa_init
+ LIBS="$LIBS1"
+ fi
+ fi
+ fi
+
+ done
+ if $search_aalib
+ then
+ aa_driver=false
+ LIBS="$OLDLIBS"
+ CFLAGS="$OLDCFLAGS"
+ else
+ aa_driver=true
+ fi
+fi
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5
+$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
+if test "${ac_cv_path_GREP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -z "$GREP"; then
+ ac_path_GREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in grep ggrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
+# Check for GNU ac_path_GREP and select it if it is found.
+ # Check for GNU $ac_path_GREP
+case `"$ac_path_GREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'GREP' >> "conftest.nl"
+ "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_GREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_GREP="$ac_path_GREP"
+ ac_path_GREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_GREP_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_GREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_GREP=$GREP
+fi
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5
+$as_echo "$ac_cv_path_GREP" >&6; }
+ GREP="$ac_cv_path_GREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for egrep" >&5
+$as_echo_n "checking for egrep... " >&6; }
+if test "${ac_cv_path_EGREP+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
+ then ac_cv_path_EGREP="$GREP -E"
+ else
+ if test -z "$EGREP"; then
+ ac_path_EGREP_found=false
+ # Loop through the user's path and test for each of PROGNAME-LIST
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_prog in egrep; do
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
+ { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
+# Check for GNU ac_path_EGREP and select it if it is found.
+ # Check for GNU $ac_path_EGREP
+case `"$ac_path_EGREP" --version 2>&1` in
+*GNU*)
+ ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
+*)
+ ac_count=0
+ $as_echo_n 0123456789 >"conftest.in"
+ while :
+ do
+ cat "conftest.in" "conftest.in" >"conftest.tmp"
+ mv "conftest.tmp" "conftest.in"
+ cp "conftest.in" "conftest.nl"
+ $as_echo 'EGREP' >> "conftest.nl"
+ "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
+ diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
+ ac_count=`expr $ac_count + 1`
+ if test $ac_count -gt ${ac_path_EGREP_max-0}; then
+ # Best one so far, save it but keep looking for a better one
+ ac_cv_path_EGREP="$ac_path_EGREP"
+ ac_path_EGREP_max=$ac_count
+ fi
+ # 10*(2^10) chars as input seems more than enough
+ test $ac_count -gt 10 && break
+ done
+ rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
+esac
+
+ $ac_path_EGREP_found && break 3
+ done
+ done
+done
+IFS=$as_save_IFS
+ if test -z "$ac_cv_path_EGREP"; then
+ { { $as_echo "$as_me:$LINENO: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5
+$as_echo "$as_me: error: no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+else
+ ac_cv_path_EGREP=$EGREP
+fi
+
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5
+$as_echo "$ac_cv_path_EGREP" >&6; }
+ EGREP="$ac_cv_path_EGREP"
+
+
+{ $as_echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+$as_echo_n "checking for ANSI C header files... " >&6; }
+if test "${ac_cv_header_stdc+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_stdc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_stdc=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+ # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "memchr" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "free" >/dev/null 2>&1; then
+ :
+else
+ ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+ # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+ if test "$cross_compiling" = yes; then
+ :
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <ctype.h>
+#include <stdlib.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+ (('a' <= (c) && (c) <= 'i') \
+ || ('j' <= (c) && (c) <= 'r') \
+ || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ if (XOR (islower (i), ISLOWER (i))
+ || toupper (i) != TOUPPER (i))
+ return 2;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+$as_echo "$ac_cv_header_stdc" >&6; }
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+ inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_header in alloca.h ddraw.h htmlhelp.h errno.h fcntl.h float.h libintl.h limits.h locale.h malloc.h stddef.h stdlib.h string.h sys/time.h sys/timeb.h unistd.h
+do
+as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ { $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking $ac_header usability" >&5
+$as_echo_n "checking $ac_header usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking $ac_header presence" >&5
+$as_echo_n "checking $ac_header presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <$ac_header>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to xaos-devel@lists.sourceforge.net ##
+## ----------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for $ac_header" >&5
+$as_echo_n "checking for $ac_header... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ eval "$as_ac_Header=\$ac_header_preproc"
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+
+fi
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+{ $as_echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5
+$as_echo_n "checking for an ANSI C-conforming const... " >&6; }
+if test "${ac_cv_c_const+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+int
+main ()
+{
+/* FIXME: Include the comments suggested by Paul. */
+#ifndef __cplusplus
+ /* Ultrix mips cc rejects this. */
+ typedef int charset[2];
+ const charset cs;
+ /* SunOS 4.1.1 cc rejects this. */
+ char const *const *pcpcc;
+ char **ppc;
+ /* NEC SVR4.0.2 mips cc rejects this. */
+ struct point {int x, y;};
+ static struct point const zero = {0,0};
+ /* AIX XL C 1.02.0.0 rejects this.
+ It does not let you subtract one const X* pointer from another in
+ an arm of an if-expression whose if-part is not a constant
+ expression */
+ const char *g = "string";
+ pcpcc = &g + (g ? g-g : 0);
+ /* HPUX 7.0 cc rejects these. */
+ ++pcpcc;
+ ppc = (char**) pcpcc;
+ pcpcc = (char const *const *) ppc;
+ { /* SCO 3.2v4 cc rejects this. */
+ char *t;
+ char const *s = 0 ? (char *) 0 : (char const *) 0;
+
+ *t++ = 0;
+ if (s) return 0;
+ }
+ { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
+ int x[] = {25, 17};
+ const int *foo = &x[0];
+ ++foo;
+ }
+ { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
+ typedef const int *iptr;
+ iptr p = 0;
+ ++p;
+ }
+ { /* AIX XL C 1.02.0.0 rejects this saying
+ "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
+ struct s { int j; const int *ap[3]; };
+ struct s *b; b->j = 5;
+ }
+ { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
+ const int foo = 10;
+ if (!foo) return 0;
+ }
+ return !cs[0] && !zero.x;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_const=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_c_const=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5
+$as_echo "$ac_cv_c_const" >&6; }
+if test $ac_cv_c_const = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define const /**/
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for inline" >&5
+$as_echo_n "checking for inline... " >&6; }
+if test "${ac_cv_c_inline+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_c_inline=no
+for ac_kw in inline __inline__ __inline; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifndef __cplusplus
+typedef int foo_t;
+static $ac_kw foo_t static_foo () {return 0; }
+$ac_kw foo_t foo () {return 0; }
+#endif
+
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_c_inline=$ac_kw
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ test "$ac_cv_c_inline" != no && break
+done
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5
+$as_echo "$ac_cv_c_inline" >&6; }
+
+
+case $ac_cv_c_inline in
+ inline | yes) ;;
+ *)
+ case $ac_cv_c_inline in
+ no) ac_val=;;
+ *) ac_val=$ac_cv_c_inline;;
+ esac
+ cat >>confdefs.h <<_ACEOF
+#ifndef __cplusplus
+#define inline $ac_val
+#endif
+_ACEOF
+ ;;
+esac
+
+if test "x$long_double" = xyes; then
+
+ { $as_echo "$as_me:$LINENO: checking for long double" >&5
+$as_echo_n "checking for long double... " >&6; }
+if test "${ac_cv_type_long_double+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$GCC" = yes; then
+ ac_cv_type_long_double=yes
+ else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* The Stardent Vistra knows sizeof (long double), but does
+ not support it. */
+ long double foo = 0.0L;
+int
+main ()
+{
+static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */
+ sizeof (double) <= sizeof (long double))];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_type_long_double=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_long_double=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_long_double" >&5
+$as_echo "$ac_cv_type_long_double" >&6; }
+ if test $ac_cv_type_long_double = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_LONG_DOUBLE 1
+_ACEOF
+
+ fi
+
+else
+echo Long double disabled, since it would be too slow on this CPU
+fi
+{ $as_echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5
+$as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
+if test "${ac_cv_header_time+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/time.h>
+#include <time.h>
+
+int
+main ()
+{
+if ((struct tm *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_time=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_time=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5
+$as_echo "$ac_cv_header_time" >&6; }
+if test $ac_cv_header_time = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TIME_WITH_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+
+
+
+
+ac_header_dirent=no
+for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
+ as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5
+$as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
+if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <$ac_hdr>
+
+int
+main ()
+{
+if ((DIR *) 0)
+return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ eval "$as_ac_Header=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_Header=no"
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_Header'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
+_ACEOF
+
+ac_header_dirent=$ac_hdr; break
+fi
+
+done
+# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
+if test $ac_header_dirent = dirent.h; then
+ { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' dir; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_search_opendir=$ac_res
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_opendir+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+ :
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+else
+ { $as_echo "$as_me:$LINENO: checking for library containing opendir" >&5
+$as_echo_n "checking for library containing opendir... " >&6; }
+if test "${ac_cv_search_opendir+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_func_search_save_LIBS=$LIBS
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char opendir ();
+int
+main ()
+{
+return opendir ();
+ ;
+ return 0;
+}
+_ACEOF
+for ac_lib in '' x; do
+ if test -z "$ac_lib"; then
+ ac_res="none required"
+ else
+ ac_res=-l$ac_lib
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ fi
+ rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_search_opendir=$ac_res
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext
+ if test "${ac_cv_search_opendir+set}" = set; then
+ break
+fi
+done
+if test "${ac_cv_search_opendir+set}" = set; then
+ :
+else
+ ac_cv_search_opendir=no
+fi
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5
+$as_echo "$ac_cv_search_opendir" >&6; }
+ac_res=$ac_cv_search_opendir
+if test "$ac_res" != no; then
+ test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+
+fi
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5
+$as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
+if test "${ac_cv_header_sys_wait_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <sys/wait.h>
+#ifndef WEXITSTATUS
+# define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
+#endif
+#ifndef WIFEXITED
+# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
+#endif
+
+int
+main ()
+{
+ int s;
+ wait (&s);
+ s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_header_sys_wait_h=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_header_sys_wait_h=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5
+$as_echo "$ac_cv_header_sys_wait_h" >&6; }
+if test $ac_cv_header_sys_wait_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_SYS_WAIT_H 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for pid_t" >&5
+$as_echo_n "checking for pid_t... " >&6; }
+if test "${ac_cv_type_pid_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_pid_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (pid_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((pid_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_pid_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5
+$as_echo "$ac_cv_type_pid_t" >&6; }
+if test "x$ac_cv_type_pid_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define pid_t int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for size_t" >&5
+$as_echo_n "checking for size_t... " >&6; }
+if test "${ac_cv_type_size_t+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_type_size_t=no
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof (size_t))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+if (sizeof ((size_t)))
+ return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ :
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_type_size_t=yes
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5
+$as_echo "$ac_cv_type_size_t" >&6; }
+if test "x$ac_cv_type_size_t" = x""yes; then
+ :
+else
+
+cat >>confdefs.h <<_ACEOF
+#define size_t unsigned int
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5
+$as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
+if test "${ac_cv_struct_tm+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/types.h>
+#include <time.h>
+
+int
+main ()
+{
+struct tm tm;
+ int *p = &tm.tm_sec;
+ return !p;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_cv_struct_tm=time.h
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_struct_tm=sys/time.h
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5
+$as_echo "$ac_cv_struct_tm" >&6; }
+if test $ac_cv_struct_tm = sys/time.h; then
+
+cat >>confdefs.h <<\_ACEOF
+#define TM_IN_SYS_TIME 1
+_ACEOF
+
+fi
+
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+eval datadir2=$datadir
+eval datadir3=$datadir2
+# This is a madness! eval can evaluate only one level of variable...
+cat >>confdefs.h <<_ACEOF
+#define DATAPATH "${datadir3}/XaoS"
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of short" >&5
+$as_echo_n "checking size of short... " >&6; }
+if test "${ac_cv_sizeof_short+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (short))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_short=$ac_lo;;
+'') if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_short=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (short)); }
+static unsigned long int ulongval () { return (long int) (sizeof (short)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (short))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (short))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (short))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_short=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_short" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (short)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_short=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_short" >&5
+$as_echo "$ac_cv_sizeof_short" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_SHORT $ac_cv_sizeof_short
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of int" >&5
+$as_echo_n "checking size of int... " >&6; }
+if test "${ac_cv_sizeof_int+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (int))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_int=$ac_lo;;
+'') if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_int=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (int)); }
+static unsigned long int ulongval () { return (long int) (sizeof (int)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (int))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (int))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (int))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_int=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_int" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (int)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_int=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5
+$as_echo "$ac_cv_sizeof_int" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INT $ac_cv_sizeof_int
+_ACEOF
+
+
+# The cast to long int works around a bug in the HP C Compiler
+# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+# This bug is HP SR number 8606223364.
+{ $as_echo "$as_me:$LINENO: checking size of long" >&5
+$as_echo_n "checking size of long... " >&6; }
+if test "${ac_cv_sizeof_long+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=0 ac_mid=0
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr $ac_mid + 1`
+ if test $ac_lo -le $ac_mid; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) < 0)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=-1 ac_mid=-1
+ while :; do
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) >= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_lo=$ac_mid; break
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_hi=`expr '(' $ac_mid ')' - 1`
+ if test $ac_mid -le $ac_hi; then
+ ac_lo= ac_hi=
+ break
+ fi
+ ac_mid=`expr 2 '*' $ac_mid`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+ done
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo= ac_hi=
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+ ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long int) (sizeof (long))) <= $ac_mid)];
+test_array [0] = 0
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_hi=$ac_mid
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_long=$ac_lo;;
+'') if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_long=0
+ fi ;;
+esac
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+static long int longval () { return (long int) (sizeof (long)); }
+static unsigned long int ulongval () { return (long int) (sizeof (long)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+ FILE *f = fopen ("conftest.val", "w");
+ if (! f)
+ return 1;
+ if (((long int) (sizeof (long))) < 0)
+ {
+ long int i = longval ();
+ if (i != ((long int) (sizeof (long))))
+ return 1;
+ fprintf (f, "%ld", i);
+ }
+ else
+ {
+ unsigned long int i = ulongval ();
+ if (i != ((long int) (sizeof (long))))
+ return 1;
+ fprintf (f, "%lu", i);
+ }
+ /* Do not output a trailing newline, as this causes \r\n confusion
+ on some platforms. */
+ return ferror (f) || fclose (f) != 0;
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sizeof_long=`cat conftest.val`
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+if test "$ac_cv_type_long" = yes; then
+ { { $as_echo "$as_me:$LINENO: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+{ { $as_echo "$as_me:$LINENO: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&5
+$as_echo "$as_me: error: cannot compute sizeof (long)
+See \`config.log' for more details." >&2;}
+ { (exit 77); exit 77; }; }; }
+ else
+ ac_cv_sizeof_long=0
+ fi
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.val
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5
+$as_echo "$ac_cv_sizeof_long" >&6; }
+
+
+
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_LONG $ac_cv_sizeof_long
+_ACEOF
+
+
+
+
+
+{ $as_echo "$as_me:$LINENO: checking for pow in -lm" >&5
+$as_echo_n "checking for pow in -lm... " >&6; }
+if test "${ac_cv_lib_m_pow+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lm $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char pow ();
+int
+main ()
+{
+return pow ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_m_pow=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_m_pow=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_m_pow" >&5
+$as_echo "$ac_cv_lib_m_pow" >&6; }
+if test "x$ac_cv_lib_m_pow" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBM 1
+_ACEOF
+
+ LIBS="-lm $LIBS"
+
+fi
+
+
+if test $png = yes; then
+
+{ $as_echo "$as_me:$LINENO: checking for inflate in -lz" >&5
+$as_echo_n "checking for inflate in -lz... " >&6; }
+if test "${ac_cv_lib_z_inflate+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflate ();
+int
+main ()
+{
+return inflate ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_z_inflate=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_z_inflate=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflate" >&5
+$as_echo "$ac_cv_lib_z_inflate" >&6; }
+if test "x$ac_cv_lib_z_inflate" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+ LIBS="-lz $LIBS"
+
+fi
+
+ if test x"$ac_cv_lib_z_inflate" = xno; then
+
+{ $as_echo "$as_me:$LINENO: checking for inflate in -lgz" >&5
+$as_echo_n "checking for inflate in -lgz... " >&6; }
+if test "${ac_cv_lib_gz_inflate+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lgz $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char inflate ();
+int
+main ()
+{
+return inflate ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_gz_inflate=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_gz_inflate=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_gz_inflate" >&5
+$as_echo "$ac_cv_lib_gz_inflate" >&6; }
+if test "x$ac_cv_lib_gz_inflate" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBGZ 1
+_ACEOF
+
+ LIBS="-lgz $LIBS"
+
+fi
+
+ if test x"$ac_cv_lib_gz_inflate" = xno; then
+ png=no
+ fi
+ fi
+
+{ $as_echo "$as_me:$LINENO: checking for png_create_info_struct in -lpng" >&5
+$as_echo_n "checking for png_create_info_struct in -lpng... " >&6; }
+if test "${ac_cv_lib_png_png_create_info_struct+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lpng $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char png_create_info_struct ();
+int
+main ()
+{
+return png_create_info_struct ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_png_png_create_info_struct=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_png_png_create_info_struct=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_png_png_create_info_struct" >&5
+$as_echo "$ac_cv_lib_png_png_create_info_struct" >&6; }
+if test "x$ac_cv_lib_png_png_create_info_struct" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBPNG 1
+_ACEOF
+
+ LIBS="-lpng $LIBS"
+
+fi
+
+ if test x"$ac_cv_lib_png_png_create_info_struct" = xno; then
+ png=no
+ fi
+ if test "$png" = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define USE_PNG 1
+_ACEOF
+
+ fi
+fi
+# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
+# for constant arguments. Useless!
+{ $as_echo "$as_me:$LINENO: checking for working alloca.h" >&5
+$as_echo_n "checking for working alloca.h... " >&6; }
+if test "${ac_cv_working_alloca_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <alloca.h>
+int
+main ()
+{
+char *p = (char *) alloca (2 * sizeof (int));
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_working_alloca_h=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_working_alloca_h=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5
+$as_echo "$ac_cv_working_alloca_h" >&6; }
+if test $ac_cv_working_alloca_h = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA_H 1
+_ACEOF
+
+fi
+
+{ $as_echo "$as_me:$LINENO: checking for alloca" >&5
+$as_echo_n "checking for alloca... " >&6; }
+if test "${ac_cv_func_alloca_works+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#ifdef __GNUC__
+# define alloca __builtin_alloca
+#else
+# ifdef _MSC_VER
+# include <malloc.h>
+# define alloca _alloca
+# else
+# ifdef HAVE_ALLOCA_H
+# include <alloca.h>
+# else
+# ifdef _AIX
+ #pragma alloca
+# else
+# ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+# endif
+# endif
+# endif
+# endif
+#endif
+
+int
+main ()
+{
+char *p = (char *) alloca (1);
+ if (p) return 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_func_alloca_works=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_func_alloca_works=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5
+$as_echo "$ac_cv_func_alloca_works" >&6; }
+
+if test $ac_cv_func_alloca_works = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define HAVE_ALLOCA 1
+_ACEOF
+
+else
+ # The SVR3 libPW and SVR4 libucb both contain incompatible functions
+# that cause trouble. Some versions do not even contain alloca or
+# contain a buggy version. If you still want to use their alloca,
+# use ar to extract alloca.o from them instead of compiling alloca.c.
+
+ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
+
+cat >>confdefs.h <<\_ACEOF
+#define C_ALLOCA 1
+_ACEOF
+
+
+{ $as_echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5
+$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
+if test "${ac_cv_os_cray+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#if defined CRAY && ! defined CRAY2
+webecray
+#else
+wenotbecray
+#endif
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+ $EGREP "webecray" >/dev/null 2>&1; then
+ ac_cv_os_cray=yes
+else
+ ac_cv_os_cray=no
+fi
+rm -f conftest*
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5
+$as_echo "$ac_cv_os_cray" >&6; }
+if test $ac_cv_os_cray = yes; then
+ for ac_func in _getb67 GETB67 getb67; do
+ as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+
+cat >>confdefs.h <<_ACEOF
+#define CRAY_STACKSEG_END $ac_func
+_ACEOF
+
+ break
+fi
+
+ done
+fi
+
+{ $as_echo "$as_me:$LINENO: checking stack direction for C alloca" >&5
+$as_echo_n "checking stack direction for C alloca... " >&6; }
+if test "${ac_cv_c_stack_direction+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test "$cross_compiling" = yes; then
+ ac_cv_c_stack_direction=0
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+int
+find_stack_direction ()
+{
+ static char *addr = 0;
+ auto char dummy;
+ if (addr == 0)
+ {
+ addr = &dummy;
+ return find_stack_direction ();
+ }
+ else
+ return (&dummy > addr) ? 1 : -1;
+}
+
+int
+main ()
+{
+ return find_stack_direction () < 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+ { (case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_try") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_c_stack_direction=1
+else
+ $as_echo "$as_me: program exited with status $ac_status" >&5
+$as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_stack_direction=-1
+fi
+rm -rf conftest.dSYM
+rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+
+
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5
+$as_echo "$ac_cv_c_stack_direction" >&6; }
+
+cat >>confdefs.h <<_ACEOF
+#define STACK_DIRECTION $ac_cv_c_stack_direction
+_ACEOF
+
+
+fi
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+for ac_func in ftime getcwd gettimeofday memchr memmove memset pow select setlocale sqrt strdup strerror strstr sleep setitimer ftime finite fabsl _fabsl __fabsl
+do
+as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
+{ $as_echo "$as_me:$LINENO: checking for $ac_func" >&5
+$as_echo_n "checking for $ac_func... " >&6; }
+if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then
+ $as_echo_n "(cached) " >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+/* Define $ac_func to an innocuous variant, in case <limits.h> declares $ac_func.
+ For example, HP-UX 11i <limits.h> declares gettimeofday. */
+#define $ac_func innocuous_$ac_func
+
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below.
+ Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+ <limits.h> exists even on freestanding compilers. */
+
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+
+#undef $ac_func
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char $ac_func ();
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined __stub_$ac_func || defined __stub___$ac_func
+choke me
+#endif
+
+int
+main ()
+{
+return $ac_func ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ eval "$as_ac_var=yes"
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ eval "$as_ac_var=no"
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+ac_res=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ { $as_echo "$as_me:$LINENO: result: $ac_res" >&5
+$as_echo "$ac_res" >&6; }
+as_val=`eval 'as_val=${'$as_ac_var'}
+ $as_echo "$as_val"'`
+ if test "x$as_val" = x""yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+
+if test "$x_driver_test" = yes; then
+if test "x$no_x" = x; then
+ if test "${ac_cv_header_sys_ipc_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
+$as_echo_n "checking for sys/ipc.h... " >&6; }
+if test "${ac_cv_header_sys_ipc_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
+$as_echo "$ac_cv_header_sys_ipc_h" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking sys/ipc.h usability" >&5
+$as_echo_n "checking sys/ipc.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/ipc.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking sys/ipc.h presence" >&5
+$as_echo_n "checking sys/ipc.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/ipc.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: sys/ipc.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: sys/ipc.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: sys/ipc.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: sys/ipc.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: sys/ipc.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: sys/ipc.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: sys/ipc.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to xaos-devel@lists.sourceforge.net ##
+## ----------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for sys/ipc.h" >&5
+$as_echo_n "checking for sys/ipc.h... " >&6; }
+if test "${ac_cv_header_sys_ipc_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_sys_ipc_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_ipc_h" >&5
+$as_echo "$ac_cv_header_sys_ipc_h" >&6; }
+
+fi
+if test "x$ac_cv_header_sys_ipc_h" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_IPC_H 1
+_ACEOF
+
+else
+ no_sys_ipc=yes
+fi
+
+
+ if test "${ac_cv_header_sys_shm_h+set}" = set; then
+ { $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
+$as_echo_n "checking for sys/shm.h... " >&6; }
+if test "${ac_cv_header_sys_shm_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
+$as_echo "$ac_cv_header_sys_shm_h" >&6; }
+else
+ # Is the header compilable?
+{ $as_echo "$as_me:$LINENO: checking sys/shm.h usability" >&5
+$as_echo_n "checking sys/shm.h usability... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+$ac_includes_default
+#include <sys/shm.h>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (ac_try="$ac_compile"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_compile") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest.$ac_objext; then
+ ac_header_compiler=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_compiler=no
+fi
+
+rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+$as_echo "$ac_header_compiler" >&6; }
+
+# Is the header present?
+{ $as_echo "$as_me:$LINENO: checking sys/shm.h presence" >&5
+$as_echo_n "checking sys/shm.h presence... " >&6; }
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+#include <sys/shm.h>
+_ACEOF
+if { (ac_try="$ac_cpp conftest.$ac_ext"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } >/dev/null && {
+ test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ }; then
+ ac_header_preproc=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_header_preproc=no
+fi
+
+rm -f conftest.err conftest.$ac_ext
+{ $as_echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+$as_echo "$ac_header_preproc" >&6; }
+
+# So? What about this header?
+case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in
+ yes:no: )
+ { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&5
+$as_echo "$as_me: WARNING: sys/shm.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the compiler's result" >&5
+$as_echo "$as_me: WARNING: sys/shm.h: proceeding with the compiler's result" >&2;}
+ ac_header_preproc=yes
+ ;;
+ no:yes:* )
+ { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: present but cannot be compiled" >&5
+$as_echo "$as_me: WARNING: sys/shm.h: present but cannot be compiled" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: check for missing prerequisite headers?" >&5
+$as_echo "$as_me: WARNING: sys/shm.h: check for missing prerequisite headers?" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: see the Autoconf documentation" >&5
+$as_echo "$as_me: WARNING: sys/shm.h: see the Autoconf documentation" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: section \"Present But Cannot Be Compiled\"" >&5
+$as_echo "$as_me: WARNING: sys/shm.h: section \"Present But Cannot Be Compiled\"" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&5
+$as_echo "$as_me: WARNING: sys/shm.h: proceeding with the preprocessor's result" >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&5
+$as_echo "$as_me: WARNING: sys/shm.h: in the future, the compiler will take precedence" >&2;}
+ ( cat <<\_ASBOX
+## ----------------------------------------------- ##
+## Report this to xaos-devel@lists.sourceforge.net ##
+## ----------------------------------------------- ##
+_ASBOX
+ ) | sed "s/^/$as_me: WARNING: /" >&2
+ ;;
+esac
+{ $as_echo "$as_me:$LINENO: checking for sys/shm.h" >&5
+$as_echo_n "checking for sys/shm.h... " >&6; }
+if test "${ac_cv_header_sys_shm_h+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_cv_header_sys_shm_h=$ac_header_preproc
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_header_sys_shm_h" >&5
+$as_echo "$ac_cv_header_sys_shm_h" >&6; }
+
+fi
+if test "x$ac_cv_header_sys_shm_h" = x""yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_IPC_H 1
+_ACEOF
+
+else
+ no_sys_shm=yes
+fi
+
+
+
+ if test "x$xshm" = xyes; then
+ { $as_echo "$as_me:$LINENO: checking X11/extensions/XShm.h" >&5
+$as_echo_n "checking X11/extensions/XShm.h... " >&6; }
+ if eval "test -f $x_includes/X11/extensions/XShm.h"; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_MITSHM_H 1
+_ACEOF
+
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ xshm=no
+ fi
+ fi
+
+ { $as_echo "$as_me:$LINENO: checking for XShmAttach in -lXext" >&5
+$as_echo_n "checking for XShmAttach in -lXext... " >&6; }
+if test "${ac_cv_lib_Xext_XShmAttach+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-lXext $X_LIBS $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char XShmAttach ();
+int
+main ()
+{
+return XShmAttach ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (ac_try="$ac_link"
+case "(($ac_try" in
+ *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
+ *) ac_try_echo=$ac_try;;
+esac
+eval ac_try_echo="\"\$as_me:$LINENO: $ac_try_echo\""
+$as_echo "$ac_try_echo") >&5
+ (eval "$ac_link") 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } && {
+ test -z "$ac_c_werror_flag" ||
+ test ! -s conftest.err
+ } && test -s conftest$ac_exeext && {
+ test "$cross_compiling" = yes ||
+ $as_test_x conftest$ac_exeext
+ }; then
+ ac_cv_lib_Xext_XShmAttach=yes
+else
+ $as_echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ ac_cv_lib_Xext_XShmAttach=no
+fi
+
+rm -rf conftest.dSYM
+rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:$LINENO: result: $ac_cv_lib_Xext_XShmAttach" >&5
+$as_echo "$ac_cv_lib_Xext_XShmAttach" >&6; }
+if test "x$ac_cv_lib_Xext_XShmAttach" = x""yes; then
+ LIBS="$LIBS -lXext"
+else
+ no_ext_lib=yes
+fi
+
+
+fi
+fi
+
+if test "$gtk_driver_test" = yes; then
+
+
+if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
+set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+PKG_CONFIG=$ac_cv_path_PKG_CONFIG
+if test -n "$PKG_CONFIG"; then
+ { $as_echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5
+$as_echo "$PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_path_PKG_CONFIG"; then
+ ac_pt_PKG_CONFIG=$PKG_CONFIG
+ # Extract the first word of "pkg-config", so it can be a program name with args.
+set dummy pkg-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $ac_pt_PKG_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+fi
+ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
+if test -n "$ac_pt_PKG_CONFIG"; then
+ { $as_echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5
+$as_echo "$ac_pt_PKG_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+ if test "x$ac_pt_PKG_CONFIG" = x; then
+ PKG_CONFIG=""
+ else
+ case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
+ac_tool_warned=yes ;;
+esac
+ PKG_CONFIG=$ac_pt_PKG_CONFIG
+ fi
+else
+ PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
+fi
+
+fi
+if test -n "$PKG_CONFIG"; then
+ _pkg_min_version=0.9.0
+ { $as_echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5
+$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
+ if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ PKG_CONFIG=""
+ fi
+
+fi
+
+pkg_failed=no
+{ $as_echo "$as_me:$LINENO: checking for DEPS" >&5
+$as_echo_n "checking for DEPS... " >&6; }
+
+if test -n "$PKG_CONFIG"; then
+ if test -n "$DEPS_CFLAGS"; then
+ pkg_cv_DEPS_CFLAGS="$DEPS_CFLAGS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.2 glib-2.0 >= 2.2\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.2 glib-2.0 >= 2.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_DEPS_CFLAGS=`$PKG_CONFIG --cflags "gtk+-2.0 >= 2.2 glib-2.0 >= 2.2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+if test -n "$PKG_CONFIG"; then
+ if test -n "$DEPS_LIBS"; then
+ pkg_cv_DEPS_LIBS="$DEPS_LIBS"
+ else
+ if test -n "$PKG_CONFIG" && \
+ { ($as_echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"gtk+-2.0 >= 2.2 glib-2.0 >= 2.2\"") >&5
+ ($PKG_CONFIG --exists --print-errors "gtk+-2.0 >= 2.2 glib-2.0 >= 2.2") 2>&5
+ ac_status=$?
+ $as_echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ pkg_cv_DEPS_LIBS=`$PKG_CONFIG --libs "gtk+-2.0 >= 2.2 glib-2.0 >= 2.2" 2>/dev/null`
+else
+ pkg_failed=yes
+fi
+ fi
+else
+ pkg_failed=untried
+fi
+
+
+
+if test $pkg_failed = yes; then
+
+if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
+ _pkg_short_errors_supported=yes
+else
+ _pkg_short_errors_supported=no
+fi
+ if test $_pkg_short_errors_supported = yes; then
+ DEPS_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "gtk+-2.0 >= 2.2 glib-2.0 >= 2.2"`
+ else
+ DEPS_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "gtk+-2.0 >= 2.2 glib-2.0 >= 2.2"`
+ fi
+ # Put the nasty error message in config.log where it belongs
+ echo "$DEPS_PKG_ERRORS" >&5
+
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ gtk_driver=false
+elif test $pkg_failed = untried; then
+ gtk_driver=false
+else
+ DEPS_CFLAGS=$pkg_cv_DEPS_CFLAGS
+ DEPS_LIBS=$pkg_cv_DEPS_LIBS
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ gtk_driver=true
+fi
+
+
+fi
+
+if test "$ac_cv_header_malloc_h" = "no"; then
+ cat >>confdefs.h <<\_ACEOF
+#define NO_MALLOC_H 1
+_ACEOF
+
+fi
+
+if test "$ac_cv_header_htmlhelp_h" = "yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define HTML_HELP 1
+_ACEOF
+
+ LIBS="$LIBS -lhtmlhelp"
+fi
+
+if test "$ac_cv_header_ddraw_h" = "yes"; then
+ cat >>confdefs.h <<\_ACEOF
+#define DDRAW_DRIVER 1
+_ACEOF
+
+fi
+
+
+echo "------------------------------------------------------------"
+echo "Available drivers:"
+drivers=no
+if test "$aa_driver_test" = yes; then
+if test "x$aa_driver" = xtrue; then
+ drivers=yes
+ cat >>confdefs.h <<\_ACEOF
+#define AA_DRIVER 1
+_ACEOF
+
+ DRIVERDIRS="$DRIVERDIRS ui/ui-drv/aa"
+ DRIVERLIBS="$DRIVERLIBS lib/libuiaa.a"
+ echo " aa-lib"
+fi
+fi
+
+if test "$gtk_driver_test" = yes; then
+if test "x$gtk_driver" = xtrue; then
+ drivers=yes
+ cat >>confdefs.h <<\_ACEOF
+#define GTK_DRIVER 1
+_ACEOF
+
+ DRIVERDIRS="$DRIVERDIRS ui/ui-drv/gtk"
+ DRIVERLIBS="$DRIVERLIBS lib/libuigtk.a"
+ CFLAGS="$CFLAGS $DEPS_CFLAGS"
+ LIBS="$LIBS $DEPS_LIBS"
+ echo " gtk+"
+fi
+fi
+
+if test "$x_driver_test" = yes; then
+if test "x$no_x" = x; then
+ drivers=yes
+ cat >>confdefs.h <<\_ACEOF
+#define X11_DRIVER 1
+_ACEOF
+
+ DRIVERDIRS="$DRIVERDIRS ui/ui-drv/x11"
+ DRIVERLIBS="$DRIVERLIBS lib/libuix11.a"
+ if test "x$no_sys_ipc$no_sys_shm y$ac_cv_lib_Xext_XShmAttach z$xshm" = "x yyes zyes"; then
+ echo " X11 with MIT shared memory support"
+ cat >>confdefs.h <<\_ACEOF
+#define MITSHM 1
+_ACEOF
+
+ else
+ echo " X11"
+ fi
+ if test "$x11_linked" = no; then
+ LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
+ x11_linked=yes
+ fi
+ CFLAGS="$CFLAGS $X_CFLAGS"
+fi
+fi
+
+if test "$win32_driver" = yes; then
+ drivers=yes
+ cat >>confdefs.h <<\_ACEOF
+#define WIN32_DRIVER 1
+_ACEOF
+
+ DRIVERDIRS="$DRIVERDIRS ui/ui-drv/win32"
+ DRIVERLIBS="ui/ui-drv/win32/ui_win32.o lib/libuiwin32.a ui/ui-drv/win32/xaos.res $DRIVERLIBS"
+ LOCALEDIR="../../locale"
+ echo -n " Win32"
+ if test "$ac_cv_header_ddraw_h" = yes; then
+ echo " (with DirectDraw support)"
+ else
+ echo ""
+ fi
+fi
+
+REALTOPDIR=`nolinks=1; pwd`
+
+BINPATH="$REALTOPDIR/bin"
+
+AR="ar"
+
+SRCPATH="$REALTOPDIR/src"
+
+LIBPATH="$SRCPATH/lib"
+
+# does this work if you do make -C <some dir>
+TOPDIR=`nolinks=1;pwd`
+
+
+# sffe cmplx detection (flow is : GLS -> sffeASM -> none)
+if test $sffe = yes; then
+ echo "------------------------------------------------------------"
+ echo "Complex math parser:"
+ echo "try GSL: $gsl"
+
+ if test $gsl = yes; then
+ GSL_LIBS=""
+ # Extract the first word of "gsl-config", so it can be a program name with args.
+set dummy gsl-config; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_path_GSL_CONFIG+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ case $GSL_CONFIG in
+ [\\/]* | ?:[\\/]*)
+ ac_cv_path_GSL_CONFIG="$GSL_CONFIG" # Let the user override the test with a path.
+ ;;
+ *)
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_path_GSL_CONFIG="$as_dir/$ac_word$ac_exec_ext"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+ test -z "$ac_cv_path_GSL_CONFIG" && ac_cv_path_GSL_CONFIG="no"
+ ;;
+esac
+fi
+GSL_CONFIG=$ac_cv_path_GSL_CONFIG
+if test -n "$GSL_CONFIG"; then
+ { $as_echo "$as_me:$LINENO: result: $GSL_CONFIG" >&5
+$as_echo "$GSL_CONFIG" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ { $as_echo "$as_me:$LINENO: checking for GSL" >&5
+$as_echo_n "checking for GSL... " >&6; }
+ if test "$GSL_CONFIG" = "no" ; then
+ gsl=no
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+ else
+ { $as_echo "$as_me:$LINENO: result: yes" >&5
+$as_echo "yes" >&6; }
+ echo "using GSL for complex numbers"
+ GSL_LIBS=`$GSL_CONFIG --libs`
+ GSL_CFLAGS=`$GSL_CONFIG --cflags`
+ CFLAGS="$CFLAGS $GSL_CFLAGS -fomit-frame-pointer -DSFFE_USING -DSFFE_CMPLX_GSL"
+ DRIVERLIBS="$DRIVERLIBS lib/libsffe.a"
+ ASM_CMPLX_O=""
+ fi
+ fi
+
+ if test $gsl = no; then
+ # Extract the first word of "nasm", so it can be a program name with args.
+set dummy nasm; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_NASM+set}" = set; then
+ $as_echo_n "(cached) " >&6
+else
+ if test -n "$NASM"; then
+ ac_cv_prog_NASM="$NASM" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
+ ac_cv_prog_NASM="yes"
+ $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+NASM=$ac_cv_prog_NASM
+if test -n "$NASM"; then
+ { $as_echo "$as_me:$LINENO: result: $NASM" >&5
+$as_echo "$NASM" >&6; }
+else
+ { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+ if test "$NASM" = yes; then
+ echo "using NASM for complex numbers"
+ CFLAGS="$CFLAGS -DSFFE_USING -DSFFE_CMPLX_ASM"
+ DRIVERLIBS="$DRIVERLIBS lib/libsffe.a"
+ ASM_CMPLX_O="asm/cmplx.o"
+ case $host_os in
+ *cygwin* | *mingw*) CMPLX_O_TARGET=coff;;
+ *darwin*) CMPLX_O_TARGET=macho;;
+ *) CMPLX_O_TARGET=elf;;
+ esac
+ else
+ sffe=no
+ fi
+ fi
+ echo "------------------------------------------------------------"
+else
+ CFLAGS="$CFLAGS -fomit-frame-pointer"
+fi
+
+
+LIBS="$LIBS $GSL_LIBS"
+CFLAGS="$CFLAGS -I${SRCPATH}/include"
+
+
+
+
+
+
+ac_config_files="$ac_config_files src/i18n/Makefile.in Makefile src/Makefile src/i18n/Makefile src/engine/Makefile src/util/Makefile src/ui/Makefile src/filter/Makefile src/ui-hlp/Makefile src/ui/ui-drv/aa/Makefile src/ui/ui-drv/x11/Makefile src/ui/ui-drv/win32/Makefile doc/Makefile help/Makefile src/ui/ui-drv/gtk/Makefile src/sffe/Makefile"
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
+#
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, we kill variables containing newlines.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+(
+ for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
+ eval ac_val=\$$ac_var
+ case $ac_val in #(
+ *${as_nl}*)
+ case $ac_var in #(
+ *_cv_*) { $as_echo "$as_me:$LINENO: WARNING: cache variable $ac_var contains a newline" >&5
+$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
+ esac
+ case $ac_var in #(
+ _ | IFS | as_nl) ;; #(
+ BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
+ *) $as_unset $ac_var ;;
+ esac ;;
+ esac
+ done
+
+ (set) 2>&1 |
+ case $as_nl`(ac_space=' '; set) 2>&1` in #(
+ *${as_nl}ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;; #(
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
+ ;;
+ esac |
+ sort
+) |
+ sed '
+ /^ac_cv_env_/b end
+ t clear
+ :clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ :end' >>confcache
+if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
+ if test -w "$cache_file"; then
+ test "x$cache_file" != "x/dev/null" &&
+ { $as_echo "$as_me:$LINENO: updating cache $cache_file" >&5
+$as_echo "$as_me: updating cache $cache_file" >&6;}
+ cat confcache >$cache_file
+ else
+ { $as_echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5
+$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
+ fi
+fi
+rm -f confcache
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
+
+DEFS=-DHAVE_CONFIG_H
+
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+ # 1. Remove the extension, and $U if already installed.
+ ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
+ ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
+ # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
+ # will be set to the directory where LIBOBJS objects are built.
+ ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext"
+ ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
+
+LTLIBOBJS=$ac_ltlibobjs
+
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_write_fail=0
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ $as_echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
+
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be more Bourne compatible
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in
+ *posix*) set -o posix ;;
+esac
+
+fi
+
+
+
+
+# PATH needs CR
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+as_nl='
+'
+export as_nl
+# Printing a long string crashes Solaris 7 /usr/bin/printf.
+as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
+as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
+if (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
+ as_echo='printf %s\n'
+ as_echo_n='printf %s'
+else
+ if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
+ as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
+ as_echo_n='/usr/ucb/echo -n'
+ else
+ as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
+ as_echo_n_body='eval
+ arg=$1;
+ case $arg in
+ *"$as_nl"*)
+ expr "X$arg" : "X\\(.*\\)$as_nl";
+ arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
+ esac;
+ expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
+ '
+ export as_echo_n_body
+ as_echo_n='sh -c $as_echo_n_body as_echo'
+ fi
+ export as_echo_body
+ as_echo='sh -c $as_echo_body as_echo'
+fi
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ PATH_SEPARATOR=:
+ (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+ (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+ PATH_SEPARATOR=';'
+ }
+fi
+
+# Support unset when possible.
+if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+
+# IFS
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent editors from complaining about space-tab.
+# (If _AS_PATH_WALK were called with IFS unset, it would disable word
+# splitting by setting IFS to empty value.)
+IFS=" "" $as_nl"
+
+# Find who we are. Look in the path if we contain no directory separator.
+case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+IFS=$as_save_IFS
+
+ ;;
+esac
+# We did not find ourselves, most probably we were run as `sh COMMAND'
+# in which case we are not to be found in the path.
+if test "x$as_myself" = x; then
+ as_myself=$0
+fi
+if test ! -f "$as_myself"; then
+ $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
+ { (exit 1); exit 1; }
+fi
+
+# Work around bugs in pre-3.0 UWIN ksh.
+for as_var in ENV MAIL MAILPATH
+do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var
+done
+PS1='$ '
+PS2='> '
+PS4='+ '
+
+# NLS nuisances.
+LC_ALL=C
+export LC_ALL
+LANGUAGE=C
+export LANGUAGE
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
+ as_basename=basename
+else
+ as_basename=false
+fi
+
+
+# Name of the executable.
+as_me=`$as_basename -- "$0" ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\/\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+
+# CDPATH.
+$as_unset CDPATH
+
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || {
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line after each line using $LINENO; the second 'sed'
+ # does the real work. The second script uses 'N' to pair each
+ # line-number line with the line containing $LINENO, and appends
+ # trailing '-' during substitution so that $LINENO is not a special
+ # case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # scripts with optimization help from Paolo Bonzini. Blame Lee
+ # E. McMahon (1931-1989) for sed's syntax. :-)
+ sed -n '
+ p
+ /[$]LINENO/=
+ ' <$as_myself |
+ sed '
+ s/[$]LINENO.*/&-/
+ t lineno
+ b
+ :lineno
+ N
+ :loop
+ s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
+ t loop
+ s/-\n.*//
+ ' >$as_me.lineno &&
+ chmod +x "$as_me.lineno" ||
+ { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensitive to this).
+ . "./$as_me.lineno"
+ # Exit status is that of the last command.
+ exit
+}
+
+
+if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
+ as_dirname=dirname
+else
+ as_dirname=false
+fi
+
+ECHO_C= ECHO_N= ECHO_T=
+case `echo -n x` in
+-n*)
+ case `echo 'x\c'` in
+ *c*) ECHO_T=' ';; # ECHO_T is single tab character.
+ *) ECHO_C='\c';;
+ esac;;
+*)
+ ECHO_N='-n';;
+esac
+if expr a : '\(a\)' >/dev/null 2>&1 &&
+ test "X`expr 00001 : '.*\(...\)'`" = X001; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+if test -d conf$$.dir; then
+ rm -f conf$$.dir/conf$$.file
+else
+ rm -f conf$$.dir
+ mkdir conf$$.dir 2>/dev/null
+fi
+if (echo >conf$$.file) 2>/dev/null; then
+ if ln -s conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s='ln -s'
+ # ... but there are two gotchas:
+ # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
+ # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
+ # In both cases, we have to default to `cp -p'.
+ ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
+ as_ln_s='cp -p'
+ elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+ else
+ as_ln_s='cp -p'
+ fi
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
+rmdir conf$$.dir 2>/dev/null
+
+if mkdir -p . 2>/dev/null; then
+ as_mkdir_p=:
+else
+ test -d ./-p && rmdir ./-p
+ as_mkdir_p=false
+fi
+
+if test -x / >/dev/null 2>&1; then
+ as_test_x='test -x'
+else
+ if ls -dL / >/dev/null 2>&1; then
+ as_ls_L_option=L
+ else
+ as_ls_L_option=
+ fi
+ as_test_x='
+ eval sh -c '\''
+ if test -d "$1"; then
+ test -d "$1/.";
+ else
+ case $1 in
+ -*)set "./$1";;
+ esac;
+ case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in
+ ???[sx]*):;;*)false;;esac;fi
+ '\'' sh
+ '
+fi
+as_executable_p=$as_test_x
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
+
+
+exec 6>&1
+
+# Save the log message, to keep $[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.
+ac_log="
+This file was extended by XaoS $as_me 3.5, which was
+generated by GNU Autoconf 2.63. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+on `(hostname || uname -n) 2>/dev/null | sed 1q`
+"
+
+_ACEOF
+
+case $ac_config_files in *"
+"*) set x $ac_config_files; shift; ac_config_files=$*;;
+esac
+
+case $ac_config_headers in *"
+"*) set x $ac_config_headers; shift; ac_config_headers=$*;;
+esac
+
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+# Files that config.status was made for.
+config_files="$ac_config_files"
+config_headers="$ac_config_headers"
+config_commands="$ac_config_commands"
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTION]... [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number and configuration settings, then exit
+ -q, --quiet, --silent
+ do not print progress messages
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+ --header=FILE[:TEMPLATE]
+ instantiate the configuration header FILE
+
+Configuration files:
+$config_files
+
+Configuration headers:
+$config_headers
+
+Configuration commands:
+$config_commands
+
+Report bugs to <bug-autoconf@gnu.org>."
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_cs_version="\\
+XaoS config.status 3.5
+configured by $0, generated by GNU Autoconf 2.63,
+ with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright (C) 2008 Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+
+ac_pwd='$ac_pwd'
+srcdir='$srcdir'
+INSTALL='$INSTALL'
+MKDIR_P='$MKDIR_P'
+test -n "\$AWK" || AWK=awk
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# The default lists apply if the user does not specify any file.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "X$1" : 'X\([^=]*\)='`
+ ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
+ ac_shift=:
+ ;;
+ *)
+ ac_option=$1
+ ac_optarg=$2
+ ac_shift=shift
+ ;;
+ esac
+
+ case $ac_option in
+ # Handling of the options.
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ ac_cs_recheck=: ;;
+ --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
+ $as_echo "$ac_cs_version"; exit ;;
+ --debug | --debu | --deb | --de | --d | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_FILES="$CONFIG_FILES '$ac_optarg'"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ $ac_shift
+ case $ac_optarg in
+ *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ CONFIG_HEADERS="$CONFIG_HEADERS '$ac_optarg'"
+ ac_need_defaults=false;;
+ --he | --h)
+ # Conflict between --help and --header
+ { $as_echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ $as_echo "$ac_cs_usage"; exit ;;
+ -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+ | -silent | --silent | --silen | --sile | --sil | --si | --s)
+ ac_cs_silent=: ;;
+
+ # This is an error.
+ -*) { $as_echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1"
+ ac_need_defaults=false ;;
+
+ esac
+ shift
+done
+
+ac_configure_extra_args=
+
+if $ac_cs_silent; then
+ exec 6>/dev/null
+ ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+if \$ac_cs_recheck; then
+ set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+ shift
+ \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
+ CONFIG_SHELL='$SHELL'
+ export CONFIG_SHELL
+ exec "\$@"
+fi
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+ $as_echo "$ac_log"
+} >&5
+
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+#
+# INIT-COMMANDS
+#
+# Capture the value of obsolete ALL_LINGUAS because we need it to compute
+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
+ # from automake < 1.5.
+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
+ LINGUAS="${LINGUAS-%UNSET%}"
+
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+
+# Handling of arguments.
+for ac_config_target in $ac_config_targets
+do
+ case $ac_config_target in
+ "src/include/aconfig.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/aconfig.h" ;;
+ "src/include/version.h") CONFIG_HEADERS="$CONFIG_HEADERS src/include/version.h" ;;
+ "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
+ "src/i18n/Makefile.in") CONFIG_FILES="$CONFIG_FILES src/i18n/Makefile.in" ;;
+ "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
+ "src/i18n/Makefile") CONFIG_FILES="$CONFIG_FILES src/i18n/Makefile" ;;
+ "src/engine/Makefile") CONFIG_FILES="$CONFIG_FILES src/engine/Makefile" ;;
+ "src/util/Makefile") CONFIG_FILES="$CONFIG_FILES src/util/Makefile" ;;
+ "src/ui/Makefile") CONFIG_FILES="$CONFIG_FILES src/ui/Makefile" ;;
+ "src/filter/Makefile") CONFIG_FILES="$CONFIG_FILES src/filter/Makefile" ;;
+ "src/ui-hlp/Makefile") CONFIG_FILES="$CONFIG_FILES src/ui-hlp/Makefile" ;;
+ "src/ui/ui-drv/aa/Makefile") CONFIG_FILES="$CONFIG_FILES src/ui/ui-drv/aa/Makefile" ;;
+ "src/ui/ui-drv/x11/Makefile") CONFIG_FILES="$CONFIG_FILES src/ui/ui-drv/x11/Makefile" ;;
+ "src/ui/ui-drv/win32/Makefile") CONFIG_FILES="$CONFIG_FILES src/ui/ui-drv/win32/Makefile" ;;
+ "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
+ "help/Makefile") CONFIG_FILES="$CONFIG_FILES help/Makefile" ;;
+ "src/ui/ui-drv/gtk/Makefile") CONFIG_FILES="$CONFIG_FILES src/ui/ui-drv/gtk/Makefile" ;;
+ "src/sffe/Makefile") CONFIG_FILES="$CONFIG_FILES src/sffe/Makefile" ;;
+
+ *) { { $as_echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+$as_echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
+ test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
+fi
+
+# Have a temporary directory for convenience. Make it in the build tree
+# simply because there is no reason against having it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Hook for its removal unless debugging.
+# Note that there is a small window in which the directory will not be cleaned:
+# after its creation but before its name has been assigned to `$tmp'.
+$debug ||
+{
+ tmp=
+ trap 'exit_status=$?
+ { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+# Create a (secure) tmp directory for tmp files.
+
+{
+ tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=./conf$$-$RANDOM
+ (umask 077 && mkdir "$tmp")
+} ||
+{
+ $as_echo "$as_me: cannot create a temporary directory in ." >&2
+ { (exit 1); exit 1; }
+}
+
+# Set up the scripts for CONFIG_FILES section.
+# No need to generate them if there are no CONFIG_FILES.
+# This happens for instance with `./config.status config.h'.
+if test -n "$CONFIG_FILES"; then
+
+
+ac_cr=' '
+ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
+if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
+ ac_cs_awk_cr='\\r'
+else
+ ac_cs_awk_cr=$ac_cr
+fi
+
+echo 'BEGIN {' >"$tmp/subs1.awk" &&
+_ACEOF
+
+
+{
+ echo "cat >conf$$subs.awk <<_ACEOF" &&
+ echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
+ echo "_ACEOF"
+} >conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+ac_delim='%!_!# '
+for ac_last_try in false false false false false :; do
+ . ./conf$$subs.sh ||
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+ ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
+ if test $ac_delim_n = $ac_delim_num; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+rm -f conf$$subs.sh
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+_ACEOF
+sed -n '
+h
+s/^/S["/; s/!.*/"]=/
+p
+g
+s/^[^!]*!//
+:repl
+t repl
+s/'"$ac_delim"'$//
+t delim
+:nl
+h
+s/\(.\{148\}\).*/\1/
+t more1
+s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
+p
+n
+b repl
+:more1
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t nl
+:delim
+h
+s/\(.\{148\}\).*/\1/
+t more2
+s/["\\]/\\&/g; s/^/"/; s/$/"/
+p
+b
+:more2
+s/["\\]/\\&/g; s/^/"/; s/$/"\\/
+p
+g
+s/.\{148\}//
+t delim
+' <conf$$subs.awk | sed '
+/^[^""]/{
+ N
+ s/\n//
+}
+' >>$CONFIG_STATUS || ac_write_fail=1
+rm -f conf$$subs.awk
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+_ACAWK
+cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+ for (key in S) S_is_set[key] = 1
+ FS = ""
+
+}
+{
+ line = $ 0
+ nfields = split(line, field, "@")
+ substed = 0
+ len = length(field[1])
+ for (i = 2; i < nfields; i++) {
+ key = field[i]
+ keylen = length(key)
+ if (S_is_set[key]) {
+ value = S[key]
+ line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
+ len += length(value) + length(field[++i])
+ substed = 1
+ } else
+ len += 1 + keylen
+ }
+
+ print line
+}
+
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
+ sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
+else
+ cat
+fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+ || { { $as_echo "$as_me:$LINENO: error: could not setup config files machinery" >&5
+$as_echo "$as_me: error: could not setup config files machinery" >&2;}
+ { (exit 1); exit 1; }; }
+_ACEOF
+
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/
+s/:*\${srcdir}:*/:/
+s/:*@srcdir@:*/:/
+s/^\([^=]*=[ ]*\):*/\1/
+s/:*$//
+s/^[^=]*=[ ]*$//
+}'
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+fi # test -n "$CONFIG_FILES"
+
+# Set up the scripts for CONFIG_HEADERS section.
+# No need to generate them if there are no CONFIG_HEADERS.
+# This happens for instance with `./config.status Makefile'.
+if test -n "$CONFIG_HEADERS"; then
+cat >"$tmp/defines.awk" <<\_ACAWK ||
+BEGIN {
+_ACEOF
+
+# Transform confdefs.h into an awk script `defines.awk', embedded as
+# here-document in config.status, that substitutes the proper values into
+# config.h.in to produce config.h.
+
+# Create a delimiter string that does not exist in confdefs.h, to ease
+# handling of long lines.
+ac_delim='%!_!# '
+for ac_last_try in false false :; do
+ ac_t=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_t"; then
+ break
+ elif $ac_last_try; then
+ { { $as_echo "$as_me:$LINENO: error: could not make $CONFIG_HEADERS" >&5
+$as_echo "$as_me: error: could not make $CONFIG_HEADERS" >&2;}
+ { (exit 1); exit 1; }; }
+ else
+ ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
+ fi
+done
+
+# For the awk script, D is an array of macro values keyed by name,
+# likewise P contains macro parameters if any. Preserve backslash
+# newline sequences.
+
+ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
+sed -n '
+s/.\{148\}/&'"$ac_delim"'/g
+t rset
+:rset
+s/^[ ]*#[ ]*define[ ][ ]*/ /
+t def
+d
+:def
+s/\\$//
+t bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3"/p
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
+d
+:bsnl
+s/["\\]/\\&/g
+s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
+D["\1"]=" \3\\\\\\n"\\/p
+t cont
+s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
+t cont
+d
+:cont
+n
+s/.\{148\}/&'"$ac_delim"'/g
+t clear
+:clear
+s/\\$//
+t bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/"/p
+d
+:bsnlc
+s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
+b cont
+' <confdefs.h | sed '
+s/'"$ac_delim"'/"\\\
+"/g' >>$CONFIG_STATUS || ac_write_fail=1
+
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ for (key in D) D_is_set[key] = 1
+ FS = ""
+}
+/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
+ line = \$ 0
+ split(line, arg, " ")
+ if (arg[1] == "#") {
+ defundef = arg[2]
+ mac1 = arg[3]
+ } else {
+ defundef = substr(arg[1], 2)
+ mac1 = arg[2]
+ }
+ split(mac1, mac2, "(") #)
+ macro = mac2[1]
+ prefix = substr(line, 1, index(line, defundef) - 1)
+ if (D_is_set[macro]) {
+ # Preserve the white space surrounding the "#".
+ print prefix "define", macro P[macro] D[macro]
+ next
+ } else {
+ # Replace #undef with comments. This is necessary, for example,
+ # in the case of _POSIX_SOURCE, which is predefined and required
+ # on some systems where configure will not decide to define it.
+ if (defundef == "undef") {
+ print "/*", prefix defundef, macro, "*/"
+ next
+ }
+ }
+}
+{ print }
+_ACAWK
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+ { { $as_echo "$as_me:$LINENO: error: could not setup config headers machinery" >&5
+$as_echo "$as_me: error: could not setup config headers machinery" >&2;}
+ { (exit 1); exit 1; }; }
+fi # test -n "$CONFIG_HEADERS"
+
+
+eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
+shift
+for ac_tag
+do
+ case $ac_tag in
+ :[FHLC]) ac_mode=$ac_tag; continue;;
+ esac
+ case $ac_mode$ac_tag in
+ :[FHL]*:*);;
+ :L* | :C*:*) { { $as_echo "$as_me:$LINENO: error: invalid tag $ac_tag" >&5
+$as_echo "$as_me: error: invalid tag $ac_tag" >&2;}
+ { (exit 1); exit 1; }; };;
+ :[FH]-) ac_tag=-:-;;
+ :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
+ esac
+ ac_save_IFS=$IFS
+ IFS=:
+ set x $ac_tag
+ IFS=$ac_save_IFS
+ shift
+ ac_file=$1
+ shift
+
+ case $ac_mode in
+ :L) ac_source=$1;;
+ :[FH])
+ ac_file_inputs=
+ for ac_f
+ do
+ case $ac_f in
+ -) ac_f="$tmp/stdin";;
+ *) # Look for the file first in the build tree, then in the source tree
+ # (if the path is not absolute). The absolute path cannot be DOS-style,
+ # because $ac_f cannot contain `:'.
+ test -f "$ac_f" ||
+ case $ac_f in
+ [\\/$]*) false;;
+ *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
+ esac ||
+ { { $as_echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5
+$as_echo "$as_me: error: cannot find input file: $ac_f" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+ case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
+ ac_file_inputs="$ac_file_inputs '$ac_f'"
+ done
+
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ configure_input='Generated from '`
+ $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
+ `' by configure.'
+ if test x"$ac_file" != x-; then
+ configure_input="$ac_file. $configure_input"
+ { $as_echo "$as_me:$LINENO: creating $ac_file" >&5
+$as_echo "$as_me: creating $ac_file" >&6;}
+ fi
+ # Neutralize special characters interpreted by sed in replacement strings.
+ case $configure_input in #(
+ *\&* | *\|* | *\\* )
+ ac_sed_conf_input=`$as_echo "$configure_input" |
+ sed 's/[\\\\&|]/\\\\&/g'`;; #(
+ *) ac_sed_conf_input=$configure_input;;
+ esac
+
+ case $ac_tag in
+ *:-:* | *:-) cat >"$tmp/stdin" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; } ;;
+ esac
+ ;;
+ esac
+
+ ac_dir=`$as_dirname -- "$ac_file" ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ { as_dir="$ac_dir"
+ case $as_dir in #(
+ -*) as_dir=./$as_dir;;
+ esac
+ test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || {
+ as_dirs=
+ while :; do
+ case $as_dir in #(
+ *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
+ *) as_qdir=$as_dir;;
+ esac
+ as_dirs="'$as_qdir' $as_dirs"
+ as_dir=`$as_dirname -- "$as_dir" ||
+$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$as_dir" : 'X\(//\)[^/]' \| \
+ X"$as_dir" : 'X\(//\)$' \| \
+ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
+$as_echo X"$as_dir" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)[^/].*/{
+ s//\1/
+ q
+ }
+ /^X\(\/\/\)$/{
+ s//\1/
+ q
+ }
+ /^X\(\/\).*/{
+ s//\1/
+ q
+ }
+ s/.*/./; q'`
+ test -d "$as_dir" && break
+ done
+ test -z "$as_dirs" || eval "mkdir $as_dirs"
+ } || test -d "$as_dir" || { { $as_echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5
+$as_echo "$as_me: error: cannot create directory $as_dir" >&2;}
+ { (exit 1); exit 1; }; }; }
+ ac_builddir=.
+
+case "$ac_dir" in
+.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
+*)
+ ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
+ # A ".." for each directory in $ac_dir_suffix.
+ ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
+ case $ac_top_builddir_sub in
+ "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
+ *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
+ esac ;;
+esac
+ac_abs_top_builddir=$ac_pwd
+ac_abs_builddir=$ac_pwd$ac_dir_suffix
+# for backward compatibility:
+ac_top_builddir=$ac_top_build_prefix
+
+case $srcdir in
+ .) # We are building in place.
+ ac_srcdir=.
+ ac_top_srcdir=$ac_top_builddir_sub
+ ac_abs_top_srcdir=$ac_pwd ;;
+ [\\/]* | ?:[\\/]* ) # Absolute name.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir
+ ac_abs_top_srcdir=$srcdir ;;
+ *) # Relative name.
+ ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_build_prefix$srcdir
+ ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
+esac
+ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
+
+
+ case $ac_mode in
+ :F)
+ #
+ # CONFIG_FILE
+ #
+
+ case $INSTALL in
+ [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+ *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
+ esac
+ ac_MKDIR_P=$MKDIR_P
+ case $MKDIR_P in
+ [\\/$]* | ?:[\\/]* ) ;;
+ */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
+ esac
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+# If the template does not know about datarootdir, expand it.
+# FIXME: This hack should be removed a few years after 2.60.
+ac_datarootdir_hack=; ac_datarootdir_seen=
+
+ac_sed_dataroot='
+/datarootdir/ {
+ p
+ q
+}
+/@datadir@/p
+/@docdir@/p
+/@infodir@/p
+/@localedir@/p
+/@mandir@/p
+'
+case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
+*datarootdir*) ac_datarootdir_seen=yes;;
+*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
+$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ ac_datarootdir_hack='
+ s&@datadir@&$datadir&g
+ s&@docdir@&$docdir&g
+ s&@infodir@&$infodir&g
+ s&@localedir@&$localedir&g
+ s&@mandir@&$mandir&g
+ s&\\\${datarootdir}&$datarootdir&g' ;;
+esac
+_ACEOF
+
+# Neutralize VPATH when `$srcdir' = `.'.
+# Shell code in configure.ac might set extrasub.
+# FIXME: do we really want to maintain this feature?
+cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
+ac_sed_extra="$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s|@configure_input@|$ac_sed_conf_input|;t t
+s&@top_builddir@&$ac_top_builddir_sub&;t t
+s&@top_build_prefix@&$ac_top_build_prefix&;t t
+s&@srcdir@&$ac_srcdir&;t t
+s&@abs_srcdir@&$ac_abs_srcdir&;t t
+s&@top_srcdir@&$ac_top_srcdir&;t t
+s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
+s&@builddir@&$ac_builddir&;t t
+s&@abs_builddir@&$ac_abs_builddir&;t t
+s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
+s&@INSTALL@&$ac_INSTALL&;t t
+s&@MKDIR_P@&$ac_MKDIR_P&;t t
+$ac_datarootdir_hack
+"
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+
+test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { $as_echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&5
+$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
+which seems to be undefined. Please make sure it is defined." >&2;}
+
+ rm -f "$tmp/stdin"
+ case $ac_file in
+ -) cat "$tmp/out" && rm -f "$tmp/out";;
+ *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ esac \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ :H)
+ #
+ # CONFIG_HEADER
+ #
+ if test x"$ac_file" != x-; then
+ {
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
+ } >"$tmp/config.h" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ { $as_echo "$as_me:$LINENO: $ac_file is unchanged" >&5
+$as_echo "$as_me: $ac_file is unchanged" >&6;}
+ else
+ rm -f "$ac_file"
+ mv "$tmp/config.h" "$ac_file" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create $ac_file" >&5
+$as_echo "$as_me: error: could not create $ac_file" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ else
+ $as_echo "/* $configure_input */" \
+ && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ || { { $as_echo "$as_me:$LINENO: error: could not create -" >&5
+$as_echo "$as_me: error: could not create -" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ ;;
+
+ :C) { $as_echo "$as_me:$LINENO: executing $ac_file commands" >&5
+$as_echo "$as_me: executing $ac_file commands" >&6;}
+ ;;
+ esac
+
+
+ case $ac_file$ac_mode in
+ "po-directories":C)
+ for ac_file in $CONFIG_FILES; do
+ # Support "outfile[:infile[:infile...]]"
+ case "$ac_file" in
+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
+ esac
+ # PO directories have a Makefile.in generated from Makefile.in.in.
+ case "$ac_file" in */Makefile.in)
+ # Adjust a relative srcdir.
+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
+ # In autoconf-2.13 it is called $ac_given_srcdir.
+ # In autoconf-2.50 it is called $srcdir.
+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
+ case "$ac_given_srcdir" in
+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
+ /*) top_srcdir="$ac_given_srcdir" ;;
+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
+ esac
+ # Treat a directory as a PO directory if and only if it has a
+ # POTFILES.in file. This allows packages to have multiple PO
+ # directories under different names or in different locations.
+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
+ rm -f "$ac_dir/POTFILES"
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
+ POMAKEFILEDEPS="POTFILES.in"
+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
+ # on $ac_dir but don't depend on user-specified configuration
+ # parameters.
+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
+ # The LINGUAS file contains the set of available languages.
+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
+ fi
+ ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
+ else
+ # The set of available languages was given in configure.in.
+ # Hide the ALL_LINGUAS assigment from automake < 1.5.
+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
+ fi
+ # Compute POFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
+ # Compute UPDATEPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
+ # Compute DUMMYPOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
+ # Compute GMOFILES
+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
+ case "$ac_given_srcdir" in
+ .) srcdirpre= ;;
+ *) srcdirpre='$(srcdir)/' ;;
+ esac
+ POFILES=
+ UPDATEPOFILES=
+ DUMMYPOFILES=
+ GMOFILES=
+ for lang in $ALL_LINGUAS; do
+ POFILES="$POFILES $srcdirpre$lang.po"
+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
+ done
+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
+ # environment variable.
+ INST_LINGUAS=
+ if test -n "$ALL_LINGUAS"; then
+ for presentlang in $ALL_LINGUAS; do
+ useit=no
+ if test "%UNSET%" != "$LINGUAS"; then
+ desiredlanguages="$LINGUAS"
+ else
+ desiredlanguages="$ALL_LINGUAS"
+ fi
+ for desiredlang in $desiredlanguages; do
+ # Use the presentlang catalog if desiredlang is
+ # a. equal to presentlang, or
+ # b. a variant of presentlang (because in this case,
+ # presentlang can be used as a fallback for messages
+ # which are not translated in the desiredlang catalog).
+ case "$desiredlang" in
+ "$presentlang"*) useit=yes;;
+ esac
+ done
+ if test $useit = yes; then
+ INST_LINGUAS="$INST_LINGUAS $presentlang"
+ fi
+ done
+ fi
+ CATALOGS=
+ if test -n "$INST_LINGUAS"; then
+ for lang in $INST_LINGUAS; do
+ CATALOGS="$CATALOGS $lang.gmo"
+ done
+ fi
+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
+ if test -f "$f"; then
+ case "$f" in
+ *.orig | *.bak | *~) ;;
+ *) cat "$f" >> "$ac_dir/Makefile" ;;
+ esac
+ fi
+ done
+ fi
+ ;;
+ esac
+ done ;;
+
+ esac
+done # for ac_tag
+
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+test $ac_write_fail = 0 ||
+ { { $as_echo "$as_me:$LINENO: error: write failure creating $CONFIG_STATUS" >&5
+$as_echo "$as_me: error: write failure creating $CONFIG_STATUS" >&2;}
+ { (exit 1); exit 1; }; }
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ ac_config_status_args=
+ test "$silent" = yes &&
+ ac_config_status_args="$ac_config_status_args --quiet"
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
+if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
+ { $as_echo "$as_me:$LINENO: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
+$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
+fi
+
+
+echo "------------------------------------------------------------"
+echo "Compiler options:"
+echo " CC : $CC"
+echo " CFLAGS : $CFLAGS"
+echo " LDLAGS : $LDLAGS"
+echo " LIBS : $LIBS"
+echo " X_LIBS : $X_LIBS"
+echo "------------------------------------------------------------"
+echo " "
+echo "READ THE FOLLOWING WARNINGS CAREFULLY"
+echo " "
+if test "x$ac_cv_header_stdc" = xno; then
+ { $as_echo "$as_me:$LINENO: WARNING: There are no ANSI C headers avaiable. XaoS will have troubles with compiling." >&5
+$as_echo "$as_me: WARNING: There are no ANSI C headers avaiable. XaoS will have troubles with compiling." >&2;}
+ config_problem=yes
+fi
+if test "x$ac_cv_c_compiler_gnu" = xyes; then
+ echo
+else
+ { $as_echo "$as_me:$LINENO: WARNING: The GNU C compiler is recommended to get the best performance. XaoS crashes many compilers so your compiler can cause troubles." >&5
+$as_echo "$as_me: WARNING: The GNU C compiler is recommended to get the best performance. XaoS crashes many compilers so your compiler can cause troubles." >&2;}
+fi
+if test "x$ac_cv_c_long_double" = xyes; then
+ if test "x$long_double" = xyes; then
+ { $as_echo "$as_me:$LINENO: WARNING: Long double enabled. This works well for x86 architectures. On other systems this may slow down much. Especially on SUN workstations. If XaoS works incredibly slowly, try to rebuild it using:
+ configure --with-long-double=no
+ make clean
+ make" >&5
+$as_echo "$as_me: WARNING: Long double enabled. This works well for x86 architectures. On other systems this may slow down much. Especially on SUN workstations. If XaoS works incredibly slowly, try to rebuild it using:
+ configure --with-long-double=no
+ make clean
+ make" >&2;}
+ fi
+fi
+if test "x$drivers" = xno; then
+ { $as_echo "$as_me:$LINENO: WARNING: There is no driver available. XaoS will not start." >&5
+$as_echo "$as_me: WARNING: There is no driver available. XaoS will not start." >&2;}
+ config_problem=yes
+fi
+if test "x$config_problem" = xyes; then
+ { $as_echo "$as_me:$LINENO: WARNING: There was a problem with automatic configuration." >&5
+$as_echo "$as_me: WARNING: There was a problem with automatic configuration." >&2;}
+ { $as_echo "$as_me:$LINENO: WARNING: Read INSTALL file for troubleshooting tips." >&5
+$as_echo "$as_me: WARNING: Read INSTALL file for troubleshooting tips." >&2;}
+fi
+if test x"$ac_cv_lib_z_inflate" = xno; then
+ if test x"$ac_cv_lib_gz_inflate" = xno; then
+ { $as_echo "$as_me:$LINENO: WARNING: You need zlib to compile XaoS with image saving support." >&5
+$as_echo "$as_me: WARNING: You need zlib to compile XaoS with image saving support." >&2;}
+ fi
+fi
+if test x"$ac_cv_lib_png_png_create_info_struct" = xno; then
+ { $as_echo "$as_me:$LINENO: WARNING: You need pnglib to compile XaoS with image saving support." >&5
+$as_echo "$as_me: WARNING: You need pnglib to compile XaoS with image saving support." >&2;}
+fi
+if test x"$sffe" = xno; then
+ { $as_echo "$as_me:$LINENO: WARNING: You need GSL or NASM to comple XaoS with user formulas." >&5
+$as_echo "$as_me: WARNING: You need GSL or NASM to comple XaoS with user formulas." >&2;}
+fi
+echo " "
+echo "END OF WARNINGS"
+echo " "
+echo "In case you have trouble with compiling or running"
+echo "XaoS please read the INSTALL file."
+echo "------------------------------------------------------------"
+
diff --git a/configure.in b/configure.in
new file mode 100644
index 0000000..8218d91
--- /dev/null
+++ b/configure.in
@@ -0,0 +1,551 @@
+AC_INIT([XaoS],[3.5],[xaos-devel@lists.sourceforge.net])
+
+AC_PREREQ(2.63)
+AC_CONFIG_HEADER(src/include/aconfig.h src/include/version.h)
+
+AC_CANONICAL_HOST
+# Force compilation without cygwin dependency
+case $host_os in
+ *cygwin*) CC='gcc -mno-cygwin' ;;
+esac
+
+AC_PROG_CC
+AX_COMPILER_VENDOR
+AX_CC_MAXOPT
+
+dnl
+dnl GNU gettext related things
+dnl
+
+AM_ICONV
+AM_GNU_GETTEXT([external])
+ALL_LINGUAS="cs es hu fr de ro it pt"
+if test "x$USE_NLS" = xyes; then
+ AC_PATH_PROG([MSGMERGE], [msgmerge], , [$PATH:../bin])
+ if test "x$ac_cv_path_MSGMERGE" = x; then
+ AC_MSG_ERROR([Install the msgmerge utility first for i18n
+ or re-configure XaoS with --disable-nls])
+ fi
+ if test "x$POFILES" = x; then
+ for lang in $ALL_LINGUAS; do
+ GMOFILES="$GMOFILES $lang.gmo"
+ POFILES="$POFILES $lang.po"
+ done
+ fi
+fi
+
+dnl
+dnl drivers to test (if available)
+dnl
+
+x11_linked=no
+x_driver_test=yes
+gtk_driver_test=no
+aa_driver_test=no
+win32_driver_test=yes
+long_double=yes
+pthread=no
+png=yes
+xshm=yes
+gsl=yes
+sffe=yes
+
+dnl
+dnl Long double is a way to archieve deeper zooms. It is very fast
+dnl at intel processors familly but seems to be very slow at almost
+dnl all other platforms. This switch tries to determine whether long_double
+dnl is optimal
+dnl
+AC_ARG_WITH(long-double,
+ [ --with-long-double=yes/no enables/disables usage of long double],[
+ if test x$withval = xyes; then
+ long_double=yes
+ fi
+ if test x$withval = xno; then
+ long_double=no
+ fi
+])
+AC_ARG_WITH(mitshm,
+ [ --with-mitshm=yes/no enables/disables MIT shared memory support],[
+ if test x$withval = xyes; then
+ xshm=yes
+ fi
+ if test x$withval = xno; then
+ xshm=no
+ fi
+])
+AC_ARG_WITH(pthread,
+ [ --with-pthread=yes enables SMP support (experimental)],[
+ if test x$withval = xyes; then
+ pthread=test
+ fi
+ if test x$withval = xno; then
+ pthread=no
+ fi
+])
+AC_ARG_WITH(png,
+ [ --with-png=yes/no enables/disables PNG saving support],[
+ if test x$withval = xyes; then
+ png=test
+ fi
+ if test x$withval = xno; then
+ png=no
+ fi
+])
+AC_ARG_WITH(gsl,
+ [ --with-gsl=yes/no enables/disables GSL complex routines],[
+ if test x$withval = xyes; then
+ gsl=yes
+ fi
+ if test x$withval = xno; then
+ gsl=no
+ fi
+])
+AC_ARG_WITH(sffe,
+ [ --with-sffe=yes/no enables/disables SFFE (user formula evaluator) support],[
+ if test x$withval = xyes; then
+ sffe=yes
+ fi
+ if test x$withval = xno; then
+ sffe=no
+ fi
+])
+
+
+
+
+AC_DEFUN([AC_PROG_AALIB_VER_OK],
+[AC_CACHE_CHECK(whether aalib version >= 1.4, ac_cv_aalib_ver_ok,
+[echo '#include <aalib.h>
+#include <aalib.h>
+void f(){
+#if AA_LIB_VERSIONCODE < 104000
+#error aa_lib is probably buggy
+/* I am using SuSE 7.3 and 8.0. Both contains version 1.3,
+ * however they report 102000 version code.
+ */
+#endif
+}' > conftest.c
+if test -z "`${CC-cc} -c conftest.c 2>&1`"; then
+ ac_cv_aalib_ver_ok=yes
+ else
+ ac_cv_aalib_ver_ok=no
+ fi
+ rm -f conftest*
+])])
+
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+dnl CFLAGS="-O"
+dnl Checks for programs.
+
+DRIVERDIRS=""
+LOCALEDIR="/usr/share/locale"
+DRIVERLIBS="lib/libui.a lib/libui-hlp.a lib/libengine.a lib/libutil.a lib/libfilter.a"
+AC_PROG_INSTALL
+
+AC_ARG_WITH(x11-driver,
+ [ --with-x11-driver=no disables x11 driver],[
+ x_driver_test=$withval
+])
+AC_ARG_WITH(gtk-driver,
+ [ --with-gtk-driver=no disables GTK driver],[
+ gtk_driver_test=$withval
+])
+AC_ARG_WITH(win32-driver,
+ [ --with-win32-driver=no disables Win32 driver],[
+ win32_driver_test=$withval
+])
+AC_ARG_WITH(aa-driver,
+ [ --with-aa-driver=no disables aa-lib driver],[
+ aa_driver_test=$withval
+])
+
+if test "$x_driver_test" = yes -o "$aa_driver_test" = yes; then
+ AC_PATH_XTRA
+fi
+
+
+if test "$win32_driver_test" = yes; then
+ win32_driver=no
+ case $host_os in
+ *mingw* | *cygwin*) win32_driver=yes
+ LIBS="$LIBS -lgdi32 -lmsvcrt -luser32 -lversion -lmingwex"
+ CFLAGS="$CFLAGS -mwindows"
+ ;;
+ esac
+fi
+
+
+if test x$pthread = xtest; then
+ AC_CHECK_FUNCS(pthread_create)
+ if test "x$ac_cv_func_pthread_create" = xyes; then
+ AC_DEFINE(USE_PTHREAD)
+ CFLAGS="$CFLAGS -D_REENTRANT"
+ AC_CHECK_FUNCS(pthread_sighandler)
+ else
+ AC_CHECK_LIB(pthread,pthread_create)
+ if test "x$ac_cv_lib_pthread_pthread_create" = xyes; then
+ AC_DEFINE(USE_PTHREAD)
+ CFLAGS="$CFLAGS -D_REENTRANT"
+ AC_CHECK_FUNCS(pthread_sighandler)
+ else
+ echo "No pthread library available! Cannot compile threaded version"
+ exit
+ fi
+ fi
+fi
+
+AC_DEFUN([AC_AALIB], [
+ if $search_aalib
+ then
+ if test -f $1/aalib.h
+ then
+ LIBS1="$LIBS"
+ if test "x$no_x" = x; then
+ LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
+ fi
+ LIBS="$LIBS $2"
+ unset ac_cv_lib_aa_aa_init
+ AC_CHECK_LIB(aa, aa_init)
+ if test "x$ac_cv_lib_aa_aa_init" = xyes; then
+ AC_MSG_RESULT(Found aalib on $1/aalib.h)
+ AC_PROG_AALIB_VER_OK
+ if test $ac_cv_aalib_ver_ok = yes; then
+ #LIBS="$LIBS $2"
+ x11_linked=yes
+ CFLAGS="$CFLAGS $3"
+ search_aalib=false
+ aa_driver=true
+ else
+ unset ac_cv_lib_aa_aa_init
+ LIBS="$LIBS1"
+ fi
+ else
+ unset ac_cv_lib_aa_aa_init
+ LIBS="$LIBS1"
+ fi
+ fi
+ fi
+])
+
+
+if test "$aa_driver_test" = yes; then
+ OLDLIBS="$LIBS"
+ OLDCFLAGS="$CFLAGS"
+
+ search_aalib=true;
+ if test "x$no_x" = x; then
+ LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS"
+ CFLAGS="$CFLAGS $X_CFLAGS"
+ fi
+ AC_AALIB(/usr/include, , )
+ AC_AALIB(/usr/local/include, -L/usr/local/lib, -I/usr/local/include)
+ for name in ../aalib-*.*
+ do
+ AC_AALIB($name,"-L$name","-I$name")
+ done
+ if $search_aalib
+ then
+ aa_driver=false
+ LIBS="$OLDLIBS"
+ CFLAGS="$OLDCFLAGS"
+ else
+ aa_driver=true
+ fi
+fi
+
+
+dnl Checks for header files.
+
+AC_CHECK_HEADERS([alloca.h ddraw.h htmlhelp.h errno.h fcntl.h float.h libintl.h limits.h locale.h malloc.h stddef.h stdlib.h string.h sys/time.h sys/timeb.h unistd.h])
+
+dnl Checks for typedefs, structures, and compiler characteristics.
+AC_C_CONST
+AC_C_INLINE
+if test "x$long_double" = xyes; then
+AC_TYPE_LONG_DOUBLE
+else
+echo Long double disabled, since it would be too slow on this CPU
+fi
+AC_HEADER_TIME
+AC_HEADER_DIRENT
+AC_HEADER_SYS_WAIT
+AC_TYPE_PID_T
+AC_TYPE_SIZE_T
+dnl AC_CHECK_MEMBERS([struct stat.st_rdev])
+AC_STRUCT_TM
+
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+eval datadir2=$datadir
+eval datadir3=$datadir2
+# This is a madness! eval can evaluate only one level of variable...
+AC_DEFINE_UNQUOTED(DATAPATH,"${datadir3}/XaoS")
+
+AC_CHECK_SIZEOF(short)
+AC_CHECK_SIZEOF(int)
+AC_CHECK_SIZEOF(long)
+
+dnl Checks for library functions.
+dnl AC_FUNC_ERROR_AT_LINE
+dnl AC_FUNC_FORK
+dnl AC_FUNC_MALLOC
+dnl AC_FUNC_MEMCMP
+dnl AC_FUNC_STAT
+dnl AC_FUNC_VPRINTF
+
+AC_CHECK_LIB(m, pow)
+
+if test $png = yes; then
+ AC_CHECK_LIB(z, inflate)
+ if test x"$ac_cv_lib_z_inflate" = xno; then
+ AC_CHECK_LIB(gz, inflate)
+ if test x"$ac_cv_lib_gz_inflate" = xno; then
+ png=no
+ fi
+ fi
+ AC_CHECK_LIB(png, png_create_info_struct)
+ if test x"$ac_cv_lib_png_png_create_info_struct" = xno; then
+ png=no
+ fi
+ if test "$png" = yes; then
+ AC_DEFINE(USE_PNG)
+ fi
+fi
+AC_FUNC_ALLOCA
+AC_CHECK_FUNCS([ftime getcwd gettimeofday memchr memmove memset pow select setlocale sqrt strdup strerror strstr sleep setitimer ftime finite fabsl _fabsl __fabsl])
+
+if test "$x_driver_test" = yes; then
+dnl X checks
+if test "x$no_x" = x; then
+ AC_CHECK_HEADER(sys/ipc.h, AC_DEFINE(HAVE_IPC_H), no_sys_ipc=yes)
+ AC_CHECK_HEADER(sys/shm.h, AC_DEFINE(HAVE_IPC_H), no_sys_shm=yes)
+
+ if test "x$xshm" = xyes; then
+ AC_MSG_CHECKING(X11/extensions/XShm.h)
+ if eval "test -f $x_includes/X11/extensions/XShm.h"; then
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_MITSHM_H)
+ else
+ AC_MSG_RESULT(no)
+ xshm=no
+ fi
+ fi
+
+ dnl AC_CHECK_LIB(Xext,XShmEventBase,LIBS="$LIBS -lXext", no_ext_lib=yes, $X_LIBS)
+ AC_CHECK_LIB(Xext,XShmAttach,LIBS="$LIBS -lXext", no_ext_lib=yes, $X_LIBS )
+
+fi
+fi
+
+if test "$gtk_driver_test" = yes; then
+ PKG_CHECK_MODULES([DEPS], gtk+-2.0 >= 2.2 glib-2.0 >= 2.2, gtk_driver=true, gtk_driver=false)
+ AC_SUBST(DEPS_CFLAGS)
+ AC_SUBST(DEPS_LIBS)
+fi
+
+if test "$ac_cv_header_malloc_h" = "no"; then
+ AC_DEFINE(NO_MALLOC_H)
+fi
+
+if test "$ac_cv_header_htmlhelp_h" = "yes"; then
+ AC_DEFINE(HTML_HELP)
+ LIBS="$LIBS -lhtmlhelp"
+fi
+
+if test "$ac_cv_header_ddraw_h" = "yes"; then
+ AC_DEFINE(DDRAW_DRIVER)
+fi
+
+
+echo "------------------------------------------------------------"
+echo "Available drivers:"
+drivers=no
+if test "$aa_driver_test" = yes; then
+if test "x$aa_driver" = xtrue; then
+ drivers=yes
+ AC_DEFINE(AA_DRIVER)
+ DRIVERDIRS="$DRIVERDIRS ui/ui-drv/aa"
+ DRIVERLIBS="$DRIVERLIBS lib/libuiaa.a"
+ echo " aa-lib"
+fi
+fi
+
+if test "$gtk_driver_test" = yes; then
+if test "x$gtk_driver" = xtrue; then
+ drivers=yes
+ AC_DEFINE(GTK_DRIVER)
+ DRIVERDIRS="$DRIVERDIRS ui/ui-drv/gtk"
+ DRIVERLIBS="$DRIVERLIBS lib/libuigtk.a"
+ CFLAGS="$CFLAGS $DEPS_CFLAGS"
+ LIBS="$LIBS $DEPS_LIBS"
+ echo " gtk+"
+fi
+fi
+
+if test "$x_driver_test" = yes; then
+if test "x$no_x" = x; then
+ drivers=yes
+ AC_DEFINE(X11_DRIVER)
+ DRIVERDIRS="$DRIVERDIRS ui/ui-drv/x11"
+ DRIVERLIBS="$DRIVERLIBS lib/libuix11.a"
+ if test "x$no_sys_ipc$no_sys_shm y$ac_cv_lib_Xext_XShmAttach z$xshm" = "x yyes zyes"; then
+ echo " X11 with MIT shared memory support"
+ AC_DEFINE(MITSHM)
+ else
+ echo " X11"
+ fi
+ if test "$x11_linked" = no; then
+ LIBS="$LIBS $X_EXTRA_LIBS $X_LIBS -lX11"
+ x11_linked=yes
+ fi
+ CFLAGS="$CFLAGS $X_CFLAGS"
+fi
+fi
+
+if test "$win32_driver" = yes; then
+ drivers=yes
+ AC_DEFINE(WIN32_DRIVER)
+ DRIVERDIRS="$DRIVERDIRS ui/ui-drv/win32"
+ DRIVERLIBS="ui/ui-drv/win32/ui_win32.o lib/libuiwin32.a ui/ui-drv/win32/xaos.res $DRIVERLIBS"
+ LOCALEDIR="../../locale"
+ echo -n " Win32"
+ if test "$ac_cv_header_ddraw_h" = yes; then
+ echo " (with DirectDraw support)"
+ else
+ echo ""
+ fi
+fi
+
+REALTOPDIR=`nolinks=1; pwd`
+AC_SUBST(REALTOPDIR)
+BINPATH="$REALTOPDIR/bin"
+AC_SUBST(BINPATH)
+AR="ar"
+AC_SUBST(AR)
+SRCPATH="$REALTOPDIR/src"
+AC_SUBST(SRCPATH)
+LIBPATH="$SRCPATH/lib"
+AC_SUBST(LIBPATH)
+# does this work if you do make -C <some dir>
+TOPDIR=`nolinks=1;pwd`
+AC_SUBST(TOPDIR)
+AC_SUBST(LOCALEDIR)
+# sffe cmplx detection (flow is : GLS -> sffeASM -> none)
+if test $sffe = yes; then
+ echo "------------------------------------------------------------"
+ echo "Complex math parser:"
+ echo "try GSL: $gsl"
+
+ if test $gsl = yes; then
+ GSL_LIBS=""
+ AC_PATH_PROG(GSL_CONFIG, gsl-config, no)
+ AC_MSG_CHECKING(for GSL)
+ if test "$GSL_CONFIG" = "no" ; then
+ gsl=no
+ AC_MSG_RESULT(no)
+ else
+ AC_MSG_RESULT(yes)
+ echo "using GSL for complex numbers"
+ GSL_LIBS=`$GSL_CONFIG --libs`
+ GSL_CFLAGS=`$GSL_CONFIG --cflags`
+ CFLAGS="$CFLAGS $GSL_CFLAGS -fomit-frame-pointer -DSFFE_USING -DSFFE_CMPLX_GSL"
+ DRIVERLIBS="$DRIVERLIBS lib/libsffe.a"
+ ASM_CMPLX_O=""
+ fi
+ fi
+
+ if test $gsl = no; then
+ AC_CHECK_PROG([NASM],[nasm],[yes])
+ if test "$NASM" = yes; then
+ echo "using NASM for complex numbers"
+ CFLAGS="$CFLAGS -DSFFE_USING -DSFFE_CMPLX_ASM"
+ DRIVERLIBS="$DRIVERLIBS lib/libsffe.a"
+ ASM_CMPLX_O="asm/cmplx.o"
+ case $host_os in
+ *cygwin* | *mingw*) CMPLX_O_TARGET=coff;;
+ *darwin*) CMPLX_O_TARGET=macho;;
+ *) CMPLX_O_TARGET=elf;;
+ esac
+ else
+ sffe=no
+ fi
+ fi
+ echo "------------------------------------------------------------"
+else
+ CFLAGS="$CFLAGS -fomit-frame-pointer"
+fi
+
+
+LIBS="$LIBS $GSL_LIBS"
+CFLAGS="$CFLAGS -I${SRCPATH}/include"
+AC_SUBST(DRIVERLIBS)
+AC_SUBST(DRIVERDIRS)
+AC_SUBST(CMPLX_O_TARGET)
+AC_SUBST(ASM_CMPLX_O)
+AC_SUBST(POFILES)
+
+AC_CONFIG_FILES([src/i18n/Makefile.in
+ Makefile src/Makefile src/i18n/Makefile src/engine/Makefile
+ src/util/Makefile src/ui/Makefile src/filter/Makefile src/ui-hlp/Makefile
+ src/ui/ui-drv/aa/Makefile
+ src/ui/ui-drv/x11/Makefile src/ui/ui-drv/win32/Makefile
+ doc/Makefile help/Makefile src/ui/ui-drv/gtk/Makefile src/sffe/Makefile
+ ])
+AC_OUTPUT
+
+echo "------------------------------------------------------------"
+echo "Compiler options:"
+echo " CC : $CC"
+echo " CFLAGS : $CFLAGS"
+echo " LDLAGS : $LDLAGS"
+echo " LIBS : $LIBS"
+echo " X_LIBS : $X_LIBS"
+echo "------------------------------------------------------------"
+echo " "
+echo "READ THE FOLLOWING WARNINGS CAREFULLY"
+echo " "
+if test "x$ac_cv_header_stdc" = xno; then
+ AC_MSG_WARN(There are no ANSI C headers avaiable. XaoS will have troubles with compiling.)
+ config_problem=yes
+fi
+if test "x$ac_cv_c_compiler_gnu" = xyes; then
+ echo
+else
+ AC_MSG_WARN(The GNU C compiler is recommended to get the best performance. XaoS crashes many compilers so your compiler can cause troubles.)
+fi
+if test "x$ac_cv_c_long_double" = xyes; then
+ if test "x$long_double" = xyes; then
+ AC_MSG_WARN([Long double enabled. This works well for x86 architectures. On other systems this may slow down much. Especially on SUN workstations. If XaoS works incredibly slowly, try to rebuild it using:
+ configure --with-long-double=no
+ make clean
+ make])
+ fi
+fi
+if test "x$drivers" = xno; then
+ AC_MSG_WARN(There is no driver available. XaoS will not start.)
+ config_problem=yes
+fi
+if test "x$config_problem" = xyes; then
+ AC_MSG_WARN([There was a problem with automatic configuration.])
+ AC_MSG_WARN([Read INSTALL file for troubleshooting tips.])
+fi
+if test x"$ac_cv_lib_z_inflate" = xno; then
+ if test x"$ac_cv_lib_gz_inflate" = xno; then
+ AC_MSG_WARN([You need zlib to compile XaoS with image saving support.])
+ fi
+fi
+if test x"$ac_cv_lib_png_png_create_info_struct" = xno; then
+ AC_MSG_WARN([You need pnglib to compile XaoS with image saving support.])
+fi
+if test x"$sffe" = xno; then
+ AC_MSG_WARN([You need GSL or NASM to comple XaoS with user formulas.])
+fi
+echo " "
+echo "END OF WARNINGS"
+echo " "
+echo "In case you have trouble with compiling or running"
+echo "XaoS please read the INSTALL file."
+echo "------------------------------------------------------------"
+
diff --git a/configure.scan b/configure.scan
new file mode 100644
index 0000000..fabf0e4
--- /dev/null
+++ b/configure.scan
@@ -0,0 +1,74 @@
+# -*- Autoconf -*-
+# Process this file with autoconf to produce a configure script.
+
+AC_PREREQ(2.61)
+AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
+AC_CONFIG_SRCDIR([tools/wintounix.c])
+AC_CONFIG_HEADER([config.h])
+
+# Checks for programs.
+AC_PROG_CXX
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_INSTALL
+AC_PROG_LN_S
+AC_PROG_MAKE_SET
+AC_PROG_RANLIB
+
+# Checks for libraries.
+# FIXME: Replace `main' with a function in `-lm':
+AC_CHECK_LIB([m], [main])
+
+# Checks for header files.
+AC_PATH_X
+AC_FUNC_ALLOCA
+AC_HEADER_DIRENT
+AC_HEADER_STDC
+AC_HEADER_SYS_WAIT
+AC_CHECK_HEADERS([OS.h fcntl.h float.h libintl.h limits.h locale.h malloc.h stddef.h stdlib.h string.h sys/time.h sys/timeb.h unistd.h])
+
+# Checks for typedefs, structures, and compiler characteristics.
+AC_HEADER_STDBOOL
+AC_C_CONST
+AC_C_INLINE
+AC_TYPE_PID_T
+AC_C_RESTRICT
+AC_TYPE_SIZE_T
+AC_TYPE_SSIZE_T
+AC_CHECK_MEMBERS([struct stat.st_rdev])
+AC_HEADER_TIME
+AC_STRUCT_TM
+AC_C_VOLATILE
+
+# Checks for library functions.
+AC_FUNC_CLOSEDIR_VOID
+AC_FUNC_ERROR_AT_LINE
+AC_FUNC_FORK
+AC_FUNC_MALLOC
+AC_FUNC_REALLOC
+AC_FUNC_SELECT_ARGTYPES
+AC_TYPE_SIGNAL
+AC_FUNC_STAT
+AC_FUNC_VPRINTF
+AC_CHECK_FUNCS([floor ftime getcwd gettimeofday memchr memmove memset pow select setlocale sqrt strchr strdup strerror strstr])
+
+AC_CONFIG_FILES([Makefile
+ doc/Makefile
+ help/Makefile
+ src/Makefile
+ src/engine/Makefile
+ src/filter/Makefile
+ src/sffe/Makefile
+ src/sffe/asm/Makefile
+ src/ui-hlp/Makefile
+ src/ui/Makefile
+ src/ui/ui-drv/BeOS/Makefile
+ src/ui/ui-drv/aa/Makefile
+ src/ui/ui-drv/dga/Makefile
+ src/ui/ui-drv/ggi/Makefile
+ src/ui/ui-drv/svga/Makefile
+ src/ui/ui-drv/template/Makefile
+ src/ui/ui-drv/win32/Makefile
+ src/ui/ui-drv/x11/Makefile
+ src/util/Makefile])
+AC_OUTPUT
diff --git a/doc/Makefile.in b/doc/Makefile.in
new file mode 100644
index 0000000..b5114d2
--- /dev/null
+++ b/doc/Makefile.in
@@ -0,0 +1,36 @@
+all: doc
+
+doc: xaos.info dvi ../AUTHORS
+
+xaos.texinfo: xaos.geninfo ../help/xaos.hlp
+ ./mktexi
+
+xaos.info: xaos.texinfo
+ makeinfo --no-split xaos.texinfo --force
+
+xaosdev.info: xaosdev.texinfo
+ makeinfo --no-split xaosdev.texinfo --force
+
+xaos.dvi: xaos.texinfo
+ tex xaos.texinfo
+ texindex xaos.??
+ tex xaos.texinfo
+
+xaosdev.dvi: xaosdev.texinfo
+ tex xaosdev.texinfo
+ texindex xaosdev.??
+ tex xaosdev.texinfo
+
+dvi: xaos.dvi xaosdev.dvi
+ rm -f xaos.aux xaos.cp xaos.fn xaos.ky xaos.log xaos.pg xaos.toc \
+ xaos.tp xaos.vr xaosdev.aux xaosdev.cp xaosdev.cps xaosdev.fn \
+ xaosdev.fns xaosdev.ilg xaosdev.ind xaosdev.ky xaosdev.kys \
+ xaosdev.log xaosdev.pg xaosdev.pgs xaosdev.toc xaosdev.tp \
+ xaosdev.tps xaosdev.vr xaosdev.vrs xaos.cps xaos.fns xaos.kys \
+ xaos.pgs xaos.tps xaos.vrs
+
+../AUTHORS: xaos.info
+ ./mkauthors > ../AUTHORS
+
+clean:
+ rm -f xaos.info xaos.texinfo xaos.dvi xaosdev.dvi # ../AUTHORS
diff --git a/doc/XaoS.lsm b/doc/XaoS.lsm
new file mode 100644
index 0000000..488f6d1
--- /dev/null
+++ b/doc/XaoS.lsm
@@ -0,0 +1,27 @@
+Begin3
+Title: XaoS - a fast portable real-time interactive fractal zoomer/morpher
+Version: 3.4
+Entered-date: Sep 28 2008
+
+Description: XaoS is a fast portable real-time interactive fractal zoomer.
+ It displays the Mandelbrot set (among other escape
+ time fractals) and allows you to zoom smoothly into the fractal.
+ Various coloring modes are provided for both the points inside
+ and outside the selected set. In addition, switching between
+ Julia and Mandelbrot fractal types is provided. The first
+ version was a poorly written Mandelbrot viewer by Thomas later
+ modified by Jan to support high frame-rate zooming. Other
+ additions were later made including autopilot (for those of
+ you without driver licenses), palette changing, PNG saving,
+ and fractal inversion.
+Keywords: X11 fractal realtime zoom mandelbrot newton
+ julia autopilot demo
+Author: jh@ucw.cz (Jan Hubicka)
+ thomas@tivoli.com (Thomas Marsh)
+Maintained-by: kovzol@particio.com (Zoltan Kovacs)
+Primary-site: xaos.sf.net
+Platform: GNU/Linux or any UNIX with X11 and ANSI C compiler,
+ Microsoft Windows (95, 98, XP), Mac OS X
+Copying-policy: GNU GENERAL PUBLIC LICENSE
+ All rights reserved by the author
+End
diff --git a/doc/mkauthors b/doc/mkauthors
new file mode 100755
index 0000000..3ed729a
--- /dev/null
+++ b/doc/mkauthors
@@ -0,0 +1,13 @@
+#!/bin/sh
+echo "AUTHORS
+-------
+
+This file is autogenerated from help/xaos.hlp.
+If you add a new feature to XaoS or fix a bug,
+please edit help/xaos.hlp and run \"cd doc; make\".
+
+This list is ordered alphabetically."
+
+cat -v xaos.info | sed "1,/C Credits/ d;/C.0.1/,\$ d" | \
+ sed s/*//g | sed s/"(alphabetically)"/""/ |
+ sed s/Note// | sed s/"lists::."/""/ | sed s/"\^_"//
diff --git a/doc/mktexi b/doc/mktexi
new file mode 100755
index 0000000..86a66b6
--- /dev/null
+++ b/doc/mktexi
@@ -0,0 +1,5 @@
+#!/bin/sh
+set -e
+echo "Generating xaos.texinfo..."
+awk '/##.*##/ {system("sh ../help/conv "$3" "$4" <../help/xaos.hlp ");};
+ /.*/ {print $0}' <xaos.geninfo >xaos.texinfo
diff --git a/doc/texi2rest.py b/doc/texi2rest.py
new file mode 100755
index 0000000..58fd5cd
--- /dev/null
+++ b/doc/texi2rest.py
@@ -0,0 +1,593 @@
+#!/usr/bin/python
+"""
+NAME
+====
+
+texi2rest - Convert texinfo xml represenation to reStructuredText
+
+SYNOPSIS
+========
+
+texi2rest *xmlfile* > *restfile*
+
+DESCRIPTION
+===========
+
+``texi2rest`` is based on ``xhtml2rest`` by Antonios Christofides. He
+included the following disclaimer for his program, and it applies
+equally to mine: far from being a decent and complete program, this is
+only something to begin with, which hopefully processes the given UTF-8
+texinfo xml file and produces reStructuredText "source code" in the
+standard output.
+
+Before processing the texinfo file, you must convert it to xml using
+the makeinfo command:
+
+ makeinfo --xml *texifile*
+
+ texi2rest *xmlfile* > *restfile*
+
+LIMITATIONS
+===========
+
+I am writing this specifically to convert the XaoS project's
+documentation. I do not plan to implement full conversion of every
+texinfo directive--only the ones used in the documentation I am trying
+to convert. Hopefully other interested parties will contribute further
+improvements.
+
+
+META
+====
+
+``texi2rest`` was hacked together by J.B. Langston,
+jb-langston@austin.rr.com, based on ``xhtml2rest`` by
+Antonios Christofides, anthony@itia.ntua.gr.
+
+Revision: $Revision: 3753 $
+
+The code and this text is hereby placed in the public domain.
+"""
+
+import xml.dom.minidom
+import re
+import sys
+import textwrap
+import math
+import UserList
+import warnings
+import codecs
+
+###############################################################################
+# Configuration: these values change the behavior of the conversion
+
+# Texinfo commands that generate emphasis markup (i.e., *text*)
+EMPHASIS_COMMANDS = ('emph', 'i', 'slanted', 'var')
+
+# Texinfo commands that generate strong markup (i.e., **text**)
+STRONG_COMMANDS = ('strong', 'b')
+
+# Texinfo commands that generate literal markup (i.e.,``text``)
+LITERAL_COMMANDS = ('code', 'verb' 'tt')
+
+# Texinfo commands that map to reST roles of the same name (i.e., :role:`text`)
+VERBATIM_COMMANDS = ('dfn', 'file', 'command', 'option', 'kbd', 'samp', 'math')
+
+# Texinfo commands that map to differnet reStructuredText roles (i.e., :role:`text`)
+MAPPED_COMMANDS = {
+ 'env': 'envvar',
+ 'key': 'kbd',
+ 'cite': 'title'
+}
+
+# Texinfo commands that do not generate any markup, but preserve nested text
+IGNORED_COMMANDS = ('url', 'sc', 'r', 'sansserif', 'titlefont', 'dmn', 'logo', 'punct')
+
+# Texinfo commands that are deleted from output, including nested text
+DELETED_COMMANDS = ()
+
+# Map of Texinfo section commands to section underline/overline characters
+# Single character indicates underline only; double characters indicates overline+underline
+SECTION_COMMANDS = {
+ # level 1
+ 'top': '**',
+ 'chapter': '**',
+ 'unnumbered': '**',
+ 'appendix': '**',
+ # level 2
+ 'section': '=',
+ 'unnumberedsec': '=',
+ 'appendixsec': '=',
+ # level 3
+ 'subsection': '-',
+ 'unnumberedsubsec': '-',
+ 'appendixsubsec': '-',
+ # level 4
+ 'subsubsection': '^',
+ 'unnumberedsubsubsec': '^',
+ 'appendixsubsubsec': '^',
+}
+
+
+###############################################################################
+
+###############################################################################
+# Global variables. I know. I'm terribly sorry. Please get rid of them.
+
+# 'unindent' is used by list items. A li list item is always indented, but its
+# first line is "unindented" and contains the number or bullet. However, it was
+# difficult for the li node to tell its #text contents (which may be deeply
+# nested) to use that. So it just places the number or bullet, which must be 4
+# characters, like " 1. ", in "unindent". The first text to be rendered uses
+# the unindent and then sets it to empty again.
+
+unindent = ''
+hyperlinks = {} # text-target pairs found in "a href" elements
+###############################################################################
+
+class Ditem:
+ """A document item; usually a node, but can be a block of text
+ resulting from processing adjacent inline items. If it is a node,
+ it is usually the BlockDitem subclass; if it is text, it is
+ normally a plain Ditem."""
+ def __init__(self, text):
+ self.text = text # Contained text (empty for BlockDitem)
+ self.type = '' # tag for block node, empty for inline
+ self.indentlevel = 0 # 0 - unindented; 1 - indented; etc.
+ def __repr__(self):
+ return self.__class__.__name__+'("""'+self.text+'""")'
+ def propagate_indents(self):
+ "Propagates indent level recursively to children"
+ pass
+ def maxwidth(self):
+ "Width it will occupy if allowed to render on infinite width"
+ self.remove_white_space()
+ return len(self.text) + 4*self.indentlevel
+ def minwidth(self):
+ "Width it will occupy if wrapped as much as possible"
+ wordlens = [len(x) for x in self.text.split()]
+ if wordlens: return max(wordlens) + 4*self.indentlevel
+ else: return 0
+ def format(self, width):
+ """Returns contents formatted so as not to exceed specified
+ width, if possible"""
+ global unindent
+ if(self.type=='pre'): raise Exception, "What are we doing here?"
+ self.remove_white_space()
+ # Quick hack to fix a problem. Do we begin with '* '?
+ while len(self.text)>=2 and self.text[1]==' ' and self.text[0] in '*-':
+ # It may be mistaken for a bullet list. Strip it.
+ self.text = self.text[2:]
+ if width < self.minwidth(): width = self.minwidth()
+ # The textwrap module has the nasty habit of breaking at hyphens. So
+ # we'll do a nasty hack: find a character that does not exist in the
+ # text, replace all hyphens with that character, ok, you get the point.
+ hyphensurrogate = ''
+ for c in '!@#$%^&*~':
+ if self.text.find(c)<0:
+ hyphensurrogate = c
+ break
+ if not hyphensurrogate: raise Exception, "Houston we have a problem"
+ text = self.text.replace('-', hyphensurrogate)
+ wrapper = textwrap.TextWrapper(
+ initial_indent=((4*self.indentlevel)-len(unindent))*' '+unindent,
+ subsequent_indent=4*self.indentlevel*' ',
+ width=width, break_long_words = False)
+ unindent = ''
+ text = wrapper.fill(text)
+ text = text.replace(hyphensurrogate, '-')
+ return text
+ def empty(self):
+ "Returns true if contains nothing"
+ return not self.text
+ def remove_white_space(self):
+ "Removes extra white space"
+ self.text = re.sub('\s+', ' ', self.text).strip()
+ def canmerge(self):
+ "Tells whether it's possible to merge this Ditem with adjacent ones"
+ return True
+ def merge(self, aditem):
+ """If possible, merges aditem, which should be an adjacent Ditem that
+ comes after this one."""
+ if not self.canmerge() or not aditem.canmerge(): return False
+ if len(self.text)>0 and self.text[-1] == '_' and len(aditem.text)>0 \
+ and aditem.text[0] not in """ \n\t:.,!=/|;"'?<>[]{}()""":
+ # Leave space after link if not followed by punctuation
+ self.text = self.text + ' ' + aditem.text
+ else:
+ self.text = self.text + aditem.text
+ return True
+
+class BlockDitem(Ditem):
+ "A Ditem which contains other Ditems"
+ def __init__(self, type):
+ Ditem.__init__(self, '')
+ self.type = type
+ self.children = [] # Contained Ditems
+ def __repr__(self):
+ return self.__class__.__name__+'("'+self.type+'"); children = '+repr(self.children)
+ def maxwidth(self):
+ childmaxwidths = [x.maxwidth() for x in self.children]
+ return childmaxwidths and max(childmaxwidths) or 0
+ def minwidth(self):
+ childminwidths = [x.minwidth() for x in self.children]
+ return childminwidths and max(childminwidths) or 0
+ def propagate_indents(self):
+ for x in self.children:
+ x.indentlevel = self.indentlevel
+ x.propagate_indents()
+ def format(self, width):
+ if width < self.minwidth(): width = self.minwidth()
+ results = [x.format(width) for x in self.children]
+ results = [x for x in results if x]
+ return "\n\n".join(results)
+ def empty(self):
+ return not (self.children)
+ def canmerge(self):
+ return False
+
+class PreDitem(Ditem):
+ "A Ditem representing a literal block"
+ def maxwidth(self):
+ return max([len(x) for x in self.text.split('\n')])
+ def minwidth(self):
+ return self.maxwidth() # Literal block; width's given
+ def remove_white_space(self):
+ pass
+ def format(self, width):
+ result = '::\n\n'
+ for x in self.text.split('\n'):
+ result = result + ' ' + x + '\n'
+ result = result + '..\n\n'
+ return result
+ def canmerge(self):
+ return False
+
+class HeadingDitem(BlockDitem):
+ "A Ditem representing an h1, h2, ..., h9"
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def minwidth(self):
+ return self.maxwidth() # Headings don't wrap
+ def format(self, width):
+ assert(len(self.children)==1)
+ text = self.children[0].format(32767)
+ uldict = {
+ 'chapter': '**', 'section': '=', 'subsection': '-', 'subsubsection': '^',
+ 'unnumbered': '**', 'unnumberedsec': '=', 'unnumberedsubsec': '-', 'unnumberedsubsubsec': '^',
+ 'appendix': '**', 'appendixsec': '=', 'appendixsubsec': '-', 'appendixsubsubsec': '^'
+ }
+ underliner = uldict[self.type]
+ if len(underliner) == 2:
+ return len(text)*underliner[0] + '\n' + text + '\n' + len(text)*underliner[0]
+ else:
+ return text + '\n' + len(text)*underliner[0]
+
+class BlockQuoteDitem(BlockDitem):
+ "A Ditem representing a blockquote"
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def propagate_indents(self):
+ self.indentlevel = self.indentlevel + 1
+ BlockDitem.propagate_indents(self)
+
+class ListDitem(BlockDitem):
+ "A Ditem representing an ol, ul, or dl"
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def format(self, width):
+ # First pass the list type and order to the children
+ order = 1
+ for x in self.children:
+ if isinstance(x, ListItemDitem):
+ x.listtype = self.type
+ x.order = order
+ order = order+1
+ # And then process normally
+ return BlockDitem.format(self, width)
+
+class ListItemDitem(BlockDitem):
+ "A Ditem representing a li, dt, or dd"
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ self.listtype = None
+ self.order = 0
+ def minwidth(self):
+ if self.type == 'definitionterm': return self.maxwidth() # Don't wrap dt
+ else: return BlockDitem.minwidth(self)
+ def propagate_indents(self):
+ if self.type in ('item', 'definitionitem'):
+ self.indentlevel = self.indentlevel + 1
+ BlockDitem.propagate_indents(self)
+ def format(self, width):
+ global unindent
+ if self.type == 'item' and self.listtype == 'enumerate':
+ unindent = ('%d. ' % (self.order)).ljust(4)
+ elif self.type == 'item' and self.listtype == 'itemize':
+ unindent = '* '
+ return BlockDitem.format(self, width)
+
+class RenderedColumn:
+ "Width information about a column being rendered"
+ def __init__(self, minwidth, maxwidth):
+ self.minwidth = minwidth
+ self.maxwidth = maxwidth
+ self.curwidth = maxwidth
+ self.fixedwidth = 0
+ def logwidth(self):
+ if self.maxwidth==0: return 0
+ else: return math.log(self.maxwidth)
+ def update(self, minwidth, maxwidth):
+ "Replaces minwidth/maxwidth if greater"
+ self.minwidth = minwidth>self.minwidth and minwidth or self.minwidth
+ self.maxwidth = maxwidth>self.maxwidth and maxwidth or self.maxwidth
+ self.curwidth = self.maxwidth
+
+class RenderedColumns(UserList.UserList):
+ "A list of RenderedColumn"
+ def __init__(self, alist):
+ self.data = alist
+ def totalWidth(self):
+ "Returns total table width"
+ return reduce(lambda x,y: x+y, [z.curwidth for z in self.data]) \
+ + len(self.data) + 1
+ def sumLogWidth(self):
+ "Returns sum of logwidth for nonfixed columns"
+ return reduce(lambda x,y: x+y,
+ [x.logwidth()*(1-x.fixedwidth) for x in self.data])
+ def distributeWidthDifference(self, width):
+ "Step 4 of w3m table rendering algorithm"
+ # Note: The use of math.ceil below is because I'd rather have a
+ # suboptimal width (a few characters less than requested width) rather
+ # than go find what to do with rounding.
+ w = self.totalWidth() - width
+ assert(w>0)
+ repeat_distribution = 1
+ while repeat_distribution:
+ repeat_distribution = 0
+ for x in self.data:
+ if x.fixedwidth: continue
+ if x.curwidth - math.ceil(w*x.logwidth()/self.sumLogWidth()) < \
+ x.minwidth:
+ x.curwidth = x.minwidth
+ x.fixedwidth = 1
+ w = self.totalWidth() - width
+ repeat_distribution=1
+ break
+ # Now that the we finished finding which columns need to be fixed to
+ # their minimum width, perform the distribution once again, without
+ # checking, and actually change remaining column widths
+ for x in self.data:
+ if x.fixedwidth: continue
+ x.curwidth = x.curwidth - math.ceil(w*x.logwidth()/self.sumLogWidth())
+
+def tablehrule(colwidths, rule='-'):
+ "Returns a horizontal table separator for given column widths"
+ result = '+'
+ for x in colwidths:
+ result = result + rule * x + '+'
+ return result
+
+class TableDitem(BlockDitem):
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def format(self, width):
+ # Uses table rendering algorithm of w3m
+ # (http://www.w3m.org/story.html), but ignoring width attribute
+ # Step 1
+ columns = RenderedColumns([RenderedColumn(x.minwidth(),
+ max(x.maxwidth(), 1) # A column can't be smaller than 1 character
+ ) for x in self.children[0].children])
+ for x in self.children:
+ for i in range(len(columns)):
+ if (len(x.children)<=i): continue # Skip empty columns
+ columns[i].update(x.children[i].minwidth(), x.children[i].maxwidth())
+ # Step 2 (width attribute) ignored
+ # Step 3 (already done - list was created with maxwidth)
+ # Step 4
+ if columns.totalWidth() > width: columns.distributeWidthDifference(width)
+ # OK, column widths are now calculated
+ colwidths = [int(x.curwidth) for x in columns]
+ result = tablehrule(colwidths) + '\n'
+ usedheadbodysep = False
+ for tr in self.children:
+ result = result + tr.format(colwidths)
+ rule = '-'
+ if not usedheadbodysep and tr.children[0].type == 'th' \
+ and tr!=self.children[-1]:
+ rule = '='
+ usedheadbodysep = True
+ result = result + tablehrule(colwidths, rule) + '\n'
+ return result
+
+class TrDitem(BlockDitem):
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def maxwidth(self):
+ return reduce(lambda x,y: x+y,
+ [x.maxwidth() for x in self.children]) + len(self.children) + 1
+ def minwidth(self):
+ return reduce(lambda x,y: x+y,
+ [x.minwidth() for x in self.children]) + len(self.children) + 1
+ def format(self, colwidths):
+ columns = [] # List of lists of lines
+ maxlinecount = 0 # Num of lines in vertically largest column
+ for i in range(len(colwidths)):
+ if len(self.children)<=i: lines = [ '' ]
+ else: lines = self.children[i].format(colwidths[i]).split('\n')
+ lines = [x + ' ' * (colwidths[i]-len(x)) for x in lines] # Pad to col len
+ maxlinecount = max(maxlinecount, len(lines))
+ columns.append(lines)
+ # Pad vertically
+ for i in range(len(columns)):
+ for j in range(maxlinecount-len(columns[i])):
+ columns[i].append(' ' * colwidths[i])
+ result = ''
+ # Add vertical separators
+ for i in range(maxlinecount):
+ result = result + '|'
+ for j in range(len(columns)):
+ result = result + columns[j][i] + '|'
+ result = result + '\n'
+ return result
+
+def handleNodeList(nodelist):
+ "Processes given nodes; merges them if possible; returns ditem list"
+ ditems = []
+ curditem = Ditem('')
+ for node in nodelist:
+ aditem = handleNode(node)
+ if curditem.merge(aditem): continue
+ ditems.append(curditem)
+ curditem = aditem
+ if not curditem.empty(): ditems.append(curditem)
+ return ditems
+
+def handleNode(node):
+ if node.nodeType == node.TEXT_NODE:
+ return handleText(node)
+ elif node.nodeName in EMPHASIS_COMMANDS:
+ return handleEmphasis(node)
+ elif node.nodeName in STRONG_COMMANDS:
+ return handleStrong(code)
+ elif node.nodeName in LITERAL_COMMANDS:
+ return handleLiteral(node)
+ elif node.nodeName in VERBATIM_COMMANDS:
+ return handleVerbatimCommand(node)
+ elif node.nodeName in MAPPED_COMMANDS:
+ return handleMappedCommand(node)
+ elif node.nodeName in IGNORED_COMMANDS:
+ return handleIgnoredCommand(node)
+ elif node.nodeName in DELETED_COMMANDS:
+ return handleDeletedCommand(node)
+ elif node.hasChildNodes():
+ contents = handleNodeList(node.childNodes)
+ if len(contents) == 1: return contents[0]
+ if len(contents) == 0: return Ditem('')
+ result = BlockDitem(node.nodeName)
+ result.children = contents
+ return result
+ return Ditem('')
+
+def processChildren(node):
+ if node.hasChildNodes():
+ return handleNodeList(node.childNodes)
+ else:
+ return ()
+
+def mergeChildren(node):
+ contents = processChildren(node)
+ if len(contents)>1: raise Exception('Unexpected block elements')
+ if contents: return contents[0]
+ else: return Ditem('')
+
+def handleEmphasis(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ if result.text:
+ result.text = '*' + result.text + '*'
+ return result
+
+def handleStrong(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ if result.text:
+ result.text = '**' + result.text + '**'
+ return result
+
+def handleLiteral(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ if result.text:
+ result.text = '``' + result.text + '``'
+ return result
+
+def handleVerbatimCommand(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ if result.text:
+ result.text = ':' + node.nodeName + ':`' + result.text + '`'
+ return result
+
+def handleMappedCommand(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ if result.text:
+ result.text = ':' + MAPPED_COMMANDS[node.nodeName] + ':`' + result.text + '`'
+ return result
+
+def handleIgnoredCommand(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ return result
+
+def handleDeletedCommand(node):
+ result = ''
+ result.type = node.nodeName
+ return result
+
+def handleText(node):
+ return Ditem(node.data)
+
+def handleAnchor(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ result.text = result.text.strip()
+ if result.text == '': return result
+ target = node.getAttribute('href').strip()
+ result.text = re.sub('\s+', ' ', result.text)
+ result.text = ':ref:`'+result.text+' <'+target+'>`'
+ return result
+
+def handleHeading(node):
+ contents = mergeChildren(node)
+ if contents.empty(): return contents
+ result = HeadingDitem(node.parentNode.nodeName)
+ result.children.append(contents)
+ return result
+
+def handleGenericBlock(node):
+ result = BlockDitem(node.nodeName)
+ result.children = processChildren(node)
+ return result
+
+def handleBlockQuote(node):
+ result = BlockQuoteDitem(node.nodeName)
+ result.children = processChildren(node)
+ return result
+
+def handleList(node):
+ result = ListDitem(node.nodeName)
+ result.children = processChildren(node)
+ return result
+
+def handleListItem(node):
+ result = ListItemDitem(node.nodeName)
+ result.children = processChildren(node)
+ return result
+
+def handleTable(node):
+ result = TableDitem(node.nodeName)
+ # Ignore table contents that are not tr
+ result.children = [x
+ for x in processChildren(node) if x.type=='tr']
+ return result
+
+def handleTr(node):
+ result = TrDitem(node.nodeName)
+ # Ignore tr contents that are not th or td
+ result.children = [x
+ for x in processChildren(node) if x.type in ('th', 'td')]
+ return result
+
+def handlePre(node):
+ return PreDitem(mergeChildren(node).text)
+
+dom1 = xml.dom.minidom.parse(sys.argv[1])
+ditem = handleNode(dom1.getElementsByTagName("texinfo")[0])
+ditem.propagate_indents()
+(utf8_encode, utf8_decode, utf8_reader, utf8_writer) = codecs.lookup('utf-8')
+outf = utf8_writer(sys.stdout)
+outf.write(ditem.format(79) + '\n')
+for h in hyperlinks.keys():
+ outf.write('\n.. _`' + h + '`:\n ' + hyperlinks[h] + '\n')
diff --git a/doc/xaos.6 b/doc/xaos.6
new file mode 100644
index 0000000..59fea28
--- /dev/null
+++ b/doc/xaos.6
@@ -0,0 +1,14 @@
+.TH XaoS 6 "22 Feb 2006" "XaoS" "Demos"
+
+.SH NAME
+xaos - Fast interactive real-time fractal zoomer/morpher
+
+.SH DETAILS
+This manual page is obsolete and no longer maintained.
+Please read the full documentation running
+XaoS. You can start it typing 'xaos'. (Press 'h' 3
+times to get into the help system.)
+.P
+In addition,
+.B xaos --help
+should give a detailed list about the command line options.
diff --git a/doc/xaos.geninfo b/doc/xaos.geninfo
new file mode 100644
index 0000000..42d8d52
--- /dev/null
+++ b/doc/xaos.geninfo
@@ -0,0 +1,283 @@
+\input texinfo @c -*-texinfo-*-
+
+@c The original files are xaos.geninfo and xaos.hlp. xaos.texinfo is
+@c automatically generated. So make all changes in the orignal files please.
+@c To regenerate xaos.texinfo, please run "mktexinfo".
+
+@c Use A4 paper - If you don't like that, remove the following 3 lines.
+@iftex
+@afourpaper
+@end iftex
+
+@setfilename xaos.info
+@settitle An fast realtime interactive fractal zoomer --- user's manual
+@dircategory Graphics
+@direntry
+* XaoS: (xaos). A fast real-time interactive fractal zoomer
+@end direntry
+
+
+@ifinfo
+@copyright{} 1996-2008 Jan Hubicka and the XaoS Development Team
+
+Permission is granted to make and distribute verbatim
+copies of this manual provided the copyright notice and
+this permission notice are preserved on all copies.
+
+@end ifinfo
+
+@c %**end of header
+
+@set VERSION 3.4
+@set DATE April 17, 2008
+
+@titlepage
+
+@title{XaoS @value{VERSION}}
+@subtitle{A fast real-time interactive fractal zoomer --- User's manual}
+
+@author{Jan Hubi@v cka}
+@tex
+Dukelsk\'ych bojovn\'\i ku 1944
+@end tex
+@*
+390 03 T@'abor @*
+Czech Republic
+
+Email: @code{jh@@ucw.cz}
+
+@value{DATE}
+
+@page
+@vskip 0pt plus 1filll
+@vskip 0pt plus 1filll
+
+@copyright{} 1996-2008 @tex Jan Hubi\v cka and the XaoS Development Team
+@end tex
+
+Permission is granted to make and distribute verbatim
+copies of this manual provided the copyright notice and
+this permission notice are preserved on all copies.
+
+@end titlepage
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node Top, Overview, (dir), (dir)
+
+@ifinfo
+@top XaoS @value{VERSION}
+@flushright 1.0
+A real-time interactive fractal zoomer
+User's manual
+@value{DATE}
+@end flushright
+
+This manual contains user documentation about XaoS --- a fast real-time fractal
+zoomer. XaoS uses a development model, so sources are freely available. The
+file @code{xaosdev.texinfo} in the source documentation contains a hacker's
+manual (design overview, algorithm description etc.).
+@end ifinfo
+
+@menu
+* Overview:: What does this software do then?
+* tutorial:: XaoS tutorial
+* controls:: Basic controls
+* video:: How to encode video files
+* format:: XaoS's file format description
+* writehelp:: How to write XaoS help files
+* xshl:: XaoS simple hypertext language
+* drivers:: Driver specific documentation
+* menus:: Functions, menu items and command line parameters
+* about:: Credits
+* support:: Getting Support
+* index:: Function index
+@end menu
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node Overview, tutorial, Top, Top
+
+@chapter Overview
+@menu
+* Why?:: Why yet another fractal generator?
+* What?:: What does this software do then?
+@end menu
+
+@node Why?, What?, Overview, Overview
+@section Why yet another fractal generator?
+
+
+We decided to make XaoS, because all fractal browsers we know of take a
+long time to calculate each image. You may browse nice images
+generated by them but real impressions of fractals --- the self
+similarity and infinite zooming into the nice parts of fractals ---
+can be seen only in animations. There are many programs available that
+make nice animations, but they take a long time to calculate and lots
+of space on disk. Most such animations are quite ugly because their
+authors can't see them without many hours of calculations.
+
+A natural question is: is it possible to generate such animations in
+real-time? The answer was negative for many years, since the Mandelbrot set is
+very computationally expensive. Things are changing. Today's computers
+are fast enough to calculate approx. 10.000 of pixels per frame,
+which is enough
+for a very low resolution animation (100x100). Several programs doing that
+are available. But 100x100 animation still looks quite ugly. To make
+animation nice you need at least 320x200 pixels. And that is 6 times more!
+One possibility is to wait until computers will be fast enough, but
+it will take many years, and then 320x200 animations will be obsolete
+and everyone will want 1024x768 resolution instead or more.
+
+We found a special algorithm that saves up to 99.98% of calculations during
+zooming by reusing pixels already calculated in previous frames. There were
+some programs doing similiar tricks before but we don't know about any able
+to do zooming interactively with a speed similar to XaoS. Many other tricks
+were later implemented XaoS to achieve yet higher framerates. Now XaoS does
+up to 120 frames per second on a 120Mhz pentium in a fullscreen 320x200
+animation, and calculates an average of 160 (0.24%) pixels per frame. This makes
+XaoS fast enough to achieve its primary goal, realtime animation, but there
+are still many areas that could improve, since more complex fractals,
+higher resolutions, or slower computers still bring many problems.
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node What?, , Why?, Overview
+@comment node-name, next, previous, up
+@section What does this software do then?
+
+XaoS is a realtime interactive fractal zoomer. This means that it lets you
+zoom smoothly into any place in the fractal you choose without the many hours
+of calculation required by most other fractal generators. It now has many
+other features too, like 13 different fractal types, autopilot, special coloring
+modes, support for various bit depths (8bpp, truecolor, hicolor and realcolor),
+random palette generation, color cycling etc...
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node tutorial, controls, Overview, Top
+@c ## chapter tutorial ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node controls, video, tutorial ,Top
+
+@c ## chapter controls ##
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node video, format, controls ,Top
+
+@c ## chapter video ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node format, writehelp,video ,Top
+@c ## chapter format ##
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node writehelp, xshl,format ,Top
+@c ## chapter writehelp ##
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node xshl, drivers,writehelp ,Top
+@c ## section xshl ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node drivers, menus,xshl ,Top
+@c ## chapter drivers ##
+
+@menu
+* aa:: AA-lib --- high quality ascii art driver
+* BeOS:: BeOS drivers
+* DGA:: DGA driver
+* dos:: DOS driver
+* dX-fullscreen:: directX fullscreen driver
+* dX-window:: directX windowed driver
+* ggi:: GGI driver
+* plan9:: plan9 driver
+* SVGAlib:: SVGAlib driver
+* win32:: Win32 driver
+* X11:: X11 driver
+@end menu
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node aa, BeOS , ,drivers
+@c ## section aa ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node BeOS, DGA , aa ,drivers
+@c ## section BeOS ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node DGA, dos , BeOS ,drivers
+@c ## section DGA ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node dos, dX-fullscreen , DGA ,drivers
+@c ## section dos ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node dX-fullscreen, dX-window , dos ,drivers
+@c ## section dX-fullscreen ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node dX-window, ggi , dX-fullscreen ,drivers
+@c ## section DX-window ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node ggi, plan9, dX-window ,drivers
+@c ## section ggi ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node plan9, SVGAlib, ggi ,drivers
+@c ## section plan9 ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node SVGAlib, win32, plan9 ,drivers
+@c ## section SVGAlib ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node win32, X11, SVGAlib ,drivers
+@c ## section win32 ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node X11, , win32 ,drivers
+@c ## section X11 ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node menus, about, drivers,Top
+
+@c ## menus controls ##
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+@comment node-name, next, previous, up
+@node about, support,menus ,Top
+@c ## appendix about ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node support, index ,about ,Top
+@c ## appendix support ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node index, ,support ,Top
+@unnumbered Index of functions
+
+@printindex fn
+
+
+@contents
+@bye
diff --git a/doc/xaos.info b/doc/xaos.info
new file mode 100644
index 0000000..5676dc2
--- /dev/null
+++ b/doc/xaos.info
@@ -0,0 +1,3818 @@
+This is xaos.info, produced by makeinfo version 4.11 from xaos.texinfo.
+
+INFO-DIR-SECTION Graphics
+START-INFO-DIR-ENTRY
+* XaoS: (xaos). A fast real-time interactive fractal zoomer
+END-INFO-DIR-ENTRY
+
+ (C) 1996-2008 Jan Hubicka and the XaoS Development Team
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+
+File: xaos.info, Node: Top, Next: Overview, Prev: (dir), Up: (dir)
+
+XaoS 3.4
+********
+
+ A real-time interactive fractal zoomer
+ User's manual
+ April 17, 2008
+
+ This manual contains user documentation about XaoS -- a fast
+real-time fractal zoomer. XaoS uses a development model, so sources are
+freely available. The file `xaosdev.texinfo' in the source
+documentation contains a hacker's manual (design overview, algorithm
+description etc.).
+
+* Menu:
+
+* Overview:: What does this software do then?
+* tutorial:: XaoS tutorial
+* controls:: Basic controls
+* video:: How to encode video files
+* format:: XaoS's file format description
+* writehelp:: How to write XaoS help files
+* xshl:: XaoS simple hypertext language
+* drivers:: Driver specific documentation
+* menus:: Functions, menu items and command line parameters
+* about:: Credits
+* support:: Getting Support
+* index:: Function index
+
+
+File: xaos.info, Node: Overview, Next: tutorial, Prev: Top, Up: Top
+
+1 Overview
+**********
+
+* Menu:
+
+* Why?:: Why yet another fractal generator?
+* What?:: What does this software do then?
+
+
+File: xaos.info, Node: Why?, Next: What?, Prev: Overview, Up: Overview
+
+1.1 Why yet another fractal generator?
+======================================
+
+We decided to make XaoS, because all fractal browsers we know of take a
+long time to calculate each image. You may browse nice images generated
+by them but real impressions of fractals -- the self similarity and
+infinite zooming into the nice parts of fractals -- can be seen only in
+animations. There are many programs available that make nice
+animations, but they take a long time to calculate and lots of space on
+disk. Most such animations are quite ugly because their authors can't
+see them without many hours of calculations.
+
+ A natural question is: is it possible to generate such animations in
+real-time? The answer was negative for many years, since the Mandelbrot
+set is very computationally expensive. Things are changing. Today's
+computers are fast enough to calculate approx. 10.000 of pixels per
+frame, which is enough for a very low resolution animation (100x100).
+Several programs doing that are available. But 100x100 animation still
+looks quite ugly. To make animation nice you need at least 320x200
+pixels. And that is 6 times more! One possibility is to wait until
+computers will be fast enough, but it will take many years, and then
+320x200 animations will be obsolete and everyone will want 1024x768
+resolution instead or more.
+
+ We found a special algorithm that saves up to 99.98% of calculations
+during zooming by reusing pixels already calculated in previous frames.
+There were some programs doing similiar tricks before but we don't know
+about any able to do zooming interactively with a speed similar to
+XaoS. Many other tricks were later implemented XaoS to achieve yet
+higher framerates. Now XaoS does up to 120 frames per second on a
+120Mhz pentium in a fullscreen 320x200 animation, and calculates an
+average of 160 (0.24%) pixels per frame. This makes XaoS fast enough to
+achieve its primary goal, realtime animation, but there are still many
+areas that could improve, since more complex fractals, higher
+resolutions, or slower computers still bring many problems.
+
+
+File: xaos.info, Node: What?, Prev: Why?, Up: Overview
+
+1.2 What does this software do then?
+====================================
+
+XaoS is a realtime interactive fractal zoomer. This means that it lets
+you zoom smoothly into any place in the fractal you choose without the
+many hours of calculation required by most other fractal generators. It
+now has many other features too, like 13 different fractal types,
+autopilot, special coloring modes, support for various bit depths
+(8bpp, truecolor, hicolor and realcolor), random palette generation,
+color cycling etc...
+
+
+File: xaos.info, Node: tutorial, Next: controls, Prev: Overview, Up: Top
+
+2 XaoS tutorial
+***************
+
+This is a brief introduction to the basic XaoS features.
+
+2.1 How to zoom
+===============
+
+The main advantage of XaoS is that after a few seconds' delay to
+calculate the first image, you may choose any point with the mouse and
+press the _left_ button. The image will start to zoom smoothly into
+the point you choose. You may move the mouse and zoom smoothly into
+interesting areas. By pressing the _middle button_ (or _left+right_
+buttons) you may also _move the image_ using "drag & drop" if you
+missed an interesting place. _Unzooming_ is also possible by using the
+_right button_, but it is much slower because optimizations are not so
+effective as for zooming.
+
+ In case you think that the default _speed_ is boring (it is quite
+slow, to make XaoS smooth on a slow computer) you may change it by
+pressing _arrow up/down_. But faster zooming is more expensive, so if
+the speed is too high you will see little but funny colorful blinking
+rectangles.
+
+2.2 Autopilot
+=============
+
+To make XaoS yet more impressive we made a special autopilot that
+automatically drives into interesting boundaries of the set. So you can
+press `A', play your favorite music, drink coffee and relax. I never
+tried this but it should be really relaxing! Many pictures in the XaoS
+gallery were discovered using the autopilot.
+
+ The autopilot also has some additional features. It turns back when
+the zoomed picture stops being interesting, and is able to spot when
+it's zoomed into a really boring part (or has reached the limit of
+floating point numbers) and restart zooming from the top.
+
+2.3 Various fractal formulae
+============================
+
+XaoS also supports formulae other than the Mandelbrot set. You may
+change _formula_ using the _number keys_ or _SHIFT+letters_.
+
+ On keys `1' to `5' are _Mandelbrot sets of various power_. The
+"normal" Mandelbrot set is on key `1'.
+
+ On key `6' is a fractal called _Newton_. It is Newton's famous
+formula for finding roots.
+
+ On key `7' is the _fourth ordered Newton_ fractal.
+
+ On key `8' is a fractal called _Barnsley_.
+
+ On key `9' is _Barnsley's second_ fractal.
+
+ On key `0' is _Barnsley's third_ fractal.
+
+ With keys `SHIFT-A' you can display a fractal called _octo_. It is a
+fractal that Thomas discovered in fractint.
+
+ With keys `SHIFT-B' you can display a fractal called _Phoenix_. It
+is a very nice and quite famous fractal.
+
+ With keys `SHIFT-C' you can display a fractal called _Magnet_. This
+fractal has quite a complex formula so it is a bit slow.
+
+ With keys `SHIFT-D' you can display the _Magnet2_ fractal.
+
+ The rest of the built-in fractals are accessible through an other
+menu, but you can still use the hotkeys.
+
+ On `SHIFT-E' is a fractal called _Triceratops_ found by Arpad.
+
+ On `SHIFT-F' is a fractal called _Catseye_ found by Arpad. This is
+more interesting if you change the bailout value.
+
+ On `SHIFT-G' is a fractal called _Mandelbar_. It was in Gnofract4d,
+and they found it at: http://mathworld.wolfram.com/MandelbarSet.html
+
+ On `SHIFT-H' is the _Lambda_ fractal.
+
+ On `SHIFT-I' and `SHIFT-J' are the _Manowar_ and _Spider_ fractals,
+they were found by users of fractint. (Scott Taylor or Lee Skinner) It
+was on http://spanky.triumf.ca/www/fractint/ taylor_skinner_type.html
+
+ The next 3 fractals are famous classic fractals.
+
+ On `SHIFT-K' is the _Sierpinski_ Gasket. You can change its shape
+by selecting another Julia seed. (This is for technical reasons.)
+
+ On `SHIFT-L' is the _Sierpinski Carpet._ It's shape can also be
+changed by selecting another Julia seed.
+
+ On `SHIFT-M' is the _Koch Snowflake._
+
+2.4 Out-coloring modes
+======================
+
+To make fractals yet more interesting, more coloring modes for points
+outside the set are provided. "Classical coloring mode" uses the number
+of iterations that the orbit required to escape to (nearly) infinity.
+You can change this mode from the _Fractal menu_ or by pressing key `C'
+To see more about coloring modes, try the tutorial on Incoloring modes
+from the XaoS features overview.
+
+ Those cryptic names for coloring modes are mathematical formulae,
+where _iter_ means number of iterations, _real_ means real coordinate
+of last orbit, and _imag_ means imaginary coordinate of last orbit.
+
+2.5 In-coloring mode
+====================
+
+In-coloring mode is similar to out-coloring, except that it changes how
+things inside the set are displayed. This can also be changed from the
+_fractal menu_ or by pressing `F'.
+
+ You might also want to see the tutorial on Out-coloring modes from
+the XaoS features overview.
+
+2.6 Planes
+==========
+
+All fractals displayed by XaoS are functions with a complex parameter.
+It can be displayed in the normal complex plane, where x is the real
+part of the number, and y is the imaginary part; but it can also be
+displayed in a number of other planes. You can select the plane to use
+from the _Fractal menu_, or by pressing `I'.
+
+ Like the coloring modes, planes have cryptic names. You guessed it,
+they're mathematical formulae. Here `mu' means coordinates in the normal
+complex plane. If you have coordinates in `1/mu' plane, and you need
+coordinates in the a complex plane (to calculate the Mandelbrot set) you
+simply use the coordinates as mu. Lambda is another plane that can be
+converted to mu using a similar formula.
+
+*mu*
+ normal mode.
+
+*1/mu*
+ Inversion: infinity goes to 0 and 0 goes to infinity.
+
+*1/(mu+0.25)*
+ Similar to inversion, but moves the center outside of the
+ Mandelbrot set so that it looks parabolic.
+
+*lambda*
+ Lambda plane.
+
+*1/lambda*
+ Inversion of lambda plane.
+
+*1/lambda-1*
+ Inversion with moved center.
+
+*1/(mu-1.40115)*
+ A very interesting mode for the Mandelbrot set. It makes small
+ things big, so you can browse the set's details easily.
+
+2.7 Mandelbrot/Julia switching
+==============================
+
+Most of the fractals displayed by XaoS (currently all of them) have two
+forms: Mandelbrot and Julia. Every point in a Mandelbrot set has its
+own Julia set. To see more about this correspondence, try the tutorial
+on Julia set from the Introduction to fractals.
+
+ In the Mandelbrot mode, you can get a corresponding Julia by moving
+the mouse to an interesting point and pressing `M'. To get back press
+`M' again. Some fractals (Barnsley and phoenix) are already in their
+Julia versions, because the Mandelbrot ones are boring. But by pressing
+`M' in such fractal you should get the Mandelbrot version, and by
+choosing another point as the base point and pressing `M' again you
+should get a completely different fractal. The most interesting points
+for Julia sets are at the boundaries of the Mandelbrot set. Most of the
+Julias inside or outside the set are boring.
+
+2.8 Fast Julia preview mode
+===========================
+
+Fast Julia mode is a quick way to find a point to use as a base for the
+Julia set.. Just press `J' and a small Julia set will be displayed in
+the top left corner. Then move the mouse around with button 1
+depressed, and the Julia for the point the mouse is over will be
+automatically generated.
+
+2.9 Palette
+===========
+
+If you think that the default XaoS colors are ugly or you are just
+bored by them you can change it by pressing `P'. XaoS will
+automatically generate random palettes. Many of them look ugly, so
+press `P' again to get another one until you find one you like.
+
+2.10 Filters
+============
+
+Many interesting effects are done by post-calculation filters. *Note
+filter::. XaoS has filters that do everything from embossing, through
+motion-blurring, right through to turning the fractal into a
+stereogram. To enable them use the `filter menu' or press `E'.
+
+2.11 Palette cycling
+====================
+
+This is a very old trick that makes the Mandelbrot set a little
+flashier. You may enable or disable it using `Y'. In the truecolor
+modes you need to enable the palette emulator filter first. This is done
+via the `E' key, or from the filter menu.
+
+2.12 Changing number of iterations
+==================================
+
+To calculate fractals perfectly, you need an infinite number of
+iterations. XaoS does just the first few of them, so after lots of
+zooming you may get into a place that looks quite boring, and the
+boundaries of the set are rounded, without any interesting details.
+This can be changed by changing the number of iterations:
+
+ Press and hold `arrow right' and wait until iterations are high
+enough. This may slow down calculation much. To reduce number of
+iterations press `arrow left'.
+
+2.13 Changing resolution
+========================
+
+XaoS usually starts in a low resolution (320x200 or thereabouts) to make
+calculations faster. If you have a fast computer or you need to save
+bigger `.gif' images, you may change the resolution. This can be done
+by pressing `=' in the full screen drivers, or simply by resizing the
+XaoS window.
+
+2.14 Changing driver
+====================
+
+XaoS usually has more than one driver available. You may change it on
+the fly in case you want a different one. For example, XaoS started in
+X11 can be switched at runtime to use the AA driver. This can be done
+from the UI menu.
+
+ This action is bit dangerous, because XaoS can crash during
+initialization if there is some problem with initialization; XaoS tries
+to initialize a new driver, and if it fails it attempts to return back
+to the original. Sometimes this is impossible, and all XaoS can do is
+terminate..
+
+2.15 Other features
+===================
+
+XaoS has many other features, but they don't fit into this tutorial.
+Most of them are available from the menu, so you can experiment with
+them. You might also want to see the _animated tutorials_ from the
+_help menu_, to have an idea what XaoS can do.
+
+
+File: xaos.info, Node: controls, Next: video, Prev: tutorial, Up: Top
+
+3 Basic controls
+****************
+
+By default the mouse buttons work in the following way:
+
+*left*
+ zoom in
+
+*right*
+ zoom out
+
+*middle*
+ move fractal in a drag-and-drop fashion
+
+ _Note:_ Since most Macs only have one button mice, these controls
+are emulated on Mac OS X using modifier keys. See the help section on
+Mac OS X for details.
+
+ This behavior can change. If you enable rotation, the first button
+is used for rotating fractals. Also, in fast Julia mode, the first
+button is used to change the seed.
+
+ If you don't have a middle button, press both buttons to enable
+emulation.
+
+ After few minutes of zooming you will probably exceed the precision
+and the fractals will get boring. If you are getting strange big
+rectangles on the screen, you probably reached the numeric limit: there
+is no way to avoid this except un-zoom back and choose a different
+area. It doesn't hurt so much, since you have zoomed approximately 64
+051 194 700 380 384 times, so there are quite a lot of areas to
+explore. Algorithms with unlimited precision exist, but they are still
+too slow for real-time zooming.
+
+ The other possibility is that you have reached the iteration limit.
+The fractal is calculated approximately, and in this case you need to
+increase number of iterations used for approximation (and decrease the
+speed in the process). This is done from the menu or using the arrow
+keys _Left_ and _Right_.
+
+ An _Up_ and _Down_ keys should be used to change zooming speed. Note
+that higher speed costs more and image will be blocky.
+
+ This behavior can also change. With palette cycling enabled, _Left_
+and _Right_ keys change cycling speed; in continuous rotation they
+change rotation speed.
+
+ All other functions are available from the menu, which (in the
+default configuration) are displayed when you move the mouse to the top
+of the screen/window. It is useful to learn the shortcut keys, which are
+shown in gray next to the menu items they trigger.
+
+
+File: xaos.info, Node: video, Next: format, Prev: controls, Up: Top
+
+4 How to encode video files from XaoS
+*************************************
+
+To create a video, make and `xaf' file first (the easiest way to do
+this is to use the _record_ function in the file menu). Then you need
+to render the animation. XaoS can output sequences of ordinary `PNG'
+images, that can later be used by a video encoder.
+
+4.1 Generating image sequences for video
+========================================
+
+To generate an image sequence, choose _Render Animation_ from the _Misc_
+menu. You can also use the following command on the command line:
+
+ xaos -render [filename] -size 352x240 -antialiasing
+ -renderframerate 24 -basename [basename]
+
+ _File to render_ (`[filename]') is the name of the `xaf' file,
+_Basename_ (`[basename]') is the name used as the base filename for
+rendered images. This should also include the path where you want to
+save the images. XaoS adds a four digit sequence number and `.png'
+extension to this name automatically.
+
+ You might also want to change the resolution. Make sure that the
+resolution you choose is supported by the video codec you wish to use.
+
+ The framerate can also be altered. Make sure you choose a framerate
+that is supported by the video codec you wish to use.
+
+ _Antialiasing_ (`-antialiasing') is used to produce anti-aliased
+images. It takes a much longer time and much more memory to calculate
+them, but resulting images are better for video compression and they
+result in a much smaller video file. (the same is true of _JPEG
+images_)
+
+ On the other hand, the other XaoS rendering option _Always
+Recalculate_ (`-alwaysrecalc') (which disables XaoS's zooming
+optimizations) is _not recommended_. If that's used, the sequence of
+animation then contains quite a lot of extra information, which
+increases size of video file, but because of the codec's lossy
+compression it is hard to see any difference, so it's not worth it.
+
+4.2 Rendered files
+==================
+
+Once you start it, XaoS will generate thousands of frames. They take
+quite a long time to calculate and save, and consume plenty of disk
+space. (e.g. to render part 1 of the tutorial you need about 60MB and
+half an hour of time).
+
+ All images are named `[basename]framenum.png'. For example
+`intro0001.png' is the first frame of the animation intro. If
+consecutive frames are the same, XaoS doesn't save them, so some frames
+may be missing. If your encoder can't handle that, you will need to
+write a simple script which will fill in the gaps by means of `mv' or
+symbolic linking.
+
+ A list of all filenames is saved into the file `[basename].par',
+where each line is the name of one frame. The names repeat here if
+necessary, so you can use this file to supply filenames to the encoder.
+
+4.3 Encoding videos
+===================
+
+Once XaoS has generated the png files for each frame of the animation,
+you can use a third-party video encoder to convert the sequence of
+images into a video file. We currently recommend the following
+encoders, which support a wide variety of video codecs and file formats:
+*ffmpeg*
+ Available from: `http://ffmpeg.mplayerhq.hu/' Instructions:
+ `http://ffmpeg.mplayerhq.hu/faq.html#SEC12'
+
+*mencoder*
+ Part of mplayer, available from: http://www.mplayerhq.hu/
+ Instructions:
+ `http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html'
+ These are both command line tools. If you prefer a graphical tool,
+you may prefer Quicktime Pro from Apple
+(http://www.apple.com/quicktime/pro/). However, this software costs
+approximately US$30, and the authors of XaoS have no experience with
+it. Although QuickTime may be easier to use, the two free encoders
+above are just as capable once you learn how to use them.
+
+ Note: we used to recommend Berkeley parallel MPEG encoder to encode
+the generated png files into MPEG videos. We have kept the instructions
+mainly for historic purposes.
+
+
+File: xaos.info, Node: format, Next: writehelp, Prev: video, Up: Top
+
+5 XaoS's file format
+********************
+
+This section describes the format used by XaoS for animations,
+configuration files and saved positions. All these files have a common
+format, designed to be easily readable, to allow manual editing of
+files and easy conversion by other programs.
+
+ I also taken care to make it easily extensible for future versions
+of XaoS so I hope there will not be many incompatibilities between
+various XaoS versions.
+
+ The format is a simple set of commands executed sequentially. XaoS
+does not provide any variables/cycles as usual scripting languages do,
+but future extension to full-blown Scheme should be easy since the
+format uses Scheme-like syntax. The syntax of every command is:
+
+ `(command_name '_[param1] [param2]_`)'
+
+ where parameters are optional and separated by whitespace (an
+arbitrary number of spaces, tabs and newlines). The parameters can have
+the following types:
+
+*integer*
+ number w/o decimal point (`123')
+
+*float*
+ floating point number in decimal notation with optional exponent
+ (`1.23E2')
+
+*keyword*
+ text started by quote `''. It is used to pass various string
+ constants like formula name (`'mandel') Quote is required for
+ scheme compatibility
+
+*string*
+ Text inside double quotes. The only parameter that should contain
+ whitespace
+
+*boolean*
+ `#t' for true or `#f' for false
+
+ There is a complete description of all XaoS functions (with some
+examples) and an index of functions in the XaoS registry. *Note
+menus::. You may particularly want to read about the animation
+functions. *Note animf::. Also, the following functions are significant:
+
+*load*
+ This function loads and interprets a file. It works similarly to
+ `#include' in C.
+
+*initstate*
+ Available in version 3.0 and above, this function resets XaoS's
+ state to default values. This command should be at the beginning
+ of each animation file, since otherwise some stuff previously
+ enabled by user could cause unexpected effects. State is not reset
+ by default before playing animations since it would make it
+ impossible to write macros. Current versions don't really need
+ macros, but in future versions, when the Scheme programming
+ language will be available, this should be a much more interesting
+ subject.
+
+*usleep*
+ This function waits for a selected amount of time(in usec) before
+ processing the next command. The screen is recalculated and
+ displayed at the beginning of the sleep if necessary. The
+ remaining time is spent by waiting, calculating if necessary, or
+ performing any animation you entered via animation commands.
+
+*wait*
+ Waits until the animation or image rendering is complete. Do not
+ call this function when zoom, or continuous rotation is active
+ otherwise deadlock happens. It is a good idea to call it
+ immediately before text subtitles are displayed, since it looks
+ ugly when they are displayed over a blocky unfinished fractal.
+ Because the degree of blockiness at a given instant is a function
+ of your machine speed, it may look nice for you but ugly for
+ others with slower machines. Also you should call this after an
+ animation is performed, before the switch to another fractal
+ happens; since the switch involves calculation, the screen is
+ stopped for a while and an unfinished fractal there looks ugly.
+ You should also call it, when you want to do something as soon as
+ possible.
+
+ Example:
+
+ ;configure everything for the first frame
+ (inistate)
+ (palette 1 1163254293 0) ;custom palette
+ (cycling #t) ;enable cycling
+ (cyclingspeed 7)
+ (maxiter 276) ;higher number of iterations
+ (range 3) ;default range for solid guessing
+ (usleep 1000000) ;second frame starts here
+ (moveview -1.8101154154614007889 -8.2687205907162041209E-05)
+ ;just move the image
+ (usleep 1000000) ;third frame
+ (morphview -1.8101154154614007889 -8.2687205907162041209E-05
+ 6.277210971069452361E-10 6.2772109785334669875E-10)
+ ;10 seconds of zooming into selected
+ rectangle
+ (usleep 100000000)
+
+ The best way to learn XaoS command language is probably to read
+position files and modify them. For example, to create zooming
+animation from the original file:
+
+ (initstate)
+ (defaultpalette 0)
+ (formula 'mandel)
+ (view -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+ 9.69332308834E-08)
+
+ Just change the `view' command to `morphview', and add `usleep':
+
+ (initstate)
+ (defaultpalette 0)
+ (formula 'mandel)
+ (morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+ 9.69332308834E-08)
+ (usleep 10000000)
+
+ The following code produces Julia morphing in the real axis:
+
+ (initstate)
+ (fastjulia #t)
+ (juliaseed -2 0)
+ (morphjulia 2 0)
+ (usleep 2000000)
+
+ And following is the "rotozooming" animation:
+
+ (initstate)
+ (fastrotate #t)
+ (morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+ 9.69332308834E-08)
+ (morphangle 300)
+ (usleep 10000000)
+ (wait)
+ (fastrotate #f)
+
+6 XaoS gallery
+**************
+
+I plan to make a gallery of animations and position files on the XaoS
+home-page, so please send any nice animations and images you created
+using XaoS to the mailing list or upload them to our website.
+
+
+File: xaos.info, Node: writehelp, Next: xshl, Prev: format, Up: Top
+
+7 How to write XaoS help files
+******************************
+
+XaoS help is stored in the file `help/xaos.hlp'. It is divided into
+parts, each part being started by a _keyword_. In the help file
+keywords are written as `%keyword'
+
+ If you are writing documentation about some command in the XaoS
+function registry, use the same keyword as the name of the command in
+order to make context sensitive help work.
+
+
+File: xaos.info, Node: xshl, Next: drivers, Prev: writehelp, Up: Top
+
+7.1 xshl
+========
+
+_Xshl_ stands for _XaoS simple hypertext language_. It uses similar
+tags to HTML. It is simpler and more restrictive in order to make it
+easy to parse using various scripts. In C code you can use the library
+present in `src/util/xshl.c' to parse it.
+
+ The following tags are supported:
+
+*head*
+ make headings (should be at the beginning of the page, at least)
+
+*emph*
+ emphasize
+
+*tt*
+ Use non proportional font
+
+*br*
+ Break line
+
+*p*
+ Next paragraph
+
+*dl*
+ Definition list
+
+*dt*
+ Definition tag (should be used only inside a definition list)
+
+*dd*
+ Definition description (should be used only inside a definition
+ list)
+
+*center*
+ align to center
+
+*right*
+ align to right
+
+*red*
+ change color to red (should not be used in help files)
+
+*black*
+ change color to black (should not be used in help files)
+
+*white*
+ change color to white (should not be used in help files)
+
+*a name*
+ link to other help page
+
+*tutor name*
+ activate tutorial
+
+*notex*
+ Ignore this in texinfo manuals
+
+
+File: xaos.info, Node: drivers, Next: menus, Prev: xshl, Up: Top
+
+8 Platform-specific documentation
+*********************************
+
+XaoS is portable and works on many different platforms. Since not all
+platforms are exactly the same, there are some differences between the
+behavior of XaoS on different platforms. Here is documentation about
+each specific port.
+
+* Menu:
+
+* aa:: AA-lib --- high quality ascii art driver
+* BeOS:: BeOS drivers
+* DGA:: DGA driver
+* dos:: DOS driver
+* dX-fullscreen:: directX fullscreen driver
+* dX-window:: directX windowed driver
+* ggi:: GGI driver
+* plan9:: plan9 driver
+* SVGAlib:: SVGAlib driver
+* win32:: Win32 driver
+* X11:: X11 driver
+
+
+File: xaos.info, Node: aa, Next: BeOS, Up: drivers
+
+8.1 AA-lib driver
+=================
+
+The AA driver is currently the most advanced and portable driver for
+XaoS. It is based on AAlib--a high quality ASCII-art library developed
+by the AA-project. (see `http://aa-project.sf.net')
+
+ It is a fully featured XaoS driver for text mode displays. It
+supports 256 colors and the mouse where possible.
+
+ It also has some extended features available from the UI menu:
+
+*Attributes*
+ AA-lib may use character attributes to improve image quality. By
+ default it uses normal, dim and bold characters where possible,
+ but you can also enable different attributes like reversed or bold
+ font characters. You may also enable usage of non ansii/reversed
+ characters if your device supports it.
+
+*Font*
+ AA-lib uses a bitmap image of the font to prepare the
+ approximation table used for ASCII art rendering. This bitmap is
+ expected to be same as the one used by your device. AAlib performs
+ detection where possible however some devices (like UNIX text
+ terminals or MDA) do not support this. AAlib has few font images
+ compiled in, so in this case you should try to use one of them to
+ achieve best results.
+
+*Inversion*
+ Some devices use inverse video: use this to get correct results on
+ such devices.
+
+*Dithering mode*
+ Dithering is an way to get more exact color in approximations, by
+ combining more characters; but this method can produce ugly
+ looking noise on certain images. Use this menu to disable or tune
+ it.
+
+*Palette options*
+ By default AA driver uses the XaoS palette to render images, but
+ it quite often looks ugly on text displays. Here you can choose a
+ special text palette instead. Note that with filters enabled, the
+ results may be rather ugly. This function is available from the
+ _palette menu_.
+
+*Save text screen*
+ The normal save function will generate a PNG image instead of nice
+ ASCII-art. To save ASCII art use this function instead. It
+ supports many text file formats like HTML, ANSI, more, etc... It
+ will also ask you for font and attributes(see above). It is
+ available from the _file menu_.
+
+ The AA-lib driver also provides the full set of standard AA-lib's
+command line options. You may use them to tune parameters like gamma
+correction, and so on. See `xaos -help' or the AA-lib documentation
+for details.
+
+ The AA driver was written by Jan Hubicka, 1997.
+
+
+File: xaos.info, Node: BeOS, Next: DGA, Prev: aa, Up: drivers
+
+8.2 BeOS support
+================
+
+XaoS has pretty advanced support for BeOS R4. It works on both PowerPC
+and Intel platforms, supports multithreading, the clipboard, file
+dragging, has native look and feel and can work as an image translator
+from XaoS files to images.
+
+ The first version of the BeOS driver was written by Jens Kilian and
+later extended by Jan Hubicka.
+
+8.2.1 Installation
+------------------
+
+You can start the installation script to do everything for you. If you
+want something special, read this section.
+
+ In order for XaoS to work you need to keep the executable together
+with its data files (`help', `examples', `catalogs' and the `tutorials'
+directory)
+
+ When first started, XaoS registers two new mime types called
+`image/x-xaos-position' for XaoS Position Files and
+`video/x-xaos-animation' for XaoS Animation Files, registers icons for
+them and sets itself as default application.
+
+8.2.2 Available display drivers
+-------------------------------
+
+XaoS supports following drivers:
+
+*BeOS*
+ Standard windowed driver using application server
+
+*DirectWindow*
+ Driver done using Game Kit's direct window class
+
+*WindowScreen*
+ Fullscreen driver.
+
+ By default, XaoS starts in windowed mode and uses the application
+server for output. You could change the driver to DirectWindow to use
+direct access to video RAM. Note that this mode is slower in most
+cases, and not supported by some videocards.
+
+ The BeOS driver by default chooses the most similar bitmap supported
+by XaoS to achieve best and fastest results. In the UI menu you can
+change this default choice to another one if you wish. Also you can
+ask the BeOS and DirectWindow to resize to fullscreen mode.
+
+ XaoS also supports real fullscreen mode using the BWindowScreen API.
+To switch XaoS to this driver, use the UI menu. If you want to use this
+mode by default, use the `-driver WindowScreen' command line option.
+
+ This driver differs a lot from windowed ones. It use direct access
+to the video card, allowing you to change video mode. Also, the 256
+color mode can access the palette, so it is not dithered like the
+windowed mode. Because BeOS can't do GUI in fullscreen mode, XaoS uses
+its own toolkit. I hope you will feel confortable in it.
+
+8.2.3 XaoS as translator
+------------------------
+
+You should be able to open XaoS files in graphics applications such as
+ShowImage or ArtPaing. In Preferences you can find the DataTranslations
+program, that can be used to set the size, type and DPI of the
+resulting image. Also antialiasing can be enabled.
+
+ Note that _translation can take a while_. So be patient and wait for
+the result.
+
+ If the translator doesn't work, ensure that you have a link to the
+XaoS executable in `/boot/beos/system/add-ons/Translators/'.
+
+
+File: xaos.info, Node: DGA, Next: dos, Prev: BeOS, Up: drivers
+
+8.3 DGA driver
+==============
+
+This is the driver for DGA (Direct Graphics Architecture) extension
+used by XFree86 X servers. It is pretty new so it could be buggy.
+
+ Bugs/limitations:
+
+*In 8bpp mode, XaoS has problems with the palette with certain window managers*
+ I don't know why this happens. Just let me know what's wrong, or
+ use another window manager.
+
+*Banked modes are not supported.*
+ I don't have any card to test this with, so it doesn't work in the
+ current version.
+
+ DGA driver was written by Jan Hubicka, 1999.
+
+
+File: xaos.info, Node: dos, Next: dX-fullscreen, Prev: DGA, Up: drivers
+
+8.4 DOS driver
+==============
+
+This is a fully featured driver for DJGPP and allegro. It supports
+many VGA modes, VESA 1.0--3.0, VBE/AF, S3 and some other cards.
+
+ The following problems may occur:
+
+*Some DPMI servers may cause problems*
+ Some DPMI servers like the one from Novell/Dr/Open DOS are buggy.
+ Use clean DOS instead and XaoS will automatically start `cwsdpmi'.
+ Under Open Dr DOS use `dpmi off' at command line to disable it.
+
+*Higher resolutions don't work*
+ If your videocard has enough memory for the selected resolution,
+ you most probably have an unsupported videocard. Please use a
+ VESA BIOS extension on this videocard. (See the note about VESA at
+ the end of this section.)
+
+*XaoS needs a coprocessor*
+ I don't distribute a coprocessor library linked into XaoS because
+ it is too slow for a real-time zoomer. Coprocessor emulation will
+ not help, because xaos works in protected mode.
+
+*XaoS needs mouse driver to be usable*
+
+*XaoS works slowly in higher resolution*
+ This could also be caused by Allegro's slow driver or your
+ videocard's VESA BIOS. You could try some other VESA BIOS
+ extension instead. Look at the `http://www.talula.demon.co.uk'
+ for the FreeBE project or Scitech Display Doctor package. (See
+ the note about VESA at the end of this section.)
+
+8.4.1 VESA
+----------
+
+VESA is a standard for using higher resolutions in DOS. Many videocards
+have VESA support in the BIOS so you don't need any additional
+software, while others need support from a special program. Also some
+VESA BIOS implementations are buggy or suboptimal; there are 3
+different versions, version 1.0 is many times slower than 2.0, which
+has support for protected mode and linear framebuffers. So if you have
+problems with higher resolutions, or some graphics modes are not
+available (like 320x200 truecolor), you might try some software package
+which emulates VESA.
+
+ The most famous VESA emulating program is Scitech Display Doctor. It
+has support for many videocards and is quite reliable. It's
+disadvantage is that it is shareware and works for only 30 days. You
+might also look on `ftp.simtel.net', where there are many VESA
+emulation packages such as `s3vbe' or the new FreeBe project at
+`http://www.talula.demon.co.uk'
+
+ DOS driver was written by Jan Hubicka, 1997.
+
+
+File: xaos.info, Node: dX-fullscreen, Next: dX-window, Prev: dos, Up: drivers
+
+8.5 DirectX fullscreen driver
+=============================
+
+This is da river for Windows 9x and NT. It is new since version 3.1 and
+because of some oddities of Windows API and kludges in DirectX it may
+be rather unstable. Please report all bugs. In case of problems you
+could use the DOS version of XaoS instead.
+
+ This driver allows the Windows port of XaoS to run in full screen
+mode. The driver supports 256, 65536 and 16777216 color modes (24bpp
+and 32bpp) in all resolutions supported by DirectX. You can change
+graphics mode by pressing the `=' key (or by using the UI/Resize menu).
+If the selected mode is not supported, the driver will restore the
+previous setting.
+
+ Use the `-mode WIDTHxHEIGHTxDEPTH' (like `-mode 640x480x16') command
+line option to change graphics mode.
+
+ If you want to start XaoS in DirectX, use the `-driver dX-fullscreen'
+option.
+
+ See the Win32 driver documentation for some more Windows releated
+information.
+
+ DirectX driver was written by Jan Hubicka, Jan Olderdissen and Pavel
+Tzekov, 1999.
+
+
+File: xaos.info, Node: dX-window, Next: ggi, Prev: dX-fullscreen, Up: drivers
+
+
+File: xaos.info, Node: ggi, Next: plan9, Prev: dX-window, Up: drivers
+
+8.6 GGI driver
+==============
+
+GGI stands for General Graphics Interface. Part of this project is to
+develop libggi, a portable graphics library, and XaoS's GGI driver uses
+that. It is experimental, since the API of libggi is not stabilized
+yet. There are some problems with keyboard handling--the shift key
+doesn't work yet.
+
+ Everything else might work well, but there are no guarantees. It is
+alpha quality software.
+
+ GGI driver was written by Jan Hubicka, 1998.
+
+
+File: xaos.info, Node: plan9, Next: SVGAlib, Prev: ggi, Up: drivers
+
+8.7 Plan9 driver
+================
+
+Plan9 is a very nice small operating system by the authors of Unix at
+Bell Labs. It is very incompatible with other operating systems; even
+the C compiler and header files are different, but XaoS should work
+well there (even on the limited free demo installation without any
+POSIX compatibility stuff)
+
+ There are a few limitations: the file selector and image saving
+don't work. You can save position files and then later render them on
+the other OS, or save screenshots.
+
+ Plan9 terminals also don't provide any way to catch the arrow keys,
+so you can't use them. Use the mouse to navigate in the menus. Also,
+getting the screen resolution is impossible, so use `-pixelwidth' and
+`-pixelheight' instead of `-screenwidth' and `-screenheight'.
+
+ By default XaoS changes the colormap. This will collide with other
+colorful programs like Mortha. You can disable this behavior using
+`-nopalette' switch, but this will slow down XaoS.
+
+ Plan9 driver was written by Jan Hubicka, 1997.
+
+
+File: xaos.info, Node: SVGAlib, Next: win32, Prev: plan9, Up: drivers
+
+8.8 SVGAlib driver
+==================
+
+This is a driver for Linux SVGAlib. I really like this driver, because
+I much prefer full screen zooming instead of a small 320x320 window in
+X11. It was one of the first drivers for XaoS and is fully featured.
+The following problems can occur:
+
+*XaoS doesn't initialize graphics mode*
+ when started under users other than root SVGAlib requires root
+ privileges to directly access the hardware. When you really want
+ to start XaoS as a normal user, enable the suid bit (`chmod +s')
+ at XaoS executable. note that I take care to disable all security
+ holes caused by this bit so I believe it is safe.
+
+*Mouse doesn't work*
+
+*Screen is blank at higher resolutions*
+ Both this problems are probably caused by misconfiguration of
+ SVGAlib. Please configure it in `etc/vga/libvga.cong' or
+ `/usr/local/lib/libvga.conf' GPM can also cause problems. Try to
+ kill it before starting XaoS.
+
+*When I switch console I can't switch back*
+ This is another typical SVGAlib bug. Try to hold `F' key longer
+ than `alt'. It helps on my computer. On older SVGAlib there was a
+ famous "enter bug" that caused a crash after pressing enter. Try
+ to update to a newer release.
+
+ SVGAlib driver was written by Jan Hubicka, 1997.
+
+
+File: xaos.info, Node: win32, Next: X11, Prev: SVGAlib, Up: drivers
+
+8.9 Win32 driver
+================
+
+This is a driver for Windows 9x and NT. It is new since version 3.1 and
+because of some oddities of Windows API it may be rather unstable.
+Please report all bugs. In case of problems you could use the DOS
+version of XaoS instead.
+
+ The driver should work in all bit depths, but 16 color mode is not
+natively supported by the XaoS engine. XaoS internally works in 32k
+colors and the result is converted to 16 colors by Windows. Because
+Windows conversion routines are slow and ugly, the result is slow and
+ugly. Please configure your display to another bit depth to "solve"
+this problem.
+
+ Use `-size WIDTHxHEIGHT' command line option to change the default
+window size.
+
+ This driver also maps to native Windows look and feel. There is a
+small problem with combo boxes in dialogs. They are expected to give
+you a choice between a few strings. The keyboard controls (changing
+choice by arrow keys) work, but mouse selection is broken. If you know
+how to solve this bug, please let me know.
+
+ XaoS is a UNIX application and has many command line options. Some
+features are not available from the GUI. Because Windows applications
+can't have normal output, most of the critical messages are displayed
+in message boxes, but some longer messages are omitted. The most
+significant omission is the help about command line options that you
+can find in `doc/cmdopts.txt'.
+
+ One thing that might be confusing is that animation rendering mode
+doesn't display anything, but only renders images. Start the rendering,
+and a message box will inform you that XaoS is entering the calculation
+loop. Relax and wait for the message box signaling the end of the loop.
+
+ Note that XaoS also supports the DirectX API.
+
+ Win32 driver was written by Jan Hubicka, Jan Olderdissen and Pavel
+Tzekov, 1999.
+
+
+File: xaos.info, Node: X11, Prev: win32, Up: drivers
+
+8.10 X11 driver
+===============
+
+This was the first driver done for XaoS. It supports many visuals,
+shared colormaps and MitSHM extension.
+
+ Bugs/limitations:
+
+*XaoS makes some X servers too busy*
+ Sometimes XaoS generates images faster than X can display them.
+ In this case XaoS responds poorly to the mouse, and other
+ applications slow down too. This happens especially often on old
+ R4 servers. Use `-sync' to avoid this problem. Note that `-sync'
+ does `not' make all communication with X asynchronous; it just
+ adds one additional XSync call. So the slowdown is not as large
+ as you might expect.
+
+*Does not work on all visuals*
+ This driver supports only 8bpp pseudocolor/grayscales, 15,16,24
+ and 32bpp truecolor, 1bpp and 8bpp staticolor visuals.
+
+*Palette rotating does not work for 8bpp pseudocolor w/o private palette*
+
+ X11 driver was written by Jan Hubicka and Thomas Marsh, 1997.
+
+
+File: xaos.info, Node: menus, Next: about, Prev: drivers, Up: Top
+
+Függelék: A Menus, functions and command line parameters
+**********************************************************
+
+All XaoS functions are referenced by a central function registry. The
+scripting language, menus, dialogs and command line options are built
+from this database. This section contains information about all
+functions available in this registry.
+
+* Menu:
+
+* root:: Root menu
+* animroot:: Animation root menu
+* plc:: Replay only commands
+
+* linemenu:: Line drawing functions
+* animf:: Animation functions
+* time:: Timing functions
+* file:: File
+* edit:: Edit
+* fractal:: Fractal
+* calc:: Calculation
+* mfilter:: Filters
+* ui:: UI
+* misc:: Misc
+* helpmenu:: Help
+* xtextpos:: Horizontal text position
+* ytextpos:: Vertical text position
+* mformula:: Formulae
+* palettemenu:: Palette
+
+
+File: xaos.info, Node: root, Next: animroot, Up: menus
+
+
+File: xaos.info, Node: animroot, Next: plc, Prev: root, Up: menus
+
+A.1 Animation root menu
+=======================
+
+This menu is displayed at the top of the screen when animation replay
+is active.
+
+* Menu:
+
+* file:: File
+* stopreplay:: Stop replay
+* helpmenu:: Help
+* ui:: UI
+
+
+File: xaos.info, Node: stopreplay, Up: animroot
+
+A.1.1 Stop replay
+-----------------
+
+Terminate animation replay.
+
+ _Available as_: menu item
+
+
+File: xaos.info, Node: plc, Next: linemenu, Prev: animroot, Up: menus
+
+A.2 Replay only commands
+========================
+
+Some commands, such as timing primitives or animation functions, are
+available only in animation files.
+
+* Menu:
+
+* linemenu:: Line drawing functions
+* animf:: Animation functions
+* time:: Timing functions
+* load:: Include file
+
+
+File: xaos.info, Node: load, Up: plc
+
+A.2.1 Include file
+------------------
+
+ -- Function: load file
+
+ This function lets you include another file in your script. It works
+similarly to `#include' in C or `load' in Scheme. The file is searched
+for in the same directory as the current source file.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: linemenu, Next: animf, Prev: plc, Up: menus
+
+A.3 Line drawing functions
+==========================
+
+XaoS has support for drawing lines. These functions are available only
+in animations and could be used to show some parts of fractals or draw
+simple diagrams. See the tutorial "Introduction to fractals" for
+examples of this feature.
+
+ Lines can be drawn in _screen_ coordinates, where 0,0 is the top
+left corner and 1,1 is bottom right, _scaled_ coordinates, which are
+similar, but scaled to keep 0,0--1,1 rectangular, or _Fractal_
+coordinates, to draw a line at an exact position on the screen.
+
+ The color of the line should be specified by the `color' command.
+You might draw an arbitrary number of lines and, later, morph them.
+Each line is identified by a unique numeric key; the current key can be
+set using `linekey'. Commands for changing lines operate on the line
+with the current key. (Lines drawn in sequence have consecutive
+numbers.)
+
+ For example:
+
+ (color 'red)
+ (line 'scaled 0.3 0.5 0.7 0.5)
+ (line 'scaled 0.3 0.5 0.7 0.5)
+ (line 'scaled 0.3 0.5 0.3 0.5)
+ (line 'scaled 0.7 0.5 0.7 0.5)
+ (linekey 0)
+ (morphline 'scaled 0.3 0.3 0.7 0.3)
+ (morphline 'scaled 0.3 0.7 0.7 0.7)
+ (morphline 'scaled 0.3 0.3 0.3 0.7)
+ (morphline 'scaled 0.7 0.3 0.7 0.7)
+ (usleep 1000000)
+
+ Creates line morphing to rectangle.
+
+ -- Function: line keyword complex complex
+
+ Draw line between two points. `keyword' specifies type of
+coordinates and should be one of the following: ``fractal', ``screen'
+or ``scaled'. This function also increases the line key.
+
+ _Available as_: command
+
+ -- Function: morphline keyword complex complex
+
+ Morph current line to given coordinates. `keyword' specifies type
+of coordinates and should be one of the following: ``fractal',
+``screen' or ``scaled'. The line will start moving at the next timing
+command, and reach the final position before the end of it. This
+function also increases the line key.
+
+ _Available as_: command
+
+ -- Function: morphlastline keyword complex complex
+
+ This function has the same functionality as morphline, but it doesn't
+increase the line key, and touches the line with the previous key. This
+is useful when you want to move a just-drawn line--you don't need to
+set linekey back.
+
+ _Available as_: command
+
+ -- Function: linekey integer
+
+ Set current line key.
+
+ _Available as_: command
+
+ -- Function: clearline
+
+ Clear current line. This function also increases the line key.
+
+ _Available as_: command
+
+ -- Function: clearlines
+
+ Clear all displayed lines. Lines can also be cleared using the
+`clearscreen' or `display' commands available from the Misc menu. *Note
+misc::.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: animf, Next: time, Prev: linemenu, Up: menus
+
+A.4 Animation functions
+=======================
+
+These functions are used to animate fractal state--to zoom, unzoom and
+morph various parameters. They should be used only in animation files.
+Animations are usually performed for a time selected by an immediately
+following timing function. *Note time::. For example:
+
+ (view 0 0 1 1)
+ (morphview 0 0 2 2)
+ (usleep 5000000)
+
+ Will do a 5 second long unzooming animation.
+
+* Menu:
+
+* animateview:: Animate view
+* smoothmorph:: Smooth morphing
+* morphview:: Morph view
+* morphjulia:: Morph julia
+* moveview:: Move view
+* morphangle:: Morph angle
+* zoom:: Zooming functions
+
+
+File: xaos.info, Node: animateview, Next: smoothmorph, Up: animf
+
+A.4.1 Animate view
+------------------
+
+ -- Function: animateview float float float float
+
+ This function is almost identical to function `view'. *Note uiview::.
+It expects that the view will be changed only slightly, so
+recalculation is done with `ANIMATE' priority. This means that dynamic
+resolution is used by default.
+
+ Viewport is selected by the center and two radiuses (real and
+imaginary). See `view' for more information.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: smoothmorph, Next: morphview, Prev: animateview, Up: animf
+
+A.4.2 Smooth Morphing
+---------------------
+
+ -- Function: morphview keystring starttime endtime
+This function lets you smoothly start and stop morphing. Specify
+starttime and stoptime as nonzero, and morphing will speed up and slow
+down for that number of usecs.
+
+ The keystring is used to select what morphing you want to control.
+It is one of the following:
+*'view*
+ control morphview
+
+*'angle*
+ control morphangle
+
+*'julia*
+ control morphjulia
+
+*'line*
+ control morphline
+
+
+File: xaos.info, Node: morphview, Next: morphjulia, Prev: smoothmorph, Up: animf
+
+A.4.3 Morph view
+----------------
+
+ -- Function: morphview float float float float
+For the time selected by the next `usleep' or other timing function,
+the viewpoint is smoothly morphed from the current one to that selected
+by `morphview'.
+
+ Viewport is selected by the center and two radiuses (real and
+imaginary). See `view' for more information.
+
+ This function can easily be used for creating zooming/unzooming
+animations using position files. This is an example position file
+generated by XaoS:
+
+ (initstate)
+ (defaultpalette 0)
+ (formula 'mandel)
+ (view -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+ 9.69332308834E-08)
+
+ By replacing the `view' command with `morphview' and adding `usleep'
+you can create a zooming animation:
+
+ (initstate)
+ (defaultpalette 0)
+ (formula 'mandel)
+ (morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+ 9.69332308834E-08)
+ (usleep 10000000)
+
+ _Available as_: command
+
+
+File: xaos.info, Node: morphjulia, Next: moveview, Prev: morphview, Up: animf
+
+A.4.4 Morph Julia
+-----------------
+
+ -- Function: morphjulia complex
+For the time selected by the next `usleep' or other timing function,
+the Julia seed is smoothly interpolated from the current one to that
+selected by `morphjulia'. By default this will cause recalculation of
+the whole screen. To avoid this, use fast Julia mode. *Note
+fastjulia::.
+
+ A simple animation morphing Julia seed in the X axis:
+
+ (initstate)
+ (fastjulia #t)
+ (juliaseed -2 0)
+ (morphjulia 2 0)
+ (usleep 2000000)
+
+ _Available as_: command
+
+
+File: xaos.info, Node: moveview, Next: morphangle, Prev: morphjulia, Up: animf
+
+A.4.5 Move view
+---------------
+
+ -- Function: moveview complex
+Smoothly move the image center to another position.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: morphangle, Next: zoom, Prev: moveview, Up: animf
+
+A.4.6 Morph angle
+-----------------
+
+ -- Function: morphangle float
+Smoothly rotate the image to another angle. By default rotation causes
+recalculation of the whole screen. To avoid this you need to enable
+fast rotate mode. *Note rotate::. Don't forget to disable it later,
+since it slows down other animations.
+
+ A simple "rotozooming" animation:
+
+ (initstate)
+ (fastrotate #t)
+ (morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+ 9.69332308834E-08)
+ (morphangle 300)
+ (usleep 10000000)
+ (wait)
+ (fastrotate #f)
+
+ _Available as_: command
+
+
+File: xaos.info, Node: zoom, Prev: morphangle, Up: animf
+
+A.4.7 Zooming functions
+-----------------------
+
+The functions for zooming/unzooming were created mainly for recording
+animations. In manually created animation files, it is easier to use
+`morphview'. *Note morphview::.
+
+ -- Function: zoomcenter complex
+ This function sets the center to zoom in on. The center is given as
+a position in fractal coordinates.
+
+ _Available as_: command
+
+ -- Function: zoom
+ Start zooming to the area specified by `zoomcenter'.
+
+ The speed of zooming should be controlled by the function `speed' or
+in a more exact way by `maxstep' and `speedup'.
+
+ -- Function: unzoom
+
+ Start unzooming from the area specified by `zoomcenter'.
+
+ _Available as_: command
+
+ -- Function: stop
+ Stop zooming or unzooming.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: time, Next: file, Prev: animf, Up: menus
+
+A.5 Timing functions
+====================
+
+Timing functions are used to control the animation replay daemon. It
+can wait for a given time, or wait until calculation is complete. The
+animation functions are controlled by such waiting; animations that are
+running while delays start keep running through the delay.
+
+* Menu:
+
+* usleep:: Usleep
+* textsleep:: Wait for text
+* wait:: Wait for complete image
+
+
+File: xaos.info, Node: usleep, Next: textsleep, Up: time
+
+A.5.1 Usleep
+------------
+
+ -- Function: usleep integer
+
+ This function waits for a given amount of time (in usec) before
+processing the next command. The screen is recalculated and displayed
+at the beginning of usleep if necessary necessary. The remaining time
+is spent in waiting or performing animation.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: textsleep, Next: wait, Prev: usleep, Up: time
+
+A.5.2 Wait for text
+-------------------
+
+ -- Function: textsleep
+
+ This function's behavior is very similar to `usleep', but the time
+is calculated from the number of letters currently displayed onscreen.
+If you want to wait just long enough for the user to read the subtitle,
+use this function. The user can alter the replay speed as desired using
+`letterspersec'. *Note letterspersec::. This value can be changed during
+replay with the arrow keys.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: wait, Prev: textsleep, Up: time
+
+A.5.3 Wait for complete image
+-----------------------------
+
+ -- Function: wait
+
+ Wait until the image is complete. You should always use this
+function after zooming or unzooming when dynamic resolution is in use.
+This ensures that the image calculation will be complete so the user
+can see the result before the animation continues. It may also be
+useful in combination with filters like motion blur. *Note blur::.
+
+ This function deadlocks if used with animation functions; don't do
+that.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: file, Next: edit, Prev: time, Up: menus
+
+A.6 File
+========
+
+* Menu:
+
+* loadpos:: Load
+* savepos:: Save
+* record:: Record
+* play:: Replay
+* saveimg:: Save image
+* loadexample:: Load random example
+* savecfg:: Save configuration
+* quit:: Quit
+
+
+File: xaos.info, Node: loadpos, Next: savepos, Up: file
+
+A.6.1 Load XaoS position file
+-----------------------------
+
+Load a XaoS position file (`*.xpf'). See the format description for
+more information.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: savepos, Next: record, Prev: loadpos, Up: file
+
+A.6.2 Save XaoS position file
+-----------------------------
+
+ -- Function: savepos file
+
+ Save current state to a XaoS position file (`*.xpf'). This file is
+human-readable, and can easily be improved by hand after saving, or
+used as a base for animations. See the format description for more
+information.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: record, Next: play, Prev: savepos, Up: file
+
+A.6.3 Record animation
+----------------------
+
+ -- Function: record bool [ file ]
+
+ e Toggle recording to a XaoS animation file (`*.xaf'). This file is
+human-readable, and can easily be improved by hand after recording.
+See the format description for more information.
+
+ From the scripting language, `(record #t)' enables recording, and
+`(record #f)' disables it.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: play, Next: saveimg, Prev: record, Up: file
+
+A.6.4 Replay animation
+----------------------
+
+Replay a XaoS animation file (`.xaf').
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: saveimg, Next: loadexample, Prev: play, Up: file
+
+A.6.5 Save image
+----------------
+
+ -- Function: saveimg file
+
+ Save current state to an image file. This file is in `.png' (portable
+network graphics) format, which can be read by many applications
+varying from graphics programs all the way to Web browsers.
+
+ This function needs an external library called `libpng'. If the
+library wasn't available during compilation, this function is
+unavailable too. Please see `INSTALL' for more information about
+obtaining libpng and recompiling XaoS.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: loadexample, Next: savecfg, Prev: saveimg, Up: file
+
+A.6.6 Load random example
+-------------------------
+
+ -- Function: loadexample
+
+ Choose random `.xpf' file from the `examples' directory and load it.
+You might use it as the starting point for next exploration.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: savecfg, Next: quit, Prev: loadexample, Up: file
+
+A.6.7 Save configuration
+------------------------
+
+ -- Function: savecfg
+
+ Save current configuration to `~/.xaosrc' (under Unix) or `xaos.cfg'
+(under DOS and Windows). XaoS automatically reloads the configuration
+from this file when it starts.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: quit, Prev: savecfg, Up: file
+
+A.6.8 Quit
+----------
+
+ -- Function: quit
+
+ Quit XaoS.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: edit, Next: fractal, Prev: file, Up: menus
+
+A.7 Edit
+========
+
+A fairly ordinary Edit menu.
+
+* Menu:
+
+* undo:: Undo
+* redo:: Redo
+* copy:: Copy
+* paste:: Paste
+
+
+File: xaos.info, Node: undo, Next: redo, Up: edit
+
+A.7.1 Undo
+----------
+
+Undo last operation. `Last operation' is quite hard to define in XaoS
+(where changes are continuous), so it might be surprising. I hope it
+will do what you want.
+
+ _Available as_: menu item
+
+
+File: xaos.info, Node: redo, Next: copy, Prev: undo, Up: edit
+
+A.7.2 Redo
+----------
+
+Redo last undone operation. See undo. *Note undo::.
+
+ _Available as_: menu item
+
+
+File: xaos.info, Node: copy, Next: paste, Prev: redo, Up: edit
+
+A.7.3 Copy
+----------
+
+Copy fractal to clipboard. This is a platform-dependent operation that
+may not have an analogue on your platform (e.g. there is no concept of
+a clipboard under aalib).
+
+ _Available as_: menu item
+
+
+File: xaos.info, Node: paste, Prev: copy, Up: edit
+
+A.7.4 Paste
+-----------
+
+Paste fractal from clipboard. This is a platform-dependent operation
+that may not have an analogue on your platform (e.g. there is no
+concept of a clipboard under aalib).
+
+ _Available as_: menu item
+
+
+File: xaos.info, Node: fractal, Next: calc, Prev: edit, Up: menus
+
+A.8 Fractal
+===========
+
+This menu contains all functions related to fractal parameters and
+display; you can change things like the formula used, coloring modes,
+seeds and much else.
+
+* Menu:
+
+* formula:: Formula
+* mformula:: formulae
+* incoloring:: Incoloring mode
+* outcoloring:: Outcoloring mode
+* plane:: Plane
+* palettemenu:: Palette
+* uimandelbrot:: Mandelbrot mode
+* uiperturbation:: Perturbation
+* uiview:: View
+* initstate:: Reset to defaults
+* tcolor:: True-color coloring modes
+
+
+File: xaos.info, Node: formula, Next: uimandelbrot, Up: fractal
+
+A.8.1 Formula
+-------------
+
+ -- Function: formula keyword
+
+ Set the current fractal formula. `keyword' should be one of the
+following:
+*'mandel*
+ Standard Mandelbrot set. *Note mandel::.
+
+*'mandel3*
+ Mandelbrot set, power 3. *Note mandel3::.
+
+*'mandel4*
+ Mandelbrot set, power 4.
+
+*'mandel5*
+ Mandelbrot set, power 5.
+
+*'mandel6*
+ Mandelbrot set, power 6.
+
+*'newton*
+ Newton's approximation method. *Note newton::.
+
+*'barnsley*
+ First Barnsley's formula. *Note barnsley::.
+
+*'octo*
+ Fractint's octo. *Note octal::.
+
+*'phoenix*
+ Phoenix. *Note phoenix::.
+
+*'magnet*
+ Magnet. *Note magnet::.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: uimandelbrot, Next: uiperturbation, Prev: formula, Up: fractal
+
+A.8.2 Mandelbrot/Julia mode
+---------------------------
+
+Most fractals rendered by XaoS can be represented as Mandelbrot sets or
+Julias. Each point in the Mandelbrot set has its own Julia set. To
+learn more about this correspondence, see the tutorial on the Julia set.
+
+ This function switches between Mandelbrot and Julia representations.
+When switching to Julia, you need to set the seed--a point selected
+from the Mandelbrot set.
+
+ If you run this function from the menu, you are prompted for the
+Julia seed as a number. Often, this can be clumsy, and it would be
+easier to specify a point with the mouse pointer. If you hit the `M'
+key instead of using the menu, the current mouse position is used.
+
+ Good seedpoints lie at the boundaries of the Mandelbrot set; other
+seeds usually generate quite a boring fractal. You can also explore
+various seeds at high speed using the Fast Julia mode. *Note
+fastjulia::.
+
+ Not all fractals have Julias, but XaoS can generate fake Julia sets
+for those that do not, which use some Julia-like modification of the
+formula; so this function is currently usable for all fractal types.
+
+ _Available as_: menu item
+
+ -- Function: julia bool
+
+ This function is used to enable/disable julia mode in animation
+files.
+
+ _Available as_: command line option, command
+
+ -- Function: juliaseed complex
+
+ Select the current julia seed.
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: uiperturbation, Next: uiview, Prev: uimandelbrot, Up: fractal
+
+A.8.3 Perturbation
+------------------
+
+Perturbation is a simple trick which changes the point at which orbits
+start. Traditionally zero is used, but other values can generate
+interesting results too.
+
+ On enabling this function from the menu, you will be asked for a
+complex number specifying the perturbation. It is a toggle; selecting
+it again resets the perturbation to zero without prompting.
+
+ It can be used to specify a complex number representing a point on
+the screen. If you hit the `B' key instead of using the menu, the
+current mouse position is used. This too is a toggle, so `B' again will
+disable perturbation by setting it to zero.
+
+ This function only has an effect for certain formulae (like the
+Mandelbrot set</a>) and only then in <a uimandelbrot>Mandelbrot mode.
+*Note mandel::.
+
+ _Available as_: menu item
+
+ -- Function: perturbation complex
+
+ This is the scripting-language variation of the perturbation
+function. Instead of toggling, you always specify the perturbation to
+use. Use 0 0 to disable perturbation.
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: bailout, Next: fastjulia, Prev: maxiter, Up: calc
+
+A.8.4 Bailout
+-------------
+
+Bailout is the value which is checked for each point of the orbit if
+the point is far enough from the complex zero point in the current
+iteration. If the point is far enough, then the iteration immediately
+stops and the starting point on the screen will be painted with a given
+colour, depending on the fractal type and many other settings.
+
+ For the Mandelbrot set this value is 4. Other fractal types usually
+have the same bailout value. For most fractals many bailout values give
+more or less similar output. E.g., for the second order Mandelbrot set
+one can prove that the sequence |z| (z:=z^2+c) tends to infinity if and
+only if |z|>2 for some element z of this sequence. In XaoS program,
+Bailout value is the square of this 2, i.e. you can change this to any
+value greater than 2 for similar results.
+
+ Other fractal types may use other bailout values. The default is 4
+for each types.
+
+ _Available as_: menu item, command line option, command
+
+ -- Function: bailout float
+
+
+File: xaos.info, Node: uiview, Next: initstate, Prev: uiperturbation, Up: fractal
+
+A.8.5 View
+----------
+
+Set your current viewpoint in the fractal. This function is useful when
+you have found some interesting coordinates somewhere (on a web page,
+perhaps) and you want to see that position in XaoS.
+
+ In the dialog you will be asked for the _center_, _radius_ and
+_angle_ of the image.
+
+ The center specifies the point which is displayed at the center of
+the screen. The radius is the radius of a circle around this point;
+XaoS will size the image so that this circle only just fits on the
+screen. The angle gives the rotation of the image in degrees.
+
+ People specify fractal coordinates in many ways. Some people use the
+coordinates of the upper-left and lower-right visible points,
+specifying the coordinates as four numbers x1, y1, x2, y2. To set the
+same viewpoint in XaoS, set the real portion of the center to
+(x1+x2)/2, the imaginary part of center to (y1+y2)/2, and the radius to
+the greater of x2-x1 and y2-y1.
+
+ Other programs use a zoom factor instead of a radius. For these, you
+can set the radius to 2/zoom.
+
+ _Available as_: menu item
+
+ -- Function: view float float float float
+
+ This function is used to set the visible area of fractal in
+animation files. It doesn't let let you specify the angle, (for that,
+see the separate function `angle'), but lets you specify an ellipse
+instead of a circle. You can specify both a real and an imaginary
+radius, so you have better control over the area that will be visible.
+XaoS will size the image so that the ellipse only just fits on the
+screen.
+
+ _Available as_: command line option, command
+
+ -- Function: angle float
+
+ Set the rotation angle in degrees. By default this causes
+recalculation of the screen. You can enable the fast rotation mode,
+which lets you rotate the screen without recalculation; but it slows
+down other things, so don't forget to disable it later.
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: initstate, Next: plane, Prev: uiview, Up: fractal
+
+A.8.6 Reset to defaults
+-----------------------
+
+ -- Function: initstate
+
+ This function resets most of XaoS's values to their defaults. It is
+useful when you get lost and want to start from the beginning. It
+should also be used as the first command of every animation file, to
+ensure that the file is always played with the same settings in effect.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: plane, Next: incoloring, Prev: initstate, Up: fractal
+
+A.8.7 Plane
+-----------
+
+ -- Function: plane integer
+
+ All fractals displayed by XaoS are functions with a complex
+parameter. They can be be displayed in the normal complex plane where
+the `x' coordinate is the real part of the number and the `y' is
+imaginary; but they can also be displayed differently:
+*mu*
+ Normal complex plane (default)
+
+*1/mu*
+ Inversion--infinity is at 0 and 0 is at infinity.
+
+*1/(mu+0.25)*
+ Similar to inversion, but moves the center outside the Mandelbrot
+ set, so it looks parabolic.
+
+*lambda plane, 1/lambda, 1/lambda-1*
+ Lambda plane and its inversion, and with a different center.
+
+*1/(mu-1.40115)*
+ A very interesting mode for the Mandelbrot set, this makes small
+ things large, for easier browsing of the set's details.
+ The tutorial about planes has some examples.
+
+ In the scripting language, the planes are numbered as follows:
+
+*0*
+ mu
+
+*1*
+ 1/mu
+
+*2*
+ 1/(mu+0.25)
+
+*3*
+ lambda
+
+*4*
+ 1/lambda
+
+*5*
+ 1/(lambda-1)
+
+*6*
+ 1/(mu-1.40115)
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: incoloring, Next: outcoloring, Prev: plane, Up: fractal
+
+A.8.8 Inside coloring mode
+--------------------------
+
+ -- Function: incoloring integer
+
+ Areas inside the set are usually filled in black, but this is only a
+convention; you could color them in differently to make the fractal
+look more interesting. The only method available to make areas inside
+the set visible is to display the value of the latest orbit as the
+value of each pixel.
+
+ The tutorial on incoloring has more information and examples.
+
+ XaoS has many different ways to show that value. The cryptic names
+of the modes are mathematical formulae, where _real_ means the real
+part of the latest orbit, and _imag_ means the imaginary part. _zmag_
+uses the magnitude of the value. The _Decomposition-like_ method uses
+the angle of the orbit. Also, truecolor incoloring modes are available,
+that display one value in each of the red, blue and green color planes
+(or, for some modes, in each of the hue, saturation and value planes).
+
+ In the scripting language, the incoloring mode is specified by one
+of the following integers:
+
+*0*
+ 0 (default)
+
+*1*
+ zmag
+
+*2*
+ Decomposition-like
+
+*3*
+ real/imag
+
+*4*
+ abs(abs(c)-abs(r))
+
+*5*
+ cos(mag)
+
+*6*
+ mag*cos(real^2)
+
+*7*
+ sin(real^2-imag^2)
+
+*8*
+ atan(real*imag*creal*cimag)
+
+*9*
+ squares
+
+*10*
+ Truecolor. To set exact parameters for truecolor coloring use the
+ `tcolor' command.
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: outcoloring, Next: tcolor, Prev: incoloring, Up: fractal
+
+A.8.9 Outside coloring mode
+---------------------------
+
+ -- Function: outcoloring integer
+
+ Outcoloring modes are similar to incoloring modes, but indicate how
+to display the areas outside the set instead. As with incoloring modes,
+the value of the latest orbit can be used to determine the color of
+each pixel, but the default is to use the number of iterations needed
+for the value at that point to become recognisably divergent as the
+color.
+
+ The tutorial on outcoloring has more information and examples.
+
+ The cryptic names of the modes are mathematical formulae, where
+_iter_ means the number of iterations required for the value to become
+recognisably divergent, _real_ means the real part of the latest orbit,
+and _imag_ means the imaginary part. _binary decomposition_ uses a
+different color when the imaginary part of the orbit is lower than
+zero, and _smooth_ attempts to remove stripes and discontinuities.
+Also, truecolor outcoloring modes are available, that display one value
+in each of the red, blue and green color planes (or, for some modes, in
+each of the hue, saturation and value planes).
+
+ In the scripting language, the outcoloring mode is specified by one
+of the following integers:
+
+*0*
+ iter (default)
+
+*1*
+ iter+real
+
+*2*
+ iter+imag
+
+*3*
+ iter+real/imag
+
+*4*
+ iter+real+imag+real/imag
+
+*5*
+ binary decomposition
+
+*6*
+ biomorphs
+
+*7*
+ potential
+
+*8*
+ color decomposition
+
+*9*
+ smooth
+
+*10*
+ True-color outcoloring mode. To set exact parameters for truecolor
+ coloring use `outtcoloring'. *Note tcolor::.
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: tcolor, Prev: outcoloring, Up: fractal
+
+A.8.10 Truecolor coloring mode
+------------------------------
+
+ -- Function: intcoloring integer
+
+ -- Function: outtcoloring integer
+
+ Truecolor coloring modes are similar to incolor and outcolor
+coloring modes; but instead of using a palette, they directly calculate
+the red, green and blue components of the color. This lets you display
+more parameters at once, and produces interesting and often attractive
+results. On 8bpp displays you need to enable the palette emulator
+filter first to see anything, amd the quality won't be so good, as far
+fewer colors are available per parameter.
+
+ The tutorial on truecolor coloring modes has more information and
+examples.
+
+ The cryptic names of the modes are always three mathematical
+formulae (one for each color component), where _real_ means the real
+part of the latest orbit, and _imag_ means the imaginary part.
+
+ To enable inside/outside truecolor coloring mode in the scripting
+language, set `incoloring'/`outcoloring' value to 10 (truecolor coloring
+mode) before (or after) calling `intcoloring' or `outtcoloring'.
+
+ In the scripting language, the coloring mode is specified by one of
+the following integers:
+
+*0*
+ black
+
+*1*
+ re*im sin(re^2) angle
+
+*2*
+ sin(re) sin(im) sin(square)
+
+*3*
+ hsv
+
+*4*
+ hsv2
+
+*5*
+ cos(re^c) cos(im^2) cos(square)
+
+*6*
+ abs(re^2) abs(im^2) abs(square)
+
+*7*
+ re*im re*re im*im
+
+*8*
+ abs(im*cim) abs(re*cre) abs(re*cim)
+
+*9*
+ abs(re*im-csqr) abs(re^2-csqr) abs(im^2-csqr)
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: calc, Next: mfilter, Prev: fractal, Up: menus
+
+A.9 Calculation
+===============
+
+This menu contains functions that control calculation parameters such as
+the maximum iteration count and periodicity checking.
+
+* Menu:
+
+* range:: Solid guessing
+* dynamic:: Dynamic resolution
+* periodicity:: Periodicity checking
+* maxiter:: Iterations
+* bailout:: Bailout
+* fastjulia:: Fast Julia mode
+* dynamic:: Dynamic resolution
+* rotate:: Rotation
+
+
+File: xaos.info, Node: range, Next: periodicity, Up: calc
+
+A.9.1 Solid guessing range
+--------------------------
+
+ -- Function: range integer
+
+ XaoS has a solid guessing optimization: if all corners of a
+rectangle have the same color, it assumes that the whole rectangle is a
+solid colored block, and doesn't calculate points inside the rectangle.
+This optimization saves lots of calculation, but sometimes introduces
+errors. This value alters the maximum size of the rectangle that can be
+guessed at one time. The default value is 3; use 0 to disable the
+optimization.
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: periodicity, Next: maxiter, Prev: range, Up: calc
+
+A.9.2 Periodicity checking
+--------------------------
+
+ -- Function: periodicity bool
+
+ Periodicity checking is one way to speed up the calculation. Areas
+inside the set always need `maxiter' iterations to determine that the
+point is probably inside the set (while it is rare for areas outside to
+need anywhere near that much). Often the orbital trajectory falls into a
+periodic, repeating cycle; if that can be detected, the calculation can
+be stopped early, as there's no way that the orbit can ever leave the
+cycle again (hence it cannot diverge, hence the point must be inside
+the set).
+
+ Implementating this method efficiently is quite problematic. It
+slows down the cases where cycles are not found, because cycle-checking
+is quite hard work and has to take place for all points, even those
+that don't become cyclic. Because of the inexactness of floating-point
+calculations, the cycles are never exact, so you need to use an error
+value. Higher error values mean that cycles will be detected sooner,
+while lower error values increase the exactness of the calculation.
+Higher values can introduce serious errors, especially at the front of
+the Mandelbrot set. XaoS detects this automatically and corrects for it
+in most cases, but sometimes it might be wrong. Also, other
+optimizations in XaoS (such as boundary tracing) don't give this method
+much of a chance to run, since areas inside the set are usually not
+calculated at all.
+
+ That's why the advantages of this optimization are questionable. You
+should probably experiment with enabling and disabling it. Sometimes
+XaoS is faster with this enabled, sometimes when disabled. Also, this
+method works only when incoloring methods are disabled, and only for
+some fractal types (some fractal types, e.g. newton, don't have any
+concept of an area `inside the set' at all.)
+
+ The tutorial chapter "Escape time fractals" has more information on
+fractal calculation in XaoS, and there is a lengthy section in the
+hacker's manual (`xaosdev.texinfo') devoted to the subject.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: maxiter, Next: bailout, Prev: periodicity, Up: calc
+
+A.9.3 Iterations
+----------------
+
+ -- Function: maxiter integer
+
+ When the fractal set is calculated, a orbital trajectory is examined
+for each point. If the orbit diverges to infinity, the point is outside
+the set. Otherwise, the point is inside the set. For exact
+calculations, you need to know the entire orbital trajectory, which is
+infinitely long for areas inside the set, so fractals cannot be
+calculated exactly. By default, XaoS calculates at most 170 positions
+(iterations) and then gives up; if the point is still inside the
+bail-out value, it guesses that the point is inside the set.
+
+ When zoomed into a detailed area, especially one close to the set
+boundary, this value could become too low, and the fractal will become
+boring. You might try increasing this value if you want to get the
+image interesting again; but this necessarily slows down the
+calculation at the same time.
+
+ The tutorial chapter "Escape time fractals" has more information on
+fractal calculation in XaoS, and there is a lengthy section in the
+hacker's manual (`xaosdev.texinfo') devoted to the subject.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: fastjulia, Next: dynamic, Prev: bailout, Up: calc
+
+A.9.4 Fast Julia mode
+---------------------
+
+ -- Function: fastjulia bool
+
+ By default, changing the seed for the Julia set requires
+recalculation of the image (which is quite slow). It's a nice effect to
+change the seed smoothly and show the Julia set morphing as the seed
+changes. XaoS has a special algorithm which can calculate such
+morphings in realtime. It is very inexact, but it is good enough for a
+fast preview.
+
+ If you want to select a good seedpoint, enable fast Julia mode and
+find a nice place by dragging with the first mouse button depressed;
+then change to the Julia mode to see the exact image.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: dynamic, Next: rotate, Prev: fastjulia, Up: calc
+
+A.10 Dynamic resolution
+=======================
+
+ -- Function: fastmode keyword
+
+ XaoS performs many optimizations, but fairly often this is not
+enough. In order to keep a high framerate, XaoS automatically lowers
+the resolution of the image, increasing it when there is time for more
+calculation. This feature is enabled by default when animating, but you
+might also like to enable it for new images (which makes the image
+`come into focus' when it is recalculated from scratch for whatever
+reason), or disable it completely if you don't like it.
+
+ In the scripting languge, the keyword should be one of the following:
+*`'never'*
+ Disable dynamic resolution
+
+*`'animate'*
+ Use only for animations (default)
+
+*`'new'*
+ Use also for new images
+
+
+File: xaos.info, Node: rotate, Prev: dynamic, Up: calc
+
+A.11 Image rotation
+===================
+
+XaoS has support for rotation of the image to any angle. By default,
+changing the angle requires recalculation of the whole screen, but when
+_fast rotation mode_ is enabled, the angle can be changed smoothly. In
+this mode XaoS calculates a larger non-rotated image and rotates it when
+needed, so it increases memory requirements and slows XaoS down; hence,
+it should be disabled when rotation is not being used.
+
+ The user interface provides two rotation modes--_rotate by mouse_
+which allows the angle to be changed by dragging with the first mouse
+button depressed, and _continuous rotation mode_, where the image is
+rotated clockwise continuously, and the arrow keys can be used to change
+the rotiation speed.
+
+ -- Function: fastrotate bool
+
+ This function is used to enable and disable fast rotation mode.
+_Available as_: command line option, command
+
+A.11.1 Automatic rotation
+-------------------------
+
+ -- Function: autorotate bool
+
+ Use this function to enable continuous rotation. In the scripting
+language you can also use `morphangle' to get an outwardly similar but
+more controllable effect.
+
+ -- Function: rotationspeed float
+
+ Specify the speed of continuous rotation, in degrees per second.
+Negative values are allowed and rotate anticlockwise.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: mfilter, Next: ui, Prev: calc, Up: menus
+
+A.12 Filters
+============
+
+Filters are a post-calculation effect applied to the resulting image.
+They can do things like motion blurring, edge detection, emulation of
+palettes or truecolor on displays that can't handle them, and such
+things. There is a tutorial chapter about them.
+
+* Menu:
+
+* filter:: Filter command
+* edge:: Edge detection
+* edge2:: Edge detection2
+* starfield:: Starfield
+* stereogram:: Random dot stereogram
+* interlace:: Interlace filter
+* blur:: Motion blur
+* emboss:: Emboss
+* palettef:: Palette emulator
+* anti:: Antialiasing
+* truecolor:: Truecolor emulator
+
+
+File: xaos.info, Node: filter, Next: edge, Up: mfilter
+
+A.12.1 Filter command
+---------------------
+
+ -- Function: filter keyword bool
+
+ This command is used to enable or disable filters. *Note mfilter::.
+The _keyword_ specifies the filter to change, and should be one of the
+following:
+
+*`'edge'*
+ Edge detection
+
+*`'edge2'*
+ Edge detection2
+
+*`'starfield'*
+ Starfield
+
+*`'stereogram'*
+ Random dot stereogram
+
+*`'interlace'*
+ Interlace filter
+
+*`'blur'*
+ Motion blur
+
+*`'emboss'*
+ Emboss
+
+*`'palette'*
+ Palette emulator
+
+*`'anti'*
+ Antialiasing
+
+*`'truecolor'*
+ Truecolor
+
+ _Available as_: command
+
+
+File: xaos.info, Node: edge, Next: edge2, Prev: filter, Up: mfilter
+
+A.12.2 Edge detection
+---------------------
+
+This filter is a standard edge detection algorithm; solid areas are
+filled in black. Some fractals look very interesting with this filter
+(and some areas of some fractals just look like noise). This version of
+the filter produces relatively wide lines, so is useful at higher
+resolutions. The filter edge detection2 makes thinner lines, for the
+low resolution modes.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: edge2, Next: starfield, Prev: edge, Up: mfilter
+
+A.12.3 Edge detection2
+----------------------
+
+This filter is a standard edge detection algorithm; solid areas are
+filled in black. Some fractals look very interesting with this filter
+(and some areas of some fractals just look like noise). This version of
+the filter produces relatively tight lines, so is useful at lower
+resolutions. The filter edge detection makes thinner lines, for the
+high resolution modes.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: starfield, Next: stereogram, Prev: edge2, Up: mfilter
+
+A.12.4 Starfield
+----------------
+
+The starfield filter generates random stars whose density depends on the
+iteration count. Choose your favorite spiral fractal and enable this
+filter to get a Grand Design spiral galaxy :)
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: stereogram, Next: interlace, Prev: starfield, Up: mfilter
+
+A.12.5 Random dot stereogram
+----------------------------
+
+Fractal images are good as a base for random dot stereograms. In case
+you don't know what these are, please point your browser to Google or
+another search engine and find some articles about such images, because
+learning to read such images takes some effort. They make it possible
+to generate three dimensional images on a normal monitor without any
+additional hardware, by exploiting bugs in the human brain (although
+you need two working eyes, and some people never learn to see them;
+they can simply ignore this feature).
+
+ XaoS is able to generate these images in animations, so you may use
+all normal XaoS functions (except palette changing and palette rotation,
+which makes no sense applied to a stereogram). To make the animation yet
+more exciting, XaoS emulates "falling" into the set; while you zoom in,
+your distance from the set drops and drops--but you never hit it; when
+the set reaches the level of your monitor, the distance is changed
+again so you are far away.
+
+ To make this work right, XaoS needs to know the _exact size of your
+monitor_. Because most platforms have no way to determine this, you
+need to use _command line options_ to tune it. If it's not set or is
+wrong, the stereograms will probably be impossible to see (if your
+monitor is too big or resolution too low), or the images will seem to
+be shallow (if your monitor is too small or resolution too high).
+
+ By default XaoS expects my 15" monitor (29.0cm x 21.5 cm). Another
+cause of problems is the virtual screen supported by some windowed
+environments (like some X servers) that makes a program think that the
+resolution is higher than it actually is, and you see only part of this
+extra-large screen.
+
+ The worst thing you could possibly do is to run full-screen XaoS in
+some graphical windowing system (OS/2 on top of Windows or Wine on top
+of Linux, perhaps) where XaoS can't tell the real size of its window at
+all. In such cases, it's normally better (not to mention faster) to run
+XaoS natively, rather than under such an emulation layer.
+
+ The following command line options are provided to specify sizes:
+
+*`-screenwidth', `-screenheight'*
+ Lets you specify the size of your screen in centimeters. Note that
+ you need to specify the size of the visible image on the monitor,
+ not the size with edge borders, or the size of the tube. The
+ simplistic `my monitor is 17", just turn 17" into centimeters'
+ doesn't work; that 17" is a marketing figure and has only a vague
+ connection to reality. Get out a ruler and measure it.
+
+*`-pixelwidth', `-pixelheight'*
+ Lets you specify the exact size of a single pixel, if XaoS cannot
+ determine this for itself from your screen size.
+
+ These options are used by some other parts of XaoS as well, so you
+should use them even when you don't want to see stereograms. You should
+probably write a small starting script (or alias, or shortcut; whatever
+your environment uses) that passes the correct parameters to XaoS.
+
+ If the window is _smaller than 8cm in any direction_, you will
+probably be unable to see anything; make the window bigger.
+
+ The correct way to see XaoS stereograms is:
+*1*
+ Start XaoS with options specifying the exact size of your screen
+ or one pixel on it
+
+*2*
+ Sit 60cm away from monitor
+
+*3*
+ If you use a windowed environment, resize XaoS's window to make it
+ wider than, say, 15 cm.
+
+*4*
+ Enable the filter (by pressing `E')
+
+*5*
+ focus on a point far away from the monitor (try to use your own
+ reflection, if your monitor's not antireflective); the random
+ blurring should eventually fall into the pattern of a Mandelbrot
+ set.
+
+*6*
+ Carefully use your mouse to zoom into interesting areas (it is
+ easy to lose concentration when you are not trained; but you can
+ use the autopilot...)
+
+*7*
+ Enjoy animation :)
+
+ If you still can't see the stereograms, it could be that the
+fractal, or your eye, is deformed. A deformed fractal can be caused by
+your specifying your monitor size wrongly. Visual problems that damage
+depth perception, as well as problems like astigmatism, can make it
+impossible to see stereograms at all.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: interlace, Next: blur, Prev: stereogram, Up: mfilter
+
+A.12.6 Interlace filter
+-----------------------
+
+The interlace filter halves the horizontal resolution, and in each
+frame alternates between drawing only the even and only the odd lines.
+This speeds up the calculation, and in higher resolutions produces a
+motion-blur-like effect.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: blur, Next: emboss, Prev: interlace, Up: mfilter
+
+A.12.7 Motion blur
+------------------
+
+Motion blur mixes the current frame with previous ones to produce a
+motion-blur effect. It might be rather slow in 16bpp truecolor modes.
+The best results can probably be seen in 8bpp modes, so you might want
+to enable the palette filter first.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: emboss, Next: palettef, Prev: blur, Up: mfilter
+
+A.12.8 Emboss
+-------------
+
+This is a standard emboss filter, as seen in programs such as the GIMP
+or Photoshop. It produces especially nice results with the smooth
+outcoloring mode. *Note outcoloring::.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: palettef, Next: anti, Prev: emboss, Up: mfilter
+
+A.12.9 Palette emulator
+-----------------------
+
+XaoS can work in either palette or truecolor mode. Both modes have
+advantages and disadvantages. Palette mode allows effects such as
+palette rotation, while truecolor mode allows smoother incoloring and
+outcoloring modes and the truecolor coloring modes. If your display is
+truecolor, you can enable this filter to get palette emulation (albeit
+not as cheaply as in a real paletted mode).
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: anti, Next: truecolor, Prev: palettef, Up: mfilter
+
+A.12.10 Antialiasing
+--------------------
+
+Antialiasing is a technique to increase image quality by eliminating
+jagged edges. XaoS calculates four values for each pixel (on the
+subpixel boundaries) and uses the average of them for the pixel value.
+
+ This filter slows XaoS down a _lot_ and greatly increases memory
+requirements. It is useful mainly when you want to save images and want
+to make them look as nice as possible. Antialiasing also helps a lot
+when you want to encode JPEG or MPEG files; they are much shorter if
+antialiased (MPEG and JPEG hate jagged edges).
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: truecolor, Prev: anti, Up: mfilter
+
+A.12.11 Truecolor emulator
+--------------------------
+
+XaoS can work in either palette or truecolor mode. Both modes have
+advantages and disadvantages. Palette mode allows effects such as
+palette rotation, while truecolor mode allows smoother incoloring and
+outcoloring modes and the truecolor coloring modes. If your display is
+8bpp, you can enable this filter to get truecolor emulation (but,
+obviously, not with as many colors as a real truecolor display).
+
+ More information about filters
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: ui, Next: misc, Prev: mfilter, Up: menus
+
+A.13 UI
+=======
+
+This menu contains functions to control the user interface layer of
+XaoS: zooming speed, the autopilot, realtime status information, and so
+on.
+
+* Menu:
+
+* speed:: Zooming speed
+* letterspersec:: Letters per second
+* autopilot:: Autopilot
+* recalculate:: Recalculate
+* interrupt:: Interrupt
+* nogui:: Disable XaoS's builtin GUI
+* status:: Status
+* ministatus:: Ministatus
+
+
+File: xaos.info, Node: speed, Next: letterspersec, Up: ui
+
+A.13.1 Zooming speed
+--------------------
+
+ -- Function: speed float
+
+ Change zooming speed, where 1 is the default, 2 means twice as fast,
+and so on.
+
+ _Available as_: menu item, command line option, command
+
+ In the scripting language you can use the following functions for
+better control:
+
+ -- Function: maxstep float
+
+ Selects the zooming/unzooming speed. The parameter specifies how
+much of the range will be removed each twentieth of a second; 0 means
+nothing, 1 means everything (the parameter obviously has to be less
+than 1). Higher values mean faster zooming.
+
+ _Available as_: command
+
+ -- Function: speedup float
+ When zooming/unzooming, every twentieth of a second the `speedup'
+value is added to the current step until `maxstep' is reached. So this
+value selects the rate at which zooming stops and starts. Both these
+functions are more for internal use of XaoS then for manually written
+scripts, but they could come in useful nonetheless.
+
+ _Available as_: command
+
+
+File: xaos.info, Node: letterspersec, Next: autopilot, Prev: speed, Up: ui
+
+A.13.2 Letters per second
+-------------------------
+
+ -- Function: letterspersec integer
+
+ Speed of subtitles for the `textsleep' function. The user can set
+this value to suit; it can also be changed with the left and right
+arrow keys during animation replay.
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: autopilot, Next: recalculate, Prev: letterspersec, Up: ui
+
+A.13.3 Autopilot
+----------------
+
+ -- Function: autopilot bool
+
+ To make XaoS yet more impressive, we made a special autopilot mode
+that automatically drives into interesting boundaries of the set; you
+should press `A', play your favorite music, drink coffee and relax. I
+never tried this but it should be really relaxing! Many pictures in the
+XaoS gallery were discovered using the autopilot.
+
+ The autopilot also has some additional features. It backtracks if the
+zoomed picture is not interesting anymore, and can detect when it's
+zoomed into really a boring part of the fractal or reached the limit of
+floating point arithmetic on the platform, and restart zooming from the
+top.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: recalculate, Next: interrupt, Prev: autopilot, Up: ui
+
+A.13.4 Recalculate
+------------------
+
+ -- Function: recalculate
+
+ Recalculate current fractal. This should be used when the fractal on
+the screen is strange because of error propagation caused by solid
+guessing. *Note range::.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: interrupt, Next: nogui, Prev: recalculate, Up: ui
+
+A.13.5 Interrupt
+----------------
+
+ -- Function: interrupt
+
+ Interrupt current calculation.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: nogui, Next: status, Prev: interrupt, Up: ui
+
+A.13.6 Disable XaoS's builtin GUI
+---------------------------------
+
+ -- Function: nogui bool
+
+ Disable XaoS menus and dialogs. This function should be used by
+external GUI programs; these manipulate XaoS via a pipe, so the
+internal GUI should be disabled at the same time. See the hacker's
+manual (`xaosdev.texinfo') for more details.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: status, Next: ministatus, Prev: nogui, Up: ui
+
+A.13.7 Status
+-------------
+
+ -- Function: status bool
+
+ Enable/disable status information. This displays some useful
+information about the current fractal, such as viewpoint etc. (In
+low-resolution modes it also almost completely obscures the current
+fractal...)
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: ministatus, Prev: status, Up: ui
+
+A.13.8 Ministatus
+-----------------
+
+ -- Function: ministatus bool
+
+ Enable/disable status line. This contains basic information such as
+how much you are zoomed and the framerate.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: misc, Next: helpmenu, Prev: ui, Up: menus
+
+A.14 Misc
+=========
+
+Miscellaneous functions.
+
+* Menu:
+
+* command:: Command
+* renderanim:: Render animation
+* clearscreen:: Clear screen
+* display:: Display fractal
+* text:: Display text
+* color:: Color
+* xtextpos:: Horizontal text position
+* ytextpos:: Vertical text position
+* textposition:: Text position
+* message:: Message
+
+
+File: xaos.info, Node: command, Next: renderanim, Up: misc
+
+A.14.1 Command
+--------------
+
+You can invoke all XaoS functions using a simple command language
+reminiscent of Scheme. This option lets you run a single command. If
+you want to run more than one, you might want to use an XaoS animation
+file instead; they are written in the same language.
+
+ _Available as_: menu item
+
+
+File: xaos.info, Node: renderanim, Next: clearscreen, Prev: command, Up: misc
+
+A.14.2 Render animation
+-----------------------
+
+Render an animation to image files. See How to encode MPEG files for
+more information.
+
+ _Available as_: menu item,
+
+
+File: xaos.info, Node: clearscreen, Next: display, Prev: renderanim, Up: misc
+
+A.14.3 Clear screen
+-------------------
+
+ -- Function: clearscreen
+
+ Clear the screen. To display the fractal again, use `display'. *Note
+display::. This function is mainly useful in tutorials and similar
+animations.
+
+ _Available as_: menu item, command
+
+
+File: xaos.info, Node: display, Next: text, Prev: clearscreen, Up: misc
+
+A.14.4 Display fractal
+----------------------
+
+ -- Function: display
+
+ Display fractal. This functions reverses the effect of the
+`clearscreen', line drawing and text output functions.
+
+ _Available as_: menu item, command
+
+
+File: xaos.info, Node: text, Next: color, Prev: display, Up: misc
+
+A.14.5 Display text
+-------------------
+
+ -- Function: text string
+
+ Display the given text on the screen. This function is mainly useful
+in tutorials. Text should be cleared by printing lots of spaces, or
+using the `clearscreen'</a> or <a display>`display' functions. You
+might also want to use the `textposition' function to select the part
+of the screen to display the text on.
+
+ To wait for the user to read the text, you can use the `textsleep'
+function.
+
+ Example:
+
+ (clearscreen)
+ (textposition 'center 'middle)
+ (text "Welcome into my animation")
+ (textsleep)
+ (display)
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: color, Next: textposition, Prev: text, Up: misc
+
+A.14.6 Color
+------------
+
+ -- Function: color keyword
+
+ Change text and line color. _keyword_ should be one of `'white',
+`'black' and `'red'.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: textposition, Next: message, Prev: color, Up: misc
+
+A.14.7 Text position
+--------------------
+
+ -- Function: textposition keyword keyword
+
+ Select text position. The first keyword specifies the horizontal
+position, the second the vertical position. The horizontal position
+should be one of `'left', `'center', and `'right'. The vertical should
+be one of `'top', `'middle', and `'bottom'.
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: message, Prev: textposition, Up: misc
+
+A.14.8 Message
+--------------
+
+ -- Function: message string
+
+ This function is almost identical to the `text' function, except
+that it uses message catalogs in the `catalog' directory to translate
+messages into other languages. It should be used only in the
+multi-lingual XaoS tutorials.
+
+ _Available as_: command line option, command
+
+
+File: xaos.info, Node: helpmenu, Next: xtextpos, Prev: misc, Up: menus
+
+A.15 Help
+=========
+
+This menu contains help and tutorials.
+
+
+File: xaos.info, Node: xtextpos, Next: ytextpos, Prev: helpmenu, Up: menus
+
+A.16 Horizontal text position
+=============================
+
+Select the horizontal position used to display text. *Note text::. It
+can be placed at the left, in the center or at the right.
+
+
+File: xaos.info, Node: ytextpos, Next: mformula, Prev: xtextpos, Up: menus
+
+A.17 Vertical text position
+===========================
+
+Select the vertical position used to display text. *Note text::. It can
+be placed at the top, in the middle or at the bottom of the screen.
+
+
+File: xaos.info, Node: mformula, Next: palettemenu, Prev: ytextpos, Up: menus
+
+A.18 formulae
+=============
+
+Each escape time fractal has its own formula. XaoS supports the
+following formulae:
+
+* Menu:
+
+* mandel:: Mandelbrot
+* mandel3:: Mandelbrot^3
+* octal:: Octal
+* newton:: Newton
+* barnsley:: Barnsley1
+* phoenix:: Phoenix
+* magnet:: Magnet
+
+
+File: xaos.info, Node: mandel, Next: mandel3, Up: mformula
+
+A.18.1 Mandelbrot
+-----------------
+
+The Mandelbrot set is the most famous escape time fractal ever. It has
+the simple formula z=z^2+c. See the tutorial chapter.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: mandel3, Next: octal, Prev: mandel, Up: mformula
+
+A.18.2 Mandelbrot^3--Mandelbrot^6 and Mandelbrot^9
+--------------------------------------------------
+
+The Mandelbrot^3 fractal is a simple modification of the standard
+Mandelbrot set formula, using z=z^3+c instead of z=z^2+c.
+
+ Other derivations of the Mandelbrot set (Mandelbrot^4 and so on) use
+even higher powers. See the tutorial chapter.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: octal, Next: newton, Prev: mandel3, Up: mformula
+
+A.18.3 Octal
+------------
+
+This is a less well-known fractal that Thomas discovered in Fractint.
+It has an interesting shape when displayed in the alternative planes.
+*Note plane::. See the tutorial chapter.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: newton, Next: barnsley, Prev: octal, Up: mformula
+
+A.18.4 Newton
+-------------
+
+This is Newton's approximation method for finding the roots of a
+polynomial. It uses the polynomial x^3=1 and counts the number of
+iterations needed to reach the approximate value of the root. See the
+tutorial chapter.
+
+ This fractal doesn't have Julia sets, but XaoS is able to generate
+Julia-like sets which are also very interesting (they are sometimes
+called "Nova formulae").
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: barnsley, Next: phoenix, Prev: newton, Up: mformula
+
+A.18.5 Barnsley1
+----------------
+
+This is a formula by Michael Barnsley. It produces very nice
+crystalline Julia sets. See the tutorial chapter.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: phoenix, Next: magnet, Prev: barnsley, Up: mformula
+
+A.18.6 Phoenix
+--------------
+
+This formula produces very nice Julia sets. See the tutorial chapter.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: magnet, Prev: phoenix, Up: mformula
+
+A.18.7 Magnet
+-------------
+
+This is a formula that comes from theoretical physics. It is derived
+from the study of theoretical lattices in the context of magnetic
+renormalization transformations. See the tutorial chapter.
+
+ _Available as_: menu item, command line option
+
+
+File: xaos.info, Node: palettemenu, Prev: mformula, Up: menus
+
+A.19 Palette
+============
+
+This menu contains functions to change the palette the fractal is
+displayed with.
+
+* Menu:
+
+* defpalette:: Default palette
+* randompalette:: Random palette
+* palette:: Custom palette
+* cycling:: Color cycling
+* shiftpalette:: Shift palette
+
+
+File: xaos.info, Node: defpalette, Next: randompalette, Up: palettemenu
+
+A.19.1 Default palette
+----------------------
+
+ -- Function: defaultpalette number
+
+ Create a default palette. In the scripting language, `number'
+specifies how much the palette is shifted by.
+
+ Note that changing the palette in truecolor modes forces
+recalculation of the whole screen. To avoid this, you can enable the
+palette emulation filter first.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: randompalette, Next: palette, Prev: defpalette, Up: palettemenu
+
+A.19.2 Random palette
+---------------------
+
+ -- Function: randompalette
+
+ Create a random palette. XaoS will automatically pick one of its
+palette-generation algorithms and create one.
+
+ Note that changing the palette in truecolor modes forces
+recalculation of the whole screen. To avoid this, you can enable the
+palette emulation filter first.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: palette, Next: cycling, Prev: randompalette, Up: palettemenu
+
+A.19.3 Custom palette
+---------------------
+
+ -- Function: palette integer integer integer
+
+ A custom palette lets you re-create some of the random palettes. The
+first value specifies the algorithm, which should currently be one of
+the following:
+*0*
+ Default palette
+
+*1*
+ Black to color gradient
+
+*2*
+ Black to color to white gradient
+
+*3*
+ Cubistic-like algorithm.
+ The seed specifies a random seed for the palette; different seeds
+generate different palettes. The last value is the amount by which the
+palette is shifted.
+
+ Note that changing the palette in the truecolor modes forces
+recalculation of the whole screen. To avoid this, you can enable the
+palette emulation filter first.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: cycling, Next: shiftpalette, Prev: palette, Up: palettemenu
+
+A.19.4 Color cycling
+--------------------
+
+ -- Function: cycling bool
+
+ Color cycling is an old and simple effect to animate fractals. The
+Mandelbrot set looks particularly nice when color-cycled. On truecolor
+displays, color cycling fails to initialize (since those displays don't
+have a palette). You can enable palette emulation filter to make it
+possible.
+
+ _Available as_: menu item, command line option, command
+
+ In the user interface, colors can also be cycled in the opposite
+direction with the "_Reversed color cycling_" function.
+
+ To control the cycling speed, you coan use arrow keys or the "_Color
+cycling speed_" function.
+
+ _Available as_: menu item
+
+ -- Function: cyclingspeed integer
+
+ The parameter specifies the number of skips per second. It can be
+negative to cycle in the opposite direction.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: shiftpalette, Prev: cycling, Up: palettemenu
+
+A.19.5 Shift palette
+--------------------
+
+ -- Function: shiftpalette integer
+
+ Shift palette by the specified number of cells. This can be used to
+tune the palette's position on the fractal. You can also use the _Shift
+one forward_ and _Shift one backward_ functions for fine-tuning. Note
+that shifted and rotated palettes could look different on different
+displays (because they may have different palette sizes).
+
+ Shifting the palette on truecolor displays causes a recalculation of
+the screen. To avoid this, you could use palette emulation filter.
+*Note palettef::.
+
+ _Available as_: menu item, command line option, command
+
+
+File: xaos.info, Node: about, Next: support, Prev: menus, Up: Top
+
+Függelék: B About XaoS
+************************
+
+Függelék: C Credits
+*********************
+
+(alphabetically)
+*Lucio Henrique de Araujo (lucio.matema@gmail.com)*
+ Brazilian/Portuguese translation
+
+*Samuel Bizien (samuel@bizien.info)*
+ Beryl fractal
+
+*Eric Courteau (ecourteau@cplus.fr)*
+ francais.cat (translation of tutorials)
+
+*Jean-Pierre Demailly (Jean-Pierre.Demailly@ujf-grenoble.fr)*
+ Updates for French translation
+
+*Radek Doulik (rodo@atrey.karlin.mff.cuni.cz)*
+ TK interface, windowid patches
+
+*Martin Dozsa (madsoft@centrum.cz)*
+ cs.po (Czech translation of menus)
+
+*Arpad Fekete (Fekete.Arpad.2@stud.u-szeged.hu)*
+ Some new fractals, and the 'More formulae' menu
+
+*Zelia Maria Horta Garcia (zeliagarcia@seed.pr.gov.br)*
+ Brazilian/Portuguese translation
+
+*Tim Goodwin (tgoodwin@cygnus.co.uk)*
+ english.cat corrections
+
+*Ben Hines*
+ autoconf suggestions, Mac OS X port
+
+*Jan Hubicka (jh@ucw.cz)*
+ Zooming routines, ugly interface, palettes, drivers, autopilot,
+ filters, documentation, tutorials etc.
+
+*Jens Kilian (jjk@acm.org)*
+ BeOS driver, deutsch.cat
+
+*Thomas A. K. Kjaer (takjaer@imv.aau.dk)*
+ OS/2 ports (320x200 graphics and AA-lib)
+
+*Zoltan Kovacs (kovzol@math.u-szeged.hu)*
+ Internationalization, Hungarian translations, finalizing version
+ 3.1, bug fixes, web design, current maintainer
+
+*Zsigmond Kovacs (kovzsi@gmail.com)*
+ Fractal examples
+
+*J.B. Langston III (jb-langston@austin.rr.com)*
+ Native Mac OS X port (from version 3.2.2); web redesign;
+ co-maintainer
+
+*Andreas Madritsch (amadritsch@datacomm.ch)*
+ New fractal types, bailout, many fixes
+
+*Mateusz Malczak (xaos@malczak.info)*
+ User formula evaluation library
+
+*Giorgio Marazzi (gmarazzi@vtr.net)*
+ Improvements and fixes for espanhol.cat
+
+*Thomas Marsh (thomas.marsh2@gmail.com)*
+ First zoomer, formulae, planes, X11 driver, inversions, many ideas
+
+*Dominic Mazzoni (dmazzoni@cs.cmu.edu)*
+ Macintosh port (version 2.0)
+
+*David Meleedy*
+ Grammatical and spelling fixed version of `xaos.6'
+
+*Paul Nasca (zynaddsubfx@yahoo.com)*
+ Ministatus improvement
+
+*Nix (nix@esperi.demon.co.uk)*
+ Grammatical and spelling fixed version of `xaos.hlp' and other
+ files
+
+*Terje Pedersen (terjepe@login.eunet.no)*
+ Amiga port
+
+*Cesar Perez (oroz@users.sourceforge.net)*
+ Spanish translations
+
+*Fabrice Premel (premelfa@etu.utc.fr)*
+ Periodicity checking
+
+*Jan Olderdissen (jan@olderdissen.com)*
+ Win32 port
+
+*Ilinca Sitaru (ilinca.sitaru@gmail.com)*
+ Romanian translation
+
+*Daniel Skarda*
+ Fractal examples
+
+*Andrew Stone (Stone Design - www.stone.com)*
+ Videator Support, Cocoa improvements, performance mode, bug fixes
+
+*Marton Torok (marton.torok@gmail.com)*
+ Small fixes for pipes
+
+*Pavel Tzekov (paveltz@csoft.bg)*
+ Win32 support
+
+*Charles Vidal*
+ Tcl/Tk interface
+
+*Tapio K. Vocaldo (taps@rmx.com)*
+ Macintosh port
+
+*Tormod Volden*
+ Fixes for X11 driver to improve compatability with Xorg,
+ XScreenSaver, Beryl and Compiz
+
+*Philippe Wautelet (p.wautelet@fractalzone.be)*
+ Bug fixes for version 3.1.1, French translation, gcc 4.0 fixes
+
+*Sergio Zanchetta*
+ Italian translation
+
+C.0.1 Included Software
+-----------------------
+
+XaoS uses the following libraries. These libraries may be included with
+some binary distributions of XaoS.
+
+ _gettext 0.17_ Website: `http://www.gnu.org/software/gettext/'
+Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later
+(http://gnu.org/licenses/gpl.html) This is free software: you are free
+to change and redistribute it. There is NO WARRANTY, to the extent
+permitted by law.
+
+ _GNU Scientific Library 1.11_ Website:
+`http://www.gnu.org/software/gsl/' Copyright (C) 1996, 1997, 1998,
+1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 The GSL Team.
+License GPLv3+: GNU GPL version 3 or later
+(http://gnu.org/licenses/gpl.html) This is free software: you are free
+to change and redistribute it. There is NO WARRANTY, to the extent
+permitted by law.
+
+ _libpng 1.2.25_ Website: `http://www.libpng.org/pub/png/libpng.html'
+Copyright (c) 1998-2008 Glenn Randers-Pehrson Copyright (c) 1996-1997
+Andreas Dilger Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+
+File: xaos.info, Node: support, Next: index, Prev: about, Up: Top
+
+Függelék: D Getting Support
+*****************************
+
+XaoS is a community-supported free software project. There are many ways
+to get help, all of which are explained below.
+
+Függelék: E Home Page
+***********************
+
+The XaoS homepage is `http://xaos.sf.net'. Check here for the latest
+news and information about XaoS and to download the latest versions.
+
+E.0.1 Discussion Forums
+-----------------------
+
+XaoS has two discussion forums hosted on SourceForge. You can read them
+freely, but in order to post, you must to register for a free
+SourceForge account.
+
+*Help*
+ Provides a place for you to ask for help using XaoS. Other XaoS
+ users and/or the XaoS developers will answer your questions.
+
+ `http://sourceforge.net/forum/forum.php?forum_id=17768'
+
+*Open Discussion*
+ Provides a place to discuss anything related to XaoS or fractals.
+ You can share tips, your own fractal creations, or any other
+ fractal-related ideas with other XaoS users.
+
+ `http://sourceforge.net/forum/forum.php?forum_id=17767'
+
+ We welcome you to join these forums and become involved in the XaoS
+community.
+
+E.0.2 Mailing Lists
+-------------------
+
+XaoS currently has three mailing lists hosted on SourceForge.
+Unfortunately, there is currently very little traffic on any of them.
+Hopefully in the future, we can get more XaoS users and developers
+involved in the mailing lists. The lists are as follows:
+
+*xaos-announce@lists.sourceforge.net*
+ Low volume list that is used only to announce new releases.
+
+ Subscribe:
+ `http://lists.sourceforge.net/mailman/listinfo/xaos-announce'
+ Archive:
+ `http://sourceforge.net/mailarchive/forum.php?forum_name=xaos-announce'
+
+*xaos-devel@lists.sourceforge.net*
+ Developer mailing list, where the developers coordinate and
+ discuss XaoS development.
+
+ Subscribe:
+ `http://lists.sourceforge.net/mailman/listinfo/xaos-devel'
+ Archive:
+ `http://sourceforge.net/mailarchive/forum.php?forum_name=xaos-devel'
+
+*xaos-discuss@lists.sourceforge.net*
+ General discussion list is for XaoS users to share tips and ideas
+ about XaoS.
+
+ Subscribe:
+ `http://lists.sourceforge.net/mailman/listinfo/xaos-discuss'
+ Archive:
+ `http://sourceforge.net/mailarchive/forum.php?forum_name=xaos-discuss'
+
+ Please feel free to join any or all of these mailing lists and share
+your ideas with the developers and other XaoS users.
+
+E.0.3 Bug Reports
+-----------------
+
+If you think you have found a bug in XaoS, please report it. The
+developers will do their best to resolve the bug in a timely manner.
+
+ Bug Tracker:
+`http://sourceforge.net/tracker/?atid=105771&group_id=5771'
+
+ Please don't submit duplicate bugs. Browse the existing ones first
+to make sure nobody has already reported it. You may add additional
+information about a bug by entering a comment on an existing bug.
+
+ If you are not sure if something is a bug, please open a support
+request. The developers will try to answer your question and can
+convert your support request to a bug if necessary.
+
+ Support Requests:
+`http://sourceforge.net/tracker/?atid=205771&group_id=5771'
+
+E.0.4 Feature Requests
+----------------------
+
+If you have an idea for a great new feature you'd like to see added to
+XaoS, please let us know about it. You can submit a feature request
+via SourceForge, and the XaoS developers will do their best to
+implement your request in a future version.
+
+ Feature Requests:
+`http://sourceforge.net/tracker/?atid=355771&group_id=5771'
+
+ Please don't submit duplicate feature requests. Browse the existing
+ones first to make sure nobody has already requested the feature your
+want. You may add your vote for a feature by adding a comment to the
+existing request.
+
+
+File: xaos.info, Node: index, Prev: support, Up: Top
+
+Index of functions
+******************
+
+
+* Menu:
+
+* angle: uiview. (line 43)
+* animateview: animateview. (line 7)
+* autopilot: autopilot. (line 7)
+* autorotate: rotate. (line 28)
+* bailout: bailout. (line 26)
+* clearline: linemenu. (line 73)
+* clearlines: linemenu. (line 79)
+* clearscreen: clearscreen. (line 7)
+* color: color. (line 7)
+* cycling: cycling. (line 7)
+* cyclingspeed: cycling. (line 25)
+* defaultpalette: defpalette. (line 7)
+* display: display. (line 7)
+* fastjulia: fastjulia. (line 7)
+* fastmode: dynamic. (line 7)
+* fastrotate: rotate. (line 20)
+* filter: filter. (line 7)
+* formula: formula. (line 7)
+* incoloring: incoloring. (line 7)
+* initstate: initstate. (line 7)
+* intcoloring: tcolor. (line 7)
+* interrupt: interrupt. (line 7)
+* julia: uimandelbrot. (line 31)
+* juliaseed: uimandelbrot. (line 38)
+* letterspersec: letterspersec. (line 7)
+* line: linemenu. (line 40)
+* linekey: linemenu. (line 67)
+* load: load. (line 7)
+* loadexample: loadexample. (line 7)
+* maxiter: maxiter. (line 7)
+* maxstep: speed. (line 17)
+* message: message. (line 7)
+* ministatus: ministatus. (line 7)
+* morphangle: morphangle. (line 7)
+* morphjulia: morphjulia. (line 7)
+* morphlastline: linemenu. (line 58)
+* morphline: linemenu. (line 48)
+* morphview <1>: morphview. (line 7)
+* morphview: smoothmorph. (line 7)
+* moveview: moveview. (line 7)
+* nogui: nogui. (line 7)
+* outcoloring: outcoloring. (line 7)
+* outtcoloring: tcolor. (line 9)
+* palette: palette. (line 7)
+* periodicity: periodicity. (line 7)
+* perturbation: uiperturbation. (line 26)
+* plane: plane. (line 7)
+* quit: quit. (line 7)
+* randompalette: randompalette. (line 7)
+* range: range. (line 7)
+* recalculate: recalculate. (line 7)
+* record: record. (line 7)
+* rotationspeed: rotate. (line 34)
+* savecfg: savecfg. (line 7)
+* saveimg: saveimg. (line 7)
+* savepos: savepos. (line 7)
+* shiftpalette: shiftpalette. (line 7)
+* speed: speed. (line 7)
+* speedup: speed. (line 26)
+* status: status. (line 7)
+* stop: zoom. (line 29)
+* text: text. (line 7)
+* textposition: textposition. (line 7)
+* textsleep: textsleep. (line 7)
+* unzoom: zoom. (line 23)
+* usleep: usleep. (line 7)
+* view: uiview. (line 31)
+* wait: wait. (line 7)
+* zoom: zoom. (line 17)
+* zoomcenter: zoom. (line 11)
+
+
+
+Tag Table:
+Node: Top440
+Node: Overview1491
+Node: Why?1688
+Node: What?3850
+Node: tutorial4423
+Node: controls14259
+Node: video16315
+Node: format20282
+Node: writehelp25754
+Node: xshl26241
+Node: drivers27386
+Node: aa28084
+Node: BeOS30601
+Node: DGA33457
+Node: dos34077
+Node: dX-fullscreen36510
+Node: dX-window37637
+Node: ggi37722
+Node: plan938273
+Node: SVGAlib39374
+Node: win3240754
+Node: X1142660
+Node: menus43657
+Node: root44527
+Node: animroot44588
+Node: stopreplay44871
+Node: plc45020
+Node: load45377
+Node: linemenu45710
+Node: animf48485
+Node: animateview49195
+Node: smoothmorph49730
+Node: morphview50314
+Node: morphjulia51377
+Node: moveview52005
+Node: morphangle52236
+Node: zoom52905
+Node: time53743
+Node: usleep54217
+Node: textsleep54618
+Node: wait55175
+Node: file55760
+Node: loadpos56031
+Node: savepos56293
+Node: record56739
+Node: play57242
+Node: saveimg57454
+Node: loadexample58090
+Node: savecfg58446
+Node: quit58833
+Node: edit59010
+Node: undo59200
+Node: redo59473
+Node: copy59648
+Node: paste59940
+Node: fractal60224
+Node: formula60787
+Node: uimandelbrot61519
+Node: uiperturbation63041
+Node: bailout64230
+Node: uiview65327
+Node: initstate67336
+Node: plane67829
+Node: incoloring68996
+Node: outcoloring70522
+Node: tcolor72247
+Node: calc73867
+Node: range74331
+Node: periodicity74958
+Node: maxiter77134
+Node: fastjulia78377
+Node: dynamic79136
+Node: rotate79975
+Node: mfilter81407
+Node: filter82063
+Node: edge82712
+Node: edge283251
+Node: starfield83795
+Node: stereogram84154
+Node: interlace88540
+Node: blur88956
+Node: emboss89371
+Node: palettef89706
+Node: anti90274
+Node: truecolor90981
+Node: ui91592
+Node: speed92053
+Node: letterspersec93116
+Node: autopilot93511
+Node: recalculate94348
+Node: interrupt94723
+Node: nogui94958
+Node: status95432
+Node: ministatus95835
+Node: misc96140
+Node: command96541
+Node: renderanim96927
+Node: clearscreen97180
+Node: display97525
+Node: text97831
+Node: color98571
+Node: textposition98855
+Node: message99325
+Node: helpmenu99732
+Node: xtextpos99871
+Node: ytextpos100144
+Node: mformula100424
+Node: mandel100775
+Node: mandel3101054
+Node: octal101531
+Node: newton101870
+Node: barnsley102414
+Node: phoenix102694
+Node: magnet102930
+Node: palettemenu103272
+Node: defpalette103608
+Node: randompalette104104
+Node: palette104609
+Node: cycling105473
+Node: shiftpalette106452
+Node: about107164
+Node: support111546
+Node: index115382
+
+End Tag Table
diff --git a/doc/xaos.texinfo b/doc/xaos.texinfo
new file mode 100644
index 0000000..fbcc70c
--- /dev/null
+++ b/doc/xaos.texinfo
@@ -0,0 +1,3468 @@
+\input texinfo @c -*-texinfo-*-
+
+@c The original files are xaos.geninfo and xaos.hlp. xaos.texinfo is
+@c automatically generated. So make all changes in the orignal files please.
+@c To regenerate xaos.texinfo, please run "mktexinfo".
+
+@c Use A4 paper - If you don't like that, remove the following 3 lines.
+@iftex
+@afourpaper
+@end iftex
+
+@setfilename xaos.info
+@settitle An fast realtime interactive fractal zoomer --- user's manual
+@dircategory Graphics
+@direntry
+* XaoS: (xaos). A fast real-time interactive fractal zoomer
+@end direntry
+
+
+@ifinfo
+@copyright{} 1996-2008 Jan Hubicka and the XaoS Development Team
+
+Permission is granted to make and distribute verbatim
+copies of this manual provided the copyright notice and
+this permission notice are preserved on all copies.
+
+@end ifinfo
+
+@c %**end of header
+
+@set VERSION 3.4
+@set DATE April 17, 2008
+
+@titlepage
+
+@title{XaoS @value{VERSION}}
+@subtitle{A fast real-time interactive fractal zoomer --- User's manual}
+
+@author{Jan Hubi@v cka}
+@tex
+Dukelsk\'ych bojovn\'\i ku 1944
+@end tex
+@*
+390 03 T@'abor @*
+Czech Republic
+
+Email: @code{jh@@ucw.cz}
+
+@value{DATE}
+
+@page
+@vskip 0pt plus 1filll
+@vskip 0pt plus 1filll
+
+@copyright{} 1996-2008 @tex Jan Hubi\v cka and the XaoS Development Team
+@end tex
+
+Permission is granted to make and distribute verbatim
+copies of this manual provided the copyright notice and
+this permission notice are preserved on all copies.
+
+@end titlepage
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node Top, Overview, (dir), (dir)
+
+@ifinfo
+@top XaoS @value{VERSION}
+@flushright 1.0
+A real-time interactive fractal zoomer
+User's manual
+@value{DATE}
+@end flushright
+
+This manual contains user documentation about XaoS --- a fast real-time fractal
+zoomer. XaoS uses a development model, so sources are freely available. The
+file @code{xaosdev.texinfo} in the source documentation contains a hacker's
+manual (design overview, algorithm description etc.).
+@end ifinfo
+
+@menu
+* Overview:: What does this software do then?
+* tutorial:: XaoS tutorial
+* controls:: Basic controls
+* video:: How to encode video files
+* format:: XaoS's file format description
+* writehelp:: How to write XaoS help files
+* xshl:: XaoS simple hypertext language
+* drivers:: Driver specific documentation
+* menus:: Functions, menu items and command line parameters
+* about:: Credits
+* support:: Getting Support
+* index:: Function index
+@end menu
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node Overview, tutorial, Top, Top
+
+@chapter Overview
+@menu
+* Why?:: Why yet another fractal generator?
+* What?:: What does this software do then?
+@end menu
+
+@node Why?, What?, Overview, Overview
+@section Why yet another fractal generator?
+
+
+We decided to make XaoS, because all fractal browsers we know of take a
+long time to calculate each image. You may browse nice images
+generated by them but real impressions of fractals --- the self
+similarity and infinite zooming into the nice parts of fractals ---
+can be seen only in animations. There are many programs available that
+make nice animations, but they take a long time to calculate and lots
+of space on disk. Most such animations are quite ugly because their
+authors can't see them without many hours of calculations.
+
+A natural question is: is it possible to generate such animations in
+real-time? The answer was negative for many years, since the Mandelbrot set is
+very computationally expensive. Things are changing. Today's computers
+are fast enough to calculate approx. 10.000 of pixels per frame,
+which is enough
+for a very low resolution animation (100x100). Several programs doing that
+are available. But 100x100 animation still looks quite ugly. To make
+animation nice you need at least 320x200 pixels. And that is 6 times more!
+One possibility is to wait until computers will be fast enough, but
+it will take many years, and then 320x200 animations will be obsolete
+and everyone will want 1024x768 resolution instead or more.
+
+We found a special algorithm that saves up to 99.98% of calculations during
+zooming by reusing pixels already calculated in previous frames. There were
+some programs doing similiar tricks before but we don't know about any able
+to do zooming interactively with a speed similar to XaoS. Many other tricks
+were later implemented XaoS to achieve yet higher framerates. Now XaoS does
+up to 120 frames per second on a 120Mhz pentium in a fullscreen 320x200
+animation, and calculates an average of 160 (0.24%) pixels per frame. This makes
+XaoS fast enough to achieve its primary goal, realtime animation, but there
+are still many areas that could improve, since more complex fractals,
+higher resolutions, or slower computers still bring many problems.
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node What?, , Why?, Overview
+@comment node-name, next, previous, up
+@section What does this software do then?
+
+XaoS is a realtime interactive fractal zoomer. This means that it lets you
+zoom smoothly into any place in the fractal you choose without the many hours
+of calculation required by most other fractal generators. It now has many
+other features too, like 13 different fractal types, autopilot, special coloring
+modes, support for various bit depths (8bpp, truecolor, hicolor and realcolor),
+random palette generation, color cycling etc...
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node tutorial, controls, Overview, Top
+
+@chapter XaoS tutorial
+
+This is a brief introduction to the basic XaoS features.
+
+@section How to zoom
+The main advantage of XaoS is that after a few seconds' delay to calculate
+the first image, you may choose any point with the mouse and press the @emph{left} button.
+The image will start to zoom smoothly into the point you choose. You may move
+the mouse and zoom smoothly into interesting areas. By pressing the @emph{middle
+button} (or @emph{left+right} buttons) you may also
+@emph{move the image} using ``drag & drop'' if you missed an interesting
+place. @emph{Unzooming} is also possible by using the @emph{right button},
+but it is much slower because optimizations are not so effective as for zooming.
+
+In case you think that the default @emph{speed} is boring (it is quite slow, to
+make XaoS smooth on a slow computer) you may change it by pressing @emph{arrow
+up/down}. But faster zooming is more expensive, so if the speed is too high
+you will see little but funny colorful blinking rectangles.
+
+@section Autopilot
+
+To make XaoS yet more impressive we made a special autopilot that
+automatically drives into interesting boundaries of the set. So you can
+press @code{A}, play your favorite music, drink coffee and relax. I never
+tried this but it should be really relaxing! Many pictures in the XaoS
+gallery were discovered using the autopilot.
+
+The autopilot also has some additional features. It turns back when the
+zoomed picture stops being interesting, and is able to spot when it's zoomed
+into a really boring part (or has reached the limit of floating point
+numbers) and restart zooming from the top.
+
+@section Various fractal formulae
+
+XaoS also supports formulae other than the Mandelbrot set. You may change
+@emph{formula} using the @emph{number keys}
+or @emph{SHIFT+letters}.
+
+
+
+On keys @code{1} to @code{5} are @emph{Mandelbrot sets of various power}. The ``normal''
+Mandelbrot set is on key @code{1}.
+
+On key @code{6} is a fractal called @emph{Newton}. It is Newton's famous formula for finding roots.
+
+On key @code{7} is the @emph{fourth ordered Newton} fractal.
+
+On key @code{8} is a fractal called @emph{Barnsley}.
+
+On key @code{9} is @emph{Barnsley's second} fractal.
+
+On key @code{0} is @emph{Barnsley's third} fractal.
+
+With keys @code{SHIFT-A} you can display a fractal called @emph{octo}. It is a fractal that Thomas
+discovered in fractint.
+
+With keys @code{SHIFT-B} you can display a fractal called @emph{Phoenix}. It is a very nice and quite famous fractal.
+
+With keys @code{SHIFT-C} you can display a fractal called @emph{Magnet}. This fractal has quite a complex formula so it is
+a bit slow.
+
+With keys @code{SHIFT-D} you can display the @emph{Magnet2} fractal.
+
+The rest of the built-in fractals are accessible through an other menu, but
+you can still use the hotkeys.
+
+On @code{SHIFT-E} is a fractal called @emph{Triceratops} found by Arpad.
+
+On @code{SHIFT-F} is a fractal called @emph{Catseye} found by Arpad.
+This is more interesting if you change the bailout value.
+
+On @code{SHIFT-G} is a fractal called @emph{Mandelbar}. It was in
+Gnofract4d, and they found it at:
+http://mathworld.wolfram.com/MandelbarSet.html
+
+On @code{SHIFT-H} is the @emph{Lambda} fractal.
+
+On @code{SHIFT-I} and @code{SHIFT-J} are the @emph{Manowar}
+and @emph{Spider} fractals, they were found by users of fractint.
+(Scott Taylor or Lee Skinner)
+It was on http://spanky.triumf.ca/www/fractint/
+taylor_skinner_type.html
+
+The next 3 fractals are famous classic fractals.
+
+On @code{SHIFT-K} is the @emph{Sierpinski} Gasket.
+You can change its shape by selecting another Julia seed.
+(This is for technical reasons.)
+
+On @code{SHIFT-L} is the @emph{Sierpinski Carpet.}
+It's shape can also be changed by selecting another Julia seed.
+
+On @code{SHIFT-M} is the @emph{Koch Snowflake.}
+
+
+
+@section Out-coloring modes
+
+To make fractals yet more interesting, more coloring modes for points
+outside the set are provided. ``Classical coloring mode'' uses the number of
+iterations that the orbit required to escape to (nearly) infinity. You can change this
+mode from the @emph{Fractal menu} or by pressing key @code{C}
+To see more about coloring modes, try the tutorial on Incoloring modes from the XaoS features overview.
+
+Those cryptic names for coloring modes are mathematical formulae, where @emph{iter} means number
+of iterations, @emph{real} means real coordinate of last orbit, and @emph{imag} means imaginary
+coordinate of last orbit.
+
+@section In-coloring mode
+
+In-coloring mode is similar to out-coloring, except that it changes how
+things inside the set are displayed. This can also be changed from the @emph{fractal
+menu} or by pressing @code{F}.
+
+You might also want to see the tutorial on
+Out-coloring modes from the XaoS features overview.
+
+@section Planes
+
+All fractals displayed by XaoS are functions with a complex parameter. It
+can be displayed in the normal complex plane, where x is the real part of
+the number, and y is the imaginary part; but it can also be displayed in
+a number of other planes. You can select the plane to use from the
+@emph{Fractal menu}, or by pressing @code{I}.
+
+Like the coloring modes, planes have cryptic names. You guessed it, they're
+mathematical formulae. Here @code{mu} means coordinates in the normal
+complex plane. If you have coordinates in @code{1/mu} plane, and you need
+coordinates in the a complex plane (to calculate the Mandelbrot set) you
+simply use the coordinates as mu. Lambda is another plane that can be
+converted to mu using a similar formula.
+
+@table @strong
+@item mu
+normal mode.
+
+@item 1/mu
+Inversion: infinity goes to 0 and 0 goes to infinity.
+
+@item 1/(mu+0.25)
+Similar to inversion, but moves the center outside of the
+Mandelbrot set so that it looks parabolic.
+
+@item lambda
+Lambda plane.
+
+@item 1/lambda
+Inversion of lambda plane.
+
+@item 1/lambda-1
+Inversion with moved center.
+
+@item 1/(mu-1.40115)
+A very interesting mode for the Mandelbrot set. It makes small things
+big, so you can browse the set's details easily.
+@end table
+
+
+@section Mandelbrot/Julia switching
+
+Most of the fractals displayed by XaoS (currently all of them) have two
+forms: Mandelbrot and Julia. Every point in a Mandelbrot set has its
+own Julia set. To see more about this correspondence, try the tutorial on
+Julia set from the Introduction to fractals.
+
+In the Mandelbrot mode, you can get a corresponding Julia by moving the mouse
+to an interesting point and pressing @code{M}. To get back press @code{M}
+again. Some fractals (Barnsley and phoenix) are already in their Julia
+versions, because the Mandelbrot ones are boring. But by pressing @code{M}
+in such fractal you should get the Mandelbrot version, and by choosing another
+point as the base point and pressing @code{M} again you should get a
+completely different fractal. The most interesting points for Julia sets
+are at the boundaries of the Mandelbrot set. Most of the Julias inside or
+outside the set are boring.
+
+
+@section Fast Julia preview mode
+
+Fast Julia mode is a quick way to find a point to use as a base for the Julia
+set.. Just press @code{J} and a small Julia set will be displayed in the top
+left corner. Then move the mouse around with button 1 depressed, and the Julia
+for the point the mouse is over will be automatically generated.
+
+@section Palette
+
+If you think that the default XaoS colors are ugly or you are just
+bored by them you can change it by pressing @code{P}. XaoS will
+automatically generate random palettes. Many of them look ugly, so
+press @code{P} again to get another one until you find one you like.
+
+@section Filters
+
+Many interesting effects are done by post-calculation filters. @xref{filter}.
+XaoS has filters that do everything from embossing, through motion-blurring,
+right through to turning the fractal into a stereogram. To enable them use
+the @code{filter menu} or press @code{E}.
+
+@section Palette cycling
+
+This is a very old trick that makes the Mandelbrot set a little flashier. You
+may enable or disable it using @code{Y}. In the truecolor modes you need
+to enable the palette emulator filter first. This is done
+via the @code{E} key, or from the filter menu.
+
+@section Changing number of iterations
+
+To calculate fractals perfectly, you need an infinite number of
+iterations. XaoS does just the first few of them, so after lots of zooming
+you may get into a place that looks quite boring, and the boundaries of the
+set are rounded, without any interesting details. This can be changed by
+changing the number of iterations:
+
+Press and hold @code{arrow right} and wait until iterations are high enough.
+This may slow down calculation much. To reduce number of iterations
+press @code{arrow left}.
+
+@section Changing resolution
+
+XaoS usually starts in a low resolution (320x200 or thereabouts) to make
+calculations faster. If you have a fast computer or you need to
+save bigger @code{.gif} images, you may change the resolution. This
+can be done by pressing @code{=} in the full screen drivers, or simply
+by resizing the XaoS window.
+
+@section Changing driver
+
+XaoS usually has more than one driver available. You may change it on
+the fly in case you want a different one. For example, XaoS started in X11
+can be switched at runtime to use the AA driver. This can be done from the
+UI menu.
+
+This action is bit dangerous, because XaoS can crash during initialization
+if there is some problem with initialization; XaoS tries to initialize a new
+driver, and if it fails it attempts to return back to the original. Sometimes
+this is impossible, and all XaoS can do is terminate..
+
+@section Other features
+XaoS has many other features, but they don't fit into this tutorial. Most of
+them are available from the menu, so you can experiment with them. You might
+also want to see the @emph{animated tutorials} from the @emph{help menu},
+to have an idea what XaoS can do.
+
+
+@c ## chapter tutorial ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node controls, video, tutorial ,Top
+
+@chapter Basic controls
+By default the mouse buttons work in the following way:
+
+@table @strong
+@item left
+zoom in
+@item right
+zoom out
+@item middle
+move fractal in a drag-and-drop fashion
+@end table
+
+@emph{Note:} Since most Macs only have one button mice, these controls
+are emulated on Mac OS X using modifier keys. See the help section on
+Mac OS X for details.
+
+This behavior can change. If you enable rotation, the first button is used for rotating
+fractals. Also, in fast Julia mode, the first button is used to change the seed.
+
+If you don't have a middle button, press both buttons to enable
+emulation.
+
+After few minutes of zooming you will probably exceed the precision and the
+fractals will get boring. If you are getting strange big rectangles on the screen,
+you probably reached the numeric limit: there is no way to avoid this except
+un-zoom back and choose a different area. It doesn't hurt so much, since you have
+zoomed approximately 64 051 194 700 380 384 times, so there are quite a lot of areas to
+explore. Algorithms with unlimited precision exist, but they are still too
+slow for real-time zooming.
+
+The other possibility is that you have reached the iteration limit. The fractal is
+calculated approximately, and in this case you need to increase number of
+iterations used for approximation (and decrease the speed in the process).
+This is done from the menu or using the arrow keys @emph{Left} and @emph{Right}.
+
+An @emph{Up} and @emph{Down} keys should be used to change zooming
+speed. Note that higher speed costs more and image will be blocky.
+
+This behavior can also change. With palette cycling enabled, @emph{Left}
+and @emph{Right} keys change cycling speed; in continuous
+rotation they change rotation speed.
+
+All other functions are available from the menu, which (in the default
+configuration) are displayed when you move the mouse to the top of the
+screen/window. It is useful to learn the shortcut keys, which are
+shown in gray next to the menu items they trigger.
+
+
+@c ## chapter controls ##
+
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node video, format, controls ,Top
+
+
+@chapter How to encode video files from XaoS
+
+To create a video, make and @code{xaf} file first (the easiest way to do this is
+to use the @emph{record} function in the file menu). Then you need to render
+the animation. XaoS can output sequences of ordinary @code{PNG} images, that
+can later be used by a video encoder.
+
+@section Generating image sequences for video
+
+To generate an image sequence, choose @emph{Render Animation} from the @emph{Misc}
+menu. You can also use the following command on the command line:
+
+
+@example
+xaos -render [filename] -size 352x240 -antialiasing
+-renderframerate 24 -basename [basename]
+@end example
+
+
+@emph{File to render} (@code{[filename]}) is the name of the @code{xaf} file,
+@emph{Basename} (@code{[basename]}) is the name used as the base filename for rendered images. This should also include the path where you want to save the images.
+XaoS adds a four digit sequence number and @code{.png} extension to this name automatically.
+
+You might also want to change the resolution. Make sure that the resolution
+you choose is supported by the video codec you wish to use.
+
+The framerate can also be altered. Make sure you choose a framerate that is supported by
+the video codec you wish to use.
+
+@emph{Antialiasing} (@code{-antialiasing}) is used to produce anti-aliased images.
+It takes a much longer
+time and much more memory to calculate them, but resulting images are better
+for video compression and they result in a much smaller video file.
+(the same is true of @emph{JPEG images})
+
+On the other hand, the other XaoS rendering option @emph{Always Recalculate} (@code{-alwaysrecalc}) (which disables
+XaoS's zooming optimizations) is @emph{not recommended}. If that's used, the
+sequence of animation then contains quite a lot of extra information, which
+increases size of video file, but because of the codec's lossy compression it is hard
+to see any difference, so it's not worth it.
+@section Rendered files
+Once you start it, XaoS will generate thousands of frames. They take quite
+a long time to calculate and save, and consume plenty of disk space.
+(e.g. to render part 1 of the tutorial you need about 60MB and half an hour of time).
+
+All images are named @code{[basename]framenum.png}. For example @code{intro0001.png} is
+the first frame of the animation intro. If consecutive frames are the same, XaoS
+doesn't save them, so some frames may be missing. If your encoder can't handle
+that, you will need to write a simple script which will fill in the gaps by means
+of @code{mv} or symbolic linking.
+
+A list of all filenames is saved into the file @code{[basename].par}, where each line is
+the name of one frame. The names repeat here if necessary, so you can use this
+file to supply filenames to the encoder.
+@section Encoding videos
+Once XaoS has generated the png files for each frame of the animation, you
+can use a third-party video encoder to convert the sequence of images into
+a video file. We currently recommend the following encoders, which support
+a wide variety of video codecs and file formats:
+@table @strong
+@item ffmpeg
+Available from: @code{http://ffmpeg.mplayerhq.hu/}
+Instructions: @code{http://ffmpeg.mplayerhq.hu/faq.html#SEC12}
+@item mencoder
+Part of mplayer, available from: http://www.mplayerhq.hu/
+Instructions: @code{http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html}
+@end table
+These are both command line tools. If you prefer a graphical tool, you may
+prefer Quicktime Pro from Apple (http://www.apple.com/quicktime/pro/). However,
+this software costs approximately US$30, and the authors of XaoS have no
+experience with it. Although QuickTime may be easier to use, the two free
+encoders above are just as capable once you learn how to use them.
+
+
+Note: we used to recommend Berkeley parallel MPEG encoder to
+encode the generated png files into MPEG videos. We have kept
+the instructions mainly for historic purposes.
+
+
+@c ## chapter video ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node format, writehelp,video ,Top
+@chapter XaoS's file format
+This section describes the format used by XaoS for animations, configuration
+files and saved positions. All these files have a common format, designed
+to be easily readable, to allow manual editing of files and easy conversion by
+other programs.
+
+I also taken care to make it easily extensible for future versions of XaoS
+so I hope there will not be many incompatibilities between various XaoS
+versions.
+
+The format is a simple set of commands executed sequentially. XaoS does not provide
+any variables/cycles as usual scripting languages do, but future extension to
+full-blown Scheme should be easy since the format uses Scheme-like syntax.
+The syntax of every command is:
+
+@code{(command_name }@emph{[param1] [param2]}@code{)}
+
+where parameters are optional and separated by whitespace (an arbitrary number
+of spaces, tabs and newlines). The parameters can have the following types:
+
+@table @strong
+@item integer
+number w/o decimal point (@code{123})
+@item float
+floating point number in decimal notation with optional exponent (@code{1.23E2})
+@item keyword
+text started by quote @code{'}. It is used to pass various string constants
+like formula name (@code{'mandel}) Quote is required for scheme compatibility
+@item string
+Text inside double quotes. The only parameter that should contain whitespace
+@item boolean
+@code{#t} for true or @code{#f} for false
+@end table
+
+There is a complete description of all XaoS functions (with some examples) and an
+index of functions in the XaoS registry. @xref{menus}. You may particularly want
+to read about the animation functions. @xref{animf}. Also, the following functions
+are significant:
+
+@table @strong
+@item load
+
+This function loads and interprets a file. It works similarly to @code{#include}
+in C.
+@item initstate
+
+Available in version 3.0 and above, this function resets XaoS's state to default
+values. This command should be at the beginning of each animation file,
+since otherwise some stuff previously enabled by user could cause unexpected
+effects. State is not reset by default before playing animations since it would
+make it impossible to write macros. Current versions don't really need macros, but
+in future versions, when the Scheme programming language will be available, this
+should be a much more interesting subject.
+@item usleep
+
+This function waits for a selected amount of time(in usec) before processing the
+next command. The screen is recalculated and displayed at the beginning of
+the sleep if necessary. The remaining time is spent by waiting, calculating if
+necessary, or performing any animation you entered via animation commands.
+@item wait
+
+Waits until the animation or image rendering is complete. Do not call this
+function when zoom, or continuous rotation is active otherwise deadlock happens. It is
+a good idea to call it immediately before text subtitles are displayed, since it looks
+ugly when they are displayed over a blocky unfinished fractal. Because the
+degree of blockiness at a given instant is a function of your machine speed,
+it may look nice for you but ugly for others with slower machines. Also
+you should call this after an animation is performed, before the switch to another
+fractal happens; since the switch involves calculation, the screen is stopped
+for a while and an unfinished fractal there looks ugly.
+You should also call it, when you want to do something as soon as possible.
+@end table
+
+Example:
+
+
+@example
+;configure everything for the first frame
+(inistate)
+(palette 1 1163254293 0) ;custom palette
+(cycling #t) ;enable cycling
+(cyclingspeed 7)
+(maxiter 276) ;higher number of iterations
+(range 3) ;default range for solid guessing
+(usleep 1000000) ;second frame starts here
+(moveview -1.8101154154614007889 -8.2687205907162041209E-05)
+;just move the image
+(usleep 1000000) ;third frame
+(morphview -1.8101154154614007889 -8.2687205907162041209E-05
+6.277210971069452361E-10 6.2772109785334669875E-10)
+;10 seconds of zooming into selected
+rectangle
+(usleep 100000000)
+@end example
+
+
+The best way to learn XaoS command language is probably to read position files
+and modify them. For example, to create zooming animation from the original
+file:
+
+
+@example
+(initstate)
+(defaultpalette 0)
+(formula 'mandel)
+(view -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+9.69332308834E-08)
+@end example
+
+
+Just change the @code{view} command to @code{morphview}, and add @code{usleep}:
+
+
+
+@example
+(initstate)
+(defaultpalette 0)
+(formula 'mandel)
+(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+9.69332308834E-08)
+(usleep 10000000)
+@end example
+
+
+The following code produces Julia morphing in the real axis:
+
+
+@example
+(initstate)
+(fastjulia #t)
+(juliaseed -2 0)
+(morphjulia 2 0)
+(usleep 2000000)
+@end example
+
+
+
+And following is the ``rotozooming'' animation:
+
+
+
+@example
+(initstate)
+(fastrotate #t)
+(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+9.69332308834E-08)
+(morphangle 300)
+(usleep 10000000)
+(wait)
+(fastrotate #f)
+@end example
+
+
+
+@chapter XaoS gallery
+
+I plan to make a gallery of animations and position files on the XaoS home-page,
+so please send any nice animations and images you created using XaoS
+to the mailing list or upload them to our website.
+@c ## chapter format ##
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node writehelp, xshl,format ,Top
+@chapter How to write XaoS help files
+XaoS help is stored in the file @code{help/xaos.hlp}. It is divided into parts,
+each part being started by a @emph{keyword}. In the help file keywords are
+written as @code{%keyword}
+
+If you are writing documentation about some command in the XaoS function
+registry, use the same keyword as the name of the command in order to make
+context sensitive help work.
+
+
+@c ## chapter writehelp ##
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node xshl, drivers,writehelp ,Top
+@section xshl
+@emph{Xshl} stands for @emph{XaoS simple hypertext language}. It
+uses similar tags to HTML. It is simpler and more restrictive in order to
+make it easy to parse using various scripts. In C code you can use the
+library present in @code{src/util/xshl.c} to parse it.
+
+The following tags are supported:
+
+@table @strong
+@item head
+make headings (should be at the beginning of the page, at least)
+@item emph
+emphasize
+@item tt
+Use non proportional font
+@item br
+Break line
+@item p
+Next paragraph
+@item dl
+Definition list
+@item dt
+Definition tag (should be used only inside a definition list)
+@item dd
+Definition description (should be used only inside a definition list)
+@item center
+align to center
+@item right
+align to right
+@item red
+change color to red (should not be used in help files)
+@item black
+change color to black (should not be used in help files)
+@item white
+change color to white (should not be used in help files)
+@item a name
+link to other help page
+@item tutor name
+activate tutorial
+@item notex
+Ignore this in texinfo manuals
+@end table
+
+
+
+@c ## section xshl ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node drivers, menus,xshl ,Top
+
+@chapter Platform-specific documentation
+XaoS is portable and works on many different platforms. Since not all platforms are
+exactly the same, there are some differences between the behavior of XaoS on
+different platforms. Here is documentation about each specific port.
+
+@c ## chapter drivers ##
+
+@menu
+* aa:: AA-lib --- high quality ascii art driver
+* BeOS:: BeOS drivers
+* DGA:: DGA driver
+* dos:: DOS driver
+* dX-fullscreen:: directX fullscreen driver
+* dX-window:: directX windowed driver
+* ggi:: GGI driver
+* plan9:: plan9 driver
+* SVGAlib:: SVGAlib driver
+* win32:: Win32 driver
+* X11:: X11 driver
+@end menu
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node aa, BeOS , ,drivers
+
+@section AA-lib driver
+
+The AA driver is currently the most advanced and portable driver for XaoS.
+It is based on AAlib---a high quality ASCII-art library developed by the AA-project.
+(see @code{http://aa-project.sf.net})
+
+It is a fully featured XaoS driver for text mode displays. It supports 256 colors
+and the mouse where possible.
+
+It also has some extended features available from the UI menu:
+
+@table @strong
+@item Attributes
+AA-lib may use character attributes to improve image quality.
+By default it uses normal, dim and bold characters where possible,
+but you can also enable different attributes like reversed or bold font
+characters. You may also enable usage of non ansii/reversed characters if
+your device supports it.
+@item Font
+AA-lib uses a bitmap image of the font to prepare the approximation table
+used for ASCII art rendering. This bitmap is expected to be same as the one used
+by your device. AAlib performs detection where possible however some devices
+(like UNIX text terminals or MDA) do not support this. AAlib has few font
+images compiled in, so in this case you should try to use one of them to
+achieve best results.
+@item Inversion
+Some devices use inverse video: use this to get correct results on such devices.
+@item Dithering mode
+Dithering is an way to get more exact color in approximations, by combining
+more characters; but this method can produce ugly looking noise on certain images.
+Use this menu to disable or tune it.
+@item Palette options
+By default AA driver uses the XaoS palette to render images, but it quite often
+looks ugly on text displays. Here you can choose a special text palette instead. Note that with
+filters enabled, the results may be rather ugly. This function is available from
+the @emph{palette menu}.
+@item Save text screen
+The normal save function will generate a PNG image instead of nice
+ASCII-art. To save ASCII art use this function instead. It supports many
+text file formats like HTML, ANSI, more, etc... It will also ask you for
+font and attributes(see above). It is available from the @emph{file
+menu}.
+@end table
+
+The AA-lib driver also provides the full set of standard AA-lib's command line
+options. You may use them to tune parameters like gamma correction, and so on.
+See @code{xaos -help} or the AA-lib documentation for details.
+
+The AA driver was written by Jan Hubicka, 1997.
+
+@c ## section aa ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node BeOS, DGA , aa ,drivers
+
+@section BeOS support
+
+XaoS has pretty advanced support for BeOS R4. It works on both PowerPC and
+Intel platforms, supports multithreading, the clipboard, file dragging,
+has native look and feel and can work as an image translator from XaoS files
+to images.
+
+The first version of the BeOS driver was written by Jens Kilian and later
+extended by Jan Hubicka.
+
+@subsection Installation
+
+You can start the installation script to do everything for you. If you want
+something special, read this section.
+
+In order for XaoS to work you need to keep the executable together with
+its data files (@code{help}, @code{examples}, @code{catalogs} and the @code{tutorials} directory)
+
+When first started, XaoS registers two new mime types called
+@code{image/x-xaos-position} for XaoS Position Files and
+@code{video/x-xaos-animation} for XaoS Animation Files,
+registers icons for them and sets itself as default application.
+
+@subsection Available display drivers
+
+XaoS supports following drivers:
+
+@table @strong
+@item BeOS
+Standard windowed driver using application server
+@item DirectWindow
+Driver done using Game Kit's direct window class
+@item WindowScreen
+Fullscreen driver.
+@end table
+
+By default, XaoS starts in windowed mode and uses the application server for output.
+You could change the driver to DirectWindow to use direct access to video RAM.
+Note that this mode is slower in most cases, and not supported by some videocards.
+
+The BeOS driver by default chooses the most similar bitmap supported by XaoS
+to achieve best and fastest results.
+In the UI menu you can change this default choice to another one if you wish.
+Also you can ask the BeOS and DirectWindow to resize to fullscreen mode.
+
+XaoS also supports real fullscreen mode using the BWindowScreen API. To switch
+XaoS to this driver, use the UI menu. If you want to use this mode by default,
+use the @code{-driver WindowScreen} command line option.
+
+This driver differs a lot from windowed ones. It use direct access to the video
+card, allowing you to change video mode. Also, the 256 color mode
+can access the palette, so it is not dithered like the windowed mode.
+Because BeOS can't do GUI in fullscreen mode, XaoS uses its own toolkit.
+I hope you will feel confortable in it.
+
+@subsection XaoS as translator
+
+You should be able to open XaoS files in graphics applications
+such as ShowImage or ArtPaing. In Preferences you can find the DataTranslations
+program, that can be used to set the size, type and DPI of the resulting image.
+Also antialiasing can be enabled.
+
+Note that @emph{translation can take a while}. So be patient and
+wait for the result.
+
+If the translator doesn't work, ensure that you have a link to the XaoS executable
+in @code{/boot/beos/system/add-ons/Translators/}.
+
+@c ## section BeOS ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node DGA, dos , BeOS ,drivers
+
+@section DGA driver
+This is the driver for DGA (Direct Graphics Architecture) extension used by
+XFree86 X servers. It is pretty new so it could be buggy.
+
+Bugs/limitations:
+
+@table @strong
+@item In 8bpp mode, XaoS has problems with the palette with certain window managers
+I don't know why this happens. Just let me know what's wrong, or use another
+window manager.
+@item Banked modes are not supported.
+I don't have any card to test this with, so it doesn't work in the current version.
+@end table
+
+DGA driver was written by Jan Hubicka, 1999.
+
+
+@c ## section DGA ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node dos, dX-fullscreen , DGA ,drivers
+
+@section DOS driver
+This is a fully featured driver for DJGPP and allegro.
+It supports many VGA modes, VESA 1.0---3.0, VBE/AF, S3 and some other cards.
+
+The following problems may occur:
+
+@table @strong
+@item Some DPMI servers may cause problems
+Some DPMI servers like the one from Novell/Dr/Open DOS are buggy. Use clean DOS
+instead and XaoS will automatically start @code{cwsdpmi}.
+Under Open Dr DOS use @code{dpmi off} at command line to disable it.
+@item Higher resolutions don't work
+If your videocard has enough memory for the selected resolution,
+you most probably have an unsupported videocard.
+Please use a VESA BIOS extension on this videocard. (See the note about VESA
+at the end of this section.)
+@item XaoS needs a coprocessor
+I don't distribute a coprocessor library linked into XaoS because it is too slow for
+a real-time zoomer. Coprocessor emulation will not help, because xaos works in protected mode.
+@item XaoS needs mouse driver to be usable
+@item XaoS works slowly in higher resolution
+This could also be caused by Allegro's slow driver or your videocard's VESA BIOS.
+You could try some other VESA BIOS extension instead.
+Look at the @code{http://www.talula.demon.co.uk} for the FreeBE
+project or Scitech Display Doctor package.
+(See the note about VESA at the end of this section.)
+@end table
+@subsection VESA
+VESA is a standard for using higher resolutions in DOS. Many videocards have
+VESA support in the BIOS so you don't need any additional software, while others
+need support from a special program. Also some VESA BIOS implementations are
+buggy or suboptimal; there are 3 different versions, version 1.0 is many times
+slower than 2.0, which has support for protected mode and linear framebuffers.
+So if you have problems with higher resolutions, or some graphics modes are
+not available (like 320x200 truecolor), you might try some software package
+which emulates VESA.
+
+The most famous VESA emulating program is Scitech Display Doctor. It has support
+for many videocards and is quite reliable. It's disadvantage is that it is
+shareware and works for only 30 days. You might also look on
+@code{ftp.simtel.net}, where there are many VESA emulation packages such as
+@code{s3vbe} or the new FreeBe project at
+@code{http://www.talula.demon.co.uk}
+
+DOS driver was written by Jan Hubicka, 1997.
+
+@c ## section dos ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node dX-fullscreen, dX-window , dos ,drivers
+
+@section DirectX fullscreen driver
+This is da river for Windows 9x and NT. It is new since version 3.1 and
+because of some oddities of Windows API and kludges in DirectX
+it may be rather unstable. Please report all bugs. In case
+of problems you could use the DOS version of XaoS instead.
+
+This driver allows the Windows port of XaoS to run in full screen mode.
+The driver supports 256, 65536 and 16777216 color modes (24bpp and 32bpp)
+in all resolutions supported by DirectX.
+You can change graphics mode by pressing the @code{=} key
+(or by using the UI/Resize menu). If the selected mode is not supported,
+the driver will restore the previous setting.
+
+Use the @code{-mode WIDTHxHEIGHTxDEPTH} (like @code{-mode 640x480x16})
+command line option to change graphics mode.
+
+If you want to start XaoS in DirectX, use the @code{-driver dX-fullscreen}
+option.
+
+See the Win32 driver documentation for some more Windows
+releated information.
+
+DirectX driver was written by Jan Hubicka, Jan Olderdissen
+and Pavel Tzekov, 1999.
+
+@c ## section dX-fullscreen ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node dX-window, ggi , dX-fullscreen ,drivers
+@c ## section DX-window ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node ggi, plan9, dX-window ,drivers
+
+@section GGI driver
+
+GGI stands for General Graphics Interface. Part of this project is to develop
+libggi, a portable graphics library, and XaoS's GGI driver uses that.
+It is experimental, since the API of libggi is not stabilized yet.
+There are some problems with keyboard handling---the shift key doesn't work
+yet.
+
+Everything else might work well, but there are no guarantees. It is alpha quality
+software.
+
+GGI driver was written by Jan Hubicka, 1998.
+
+@c ## section ggi ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node plan9, SVGAlib, ggi ,drivers
+
+@section Plan9 driver
+
+Plan9 is a very nice small operating system by the authors of Unix at Bell Labs.
+It is very incompatible with other operating systems; even the C compiler and
+header files are different, but XaoS should work well there (even on the
+limited free demo installation without any POSIX compatibility stuff)
+
+There are a few limitations: the file selector and image saving don't work.
+You can save position files and then later render them on the other OS, or save
+screenshots.
+
+Plan9 terminals also don't provide any way to catch the arrow keys, so you
+can't use them. Use the mouse to navigate in the menus. Also, getting the screen
+resolution is impossible, so use @code{-pixelwidth} and @code{-pixelheight}
+instead of @code{-screenwidth} and @code{-screenheight}.
+
+By default XaoS changes the colormap. This will collide with other colorful
+programs like Mortha. You can disable this behavior using
+@code{-nopalette} switch, but this will slow down XaoS.
+
+Plan9 driver was written by Jan Hubicka, 1997.
+
+@c ## section plan9 ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node SVGAlib, win32, plan9 ,drivers
+
+@section SVGAlib driver
+
+This is a driver for Linux SVGAlib. I really like this driver, because
+I much prefer full screen zooming instead of a small 320x320 window in X11.
+It was one of the first drivers for XaoS and is fully featured.
+The following problems can occur:
+
+@table @strong
+@item XaoS doesn't initialize graphics mode
+when started under users other than root SVGAlib requires root privileges
+to directly access the hardware. When you really want to start XaoS as a
+normal user, enable the suid bit (@code{chmod +s}) at XaoS executable.
+note that I take care to disable all security holes caused by this
+bit so I believe it is safe.
+@item Mouse doesn't work
+@item Screen is blank at higher resolutions
+Both this problems are probably caused by misconfiguration of
+SVGAlib. Please configure it in @code{etc/vga/libvga.cong} or
+@code{/usr/local/lib/libvga.conf}
+GPM can also cause problems. Try to kill it before starting XaoS.
+@item When I switch console I can't switch back
+This is another typical SVGAlib bug. Try to hold @code{F} key longer than @code{alt}.
+It helps on my computer. On older SVGAlib there was a famous ``enter bug'' that caused
+a crash after pressing enter. Try to update to a newer release.
+@end table
+
+SVGAlib driver was written by Jan Hubicka, 1997.
+
+@c ## section SVGAlib ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node win32, X11, SVGAlib ,drivers
+
+@section Win32 driver
+
+This is a driver for Windows 9x and NT. It is new since version 3.1 and
+because of some oddities of Windows API it may be rather unstable.
+Please report all bugs. In case of problems you could use the DOS version
+of XaoS instead.
+
+The driver should work in all bit depths, but 16 color mode is not natively
+supported by the XaoS engine. XaoS internally works in 32k colors and
+the result is converted to 16 colors by Windows. Because Windows
+conversion routines are slow and ugly, the result is slow and ugly.
+Please configure your display to another bit depth to ``solve''
+this problem.
+
+Use @code{-size WIDTHxHEIGHT} command line option to change the default
+window size.
+
+This driver also maps to native Windows look and feel. There is a small
+problem with combo boxes in dialogs. They are expected to give you a choice
+between a few strings. The keyboard controls (changing choice by arrow keys)
+work, but mouse selection is broken. If you know how to solve this bug,
+please let me know.
+
+XaoS is a UNIX application and has many command line options.
+Some features are not available from the GUI.
+Because Windows applications can't have normal output,
+most of the critical messages are displayed in message boxes, but
+some longer messages are omitted. The most significant omission is the help
+about command line options that you can find in @code{doc/cmdopts.txt}.
+
+One thing that might be confusing is that animation rendering mode doesn't
+display anything, but only renders images. Start the rendering,
+and a message box will inform you that XaoS is entering the calculation
+loop. Relax and wait for the message box signaling the end of the loop.
+
+Note that XaoS also supports the DirectX API.
+
+Win32 driver was written by Jan Hubicka, Jan Olderdissen and Pavel Tzekov, 1999.
+
+
+@c ## section win32 ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node X11, , win32 ,drivers
+
+@section X11 driver
+This was the first driver done for XaoS. It supports many visuals, shared
+colormaps and MitSHM extension.
+
+Bugs/limitations:
+
+@table @strong
+@item XaoS makes some X servers too busy
+Sometimes XaoS generates images faster than X can display them.
+In this case XaoS responds poorly to the mouse, and other applications slow
+down too. This happens especially often on old R4 servers. Use @code{-sync}
+to avoid this problem. Note that @code{-sync} does @code{not} make all
+communication with X asynchronous; it just adds one additional XSync call.
+So the slowdown is not as large as you might expect.
+@item Does not work on all visuals
+This driver supports only 8bpp pseudocolor/grayscales, 15,16,24 and 32bpp truecolor, 1bpp and 8bpp staticolor visuals.
+@item Palette rotating does not work for 8bpp pseudocolor w/o private palette
+@end table
+
+X11 driver was written by Jan Hubicka and Thomas Marsh, 1997.
+
+@c ## section X11 ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node menus, about, drivers,Top
+
+@appendix Menus, functions and command line parameters
+All XaoS functions are referenced by a central function registry. The
+scripting language, menus, dialogs and command line options are built
+from this database. This section contains information about all functions
+available in this registry.
+@menu
+* root:: Root menu
+* animroot:: Animation root menu
+* plc:: Replay only commands
+
+* linemenu:: Line drawing functions
+* animf:: Animation functions
+* time:: Timing functions
+* file:: File
+* edit:: Edit
+* fractal:: Fractal
+* calc:: Calculation
+* mfilter:: Filters
+* ui:: UI
+* misc:: Misc
+* helpmenu:: Help
+* xtextpos:: Horizontal text position
+* ytextpos:: Vertical text position
+* mformula:: Formulae
+* palettemenu:: Palette
+@end menu
+@node root, animroot, , menus
+
+
+
+@node animroot, plc, root, menus
+
+
+
+@appendixsec Animation root menu
+This menu is displayed at the top of the screen when animation replay is active.
+@menu
+* file:: File
+* stopreplay:: Stop replay
+* helpmenu:: Help
+* ui:: UI
+@end menu
+@node stopreplay, , , animroot
+
+
+@appendixsubsec Stop replay
+Terminate animation replay.
+
+@emph{Available as}: menu item
+
+
+
+@node plc, linemenu, animroot, menus
+
+
+@appendixsec Replay only commands
+Some commands, such as timing primitives or animation functions, are available
+only in animation files.
+@menu
+* linemenu:: Line drawing functions
+* animf:: Animation functions
+* time:: Timing functions
+* load:: Include file
+@end menu
+@node load, , , plc
+
+
+
+
+@appendixsubsec Include file
+@defun load file
+@end defun
+
+This function lets you include another file in your script. It works similarly
+to @code{#include} in C or @code{load} in Scheme.
+The file is searched for in the same directory as the current source file.
+
+@emph{Available as}: command
+
+@node linemenu, animf, plc, menus
+
+
+
+@appendixsec Line drawing functions
+XaoS has support for drawing lines. These functions are available only in
+animations and could be used to show some parts of fractals or draw simple
+diagrams. See the tutorial ``Introduction to fractals''
+for examples of this feature.
+
+Lines can be drawn in @emph{screen} coordinates, where 0,0
+is the top left corner and 1,1 is bottom right, @emph{scaled}
+coordinates, which are similar, but scaled to keep 0,0---1,1 rectangular,
+or @emph{Fractal} coordinates, to draw a line at an exact position
+on the screen.
+
+The color of the line should be specified by the @code{color} command.
+You might draw an arbitrary number of lines and, later, morph them. Each line is
+identified by a unique numeric key; the current key can be set using @code{linekey}.
+Commands for changing lines operate on the line with the current key.
+(Lines drawn in sequence have consecutive numbers.)
+
+For example:
+
+
+@example
+(color 'red)
+(line 'scaled 0.3 0.5 0.7 0.5)
+(line 'scaled 0.3 0.5 0.7 0.5)
+(line 'scaled 0.3 0.5 0.3 0.5)
+(line 'scaled 0.7 0.5 0.7 0.5)
+(linekey 0)
+(morphline 'scaled 0.3 0.3 0.7 0.3)
+(morphline 'scaled 0.3 0.7 0.7 0.7)
+(morphline 'scaled 0.3 0.3 0.3 0.7)
+(morphline 'scaled 0.7 0.3 0.7 0.7)
+(usleep 1000000)
+@end example
+
+
+Creates line morphing to rectangle.
+
+
+
+
+@defun line keyword complex complex
+@end defun
+
+Draw line between two points.
+@code{keyword} specifies type of coordinates and should be one of the
+following: @code{`fractal}, @code{`screen} or @code{`scaled}.
+This function also increases the line key.
+
+@emph{Available as}: command
+
+
+
+
+
+@defun morphline keyword complex complex
+@end defun
+
+Morph current line to given coordinates.
+@code{keyword} specifies type of coordinates and should be one of the
+following: @code{`fractal}, @code{`screen} or @code{`scaled}.
+The line will start moving at the next timing command, and reach the
+final position before the end of it.
+This function also increases the line key.
+
+@emph{Available as}: command
+
+
+
+
+
+@defun morphlastline keyword complex complex
+@end defun
+
+This function has the same functionality as morphline, but it doesn't
+increase the line key, and touches the line with the previous key. This is useful when
+you want to move a just-drawn line---you don't need to set linekey back.
+
+@emph{Available as}: command
+
+
+
+@defun linekey integer
+@end defun
+
+Set current line key.
+
+@emph{Available as}: command
+
+
+
+@defun clearline
+@end defun
+
+Clear current line. This function also increases the line key.
+
+@emph{Available as}: command
+
+@defun clearlines
+@end defun
+
+Clear all displayed lines. Lines can also be cleared using the
+@code{clearscreen} or @code{display} commands available from the Misc menu. @xref{misc}.
+
+@emph{Available as}: command
+
+@node animf, time, linemenu, menus
+
+
+
+@appendixsec Animation functions
+These functions are used to animate fractal state---to zoom, unzoom and morph
+various parameters. They should be used only in animation files.
+Animations are usually performed for a time selected by an immediately following
+timing function. @xref{time}.
+For example:
+
+
+@example
+(view 0 0 1 1)
+(morphview 0 0 2 2)
+(usleep 5000000)
+@end example
+
+
+Will do a 5 second long unzooming animation.
+@menu
+* animateview:: Animate view
+* smoothmorph:: Smooth morphing
+* morphview:: Morph view
+* morphjulia:: Morph julia
+* moveview:: Move view
+* morphangle:: Morph angle
+* zoom:: Zooming functions
+@end menu
+@node animateview, smoothmorph, , animf
+
+
+@appendixsubsec Animate view
+@defun animateview float float float float
+@end defun
+
+This function is almost identical to function @code{view}. @xref{uiview}.
+It expects that the view will be changed only slightly, so recalculation is done
+with @code{ANIMATE} priority. This means that dynamic resolution is used by
+default.
+
+Viewport is selected by the center and two radiuses (real and imaginary). See
+@code{view} for more information.
+
+@emph{Available as}: command
+
+@node smoothmorph, morphview, animateview, animf
+
+
+@appendixsubsec Smooth Morphing
+@defun morphview keystring starttime endtime
+@end defun
+This function lets you smoothly start and stop morphing. Specify
+starttime and stoptime as nonzero, and morphing will speed up and slow down for
+that number of usecs.
+
+The keystring is used to select what morphing you want to control. It is one of
+the following:
+@table @strong
+@item 'view
+control morphview
+@item 'angle
+control morphangle
+@item 'julia
+control morphjulia
+@item 'line
+control morphline
+@end table
+@node morphview, morphjulia, smoothmorph, animf
+
+
+@appendixsubsec Morph view
+@defun morphview float float float float
+@end defun
+For the time selected by the next @code{usleep} or other timing function, the viewpoint is smoothly morphed from
+the current one to that selected by @code{morphview}.
+
+Viewport is selected by the center and two radiuses (real and imaginary). See
+@code{view} for more information.
+
+This function can easily be used for creating zooming/unzooming animations using position files.
+This is an example position file generated by XaoS:
+
+
+@example
+(initstate)
+(defaultpalette 0)
+(formula 'mandel)
+(view -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+9.69332308834E-08)
+@end example
+
+
+By replacing the @code{view} command with @code{morphview} and
+adding @code{usleep} you can create a zooming animation:
+
+
+@example
+(initstate)
+(defaultpalette 0)
+(formula 'mandel)
+(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+9.69332308834E-08)
+(usleep 10000000)
+@end example
+
+
+
+
+@emph{Available as}: command
+
+@node morphjulia, moveview, morphview, animf
+
+
+@appendixsubsec Morph Julia
+@defun morphjulia complex
+@end defun
+For the time selected by the next @code{usleep} or other timing function, the Julia seed
+is smoothly interpolated from the current one to that selected by @code{morphjulia}. By default this will
+cause recalculation of the whole screen.
+To avoid this, use fast Julia mode. @xref{fastjulia}.
+
+A simple animation morphing Julia seed in the X axis:
+
+
+@example
+(initstate)
+(fastjulia #t)
+(juliaseed -2 0)
+(morphjulia 2 0)
+(usleep 2000000)
+@end example
+
+
+
+@emph{Available as}: command
+
+@node moveview, morphangle, morphjulia, animf
+
+
+@appendixsubsec Move view
+@defun moveview complex
+@end defun
+Smoothly move the image center to another position.
+
+@emph{Available as}: command
+
+@node morphangle, zoom, moveview, animf
+
+
+@appendixsubsec Morph angle
+@defun morphangle float
+@end defun
+Smoothly rotate the image to another angle. By default rotation causes
+recalculation of the whole screen. To avoid this you need to enable
+fast rotate mode. @xref{rotate}. Don't forget to disable it later, since
+it slows down other animations.
+
+
+A simple ``rotozooming'' animation:
+
+
+@example
+(initstate)
+(fastrotate #t)
+(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+9.69332308834E-08)
+(morphangle 300)
+(usleep 10000000)
+(wait)
+(fastrotate #f)
+@end example
+
+
+@emph{Available as}: command
+
+@node zoom, , morphangle, animf
+
+
+@appendixsubsec Zooming functions
+
+The functions for zooming/unzooming were created mainly for recording
+animations. In manually created animation files, it is easier to use
+@code{morphview}. @xref{morphview}.
+
+@defun zoomcenter complex
+@end defun
+This function sets the center to zoom in on. The center is given as a position
+in fractal coordinates.
+
+@emph{Available as}: command
+@defun zoom
+@end defun
+Start zooming to the area specified by @code{zoomcenter}.
+
+The speed of zooming should be controlled by the function @code{speed}
+or in a more exact way by @code{maxstep} and @code{speedup}.
+
+@defun unzoom
+@end defun
+
+Start unzooming from the area specified by @code{zoomcenter}.
+
+@emph{Available as}: command
+@defun stop
+@end defun
+Stop zooming or unzooming.
+
+@emph{Available as}: command
+
+@node time, file, animf, menus
+
+
+
+@appendixsec Timing functions
+Timing functions are used to control the animation replay daemon. It can wait
+for a given time, or wait until calculation is complete. The animation functions
+are controlled by such waiting; animations that are running while delays start
+keep running through the delay.
+@menu
+* usleep:: Usleep
+* textsleep:: Wait for text
+* wait:: Wait for complete image
+@end menu
+@node usleep, textsleep, , time
+
+
+@appendixsubsec Usleep
+@defun usleep integer
+@end defun
+
+This function waits for a given amount of time (in usec) before processing
+the next command. The screen is recalculated and displayed at the beginning of
+usleep if necessary necessary. The remaining time is spent in waiting or
+performing animation.
+
+@emph{Available as}: command
+
+@node textsleep, wait, usleep, time
+
+
+@appendixsubsec Wait for text
+@defun textsleep
+@end defun
+
+
+This function's behavior is very similar to @code{usleep},
+but the time is calculated from the number of letters currently displayed
+onscreen. If you want to wait just long enough for the user to read the subtitle,
+use this function. The user can alter the replay speed as desired using
+@code{letterspersec}. @xref{letterspersec}. This value can be changed during
+replay with the arrow keys.
+
+@emph{Available as}: command
+
+@node wait, , textsleep, time
+
+
+@appendixsubsec Wait for complete image
+@defun wait
+@end defun
+
+Wait until the image is complete. You should always use this function after
+zooming or unzooming when dynamic resolution is in use. This ensures that
+the image calculation will be complete so the user can see the result before
+the animation continues. It may also be useful in combination with filters like
+motion blur. @xref{blur}.
+
+This function deadlocks if used with animation functions; don't
+do that.
+
+@emph{Available as}: command
+
+@node file, edit, time, menus
+
+
+
+@appendixsec File
+@menu
+* loadpos:: Load
+* savepos:: Save
+* record:: Record
+* play:: Replay
+* saveimg:: Save image
+* loadexample:: Load random example
+* savecfg:: Save configuration
+* quit:: Quit
+@end menu
+@node loadpos, savepos, , file
+
+
+@appendixsubsec Load XaoS position file
+
+Load a XaoS position file (@code{*.xpf}).
+See the format description for more information.
+
+@emph{Available as}: menu item, command line option
+
+@node savepos, record, loadpos, file
+
+
+@appendixsubsec Save XaoS position file
+@defun savepos file
+@end defun
+
+Save current state to a XaoS position file (@code{*.xpf}). This file is
+human-readable, and can easily be improved by hand after saving, or used as
+a base for animations.
+See the format description for more information.
+
+@emph{Available as}: menu item, command line option, command
+
+@node record, play, savepos, file
+
+
+@appendixsubsec Record animation
+@defun record bool [ file ]
+@end defun
+
+
+e
+Toggle recording to a XaoS animation file (@code{*.xaf}). This file is
+human-readable, and can easily be improved by hand after recording.
+See the format description for more information.
+
+From the scripting language, @code{(record #t)} enables recording, and
+@code{(record #f)} disables it.
+
+@emph{Available as}: menu item, command line option, command
+
+@node play, saveimg, record, file
+
+
+@appendixsubsec Replay animation
+
+Replay a XaoS animation file (@code{.xaf}).
+
+@emph{Available as}: menu item, command line option
+
+@node saveimg, loadexample, play, file
+
+
+@appendixsubsec Save image
+@defun saveimg file
+@end defun
+
+Save current state to an image file. This file is in @code{.png} (portable
+network graphics) format, which can be read by many applications varying from
+graphics programs all the way to Web browsers.
+
+This function needs an external library called @code{libpng}. If the library
+wasn't available during compilation, this function is unavailable too.
+Please see @code{INSTALL} for more information about obtaining libpng
+and recompiling XaoS.
+
+@emph{Available as}: menu item, command line option, command
+
+@node loadexample, savecfg, saveimg, file
+
+
+@appendixsubsec Load random example
+@defun loadexample
+@end defun
+
+Choose random @code{.xpf} file from the @code{examples} directory and
+load it.
+You might use it as the starting point for next exploration.
+
+@emph{Available as}: menu item, command line option, command
+
+@node savecfg, quit, loadexample, file
+
+
+@appendixsubsec Save configuration
+@defun savecfg
+@end defun
+
+Save current configuration to @code{~/.xaosrc} (under Unix) or @code{xaos.cfg}
+(under DOS and Windows). XaoS automatically reloads the configuration from this
+file when it starts.
+
+@emph{Available as}: menu item, command line option, command
+
+@node quit, , savecfg, file
+
+
+@appendixsubsec Quit
+@defun quit
+@end defun
+
+Quit XaoS.
+
+@emph{Available as}: menu item, command line option, command
+
+@node edit, fractal, file, menus
+
+
+@appendixsec Edit
+A fairly ordinary Edit menu.
+@menu
+* undo:: Undo
+* redo:: Redo
+* copy:: Copy
+* paste:: Paste
+@end menu
+@node undo, redo, , edit
+
+
+@appendixsubsec Undo
+Undo last operation. `Last operation' is quite hard to define in
+XaoS (where changes are continuous), so it might be surprising.
+I hope it will do what you want.
+
+@emph{Available as}: menu item
+@node redo, copy, undo, edit
+
+
+@appendixsubsec Redo
+Redo last undone operation. See undo. @xref{undo}.
+
+@emph{Available as}: menu item
+@node copy, paste, redo, edit
+
+
+@appendixsubsec Copy
+Copy fractal to clipboard. This is a platform-dependent operation that may
+not have an analogue on your platform (e.g. there is no concept of a clipboard
+under aalib).
+
+@emph{Available as}: menu item
+@node paste, , copy, edit
+
+
+@appendixsubsec Paste
+Paste fractal from clipboard. This is a platform-dependent operation that may
+not have an analogue on your platform (e.g. there is no concept of a clipboard
+under aalib).
+
+@emph{Available as}: menu item
+
+@node fractal, calc, edit, menus
+
+
+@appendixsec Fractal
+This menu contains all functions related to fractal parameters and display;
+you can change things like the formula used, coloring modes, seeds and much
+else.
+
+@menu
+* formula:: Formula
+* mformula:: formulae
+* incoloring:: Incoloring mode
+* outcoloring:: Outcoloring mode
+* plane:: Plane
+* palettemenu:: Palette
+* uimandelbrot:: Mandelbrot mode
+* uiperturbation:: Perturbation
+* uiview:: View
+* initstate:: Reset to defaults
+* tcolor:: True-color coloring modes
+@end menu
+@node formula, uimandelbrot, , fractal
+
+
+@appendixsubsec Formula
+@defun formula keyword
+@end defun
+
+Set the current fractal formula. @code{keyword} should be one of the
+following:
+@table @strong
+@item 'mandel
+Standard Mandelbrot set. @xref{mandel}.
+@item 'mandel3
+Mandelbrot set, power 3. @xref{mandel3}.
+@item 'mandel4
+Mandelbrot set, power 4.
+@item 'mandel5
+Mandelbrot set, power 5.
+@item 'mandel6
+Mandelbrot set, power 6.
+@item 'newton
+Newton's approximation method. @xref{newton}.
+@item 'barnsley
+First Barnsley's formula. @xref{barnsley}.
+@item 'octo
+Fractint's octo. @xref{octal}.
+@item 'phoenix
+Phoenix. @xref{phoenix}.
+@item 'magnet
+Magnet. @xref{magnet}.
+@end table
+
+@emph{Available as}: command
+
+@node uimandelbrot, uiperturbation, formula, fractal
+
+
+@appendixsubsec Mandelbrot/Julia mode
+
+Most fractals rendered by XaoS can be represented as Mandelbrot sets or Julias.
+Each point in the Mandelbrot set has its own Julia set. To learn more about
+this correspondence, see the tutorial on the Julia set.
+
+This function switches between Mandelbrot and Julia representations. When
+switching to Julia, you need to set the seed---a point selected from the
+Mandelbrot set.
+
+If you run this function from the menu, you are prompted for the Julia seed
+as a number. Often, this can be clumsy, and it would be easier to specify a
+point with the mouse pointer. If you hit the @code{M} key instead of
+using the menu, the current mouse position is used.
+
+Good seedpoints lie at the boundaries of the Mandelbrot set; other seeds
+usually generate quite a boring fractal. You can also explore various seeds
+at high speed using the Fast Julia mode. @xref{fastjulia}.
+
+Not all fractals have Julias, but XaoS can generate fake Julia sets for
+those that do not, which use some Julia-like modification of the formula;
+so this function is currently usable for all fractal types.
+
+@emph{Available as}: menu item
+@defun julia bool
+@end defun
+
+This function is used to enable/disable julia mode in animation files.
+
+@emph{Available as}: command line option, command
+@defun juliaseed complex
+@end defun
+
+Select the current julia seed.
+
+@emph{Available as}: command line option, command
+
+@node uiperturbation, uiview, uimandelbrot, fractal
+
+
+@appendixsubsec Perturbation
+
+Perturbation is a simple trick which changes the point at which orbits start.
+Traditionally zero is used, but other values can generate interesting
+results too.
+
+On enabling this function from the menu, you will be asked for a complex
+number specifying the perturbation. It is a toggle; selecting it again
+resets the perturbation to zero without prompting.
+
+It can be used to specify a complex number representing a point on the screen.
+If you hit the @code{B} key instead of using the menu, the current mouse
+position is used. This too is a toggle, so @code{B} again will disable
+perturbation by setting it to zero.
+
+This function only has an effect for certain formulae (like the
+Mandelbrot set</a>) and only then in <a uimandelbrot>Mandelbrot mode. @xref{mandel}.
+
+@emph{Available as}: menu item
+@defun perturbation complex
+@end defun
+
+This is the scripting-language variation of the perturbation function. Instead
+of toggling, you always specify the perturbation to use. Use 0 0 to disable
+perturbation.
+
+@emph{Available as}: command line option, command
+
+@node bailout, fastjulia, maxiter, calc
+
+
+@appendixsubsec Bailout
+
+Bailout is the value which is checked for each point of
+the orbit if the point is far enough
+from the complex zero point in the current iteration.
+If the point is far enough, then the iteration immediately
+stops and the starting point on the screen will be
+painted with a given colour, depending on the fractal
+type and many other settings.
+
+For the Mandelbrot set
+this value is 4. Other fractal types usually
+have the same bailout value. For most fractals many bailout values
+give more or less similar output. E.g., for the second order
+Mandelbrot set one can prove that the sequence |z| (z:=z^2+c) tends to
+infinity if and only if |z|>2 for some element z of this sequence.
+In XaoS program, Bailout value is the square of this 2, i.e. you can change this
+to any value greater than 2 for similar results.
+
+Other fractal types may use other bailout values. The default
+is 4 for each types.
+
+@emph{Available as}: menu item, command line option, command
+@defun bailout float
+@end defun
+
+
+@node uiview, initstate, uiperturbation, fractal
+
+
+@appendixsubsec View
+
+Set your current viewpoint in the fractal. This function is useful when you have
+found some interesting coordinates somewhere (on a web page, perhaps) and you
+want to see that position in XaoS.
+
+In the dialog you will be asked for the @emph{center}, @emph{radius}
+and @emph{angle} of the image.
+
+The center specifies the point which is displayed at the center of the screen.
+The radius is the radius of a circle around this point; XaoS will size the image
+so that this circle only just fits on the screen. The angle gives the rotation of
+the image in degrees.
+
+People specify fractal coordinates in many ways. Some people use the coordinates
+of the upper-left and lower-right visible points, specifying the coordinates as four
+numbers @math{x1}, @math{y1}, @math{x2}, @math{y2}.
+To set the same viewpoint in XaoS, set the real portion of the center to
+@math{(x1+x2)/2}, the imaginary part of center to @math{(y1+y2)/2}, and
+the radius to the greater of @math{x2-x1} and @math{y2-y1}.
+
+Other programs use a zoom factor instead of a radius. For these, you can set the
+radius to @math{2/zoom}.
+
+@emph{Available as}: menu item
+@defun view float float float float
+@end defun
+
+This function is used to set the visible area of fractal in animation files.
+It doesn't let let you specify the angle, (for that, see the separate function
+@code{angle}), but lets you specify an ellipse instead of a circle. You can
+specify both a real and an imaginary radius, so you have better control over the
+area that will be visible. XaoS will size the image so that the ellipse only just
+fits on the screen.
+
+@emph{Available as}: command line option, command
+@defun angle float
+@end defun
+
+Set the rotation angle in degrees. By default this causes recalculation of the
+screen. You can enable the fast rotation mode, which lets you
+rotate the screen without recalculation; but it slows down other things, so
+don't forget to disable it later.
+
+@emph{Available as}: command line option, command
+
+@node initstate, plane, uiview, fractal
+
+
+@appendixsubsec Reset to defaults
+@defun initstate
+@end defun
+
+This function resets most of XaoS's values to their defaults. It is useful when
+you get lost and want to start from the beginning. It should also be used
+as the first command of every animation file, to ensure that the file is always
+played with the same settings in effect.
+
+@emph{Available as}: menu item, command line option, command
+
+@node plane, incoloring, initstate, fractal
+
+
+@appendixsubsec Plane
+@defun plane integer
+@end defun
+
+All fractals displayed by XaoS are functions with a complex parameter.
+They can be be displayed in the normal complex plane where the @code{x}
+coordinate is the real part of the number and the @code{y} is imaginary;
+but they can also be displayed differently:
+@table @strong
+@item @math{mu}
+Normal complex plane (default)
+@item @math{1/mu}
+Inversion---infinity is at 0 and
+0 is at infinity.
+@item @math{1/(mu+0.25)}
+Similar to inversion, but moves
+the center outside the Mandelbrot set,
+so it looks parabolic.
+@item @math{lambda plane}, @math{1/lambda}, @math{1/lambda-1}
+Lambda plane and its inversion, and with a different center.
+@item @math{1/(mu-1.40115)}
+A very interesting mode for the
+Mandelbrot set, this makes small
+things large, for easier browsing
+of the set's details.
+@end table
+The tutorial about planes has some examples.
+
+
+
+In the scripting language, the planes are numbered as follows:
+
+@table @strong
+@item 0
+@math{mu}
+@item 1
+@math{1/mu}
+@item 2
+@math{1/(mu+0.25)}
+@item 3
+@math{lambda}
+@item 4
+@math{1/lambda}
+@item 5
+@math{1/(lambda-1)}
+@item 6
+@math{1/(mu-1.40115)}
+@end table
+
+@emph{Available as}: command line option, command
+
+@node incoloring, outcoloring, plane, fractal
+
+
+@appendixsubsec Inside coloring mode
+@defun incoloring integer
+@end defun
+
+Areas inside the set are usually filled in black, but this is only a convention;
+you could color them in differently to make the fractal look more interesting.
+The only method available to make areas inside the set visible is to display
+the value of the latest orbit as the value of each pixel.
+
+The tutorial on incoloring has more information and
+examples.
+
+XaoS has many different ways to show that value. The cryptic names of the modes
+are mathematical formulae, where @emph{real} means the real part of the
+latest orbit, and @emph{imag} means the imaginary part. @emph{zmag}
+uses the magnitude of the value. The @emph{Decomposition-like} method uses
+the angle of the orbit. Also, truecolor incoloring modes are available, that
+display one value in each of the red, blue and green color planes (or, for some
+modes, in each of the hue, saturation and value planes).
+
+In the scripting language, the incoloring mode is specified by one of the
+following integers:
+
+@table @strong
+@item 0
+@math{0} (default)
+@item 1
+@math{zmag}
+@item 2
+Decomposition-like
+@item 3
+@math{real/imag}
+@item 4
+@math{abs(abs(c)-abs(r))}
+@item 5
+@math{cos(mag)}
+@item 6
+@math{mag*cos(real^2)}
+@item 7
+@math{sin(real^2-imag^2)}
+@item 8
+@math{atan(real*imag*creal*cimag)}
+@item 9
+squares
+@item 10
+Truecolor. To set exact parameters for truecolor coloring use the
+@code{tcolor} command.
+@end table
+
+@emph{Available as}: command line option, command
+
+@node outcoloring, tcolor, incoloring, fractal
+
+
+@appendixsubsec Outside coloring mode
+@defun outcoloring integer
+@end defun
+
+Outcoloring modes are similar to incoloring modes, but indicate
+how to display the areas outside the set instead. As with incoloring modes, the
+value of the latest orbit can be used to determine the color of each pixel, but the
+default is to use the number of iterations needed for the value at that point to become
+recognisably divergent as the color.
+
+The tutorial on outcoloring has more information and
+examples.
+
+The cryptic names of the modes are mathematical formulae, where @emph{iter}
+means the number of iterations required for the value to become recognisably divergent,
+@emph{real} means the real part of the latest orbit, and @emph{imag}
+means the imaginary part. @emph{binary decomposition} uses a different color
+when the imaginary part of the orbit is lower than zero, and @emph{smooth}
+attempts to remove stripes and discontinuities. Also, truecolor outcoloring
+modes are available, that display one value in each of the red, blue and green color planes
+(or, for some modes, in each of the hue, saturation and value planes).
+
+In the scripting language, the outcoloring mode is specified by one of the following
+integers:
+
+@table @strong
+@item 0
+@math{iter} (default)
+@item 1
+@math{iter+real}
+@item 2
+@math{iter+imag}
+@item 3
+@math{iter+real/imag}
+@item 4
+@math{iter+real+imag+real/imag}
+@item 5
+binary decomposition
+@item 6
+biomorphs
+@item 7
+potential
+@item 8
+color decomposition
+@item 9
+smooth
+@item 10
+True-color outcoloring mode. To set exact parameters for truecolor coloring use @code{outtcoloring}. @xref{tcolor}.
+@end table
+
+@emph{Available as}: command line option, command
+
+@node tcolor, , outcoloring, fractal
+
+
+@appendixsubsec Truecolor coloring mode
+@defun intcoloring integer
+@end defun
+@defun outtcoloring integer
+@end defun
+
+Truecolor coloring modes are similar to incolor and
+outcolor coloring modes; but instead of using a palette,
+they directly calculate the red, green and blue components of the color.
+This lets you display more parameters at once, and produces interesting
+and often attractive results. On 8bpp displays you need to enable the
+palette emulator filter first to see anything, amd the quality
+won't be so good, as far fewer colors are available per parameter.
+
+The tutorial on truecolor coloring modes has more
+information and examples.
+
+The cryptic names of the modes are always three mathematical formulae (one for
+each color component), where @emph{real} means the real part of the latest
+orbit, and @emph{imag} means the imaginary part.
+
+To enable inside/outside truecolor coloring mode in the scripting language,
+set @code{incoloring}/@code{outcoloring} value to 10 (truecolor coloring
+mode) before (or after) calling @code{intcoloring} or @code{outtcoloring}.
+
+In the scripting language, the coloring mode is specified by one of the following
+integers:
+
+@table @strong
+@item 0
+black
+@item 1
+@math{re*im} @math{sin(re^2)} angle
+@item 2
+@math{sin(re)} @math{sin(im)} @math{sin(square)}
+@item 3
+hsv
+@item 4
+hsv2
+@item 5
+@math{cos(re^c)} @math{cos(im^2)} @math{cos(square)}
+@item 6
+@math{abs(re^2)} @math{abs(im^2)} @math{abs(square)}
+@item 7
+@math{re*im} @math{re*re} @math{im*im}
+@item 8
+@math{abs(im*cim)} @math{abs(re*cre)} @math{abs(re*cim)}
+@item 9
+@math{abs(re*im-csqr)} @math{abs(re^2-csqr)} @math{abs(im^2-csqr)}
+@end table
+
+@emph{Available as}: command line option, command
+
+@node calc, mfilter, fractal, menus
+
+
+
+@appendixsec Calculation
+This menu contains functions that control calculation parameters such as
+the maximum iteration count and periodicity checking.
+@menu
+* range:: Solid guessing
+* dynamic:: Dynamic resolution
+* periodicity:: Periodicity checking
+* maxiter:: Iterations
+* bailout:: Bailout
+* fastjulia:: Fast Julia mode
+* dynamic:: Dynamic resolution
+* rotate:: Rotation
+@end menu
+@node range, periodicity, , calc
+
+
+@appendixsubsec Solid guessing range
+@defun range integer
+@end defun
+
+XaoS has a solid guessing optimization: if all corners of a rectangle have
+the same color, it assumes that the whole rectangle is a solid colored block,
+and doesn't calculate points inside the rectangle. This optimization saves
+lots of calculation, but sometimes introduces errors. This value alters the
+maximum size of the rectangle that can be guessed at one time. The default
+value is 3; use 0 to disable the optimization.
+
+@emph{Available as}: command line option, command
+
+@node periodicity, maxiter, range, calc
+
+
+@appendixsubsec Periodicity checking
+@defun periodicity bool
+@end defun
+
+Periodicity checking is one way to speed up the calculation. Areas inside the
+set always need @code{maxiter} iterations to determine that
+the point is probably inside the set (while it is rare for areas outside to
+need anywhere near that much). Often the orbital trajectory falls into a
+periodic, repeating cycle; if that can be detected, the calculation can be
+stopped early, as there's no way that the orbit can ever leave the cycle
+again (hence it cannot diverge, hence the point must be inside the set).
+
+Implementating this method efficiently is quite problematic. It slows down
+the cases where cycles are not found, because cycle-checking is quite hard work
+and has to take place for all points, even those that don't become cyclic.
+Because of the inexactness of floating-point calculations, the cycles are
+never exact, so you need to use an error value. Higher error values mean that
+cycles will be detected sooner, while lower error values increase the
+exactness of the calculation. Higher values can introduce serious errors,
+especially at the front of the Mandelbrot set. XaoS detects this automatically
+and corrects for it in most cases, but sometimes it might be wrong. Also,
+other optimizations in XaoS (such as boundary tracing) don't give this method
+much of a chance to run, since areas inside the set are usually not
+calculated at all.
+
+That's why the advantages of this optimization are questionable. You should
+probably experiment with enabling and disabling it. Sometimes XaoS is faster
+with this enabled, sometimes when disabled. Also, this method works only
+when incoloring methods are disabled, and only for some
+fractal types (some fractal types, e.g. newton, don't have any concept of
+an area `inside the set' at all.)
+
+The tutorial chapter ``Escape time fractals'' has
+more information on fractal calculation in XaoS, and there is a lengthy
+section in the hacker's manual (@code{xaosdev.texinfo}) devoted to the
+subject.
+
+@emph{Available as}: menu item, command line option, command
+
+@node maxiter, bailout, periodicity, calc
+
+
+@appendixsubsec Iterations
+@defun maxiter integer
+@end defun
+
+When the fractal set is calculated, a orbital trajectory is examined for each
+point. If the orbit diverges to infinity, the point is outside the set.
+Otherwise, the point is inside the set. For exact calculations, you need to
+know the entire orbital trajectory, which is infinitely long for areas inside
+the set, so fractals cannot be calculated exactly. By default, XaoS calculates
+at most 170 positions (iterations) and then gives up; if the point is still
+inside the bail-out value, it guesses that the point is inside the set.
+
+When zoomed into a detailed area, especially one close to the set boundary,
+this value could become too low, and the fractal will become boring.
+You might try increasing this value if you want to get the image interesting
+again; but this necessarily slows down the calculation at the same time.
+
+The tutorial chapter ``Escape time fractals'' has
+more information on fractal calculation in XaoS, and there is a lengthy
+section in the hacker's manual (@code{xaosdev.texinfo}) devoted to the
+subject.
+
+@emph{Available as}: menu item, command line option, command
+
+@node fastjulia, dynamic, bailout, calc
+
+
+@appendixsubsec Fast Julia mode
+@defun fastjulia bool
+@end defun
+
+By default, changing the seed for the Julia set requires recalculation of the
+image (which is quite slow). It's a nice effect to change the seed smoothly and
+show the Julia set morphing as the seed changes. XaoS has a special algorithm
+which can calculate such morphings in realtime. It is very inexact, but it is
+good enough for a fast preview.
+
+If you want to select a good seedpoint, enable fast Julia mode and find a
+nice place by dragging with the first mouse button depressed; then change to
+the Julia mode to see the exact image.
+
+@emph{Available as}: menu item, command line option, command
+
+@node dynamic, rotate, fastjulia, calc
+
+
+
+@appendixsec Dynamic resolution
+@defun fastmode keyword
+@end defun
+
+XaoS performs many optimizations, but fairly often this is not enough. In order
+to keep a high framerate, XaoS automatically lowers the resolution of the image,
+increasing it when there is time for more calculation. This feature is enabled by
+default when animating, but you might also like to enable it for new images
+(which makes the image `come into focus' when it is recalculated from scratch for
+whatever reason), or disable it completely if you don't like it.
+
+In the scripting languge, the keyword should be one of the following:
+@table @strong
+@item @code{'never}
+Disable dynamic resolution
+@item @code{'animate}
+Use only for animations (default)
+@item @code{'new}
+Use also for new images
+@end table
+@node rotate, , dynamic, calc
+
+
+
+@appendixsec Image rotation
+
+XaoS has support for rotation of the image to any angle. By default, changing
+the angle requires recalculation of the whole screen, but when
+@emph{fast rotation mode} is enabled, the angle can be changed smoothly.
+In this mode XaoS calculates a larger non-rotated image and rotates it when
+needed, so it increases memory requirements and slows XaoS down; hence, it
+should be disabled when rotation is not being used.
+
+The user interface provides two rotation modes---@emph{rotate by
+mouse} which allows the angle to be changed by dragging with the first
+mouse button depressed, and @emph{continuous rotation mode}, where the image
+is rotated clockwise continuously, and the arrow keys can be used to change
+the rotiation speed.
+@defun fastrotate bool
+@end defun
+
+This function is used to enable and disable fast rotation mode.
+@emph{Available as}: command line option, command
+@appendixsubsec Automatic rotation
+@defun autorotate bool
+@end defun
+
+Use this function to enable continuous rotation. In the scripting language you
+can also use @code{morphangle} to get an outwardly similar
+but more controllable effect.
+@defun rotationspeed float
+@end defun
+
+Specify the speed of continuous rotation, in degrees per second.
+Negative values are allowed and rotate anticlockwise.
+
+@emph{Available as}: menu item, command line option, command
+
+
+
+@node mfilter, ui, calc, menus
+
+
+
+@appendixsec Filters
+Filters are a post-calculation effect applied to the resulting image. They
+can do things like motion blurring, edge detection, emulation of palettes
+or truecolor on displays that can't handle them, and such things. There is
+a tutorial chapter about them.
+
+@menu
+* filter:: Filter command
+* edge:: Edge detection
+* edge2:: Edge detection2
+* starfield:: Starfield
+* stereogram:: Random dot stereogram
+* interlace:: Interlace filter
+* blur:: Motion blur
+* emboss:: Emboss
+* palettef:: Palette emulator
+* anti:: Antialiasing
+* truecolor:: Truecolor emulator
+@end menu
+@node filter, edge, , mfilter
+
+
+@appendixsubsec Filter command
+@defun filter keyword bool
+@end defun
+
+This command is used to enable or disable filters. @xref{mfilter}.
+The @emph{keyword} specifies the filter to change, and should be one of
+the following:
+
+@table @strong
+@item @code{'edge}
+Edge detection
+@item @code{'edge2}
+Edge detection2
+@item @code{'starfield}
+Starfield
+@item @code{'stereogram}
+Random dot stereogram
+@item @code{'interlace}
+Interlace filter
+@item @code{'blur}
+Motion blur
+@item @code{'emboss}
+Emboss
+@item @code{'palette}
+Palette emulator
+@item @code{'anti}
+Antialiasing
+@item @code{'truecolor}
+Truecolor
+@end table
+
+@emph{Available as}: command
+@node edge, edge2, filter, mfilter
+
+
+@appendixsubsec Edge detection
+
+This filter is a standard edge detection algorithm; solid areas are filled
+in black. Some fractals look very interesting with this filter (and some
+areas of some fractals just look like noise). This version of the filter produces
+relatively wide lines, so is useful at higher resolutions. The filter
+edge detection2 makes thinner lines, for the low resolution modes.
+
+@emph{Available as}: menu item, command line option
+
+@node edge2, starfield, edge, mfilter
+
+
+@appendixsubsec Edge detection2
+
+This filter is a standard edge detection algorithm; solid areas are filled
+in black. Some fractals look very interesting with this filter (and some
+areas of some fractals just look like noise). This version of the filter produces
+relatively tight lines, so is useful at lower resolutions. The filter
+edge detection makes thinner lines, for the high resolution modes.
+
+@emph{Available as}: menu item, command line option
+
+@node starfield, stereogram, edge2, mfilter
+
+
+@appendixsubsec Starfield
+
+The starfield filter generates random stars whose density depends on the
+iteration count. Choose your favorite spiral fractal and enable this filter
+to get a Grand Design spiral galaxy :)
+
+@emph{Available as}: menu item, command line option
+
+@node stereogram, interlace, starfield, mfilter
+
+
+@appendixsubsec Random dot stereogram
+
+Fractal images are good as a base for random dot stereograms. In
+case you don't know what these are, please point your browser to
+Google or another search engine and find some articles about such
+images, because learning to read such images takes some effort. They
+make it possible to generate three dimensional images on a normal monitor
+without any additional hardware, by exploiting bugs in the human brain
+(although you need two working eyes, and some people never learn to
+see them; they can simply ignore this feature).
+
+XaoS is able to generate these images in animations, so you may use
+all normal XaoS functions (except palette changing and palette rotation,
+which makes no sense applied to a stereogram). To make the animation yet
+more exciting, XaoS emulates ``falling'' into the set; while you zoom in,
+your distance from the set drops and drops---but you never hit it; when the
+set reaches the level of your monitor, the distance is changed again so
+you are far away.
+
+To make this work right, XaoS needs to know the @emph{exact size of your
+monitor}. Because most platforms have no way to determine this, you need to
+use @emph{command line options} to tune it. If it's not set or is wrong,
+the stereograms will probably be impossible to see (if your monitor is too
+big or resolution too low), or the images will seem to be shallow (if your
+monitor is too small or resolution too high).
+
+By default XaoS expects my 15" monitor (29.0cm x 21.5 cm). Another
+cause of problems is the virtual screen supported by some windowed
+environments (like some X servers) that makes a program think that the
+resolution is higher than it actually is, and you see only part of
+this extra-large screen.
+
+The worst thing you could possibly do is to run full-screen XaoS in some
+graphical windowing system (OS/2 on top of Windows or Wine on top of Linux,
+perhaps) where XaoS can't tell the real size of its window at all. In such
+cases, it's normally better (not to mention faster) to run XaoS natively,
+rather than under such an emulation layer.
+
+The following command line options are provided to specify sizes:
+
+@table @strong
+@item @code{-screenwidth}, @code{-screenheight}
+Lets you specify the size of your screen in centimeters. Note that
+you need to specify the size of the visible image on the monitor, not
+the size with edge borders, or the size of the tube. The simplistic
+`my monitor is 17", just turn 17" into centimeters' doesn't work;
+that 17" is a marketing figure and has only a vague connection to
+reality. Get out a ruler and measure it.
+
+@item @code{-pixelwidth}, @code{-pixelheight}
+Lets you specify the exact size of a single pixel, if XaoS cannot
+determine this for itself from your screen size.
+@end table
+
+These options are used by some other parts of XaoS as well, so you should
+use them even when you don't want to see stereograms. You should probably
+write a small starting script (or alias, or shortcut; whatever your environment
+uses) that passes the correct parameters to XaoS.
+
+If the window is @emph{smaller than 8cm in any direction}, you will probably be
+unable to see anything; make the window bigger.
+
+The correct way to see XaoS stereograms is:
+@table @strong
+@item 1
+Start XaoS with options specifying the exact size of your screen or one pixel on it
+@item 2
+Sit 60cm away from monitor
+@item 3
+If you use a windowed environment, resize XaoS's window to make it wider than, say, 15 cm.
+@item 4
+Enable the filter (by pressing @code{E})
+@item 5
+focus on a point far away from the monitor (try to use your
+own reflection, if your monitor's not antireflective); the random blurring should
+eventually fall into the pattern of a Mandelbrot set.
+@item 6
+Carefully use your mouse to zoom into interesting areas
+(it is easy to lose concentration when you are not trained; but you can use
+the autopilot...)
+@item 7
+Enjoy animation :)
+@end table
+
+If you still can't see the stereograms, it could be that the fractal, or your eye,
+is deformed. A deformed fractal can be caused by your specifying your monitor size
+wrongly. Visual problems that damage depth perception, as well as problems like
+astigmatism, can make it impossible to see stereograms at all.
+
+
+@emph{Available as}: menu item, command line option
+
+@node interlace, blur, stereogram, mfilter
+
+
+@appendixsubsec Interlace filter
+
+The interlace filter halves the horizontal resolution, and in each frame alternates
+between drawing only the even and only the odd lines. This speeds up the
+calculation, and in higher resolutions produces a motion-blur-like effect.
+
+@emph{Available as}: menu item, command line option
+
+@node blur, emboss, interlace, mfilter
+
+
+@appendixsubsec Motion blur
+
+Motion blur mixes the current frame with previous ones to produce a
+motion-blur effect. It might be rather slow in 16bpp truecolor modes. The best
+results can probably be seen in 8bpp modes, so you might want to enable the
+palette filter first.
+
+@emph{Available as}: menu item, command line option
+
+@node emboss, palettef, blur, mfilter
+
+
+@appendixsubsec Emboss
+
+This is a standard emboss filter, as seen in programs such as the GIMP or
+Photoshop. It produces especially nice results with the smooth
+outcoloring mode. @xref{outcoloring}.
+
+@emph{Available as}: menu item, command line option
+
+@node palettef, anti, emboss, mfilter
+
+
+@appendixsubsec Palette emulator
+
+XaoS can work in either palette or truecolor mode. Both modes
+have advantages and disadvantages. Palette mode allows effects such as palette
+rotation, while truecolor mode allows smoother incoloring
+and outcoloring modes and the
+truecolor coloring modes. If your display is truecolor, you
+can enable this filter to get palette emulation (albeit not as cheaply as in
+a real paletted mode).
+
+@emph{Available as}: menu item, command line option
+
+@node anti, truecolor, palettef, mfilter
+
+
+@appendixsubsec Antialiasing
+
+Antialiasing is a technique to increase image quality by eliminating jagged
+edges. XaoS calculates four values for each pixel (on the subpixel boundaries)
+and uses the average of them for the pixel value.
+
+This filter slows XaoS down a @emph{lot} and greatly increases memory
+requirements. It is useful mainly when you want to save images and want to make
+them look as nice as possible. Antialiasing also helps a lot when you want to
+encode JPEG or MPEG files; they are much shorter if antialiased (MPEG and JPEG
+hate jagged edges).
+
+@emph{Available as}: menu item, command line option
+
+@node truecolor, , anti, mfilter
+
+
+@appendixsubsec Truecolor emulator
+
+XaoS can work in either palette or truecolor mode. Both modes
+have advantages and disadvantages. Palette mode allows effects such as palette
+rotation, while truecolor mode allows smoother incoloring
+and outcoloring modes and the
+truecolor coloring modes. If your display is 8bpp, you can enable
+this filter to get truecolor emulation (but, obviously, not with as many colors
+as a real truecolor display).
+
+More information about filters
+
+@emph{Available as}: menu item, command line option
+
+@node ui, misc, mfilter, menus
+
+
+
+@appendixsec UI
+
+This menu contains functions to control the user interface layer of XaoS:
+zooming speed, the autopilot, realtime status information, and so on.
+
+@menu
+* speed:: Zooming speed
+* letterspersec:: Letters per second
+* autopilot:: Autopilot
+* recalculate:: Recalculate
+* interrupt:: Interrupt
+* nogui:: Disable XaoS's builtin GUI
+* status:: Status
+* ministatus:: Ministatus
+@end menu
+@node speed, letterspersec, , ui
+
+
+@appendixsubsec Zooming speed
+@defun speed float
+@end defun
+
+Change zooming speed, where 1 is the default, 2 means twice as fast, and so on.
+
+@emph{Available as}: menu item, command line option, command
+
+In the scripting language you can use the following functions for better
+control:
+@defun maxstep float
+@end defun
+
+Selects the zooming/unzooming speed. The parameter specifies how much of the
+range will be removed each twentieth of a second; 0 means nothing, 1 means
+everything (the parameter obviously has to be less than 1).
+Higher values mean faster zooming.
+
+@emph{Available as}: command
+@defun speedup float
+@end defun
+When zooming/unzooming, every twentieth of a second the @code{speedup}
+value is added to the current step until @code{maxstep} is reached.
+So this value selects the rate at which zooming stops and starts.
+Both these functions are more for internal use of XaoS then for manually
+written scripts, but they could come in useful nonetheless.
+
+@emph{Available as}: command
+
+@node letterspersec, autopilot, speed, ui
+
+
+@appendixsubsec Letters per second
+@defun letterspersec integer
+@end defun
+
+Speed of subtitles for the @code{textsleep} function.
+The user can set this value to suit; it can also be changed with the left and
+right arrow keys during animation replay.
+
+@emph{Available as}: command line option, command
+
+@node autopilot, recalculate, letterspersec, ui
+
+
+@appendixsubsec Autopilot
+@defun autopilot bool
+@end defun
+
+To make XaoS yet more impressive, we made a special autopilot mode that
+automatically drives into interesting boundaries of the set; you should
+press @code{A}, play your favorite music, drink coffee and relax. I never
+tried this but it should be really relaxing! Many pictures in the XaoS
+gallery were discovered using the autopilot.
+
+The autopilot also has some additional features. It backtracks if the
+zoomed picture is not interesting anymore, and can detect when it's zoomed
+into really a boring part of the fractal or reached the limit of floating
+point arithmetic on the platform, and restart zooming from the top.
+
+@emph{Available as}: menu item, command line option, command
+
+@node recalculate, interrupt, autopilot, ui
+
+
+@appendixsubsec Recalculate
+@defun recalculate
+@end defun
+
+Recalculate current fractal. This should be used when the fractal on the
+screen is strange because of error propagation caused by
+solid guessing. @xref{range}.
+
+@emph{Available as}: menu item, command line option, command
+
+@node interrupt, nogui, recalculate, ui
+
+
+@appendixsubsec Interrupt
+@defun interrupt
+@end defun
+
+Interrupt current calculation.
+
+@emph{Available as}: menu item, command line option, command
+
+
+@node nogui, status, interrupt, ui
+
+
+@appendixsubsec Disable XaoS's builtin GUI
+@defun nogui bool
+@end defun
+
+Disable XaoS menus and dialogs. This function should be used by external GUI
+programs; these manipulate XaoS via a pipe, so the internal GUI should be
+disabled at the same time. See the hacker's manual (@code{xaosdev.texinfo})
+for more details.
+
+@emph{Available as}: menu item, command line option, command
+
+@node status, ministatus, nogui, ui
+
+
+@appendixsubsec Status
+@defun status bool
+@end defun
+
+Enable/disable status information. This displays some useful information
+about the current fractal, such as viewpoint etc. (In low-resolution modes it
+also almost completely obscures the current fractal...)
+
+@emph{Available as}: menu item, command line option, command
+
+@node ministatus, , status, ui
+
+
+@appendixsubsec Ministatus
+@defun ministatus bool
+@end defun
+
+Enable/disable status line. This contains basic information such as how
+much you are zoomed and the framerate.
+
+@emph{Available as}: menu item, command line option, command
+
+@node misc, helpmenu, ui, menus
+
+
+
+@appendixsec Misc
+Miscellaneous functions.
+@menu
+* command:: Command
+* renderanim:: Render animation
+* clearscreen:: Clear screen
+* display:: Display fractal
+* text:: Display text
+* color:: Color
+* xtextpos:: Horizontal text position
+* ytextpos:: Vertical text position
+* textposition:: Text position
+* message:: Message
+@end menu
+@node command, renderanim, , misc
+
+
+@appendixsubsec Command
+
+You can invoke all XaoS functions using a simple command language reminiscent
+of Scheme. This option lets you run a single command. If you want to run more
+than one, you might want to use an XaoS animation file instead;
+they are written in the same language.
+
+@emph{Available as}: menu item
+
+@node renderanim, clearscreen, command, misc
+
+
+@appendixsubsec Render animation
+
+Render an animation to image files. See How to encode MPEG files
+for more information.
+
+@emph{Available as}: menu item,
+@node clearscreen, display, renderanim, misc
+
+
+@appendixsubsec Clear screen
+@defun clearscreen
+@end defun
+
+Clear the screen. To display the fractal again, use @code{display}. @xref{display}.
+This function is mainly useful in tutorials and similar animations.
+
+@emph{Available as}: menu item, command
+
+@node display, text, clearscreen, misc
+
+
+@appendixsubsec Display fractal
+@defun display
+@end defun
+
+Display fractal. This functions reverses the effect of the @code{clearscreen},
+line drawing and text output functions.
+
+@emph{Available as}: menu item, command
+
+@node text, color, display, misc
+
+
+@appendixsubsec Display text
+@defun text string
+@end defun
+
+Display the given text on the screen. This function is mainly useful in tutorials.
+Text should be cleared by printing lots of spaces, or using the
+@code{clearscreen}</a> or <a display>@code{display}
+functions. You might also want to use the @code{textposition}
+function to select the part of the screen to display the text on.
+
+To wait for the user to read the text, you can use the @code{textsleep}
+function.
+
+Example:
+
+
+@example
+(clearscreen)
+(textposition 'center 'middle)
+(text "Welcome into my animation")
+(textsleep)
+(display)
+@end example
+
+
+@emph{Available as}: menu item, command line option, command
+
+@node color, textposition, text, misc
+
+
+@appendixsubsec Color
+@defun color keyword
+@end defun
+
+Change text and line color. @emph{keyword} should be one of @code{'white},
+@code{'black} and @code{'red}.
+
+@emph{Available as}: menu item, command line option, command
+
+@node textposition, message, color, misc
+
+
+@appendixsubsec Text position
+@defun textposition keyword keyword
+@end defun
+
+Select text position. The first keyword specifies the horizontal
+position, the second the vertical position. The horizontal position should be
+one of @code{'left}, @code{'center}, and @code{'right}.
+The vertical should be one of @code{'top}, @code{'middle}, and @code{'bottom}.
+
+@emph{Available as}: command line option, command
+
+@node message, , textposition, misc
+
+
+@appendixsubsec Message
+@defun message string
+@end defun
+
+This function is almost identical to the @code{text} function,
+except that it uses message catalogs in the @code{catalog} directory to
+translate messages into other languages. It should be used only in the multi-lingual
+XaoS tutorials.
+
+@emph{Available as}: command line option, command
+
+@node helpmenu, xtextpos, misc, menus
+
+
+
+@appendixsec Help
+This menu contains help and tutorials.
+
+@node xtextpos, ytextpos, helpmenu, menus
+
+
+
+@appendixsec Horizontal text position
+Select the horizontal position used to display text. @xref{text}.
+It can be placed at the left, in the center or at the right.
+
+@node ytextpos, mformula, xtextpos, menus
+
+
+
+@appendixsec Vertical text position
+Select the vertical position used to display text. @xref{text}. It can be
+placed at the top, in the middle or at the bottom of the screen.
+
+@node mformula, palettemenu, ytextpos, menus
+
+
+
+@appendixsec formulae
+
+Each escape time fractal has its own formula. XaoS supports the following
+formulae:
+
+@menu
+* mandel:: Mandelbrot
+* mandel3:: Mandelbrot^3
+* octal:: Octal
+* newton:: Newton
+* barnsley:: Barnsley1
+* phoenix:: Phoenix
+* magnet:: Magnet
+@end menu
+@node mandel, mandel3, , mformula
+
+
+@appendixsubsec Mandelbrot
+
+The Mandelbrot set is the most famous escape time fractal ever. It has the
+simple formula @math{z=z^2+c}. See the tutorial chapter.
+
+@emph{Available as}: menu item, command line option
+
+@node mandel3, octal, mandel, mformula
+
+
+@appendixsubsec Mandelbrot^3---Mandelbrot^6 and Mandelbrot^9
+
+The Mandelbrot^3 fractal is a simple modification of the standard
+Mandelbrot set formula, using @math{z=z^3+c} instead of
+@math{z=z^2+c}.
+
+Other derivations of the Mandelbrot set (Mandelbrot^4 and so on) use even
+higher powers. See the tutorial chapter.
+
+@emph{Available as}: menu item, command line option
+@node octal, newton, mandel3, mformula
+
+
+@appendixsubsec Octal
+
+This is a less well-known fractal that Thomas discovered in Fractint.
+It has an interesting shape when displayed in the alternative
+planes. @xref{plane}. See the tutorial chapter.
+
+@emph{Available as}: menu item, command line option
+
+@node newton, barnsley, octal, mformula
+
+
+@appendixsubsec Newton
+
+This is Newton's approximation method for finding the roots of a polynomial. It
+uses the polynomial @math{x^3=1} and counts the number of iterations needed
+to reach the approximate value of the root. See the tutorial chapter.
+
+This fractal doesn't have Julia sets, but XaoS is able to generate Julia-like
+sets which are also very interesting (they are sometimes called ``Nova
+formulae'').
+
+@emph{Available as}: menu item, command line option
+
+@node barnsley, phoenix, newton, mformula
+
+
+@appendixsubsec Barnsley1
+
+This is a formula by Michael Barnsley. It produces very nice crystalline Julia
+sets. See the tutorial chapter.
+
+@emph{Available as}: menu item, command line option
+
+@node phoenix, magnet, barnsley, mformula
+
+
+@appendixsubsec Phoenix
+
+This formula produces very nice Julia sets.
+See the tutorial chapter.
+
+@emph{Available as}: menu item, command line option
+
+@node magnet, , phoenix, mformula
+
+
+@appendixsubsec Magnet
+
+This is a formula that comes from theoretical physics.
+It is derived from the study of theoretical lattices in the context of magnetic
+renormalization transformations.
+See the tutorial chapter.
+
+@emph{Available as}: menu item, command line option
+
+@node palettemenu, , mformula, menus
+
+
+
+@appendixsec Palette
+This menu contains functions to change the palette the fractal is displayed with.
+@menu
+* defpalette:: Default palette
+* randompalette:: Random palette
+* palette:: Custom palette
+* cycling:: Color cycling
+* shiftpalette:: Shift palette
+@end menu
+@node defpalette, randompalette, , palettemenu
+
+
+@appendixsubsec Default palette
+@defun defaultpalette number
+@end defun
+
+Create a default palette. In the scripting language, @code{number} specifies
+how much the palette is shifted by.
+
+Note that changing the palette in truecolor modes forces recalculation of
+the whole screen. To avoid this, you can enable the
+palette emulation filter first.
+
+@emph{Available as}: menu item, command line option, command
+
+@node randompalette, palette, defpalette, palettemenu
+
+
+@appendixsubsec Random palette
+@defun randompalette
+@end defun
+
+Create a random palette. XaoS will automatically pick one of its
+palette-generation algorithms and create one.
+
+Note that changing the palette in truecolor modes forces recalculation of
+the whole screen. To avoid this, you can enable the
+palette emulation filter first.
+
+@emph{Available as}: menu item, command line option, command
+
+@node palette, cycling, randompalette, palettemenu
+
+
+@appendixsubsec Custom palette
+@defun palette integer integer integer
+@end defun
+
+A custom palette lets you re-create some of the random palettes. The first value
+specifies the algorithm, which should currently be one of the following:
+@table @strong
+@item 0
+Default palette
+@item 1
+Black to color gradient
+@item 2
+Black to color to white gradient
+@item 3
+Cubistic-like algorithm.
+@end table
+The seed specifies a random seed for the palette; different seeds generate
+different palettes. The last value is the amount by which the palette is shifted.
+
+Note that changing the palette in the truecolor modes forces recalculation of
+the whole screen. To avoid this, you can enable the
+palette emulation filter first.
+
+@emph{Available as}: menu item, command line option, command
+
+@node cycling, shiftpalette, palette, palettemenu
+
+
+@appendixsubsec Color cycling
+@defun cycling bool
+@end defun
+
+Color cycling is an old and simple effect to animate fractals. The Mandelbrot
+set looks particularly nice when color-cycled. On truecolor displays, color
+cycling fails to initialize (since those displays don't have a palette).
+You can enable palette emulation filter to make it possible.
+
+@emph{Available as}: menu item, command line option, command
+
+In the user interface, colors can also be cycled in the opposite direction
+with the ``@emph{Reversed color cycling}'' function.
+
+To control the cycling speed, you coan use arrow keys or the
+``@emph{Color cycling speed}'' function.
+
+@emph{Available as}: menu item
+@defun cyclingspeed integer
+@end defun
+
+The parameter specifies the number of skips per second. It can be negative to
+cycle in the opposite direction.
+
+@emph{Available as}: menu item, command line option, command
+
+@node shiftpalette, , cycling, palettemenu
+
+
+@appendixsubsec Shift palette
+@defun shiftpalette integer
+@end defun
+
+Shift palette by the specified number of cells. This can be used to tune the
+palette's position on the fractal. You can also use the
+@emph{Shift one forward} and @emph{Shift one backward} functions
+for fine-tuning. Note that shifted and rotated palettes could look different on
+different displays (because they may have different palette sizes).
+
+Shifting the palette on truecolor displays causes a recalculation of the screen.
+To avoid this, you could use palette emulation filter. @xref{palettef}.
+
+@emph{Available as}: menu item, command line option, command
+
+
+@c ## menus controls ##
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+@comment node-name, next, previous, up
+@node about, support,menus ,Top
+@appendix About XaoS
+@appendix Credits
+(alphabetically)
+@table @strong
+@item Lucio Henrique de Araujo (lucio.matema@@gmail.com)
+Brazilian/Portuguese translation
+@item Samuel Bizien (samuel@@bizien.info)
+Beryl fractal
+@item Eric Courteau (ecourteau@@cplus.fr)
+francais.cat (translation of tutorials)
+@item Jean-Pierre Demailly (Jean-Pierre.Demailly@@ujf-grenoble.fr)
+Updates for French translation
+@item Radek Doulik (rodo@@atrey.karlin.mff.cuni.cz)
+TK interface, windowid patches
+@item Martin Dozsa (madsoft@@centrum.cz)
+cs.po (Czech translation of menus)
+@item Arpad Fekete (Fekete.Arpad.2@@stud.u-szeged.hu)
+Some new fractals, and the 'More formulae' menu
+@item Zelia Maria Horta Garcia (zeliagarcia@@seed.pr.gov.br)
+Brazilian/Portuguese translation
+@item Tim Goodwin (tgoodwin@@cygnus.co.uk)
+english.cat corrections
+@item Ben Hines
+autoconf suggestions, Mac OS X port
+@item Jan Hubicka (jh@@ucw.cz)
+Zooming routines, ugly interface, palettes, drivers, autopilot, filters, documentation, tutorials etc.
+@item Jens Kilian (jjk@@acm.org)
+BeOS driver, deutsch.cat
+@item Thomas A. K. Kjaer (takjaer@@imv.aau.dk)
+OS/2 ports (320x200 graphics and AA-lib)
+@item Zoltan Kovacs (kovzol@@math.u-szeged.hu)
+Internationalization, Hungarian translations, finalizing version 3.1, bug fixes, web design, current maintainer
+@item Zsigmond Kovacs (kovzsi@@gmail.com)
+Fractal examples
+@item J.B. Langston III (jb-langston@@austin.rr.com)
+Native Mac OS X port (from version 3.2.2); web redesign; co-maintainer
+@item Andreas Madritsch (amadritsch@@datacomm.ch)
+New fractal types, bailout, many fixes
+@item Mateusz Malczak (xaos@@malczak.info)
+User formula evaluation library
+@item Giorgio Marazzi (gmarazzi@@vtr.net)
+Improvements and fixes for espanhol.cat
+@item Thomas Marsh (thomas.marsh2@@gmail.com)
+First zoomer, formulae, planes, X11 driver, inversions, many ideas
+@item Dominic Mazzoni (dmazzoni@@cs.cmu.edu)
+Macintosh port (version 2.0)
+@item David Meleedy
+Grammatical and spelling fixed version of @code{xaos.6}
+@item Paul Nasca (zynaddsubfx@@yahoo.com)
+Ministatus improvement
+@item Nix (nix@@esperi.demon.co.uk)
+Grammatical and spelling fixed version of @code{xaos.hlp} and other files
+@item Terje Pedersen (terjepe@@login.eunet.no)
+Amiga port
+@item Cesar Perez (oroz@@users.sourceforge.net)
+Spanish translations
+@item Fabrice Premel (premelfa@@etu.utc.fr)
+Periodicity checking
+@item Jan Olderdissen (jan@@olderdissen.com)
+Win32 port
+@item Ilinca Sitaru (ilinca.sitaru@@gmail.com)
+Romanian translation
+@item Daniel Skarda
+Fractal examples
+@item Andrew Stone (Stone Design - www.stone.com)
+Videator Support, Cocoa improvements, performance mode, bug fixes
+@item Marton Torok (marton.torok@@gmail.com)
+Small fixes for pipes
+@item Pavel Tzekov (paveltz@@csoft.bg)
+Win32 support
+@item Charles Vidal
+Tcl/Tk interface
+@item Tapio K. Vocaldo (taps@@rmx.com)
+Macintosh port
+@item Tormod Volden
+Fixes for X11 driver to improve compatability with Xorg, XScreenSaver, Beryl and Compiz
+@item Philippe Wautelet (p.wautelet@@fractalzone.be)
+Bug fixes for version 3.1.1, French translation, gcc 4.0 fixes
+@item Sergio Zanchetta
+Italian translation
+@end table
+@subsection Included Software
+XaoS uses the following libraries. These libraries may be included
+with some binary distributions of XaoS.
+
+@emph{gettext 0.17}
+Website: @code{http://www.gnu.org/software/gettext/}
+Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc.
+License GPLv3+: GNU GPL version 3 or later (http://gnu.org/licenses/gpl.html)
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+@emph{GNU Scientific Library 1.11}
+Website: @code{http://www.gnu.org/software/gsl/}
+Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 The GSL Team.
+License GPLv3+: GNU GPL version 3 or later (http://gnu.org/licenses/gpl.html)
+This is free software: you are free to change and redistribute it.
+There is NO WARRANTY, to the extent permitted by law.
+
+@emph{libpng 1.2.25}
+Website: @code{http://www.libpng.org/pub/png/libpng.html}
+Copyright (c) 1998-2008 Glenn Randers-Pehrson
+Copyright (c) 1996-1997 Andreas Dilger
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+@c ## appendix about ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node support, index ,about ,Top
+@appendix Getting Support
+XaoS is a community-supported free software project. There are many ways
+to get help, all of which are explained below.
+
+@appendix Home Page
+The XaoS homepage is @code{http://xaos.sf.net}. Check here for the
+latest news and information about XaoS and to download the latest versions.
+
+
+@subsection Discussion Forums
+XaoS has two discussion forums hosted on SourceForge. You can read them
+freely, but in order to post, you must to register for a free SourceForge
+account.
+
+@table @strong
+@item Help
+Provides a place for you to ask for help using XaoS. Other XaoS users
+and/or the XaoS developers will answer your questions.
+
+
+@code{http://sourceforge.net/forum/forum.php?forum_id=17768}
+@item Open Discussion
+Provides a place to discuss anything related to XaoS or fractals.
+You can share tips, your own fractal creations, or any other fractal-related
+ideas with other XaoS users.
+
+
+@code{http://sourceforge.net/forum/forum.php?forum_id=17767}
+@end table
+
+
+We welcome you to join these forums and become involved in the XaoS community.
+
+@subsection Mailing Lists
+
+XaoS currently has three mailing lists hosted on SourceForge. Unfortunately,
+there is currently very little traffic on any of them. Hopefully in the future,
+we can get more XaoS users and developers involved in the mailing lists.
+The lists are as follows:
+
+@table @strong
+@item xaos-announce@@lists.sourceforge.net
+Low volume list that is used only to announce new releases.
+
+
+Subscribe: @code{http://lists.sourceforge.net/mailman/listinfo/xaos-announce}
+Archive: @code{http://sourceforge.net/mailarchive/forum.php?forum_name=xaos-announce}
+
+@item xaos-devel@@lists.sourceforge.net
+Developer mailing list, where the developers coordinate and discuss XaoS development.
+
+
+Subscribe: @code{http://lists.sourceforge.net/mailman/listinfo/xaos-devel}
+Archive: @code{http://sourceforge.net/mailarchive/forum.php?forum_name=xaos-devel}
+
+@item xaos-discuss@@lists.sourceforge.net
+General discussion list is for XaoS users to share tips and ideas about XaoS.
+
+
+Subscribe: @code{http://lists.sourceforge.net/mailman/listinfo/xaos-discuss}
+Archive: @code{http://sourceforge.net/mailarchive/forum.php?forum_name=xaos-discuss}
+@end table
+
+
+Please feel free to join any or all of these mailing lists and share your ideas with the
+developers and other XaoS users.
+
+@subsection Bug Reports
+If you think you have found a bug in XaoS, please report it. The developers will do their
+best to resolve the bug in a timely manner.
+
+
+Bug Tracker: @code{http://sourceforge.net/tracker/?atid=105771&group_id=5771}
+
+
+Please don't submit duplicate bugs. Browse the existing ones first to make
+sure nobody has already reported it. You may add additional information about a bug by
+entering a comment on an existing bug.
+
+
+If you are not sure if something is a bug, please open a support request. The developers
+will try to answer your question and can convert your support request to a bug if necessary.
+
+
+Support Requests: @code{http://sourceforge.net/tracker/?atid=205771&group_id=5771}
+
+@subsection Feature Requests
+If you have an idea for a great new feature you'd like to see added to XaoS, please let us know about it.
+You can submit a feature request via SourceForge, and the XaoS developers will do their best to
+implement your request in a future version.
+
+
+Feature Requests: @code{http://sourceforge.net/tracker/?atid=355771&group_id=5771}
+
+
+Please don't submit duplicate feature requests. Browse the existing ones
+first to make sure nobody has already requested the feature your want. You may add your
+vote for a feature by adding a comment to the existing request.
+
+@c ## appendix support ##
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@comment node-name, next, previous, up
+@node index, ,support ,Top
+@unnumbered Index of functions
+
+@printindex fn
+
+
+@contents
+@bye
diff --git a/doc/xaosdev.info b/doc/xaosdev.info
new file mode 100644
index 0000000..57b5d82
--- /dev/null
+++ b/doc/xaosdev.info
@@ -0,0 +1,2862 @@
+This is Info file xaosdev.info, produced by Makeinfo version 1.68 from
+the input file xaosdev.texinfo.
+
+INFO-DIR-SECTION Graphics
+START-INFO-DIR-ENTRY
+* XaoS: (xaosdev). The fast real-time interactive fractal zoomer
+ (developers documentation
+END-INFO-DIR-ENTRY
+
+ (C) 1997 Jan Hubicka
+
+ Permission is granted to make and distribute verbatim copies of this
+manual provided the copyright notice and this permission notice are
+preserved on all copies.
+
+
+File: xaosdev.info, Node: Top, Prev: (dir), Up: (dir)
+
+XaoS 3.1
+********
+
+ An real-time interactive fractal zoomer
+ Hacker's guide
+ May 14, 1998
+
+ This manual contains documentation for those who are interested in
+studying and improving XaoS sources or using them in other programs.
+It includes description of algorithm and documentation of those parts
+of XaoS I think they should be useful for someone.
+
+* Menu:
+
+* design:: Overview of the XaoS design
+* driver:: Driver API description
+* gui-driver:: Writing user interface driver
+* eui:: Writing an external user interface
+* ui-helper:: UI helper library
+* xthreads:: XaoS thread library
+* filters:: Filters
+* algorithm:: Algorithm description
+* timerlib:: The timer library
+* registry:: XaoS function registry
+* index:: Function command and variable index
+
+
+File: xaosdev.info, Node: design, Next: driver, Prev: Top, Up: Top
+
+Overview of the XaoS design
+***************************
+
+ Whole sources of XaoS are designed into several "libraries" (some of
+them are not really libraries, but added into other's, but should be
+separated easily).
+
+ Understanding to the main philosophy should help you to navigate in
+the sources. I also expect that many of the lower level stuff should
+be useful in the other projects, since it is designed to be fairly
+generic.
+
+ So here is an overview from the lowest level stuff to the highest.
+
+Palette and image library
+=========================
+
+ Sources are in directory `src/filter'. The aim of palette library is
+to provide relatively abstract interface to the various visuals and
+hide differences in the hardware and driver implementation. Fixedcolor,
+pseudocolor, grayscale and truecolor visuals should be handled in the
+almost same way.
+
+ It provides the structure `palette', which contains actual palette.
+You might allocate new colors here (you give RGB value and
+corresponding pixel is returned), interpolate colors where possible,
+cycle colors and so on. Every palette also consist from the two
+parts--the preallocated color cells and the actual palette. This lets
+for example to GUI possibility to allocate statically colors for its
+texts and dialogs, while rest of palette is under control of different
+parts of XaoS.
+
+ This library also contain set of functions to allocate different
+palettes used by other parts. I expected that different parts of XaoS
+should use same palette. Nothing similar happened yet, but functions
+are kept here.
+
+ The image library is built at the top of palette library. It extends
+functionality for handling actual image data. Each image is represented
+by one or two frame-buffers (it is useful for double-buffering). One
+frame-buffer is called current and other old. They should be flipped by
+special function. Program can draw into both of them.
+
+ Frame-buffers are hold as the set of pointers to the scan-lines.
+This brings better flexibility, because tricks like sub-windows, or
+flipped bitmaps are possible. Also speeds up, since you should avoid
+one multiplication.
+
+ The last significant information image structure hold is of course
+bpp depth. It is counted in bytes, and should be 0-4. Where 0 is used
+for 1bit bitmaps.
+
+Filter library
+==============
+
+ Source are available in `src/filter'. This library controls the
+process of creation of the image. It handles an queue of the filters,
+where each filter should modify the image. There are two special filter
+at the beginning and end of queue. The first filter is usually the
+actual fractal engine which creates image, while the terminal filter is
+usually user interface helper library.
+
+Xthread library
+===============
+
+ This library provides interface to various multi-threading libraries
+(currently the BeOS, plan9 and POSIX implementations are available). It
+allows to run various function paraelly and some synchronization
+primitives (semaphores). It is simple, but has all the functionality
+required for the XaoS engine.
+
+Fractal library
+===============
+
+ Source are available in `src/engine/', headers in `fractal.h'. This
+library contains the actual fractal calculation routines. It operates
+with fractal context, which contains informations like current formula,
+seed for julia, palette etc.
+
+ Functions for calculating the various fractal types and various
+coloring modes are available here.
+
+Zooming engine and other filters.
+=================================
+
+ Source are available in `src/engine/'. This is the actual zooming
+engine filter. It is done in fairly independent way at fractal library,
+so it should be possibly used for zooming other stuff. (it was already
+used for zooming large scale images containing maps of Hungary).
+
+ All other filter has their special file, where is implementation and
+structure containing all functions exported from the filter to user
+interface. They are registered in the file `ui_helper'. One other
+terminal filter is implemented--Julia morpher. Other filters adds
+special effects (such as motion blur), or does conversions (such as
+rotation, dithering etc.)
+
+Timer library
+=============
+
+ This library provides many of very useful timing primitives. Such as
+timers, etc. Currently it is used by some other programs too.
+
+xio library
+===========
+
+ This library aims to provide united interface to file-system. Some
+strange systems (such as MacOS) has file-system API done in much
+different way than in UNIX. They don't have names in string, and uses
+special structures etc.
+
+xshl library
+============
+
+ Xshl stands for XaoS simple hypertext library. It contains fairly
+universal engine parsing an xshl language. It is similar to HTML with
+some additions and many restrictions. It should render this texts for
+the proportional/non-proportional fonts and various sizes.
+
+help library
+============
+
+ it is built at the top of xshl and xio libraries. It should read
+help files, wick contains an chapters. Parse chapter with given keyword
+etc.
+
+xmenu library
+=============
+
+ This is the XaoS function registry. All functions from UI-Helper
+library are registered in the registry. From this registry the menus,
+dialogs, command line options and scripting language are built.
+
+Catalog library
+===============
+
+ This is library for handling an message catalogs. It should read
+catalog and convert the keyword into actual message.
+
+PNG library
+===========
+
+ This library provides the function for saving an image from Image
+library to the file (in PNG format). Other formats should be added as
+well if required.
+
+UI-helper library
+=================
+
+ This library controls all the low-level stuff and provides an high
+level interface to it. It has functions for playing animations,
+zooming/UN-zooming and such. It heavily uses all the described
+libraries. It don't implement functions for handling menus and such,
+but makes great help for such implementations, because of the function
+registry database.
+
+Ugly interface
+==============
+
+ This is currently the only real user interface for XaoS (there is
+also an second, wich is used for rendering animations, but it is not
+user interface, how users expect it). It is built at the top of
+UI-helper library and provides functions for drawing menus, dialogs and
+such. It has drivers for many platforms, and it should be easily
+ported to the others.
+
+ In the future, it should be quite easily to extended to let drivers
+specify their own menu/dialog handling code, so it should be possible
+to give it an "native" look of given platform.
+
+ It has also an function, where an GUI drawing routines are disabled.
+Function registry database is transfered trough pipe to external
+program, wick should build the menus and act as external user
+interface. It then back sends an commands in the scripting language
+representing things, that user done. So it is an another way, how to
+give native look to ugly interface.
+
+ Ugly interface has also one serious limitation--for the historical
+reasons it is coded to handle just one window (rest of XaoS probably
+can do multiple windows--untested). So in windowed environments it is
+impossible to open multiple menus with fractals. At the other hand,
+this limitation is not so important, once external GUI enter the role.
+They should just start multiple XaoS engines. This will bring extra
+robustness, multitasking and some other advantages, so it is the
+proffered way. Thats why I don't plan to remove this limitation yet.
+
+
+File: xaosdev.info, Node: driver, Next: gui-driver, Prev: design, Up: Top
+
+Driver API description
+**********************
+
+ To port successfully XaoS to some platform you need:
+
+ * ANSI C compatible optimizing compiler. Note that optimizing
+ compiler is really required, since XaoS is coded to be good target
+ for optimizations and don't have any routines coded in assembly,
+ so if you will use some bad compiler, you should receive more than
+ ten times slower result. Also note that some compilers has serious
+ problems with compiling XaoS--like most of DOS compilers (Watcom
+ C, Borland C, Microsoft C etc...), has serious problems. They
+ generate incorrect code or crash during compilation. I highly
+ recommend to use GNU C compiler. Even some versions of GNU C has
+ problems. Please read `compilers.txt' for more information.
+
+ * Fast way to avoid division by zero/overflow and other floating
+ point exception. XaoS is carefully coded to not to crash in this
+ case, but don't have any tests to avoid such situation and expect
+ random result in such case. Many platforms provide way to switch
+ coprocessor into mode, where 1/0 is evaluated into Inf etc. If
+ there is no such way, try to use some kind of signal handler that
+ will ignore such exceptions.
+
+ The "normal" solution--add ifs to avoid division by zero is almost
+ impossible. The division is quite easy to check. But other
+ cases--overflows are much worse. So I don't think it is possible
+ to avoid all crashes just by adding ifs.
+
+ XaoS don't depend at IEEE arithmetic. Result in such cases should
+ me mostly undefined. XaoS usually works well with compiler's
+ switches for inexact math enabled (such as `-ffast-math' in GNU).
+ But no guarantees. For example at Alphas this is not true--since
+ they usually generates exceptions then. Also `-mno-ieee-fp' at
+ Intel don't work. This is due to gcc bug. Gcc in some cases reverse
+ the condition when this switch is enabled. I've made patch to fix this
+ problem and hope that it will get to egcs or gcc soon.
+
+ * Text or graphics output device. If you have only text output
+ device, you may use AA driver, which renders fractals into high
+ quality ASCII art. In this case you might skip this chapter,
+ download AA-lib (http://www.ta.jcu.cz/aa) and read porting chapter
+ of AAlib manual. Graphics device must one of:
+
+ * 8bits per pixel with user definable palette `C256', static
+ palette `FIXEDCOLOR', or static grayscale `GRAYSCALE'
+
+ * 16bits per pixel with arbitrary bits per each color
+ `TRUECOLOR'
+
+ * 24bits per pixel with 8 bits per each color, arbitrary order
+ `TRUECOLOR24'
+
+ * 32bits per pixel with arbitrary order of colors, where each
+ colors fit to exactly one byte `TRUECOLOR'
+
+ * 1bits per pixel bitmap with both orders (Least or Most
+ significant bit first)
+
+ Please contact me if you have different kind of device. Some modes
+ (like miss-ordered truecolor modes) should be added really easily
+ if required. Note that mono/4/16 colors devices will be probably
+ never supported internally by XaoS, since I expect they will be
+ slower than 8bpp, so XaoS will internally work in 8bpp and then
+ image should be converted. Contact me if you want to write such
+ converter. (For bitmap there already exists--see `dither.c'.
+
+ * Some way to save images. By default XaoS uses `pnglib', which is
+ ported to many platforms, but there is still many others. If your
+ system has some standard image format, which is easier to handle
+ than `.png', contact me and I will show you, how to add such
+ support to XaoS (see `png.c').
+
+ * Stdio compatible library (this is problem at Mac or BeOS). XaoS
+ has the abstract layer at the top of stdio, so it should use other
+ input/output libraries too. You might write just another
+ implementation if it's library called `xio'. See `xio.h'.
+
+ Ugly interface is designed to make writing of new drivers as easy as
+possible. You need to write just few functions to fill following table:
+(use file `ui_template' for starting of writing new driver from scrath)
+ struct ui_driver {
+ char *name;
+ int (*init)(void); /*initializing function. returns 0 if fail*/
+ void (*getsize)(int *,int *); /*get current size..in full-screen versions
+ i.e svga and dos asks user for it*/
+ void (*processevents)(int,int *,int *,int *,int *);
+ /*processevents..calls ui_resize,ui_key
+ also returns positions of mouse..
+ waits for event if first parameter is
+ 1*/
+ void (*getmouse)(int *,int *,int *);
+ /*returns current mouse positions*/
+ void (*uninit)(); /*called before exit*/
+ int (*set_color)(int,int,int,int);
+ /*alloc palette color and returns number*/
+ int (*set_range)(ui_palette *palette,int start,int end)
+ /*Set palette range*/
+ void (*print)(int,int,char *);/*prints text*/
+ void (*display)(); /*displays bitmap*/
+ int (*alloc_buffers)(char **buffer1,char **buffer2);/*makes buffers*/
+ void (*free_buffers)(char *buffer1,char *buffer2);/*frees buffers*/
+ void (*flip_buffers)(void); /*prints text*/
+ void (*mousetype) (int type); /*Change mouse cursor*/
+ void (*flush) (void); /*Flush current state to screen*/
+ int textwidth; /*width of text*/
+ int textheight; /*height of text*/
+ struct params *params; /*command line parameters*/
+ int flags;
+ float width,height;
+ int maxwidth,maxheight;
+ int imagetype;
+ int palettestart,paletteend,maxentries;
+ int rmask, gmask, bmask;
+ struct gui_driver gui_driver;
+ };
+
+Functions
+=========
+
+ Ui uses following functions to communicate with driver:
+
+ - Function: init
+ function that initializes driver and returns 1 if success and 0 if
+ fail
+
+ - Function: getsize (INT *WIDTH, INT *HEIGHT)
+ returns size of screen(window) x and y
+
+ - Function: processevents (INT WAIT, INT *X,INT *Y, INT *BUTTONMASK,
+ INT &KEYS)
+ gets new keyboard/mouse events. parameters:
+ WAIT
+ if 1 function can wait for next event otherwise just lookup if
+ something came. This is useful on multi-tasked os
+ where xaos does not eats unnecesaru CPU.
+
+ *X,*Y
+ here returns current positions of mouse
+
+ *B
+ returns mask of `BUTTON1',`BUTTON2',`BUTTON3' for mouse
+ buttons
+
+ *K
+ returns mask for cursor keys
+ `1'
+ left
+
+ `2'
+ right
+
+ `4'
+ up
+
+ `8'
+ down function also calls `ui_key' (ASCII
+ character) and ui_resize if required. For special keys use
+ `UIKEY_UP', `UIKEY_DOWN', etc. See `ui.h' for complete lists
+ of this constants.
+
+ note in case of problems freeing/allocating inside processevents
+ you may call `ui_call_resize' that calls resize later outside
+ this function
+
+ - Function: uninit
+ Unitialises driver--called before exit.
+
+ - Function: set_range (UI_PALETTE *PALETTE, INT START, INT END)
+ This is an preffered way to set palette (second way is `set_color')
+ when `imagetype' is `UI_C256' (256 color with palette) one of this
+ two functions is required. In truecolor modes they are unused. In
+ case direct access to palette is possible at your platform, define
+ this one. Function is expected to set all color cells between
+ START to END to colors defined in PALETTE. `Ui_palette' is array
+ of UI_RGB. `Palette[0]' is color for entry number START. `Ui_rgb'
+ is an array of `char'. `Palette[0][0]' is red field of entry
+ number START, `Palette[0][1]' is green and `Palette[0][2]' is
+ blue. `0' means black and `255' means full intensity. Use `NULL'
+ if your driver don't support this call.
+
+ - Function: set_color (INT R, INT G, INT B, INT INIT)
+ This is an secondary way, that should be used at platforms w/o
+ direct palette access (like X11 or static color schemes). It
+ receives RGB value of color, and returns index of color cell
+ with this color or -1 if no more color cells available. An INIT
+ parameter is set to 1, when first entry of palette is allocated,
+ `set_color' is expected to free all color entries previously
+ allocated. Use `NULL' if your driver don't support this call
+
+ - Function: print (INT `x',INT `y', CHAR *`text')
+ prints text to screen at position x/y. This function is a bit
+ archaistic (XaoS now uses in the most cases its own functions
+ drawing directly to the buffer), but in some
+ cases--initialization messages or calculation, functions are
+ unusable, so we still need this primitive. In the `C256' mode
+ you might rely, that first allocated color is always black and
+ second is white.
+
+ - Function: display (VOID)
+ displays current buffer to screen
+
+ - Function: alloc_buffers (CHAR **BUFFER1,CHAR **BUFFER2)
+ allocs two buffers that can hold screen size bitmap. Also sets
+ current buffer to BUFFER1. Since version 2.1 returns scan-line
+ size in bytes(usually width) and 0 if fail. This is useful on
+ systems, that allocated bitmap bigger than
+ window/screen(dividable by 4 or so)
+
+ - Function: free_buffers (CHAR *BUFFER1, CHAR *BUFFER2)
+ frees allocated buffers
+
+ - Function: flip_buffer (VOID)
+ flips buffers--set current buffer to other one
+
+ - Function: flush (VOID)
+ This function should be used by drivers with buffered output to
+ flush output buffers. Other driver should set it to NULL.
+
+ - Function: mousetype (INT TYPE)
+ This function is used to change mouse cursor. It receives
+ following values:
+ `NORMALMOUSE'
+ This mouse is usually displayed at screen, when UI waits for
+ user commands
+
+ `WAITMOUSE'
+ This mouse is displayed when UI is busy(should be famous wait
+ clocks) or you may use mouse defined in
+ ui_dos--mandelbrot set
+
+ `REPLAYMOUSE'
+ This mouse is displayed during replay. Should be none at
+ fullscreen drivers, since blinking mouse cursor during
+ replay looks ugly. At windowed system disabling mouse
+ looks ugly, so it should be some funny cursor.
+ You should use NULL if your driver don't support this.
+
+Other information
+=================
+
+ Also some additional variables are used to inform ui about driver.
+All this values can be changed by init functions in case they are
+unknown before.
+
+TEXTHEIGHT, TEXTWIDTH
+ width and height of your font
+
+PALETTESTART, PALETTEEND
+ First and last palette entry, that should be changed. This you
+ should use to avoid changing of entries reserved for window
+ system, text, mouse etc.
+
+RMASK, GMASK, BMASK
+ This fields are used in truecolor modes to specify, where each
+ color is defined
+
+MAXENTRIES;
+ Number of allocatable entries. Normally should be
+ PALETTESTART-PALETTEEND
+
+IMAGETYPE
+ defines type of image. Should be one of following values:
+ `UI_C256'
+ classical 256 color with palette scheme used by most older
+ graphics adapters. You should use it also for
+ static-color schemes but they are not supported well in
+ current version.
+
+ `UI_TRUECOLOR'
+ 32bpp truecolor mode
+
+ `UI_TRUECOLOR24'
+ 24bpp truecolor mode.
+
+ `UI_TRUECOLOR16'
+ 16bpp truecolor mode
+
+ FOLLOWING PART IS NOT REQUIRED TO MAKE FIRST VERSION OF DRIVER
+WORKING. so you may skip to REGISTERING DRIVER for first read and
+return here later.
+
+PARAMS
+ Using this you may define command line options for you driver.
+
+ They are defined using params structure like:
+ static struct params params[]={
+ {"-mode",P_NUMBER,&defmode,
+ "Select graphics mode(same number as in interactive menu)"},
+ {NULL,0,NULL,NULL} /*this is MUST be last option field*/
+ };
+
+ every line is one parameters. List ends with `{NULL,0,NULL,NULL}'.
+ First filed is option name. Second field is type of parameter:
+ `P_SWITCH'
+ no parameter--variable is just set to 1 if option
+
+ `P_NUMBER'
+ integer number
+
+ `P_STRING'
+ string
+
+ `P_FLOAT'
+ floating point number (variable is float) Third is
+ pointer to variable that is changed if option is set. It is for
+ example `int*' for `P_NUMBER' or `P_SWITCH' and so on.. Last
+ one is help text. Displayed by `ui -h'
+
+WIDTH,HEIGHT
+ see FLAGS. May be set to `0.0, 0.0' for the beginning
+
+MAXWIDTH,MAXHEIGHT
+ see FLAGS. May be set to 0,0 for the beginning
+
+FLAGS
+ This variable says more about your driver. You may start with
+ value 0. But for final version it is recommended to read
+ following chapter carefully.
+
+ Flags are uppercase constants and should be set by following way:
+
+ `ASYNC_PALETTE | RANDOM_PALETTE_SIZE'
+
+ following switches are supported:
+
+ `RANDOM_PALETTE_SIZE'
+ random size of palette. This is used in X where palette is
+ shared between programs. By default xaos allocates all
+ available colors up to 256. This is not very nice to
+ other applications in X. So randomsize causes that just
+ some random number of colors(between 8-256) are allocated.
+
+ Also when this variable is off XaoS expects that allays same
+ number of colors is available.
+
+ `UPDATE_AFTER_RESIZE'
+ recalculate and redraw screen even if its size is not changed.
+ In case that resize procedure destroys data in buffers
+
+ `RESIZE_COMMAND'
+ Some drivers (mainly the fullscreen ones) may in the function
+ `get_size' ask user for the size and color depth. It
+ should be nice to let user change this parameter at
+ runtime. I.E force XaoS to reinitialize his images. This is
+ done by `ui_resize' call. This call in windowed drivers
+ is called by the external event. But in fullscreen
+ drivers you need key/menu item for this. You might add
+ this function directly into XaoS's function registry (see
+ for example the GGI driver)--it is usefull mainly when you
+ want to make some size selection dialog in the standard
+ way, or let XaoS add his default one. And this is done by
+ this flag. See for example SVGAlib or DOG driver.
+ Screen/window size informations:
+
+ Xaos needs to know exact size of displayed images. This is required
+ for random dot stereo-grams and also for keeping fractals in
+ their shape (do not make them wide on 640x200 resolution etc.)
+ So minimally one of the following values should be defined.
+ (they are sorted in order I prefer them)
+ `SCREENSIZE'
+ values width/height specifies exact size of screen/window in
+ centimeters
+
+ `PIXELSIZE'
+ values width/height specifies exact size of one pixel in
+ centimeters This is better for windowed environments
+ where window size is often changed
+
+ `FULLSCREEN'
+ driver runs fullscreen. XaoS automatically uses default
+ screen size (29.0cm x 21.5cm)
+
+ `RESOLUTION'
+ driver does not know exact screen size. But knows resolution
+ used. (it is in variables width/height) XaoS
+ automatically calculates pixel width
+ using:29.0cm/maxwidth and height: 21.5/maxheight
+ Of course default width and height can be changed by command line
+ options. You may also use combinations like:
+
+ `SCREENSIZE | FULLSCREEN'
+ the best for fullscreen drivers
+
+ `PIXELSIZE | RESOLUTION'
+ the best for windowed drivers
+
+ `FULLSCREEN'
+ for fullscreen drivers than have no idea about screen size...
+ do not forget to set WIDTH, HEIGHT, MAXWIDTH,
+ MAXHEIGHT fields if required.
+
+GUI_DRIVER
+ See next section for description.
+
+Registering driver
+==================
+
+ Than just register driver to `driver.c' and you may compile :) You
+may use `ui_template.c' as driver template..
+
+ You may also look at xthreads library description if you are porting
+XaoS to some SMP platform.
+
+ Please let me know if you want to start code some driver.
+
+
+File: xaosdev.info, Node: gui-driver, Next: eui, Prev: driver, Up: Top
+
+Writting GUI driver
+*******************
+
+ XaoS have builtin GUI. Many operating systems have native gui
+toolkits and XaoS default GUI might look strange there. To avoid this
+problem, you might write external gui program (see eui section) or
+write mappings of XaoS GUI functions. The advantage of external gui
+process in multitasking. XaoS is not thread safe and GUI must be
+synchronous with calculation. Also ugly interface code currently don't
+support multiple windows (this should be solved in future). This
+solution is suitable mainly for those systems, where cooperation of two
+programs sharing one window should be problem (like on Windows).
+
+ To write gui driver you need to fill following structure:
+ struct gui_driver
+ {
+ void (*setrootmenu)(struct uih_context *c, char *name);
+ void (*enabledisable)(struct uih_context *c, char *name);
+ void (*menu)(struct uih_context *c, char *name);
+ void (*dialog)(struct uih_context *c, char *name);
+ void (*help)(struct uih_context *c, char *name);
+ };
+
+ All function have `uih_context' parameter. You don't need to worry
+about it's contents. Just pass it to the called functions that require
+it. This parameter is for multiple window support, that is not
+implemented yet.
+
+ The `setrootmenu' function expected to draw root menu according to
+the menu called `name'. To get menu fields you might use following
+piece of code:
+ #include <ui.h>
+ #include <xmenu.h>
+
+ ....
+
+ int i;
+ menuitem *item;
+ for (i = 0; (item = menu_item (name, i)) != NULL; i++)
+ {
+ if (item->type == MENU_SUBMENU) {
+ /* This field is submenu. You might call here
+ function to construct submenu. item->shortname contains
+ name for submenu */
+ }
+ /* add menu field here.
+
+ You might check flags here:
+ item->flags&MENUFLAG_CHECKBOX
+ field have beckbox
+ item->flags&MENUFLAG_RADIO
+ field is part of radio button group. In current implementation
+ there is one radio button group per menu.
+
+ in both cases you might call: menu_enabled(uih, item) to see
+ if item is checked or not.
+
+ item->name contains field's text
+
+ item->key contains hotkey (one letter string in current
+ implementation)
+ }
+ Once field is selected, call function `ui_menuactivate(item, NULL)'
+where `item' is pointer to `menuitem' record of selected field.
+
+ Function `enabledisable' is called when checkbox or radiobutton
+state is changed. The `name' parameter match to `item->shortname' of
+changed field. So you need to browse all created menus, compare
+`item->shortname' and in case it match, call `menu_enabled' to obtain
+new state. For radiobuttons only enable events are noticed. Your code
+is expected to automatically disable all other radiobuttons in the same
+submenu.
+
+ function `menu' works in similar way to `setrootmenu' but displays
+popup menu.
+
+ Function `dialog' is called for dialogs. The function should look
+like:
+ menuitem *item = menu_findcommand(name);
+ menudialog *dialog = menu_getdialog(uih, item);
+ int i;
+ for(i=0; dialog[i].question; i++)
+ {
+ /* Construct dialog, where left side contains labels with
+ dialog[i].question. Right side contains input entities based on the
+ dialog[i].type. Dialog[i].type is one of the following:
+
+ DIALOG_INT: integer value input. The default value is: dialog[i].defint
+ DIALOG_FLOAT: floating point input value (long double, where availble
+ exact). Default value is dialog: dialog[i].deffloat
+ DIALOG_COORD: complex value floating point input (two floats), default
+ values are dialog[i].deffloat and dialog[i].deffloat2
+ DIALOG_STRING: string input. default value is dialog[i].defstr
+ DIALOG_IFILE: input file
+ DIALOG_OFILE: output file
+ default mask is dialog[i].defstr
+ DIALOG_CHOICE: choice between various strings.
+ retype dialog[i].defstr to char ** to get pointer to NULL terminated
+ array of the choices.
+ }
+ Once dialog is filled by user, gui_driver is expected to allocate
+array of union `dialogparam' `dialogparam':
+ dialogparam *p = calloc (sizeof (*p), nitems);
+ fill selected values. `p[i].dint' is used to pass integer value, or
+number of DIALOG_CHOICE selection, `p[i].number' is used for floating
+point number, `p[i].dstring' for strings and filenames,
+`p[i].dcoord[0]' and `p[i].dcoord[1]' for complex values.
+
+ The string values are expected to be in separate malloced chunks.
+Once array is filled, call `ui_menuactivate(item, p)'.
+
+ The function `help' is used to display help about given topic. To
+implement it you might eighter convert XaoS help file to some native
+format, or use xshl library to render help page for you. To render xshl
+page use:
+ #include <xshl.h>
+ xshl_line *lines;
+ int getwidth (void *data, int flags, char *text)
+ {
+ return width of text with given flags
+ flags is mask of the following:
+ XSHL_BIG - large text
+ XSHL_EMPH - emphatized text
+ XSHL_MONOSPACE - monospaced text (typewriter)
+ XSHL_LINK - line (should be underlined or so)
+ XSHL_WHITE
+ XSHL_RED
+ XSHL_BLACK - color of text (not very meaningfull here)
+ XSHL_RIGHTALIGN
+ XSHL_CENTERALIGN - alignment of the text
+
+ }
+ lines = help_make (name, getwidth, textheight, largetextheight);
+ if (lines == NULL)
+ lines = help_make ("main", getwidth, textheight, largetextheight);
+ Now you might use `lines' to draw the help. It is pointer to the
+arraw of structures:
+ struct xshl_line {
+ int y;
+ struct xshl_item *first;
+ };
+ `y' is possition of the line from beggining of text and first is
+pointer to the blocks of texts on the line. Last line contains NULL
+pointer in the first section.
+
+ `first' is linked list of the structures:
+ struct xshl_item {
+ struct xshl_context c;
+ char *text;
+ int x;
+ int width;
+ struct xshl_item *next;
+ };
+
+ you might draw text `text' on the possition `x' (and `y' from the
+line record) using style described by `xshl_context':
+ struct xshl_context {
+ int flags;
+ char *linktext;
+ };
+ `flags' have same meaning as in `getwidth' section. `linktext' is
+name of the next help page in case field have XSHL_LINK atribute.
+
+ As an example of `gui_driver' see win32 driver code.
+
+
+File: xaosdev.info, Node: eui, Next: ui-helper, Prev: gui-driver, Up: Top
+
+Writting an external user interface
+***********************************
+
+ This part describes, how to make an external user interface--it is
+the separate program, which makes an window with all menus and dialogs.
+It uses XaoS engine for calculating the fractal as separate process.
+This design brings many advantages--the external GUI implementation
+should have an "native look" for given platform and should contain many
+extensions, such as multiple windows etc. Also all calculation are done
+in the multitasking and user interface is usable even when engine is
+busy.
+
+ The X window provides a way, when program draws into other's
+window--"master" program creates window and sub-window, where he wants
+to have fractal, then calls engine with `-windowid' NUMBER_OF_WINDOW
+parameters. It instead of creating new window uses specified window.
+Most famous example of such cooperation is probably
+ghostscript/ghostview.
+
+ Other windowed environments probably provides similar way for
+cooperation. At others it should be implemented using shared memory, so
+it should work at most platforms, I expect.
+
+ Of course, you might also design UI as separate button box in
+another window, like most of animation players, or Imagemagick have. In
+fact external GUI should be very similar to Imagemagick style.
+
+basic concept
+=============
+
+ The UI implementation has function to disable it's GUI functions.
+Because of the function registry, all it's menus and dialogs are
+described in the fairly simple database. This database is mapped also
+to the scripting language similar to scheme. So the external UI
+implementation just translate the actions into this scripting language
+and sends it trough pipe.
+
+ This commands should be created automatically from the database, as
+well as menus and dialogs, so UI don't need to have special code for
+various XaoS features. At the beginning it should use XaoS' command
+`(print_menus)' to force him to send information about database, then
+build menus using this information.
+
+ For this you need just some equivalent to UNIX pipes, so again I
+expect it is doable at most platforms.
+
+starting XaoS as slave process
+==============================
+
+ One of the first thinks, engine needs to do is to initialize XaoS in
+right mode to work as slave process. For this you need to do several
+thinks:
+
+ * Open the pipe
+
+ * Disable builtin GUI
+
+ * Read menu hierarchy (this is optional--GUI can also have all menus
+ coded into it. But it is not recommended, since it will make
+ problems with future adding new features)
+
+ Opening pipe is done via `-pipe' option. It takes one parameter,
+which is name of FIFO you want use. If you specify "`-'", XaoS will
+read input from stdin.
+
+ To disable XaoS GUI use option `-nogui'. This will disable all menus,
+dialogs and help text.
+
+ To read menu hiearchy just add `-print_menus' parameter and then
+parse XaoS's output. This will print the whole hierarchy. In case you
+are building menus at the time, they are selected, you might prefer
+usage of the command `print_menu'. It prints just one menu without it's
+sub-menus, so it's output should be directly used for building it. It
+takes one string parameter, which is name of menu you want to print. To
+print root menu use `"root"'. Option should look like this:
+`-print_menu root'.
+
+ Under X Window you need also specify the `-windowid'. Also the
+`-shared' is quite recommended. Otherwise in pseudocolor visuals XaoS
+will create it's own colormap, wich will most probably collide with
+UI's colormap and XaoS or UI will have false colors. If you have any
+idea, how to avoid this, let me know.
+
+ You might also let user to specify some extra parameters from the
+command line. You should simple add the to the end of command line. The
+`-nogui' and `-print_menus' commands must be first for the simple
+reason: XaoS parses it's command line in the early initialization
+stages. Some commands (like `-print_menus') should be processed at this
+time, while others (like `-loadpos' needs to have working engine. This
+commands are queued and processed later, once engine is initialized.
+In case some such command is before `-print_menus' XaoS will decide to
+keep same order of commands, so it will queue `-print_menus' too. This
+will case, that menus will be printed much later and startup will be
+slower.
+
+ So the proper calling sequence for the user interface under X should
+look like:
+
+ xaos -nogui -print_menus -windowid <id> -share -pipe - [OTHER OPTIONS]
+
+Parsing the menu structure
+==========================
+
+ The structure is printed menu by menu. Each menu contains an header,
+some entries and `endmenu'. Whole listing from `print_menus' is
+terminated by `endmenus'.
+
+ The header starts with `menu' and then contains an identifier of menu
+and full name. Such as:
+
+ menu "fractal" "Fractal"
+
+ Then each entry has its own line. It starts by type, which should be
+`submenu' or `menuentry'.
+
+ `submenu' has similar format to header--fullname of menu and
+identifier.
+
+ `menuentry' adds next few fields. It has an type of entry, which
+should be `normal', `radio' or `checkbox'. `radio' and `checkbox' are
+followed by `on' or `off' specifying whether it is enabled or disabled.
+The radio-buttons don't have explicit information about groups they
+belongs to. For now I just expect, that each menu contains just one
+such group, so it is clear.
+
+ Then set of flags should follow. Currently two flags are defined.
+`dialog', wich specifies, that function has dialog, and
+`dialogatdisable'. By default, dialog for check-boxed functions are
+displayed just in case they are enabled. The second flag reverses this
+behaviour. It is now used for `mandlebrot' function, which behaves in
+this style. When you disable it, user is prompted for the Julia seed.
+
+ So specification should look like this:
+
+ menu fractal "Fractal"
+ submenu "formulae" "mformula"
+ submenu "Incoloring mode" "mincoloring"
+ submenu "Outcoloring mode" "moutcoloring"
+ submenu "Plane" "mplane"
+ submenu "Palette" "palette"
+ menuentry "Mandelbrot mode" "uimandelbrot" checkbox off dialogatdisable dialog
+ menuentry "Perturbation" "uiperturbation" checkbox off dialog
+ menuentry "View" "uiview" normal dialog
+ menuentry "Reset to defaults" "initstate" normal
+ endmenu
+
+Activating functions and dialogs
+================================
+
+ Once the menu structure is built and user selects some item, it
+should be activated. It is done by simple command: `(NAME)'. Once "`)'"
+is sent, command is executed by XaoS.
+
+ Check-boxed functions has one extra parameter--`#t' to enable them
+and `#f' to disable. So if you want enable item `autopilot' send:
+`autopilot #t'
+
+ Radio-buttons don't have any such special parameter--because
+disabling radio-button is nonsense.
+
+ In case, item has flag dialog enabled, engine expects that UI will
+make dialog first, ask user of values and then call function with
+parameters. UI needs first to know, what parameters function expect.
+It is done by sending command `(print_dialog "NAME")'. XaoS replies
+with dialog specification very similar to menu specification.
+
+ It has header `dialog' followed by the name of function. Then one
+dialog entry per line is sent. it is started by `dialogentry' followed
+by question UI should display. The is type, which should be one of the
+following:
+`integer'
+ Integer number such as `123'
+
+`float'
+ Floating point number such as `123.123'
+
+`string'
+ String such as `"ahoj"'
+
+`keyword'
+ String such as `'ahoj'. The keywords are mostly similar to string,
+ except they can not contain space. They are used for example for
+ specifying formula type. Strings are used for printing texts etc.
+
+`inputfile'
+
+`outputfile'
+ Here UI should display file selection dialogs. With `outputfile'
+ it is also good idea to check, whether file exist and in this case
+ make some overwriting dialog too.
+
+`onoff'
+ Boolean value (`#f', or `#t')
+
+`complex'
+ Complex value--two floating point numbers such as `123.123 123.123'
+
+`choice'
+ Choice between some keywords. Those keywords are send after
+ `choice' in enclosed the `{' `}'. Last information at the line is
+the default value in the same format as examples above. For files, the
+default value is in format `"[PREFIX]*[EXTENSION]"'.
+
+ Some examples:
+
+ customdialog "uiview"
+ dialogentry "center:" complex 0.000000 0.000000
+ dialogentry "Radius:" float 0.000000
+ dialogentry "Angle:" float 0.000000
+ enddialog
+
+ dialog "load"
+ dialogentry "Filename:" inputfile "fract*.xpf"
+ enddialog
+
+ customdialog "color"
+ dialogentry "Color" choice {white black red }white
+ enddialog
+
+ To activate function, send command which contain function name,
+possible `#t'/`#f' in check-boxes and parameters in the same order as
+in dialog, same format as in examples, separated by the space. Such as:
+
+ (uiview 0 0 0.5 0)
+ (load "text.xpf")
+ (color 'white)
+
+Synchronization
+===============
+
+ In some cases, XaoS can change radio-box and check-box values. (like
+when user pressed a key, or loaded some file). So all changes are sent
+to GUI, wich should inform about this. They are sent to standard output
+in following format:
+
+ checkbox "name" on/off
+ radio "name" on/off
+
+ So your GUI should parse this and change it's menus when necessary.
+
+ Also XaoS's menus can contain more distinct trees. In some cases
+(like when animation replay is active) root of menu structure should
+change. The XaoS sends command:
+
+ root "name"
+
+ Also user can press keys, which normally displayed menus, dialogs or
+help. Then XaoS sends commands:
+
+ menu "name"
+ dialog "name"
+ help "topic"
+
+ All this commands should be taken into account by GUI, or should be
+ignored.
+
+help
+====
+
+ XaoS's help is in the simple hypertext language. In order to
+simplify it's parsing I've made an xshl and help libraries. So making
+of help window should be quite easy. Just call help function:
+
+ - Function: struct xshl_line *help_make (char *COMMAND, int GETWIDTH
+ (void *, int FLAGS, char *TEXT), int WIDTH, int SMALLHEIGHT,
+ int BIGHEIGHT);
+ and you will receive of listings of text with positions, where to
+print into window.
+
+ `command' parameter is topic of help. `getwidth' function is
+function, wich returns width of given text. `width' is width of window,
+`smallheight' is height of small font and `bigheight' is height of big
+font.
+
+ Please ask me for more details if necessary.
+
+ And thats all. Good luck with coding.
+
+
+File: xaosdev.info, Node: ui-helper, Next: xthreads, Prev: eui, Up: Top
+
+UI-helper library
+*****************
+
+ UI helper library takes care to all XaoS' engine functions and
+features and gives the higher level API, which is quite easy to
+understand. If you want to write completely new user interface
+(replacement for the ugly interface--not just new bindings for native
+menus or external user interfaces) or you want to use XaoS engine in
+your program as an library, you will probably want to use this library.
+
+ It's API has many calls and features. This section gives just brief
+overview of it's calls. Please ask me about details.
+
+initialization
+==============
+
+ To initialize ui helper library, you need to prepare an palette and
+image. Palette is created using palette library calls `createpalette'.
+Creating truecolor palette should look like this:
+
+ struct palette *pal = createpalette (0, 0, TRUECOLOR, 0, 0, NULL,
+ NULL, NULL, NULL);
+
+ For details about creating palettes see `ui.c' or ask me.
+
+ To create image call:
+
+ struct *image img = create_image_mem (width, height, 2, pal,
+ pixelwidth, pixelheight);
+
+ This creates image in the memory. If you want to create it in your
+own buffers, you might use `create_image_cont' or `create_image' calls.
+Again see `ui.c'.
+
+ Then it is time to fire up main library:
+
+ struct uih_context *uih = uih_mkcontext (0, img, passfunc,
+ NULL, NULL);
+
+ The `passfunc' is called when engine is calculating. It might process
+events and display process information. It should look like this:
+
+ static int
+ ui_passfunc (struct uih_context *c, int display, char *text, float percent)
+ {
+ /*process events */
+ if (uih->display)
+ {
+ uih_drawwindows (uih);
+ /*display */
+ }
+ if (display)
+ {
+ if (percent)
+ sprintf (str, "%s %3.2f%% ", text, (double) percent);
+ else
+ sprintf (str, "%s ", text);
+ /*display it */
+ }
+ }
+ It might set `uih->interrupt', if it wants to interrupt current
+calculation.
+
+ You also might load the catalog file in order to make tutorials
+working:
+
+ uih_loadcatalog (uih, "english");
+
+ Since this ui_helper library is fully functional and you might enter
+the main loop.
+
+main loop
+=========
+
+ UI helper library does an timing primitives. So it expect an
+standard form of the main loop. It asks the program to display changed
+image when necessary. Library also use timerlib for it's timing. So
+read section about this library, since you might use it for your
+purposes too.
+
+ Main loop should look like this:
+
+ while (1)
+ {
+ if (uih->display)
+ {
+ uih_prepare_image (uih);
+ uih_drawwindows(uih);
+ /*display current image buffer*/
+ }
+ uih_update (uih, mousex, mousey, buttons);
+ if ((time = tl_process_group (syncgroup, NULL)) != -1 &&
+ !uih->inanimation) {
+ /*relax given time in usec - wait of events etc..*/
+ }
+ /*and repeat*/
+ }
+
+calling functions
+=================
+
+ UI helper library has many functions declared in `ui_helper.h' for
+various actions. There is too much of them to describe, but their names
+are quite informative, so I hope you will not have problems.
+
+ You might also use XaoS function registry, which does all this stuff
+for you. You will just draw menus and dialogs based at this registry
+and automatically all features will be available. So if you are writing
+an ordinary user interface, this is the preffered way.
+
+ Note that `ui_helper' library is not reentrant, so you can't call
+most of this function from the `passfunc'. If you are using registry,
+activating function handles this automatically and queues functions
+when necessary. To process them you need to flush queue in the main
+loop as follows:
+
+ static void
+ processbuffer (void)
+ {
+ menuitem *item;
+ dialogparam *d;
+ if (uih->incalculation)
+ return;
+ while ((item = menu_delqueue (&d)) != NULL)
+ {
+ menu_menuactivate (item, d);
+ }
+ }
+
+closing library
+===============
+
+ This is done using:
+
+ uih_freecontext (uih);
+
+ One implementation of user interface at the top is ugly interface.
+See dirrectory `src/ui'. Another, much simpler is `render.c', which does
+animation rendering.
+
+
+File: xaosdev.info, Node: xthreads, Next: filters, Prev: ui-helper, Up: Top
+
+XaoS thread library
+*******************
+
+ This description should be useful for those, who want to port XaoS
+into multiprocessor platforms and those, who want to implement some
+filter or other relatively computational expensive code. Note that
+thread library should be mapped into nothread calls, in case host does
+not allows multi-threading or it is not SMP architecture (since this
+library is used only to distribute calculation into other CPUs)
+
+ XaoS thread library is simple map of few functions required by XaoS
+to system library for threads.
+
+ It has following variables:
+
+ - Variable: ethreads
+ This is set to 1 in case that threads are enabled
+
+ - Variable: nthreads
+ Number of threads
+
+ It and following calls:
+
+ - Function: void xth_init (int THREADS)
+ This function initializes threading library (starts threads, sets
+ ETHREAD to 1 and NTHREADS to n. THREADS parameter should be set to
+ 0--auto-detection or number of threads users wants. In case threads
+ is set to 1, threading library is disabled and following functions
+ are mapped into those nothread_ equivalents defined in `xthread.h'.
+
+ Note that threads are not identical--there is main thread (one
+ that called xth_init) that communicates with drivers, controls
+ calculation etc. and other tasks that are waiting to orders from
+ main task. They also can't use functions from xthread library.
+
+ - Function: void xth_uninit (void)
+ This function UN-initialize thread library--kills child threads,
+ sets ETHREAD to 0 and NTHREADS to 1.
+
+ - Function: void xth_function (xfunction *FUNCTION, void *data, int
+ RANGE)
+ This function is used in case, engine wants to perform some
+ operation at image in parael. It is expected to wait until all
+ threads are ready and start FUNCTION at all threads including
+ control one with following parameters: DATA--this parameter is
+ same as DATA passed to xth_function, TASKINFO--pointer to structure
+ taskinfo, that is platform depended (defined in `xthread.h') but
+ must have at least field `n', that holds number of thread (control
+ thread has 0 and other numbers in range 1 - NTHREADS). Next two
+ parameters is range of image, function is expected to do action.
+ Xth_function is expected to divided RANGE into NTHREADS equal
+ pieces and pass always start of piece and start of next piece
+ (RANGE in case of last one). Function does not wait for other
+ threads at the end and returns immediately to main thread after
+ FUNCTION returns.
+
+ This function is called approx. 5-10 times per frame
+
+ - Function: void xth_sync (void)
+ This functions waits until all threads are ready for next order
+ from main task.
+
+ This function is called approx 5-10 times per frame
+
+ - Function: void xth_bgjob (xfunction *FUNCTION, void *DATA)
+ This function is expected to behave as follows: look if there is
+ any thread waiting for orders, if so, ask him to call FUNCTION
+ with similar conventions as in xth_function except that range
+ parameters are set to 0. Otherwise it starts function in normally
+ (at foreground).
+
+ This function is called once per frame.
+
+ - Function: void xth_nthread (struct taskinfo *S)
+ This function should be used to determine number of current
+ thread. Do not use `taskinfo->n' instead since in case threads are
+ disabled, it should be defined to 0 and that allows optimizer to
+ perform better optimizations. This function should be called by
+ all threads.
+
+ - Function: void xth_lock (int N)
+
+ - Function: void xth_unlock (int N)
+ Lock/unlock lock number N. At least `MAXSEMAPHORS' locks must be
+ available.
+
+ Note that locks are used always for very short fragments of code
+ so they needs to be fast. So spin-locks are maybe better than
+ Dijskra semaphores. Untested. They are called once per calculated
+ line/row during zoom and once per approx 10 pixels during
+ calculation of new image.
+
+ - Function: void xth_sleep (int N, int L)
+ It is expected to atomically unlock lock L and sleep in queue N.
+ At least `MAXCONDS' queues must be available. After it is waked
+ up, lock L again. This mechanism is used by calculation of new
+ image algorithm, but it is designed to minimize its calls, so I
+ expect they should be called once or twice.
+
+ - Function: void xth_wakeup (int N)
+ Wake up some thread from queue N. Lock used by sleep calls is
+ locked in this cases. Function should also wake up all threads if
+ such operation is not supported by host API. With luck, this
+ function should not be called at all. It should be called by new
+ image calculation routines in case queue is empty. This happens in
+ case of 50 threads but happens rarely at two or eight threads
+ according to my tests.
+
+ - Function: void xth_wakeall (int N)
+ Similar to wakeup but wake up all threads.
+
+
+File: xaosdev.info, Node: filters, Next: algorithm, Prev: xthreads, Up: Top
+
+Filters
+*******
+
+ This is a brief description of filter system used internally by XaoS.
+Filters in XaoS provides an object oriented interface to every part of
+XaoS engine. Main filters are: User interface implemented in ui_helper.c
+and zooming engine implemented in zoom.c. Filters are connected into an
+queue--at the beginning there is just two filters here(zoom and ui) but
+later additional filters should be inserted into the middle of queue
+like an stereo-gram generation etc. The queue supports operations like
+remove filter, add filter and initialize.
+
+ In the calculation every filter should use data calculated by filter
+lower in the queue. Data are stored into image. So for example
+stereo-gram filter should use fractal generated by zooming engine and
+create an stereo-gram.
+
+ This makes XaoS's code more flexible and makes easy future
+enhancements like different zooming engine, image rotation, other
+special effects, plug-ins and some other funny stuff since interface of
+each such part is well defined and each filter has quite good control
+over his child. So stereo-gram filter should change palette, force
+zooming engine to change depth, width and height of calculated image to
+fit his needs and so on.
+
+ This document describes mainly creating of filter like stereo-gram
+generator i.e. filter placed into middle of queue since I don't expect
+there will be many people creating "terminal" filters (zooming
+engines/user interface layer) note that different user interface is
+possible since user interface layer is not the real user interface just
+set of high level functions that should be called by main application
+like set_view. So in case you want to use XaoS as an calculation engine
+in your program this document is probably not for you.
+
+ Each filter is defined by filter_action structures as follows:
+ struct filteraction {
+ char *name;
+ char *shortname;
+ int flags;
+ struct filter *(*getinstance)(struct filteraction *a);
+ void (*destroyinstance)(struct filter *f);
+ int (*doit)(struct filter *f,int flags,int time);
+ int (*requirement)(struct filter *f,struct requirements *r);
+ int (*initialize)(struct filter *f,struct initdata *i);
+ void (*convertup)(struct filter *f,int *x,int *y);
+ void (*convertdown)(struct filter *f,int *x,int *y);
+ void (*removefilter)(struct filter *f);
+ };
+ This structure describes static filter's parameters (like its name)
+and basic set of methods required for communication with resto of XaoS.
+The name field describes filter's name like "An random dot stereo-gram
+generator". Name is displayed by ugly interface in filter's menu. So it
+is expected to be descriptive and shorter than 30 characters. The short
+name is one word long name for filter like "stereogram". This name is
+used by save files, possibly by command line parameters. Simply
+everywhere where user should need to write it and writing long
+descriptive name should be just wasting of time and disk space.
+
+ Flags field is kept for future enhancements and is expected to be 0
+for now.
+
+Creating / destroying of instance
+=================================
+
+ Functions getinstance and destroyinstance are equivalents to
+constructor and destructor in OOP. Getinstance is expected to create
+and fill following structure:
+
+ struct filter {
+ struct filter *next,*previous;
+ struct queue *queue;
+ struct filteraction *action;
+ struct image *image,*childimage;
+ struct requirements req;
+ struct fractal_context *fractalc;
+ void *data;
+ char *name;
+ int flags;
+ void (*wait_function) (struct filter *f);
+ /*stuff for wait_function*/
+ int pos,max,incalculation,readyforinterrupt,interrupt;
+ char *pass;
+ };
+ Altrought this structure seems to be long and complex, most of
+fields are unused at this time and rest of them are filled
+automatically by function:
+
+ - Function: struct filter * createfilter (struct filteraction *FA);
+ That should be used to create instance. Only possibly interesting
+ field is data. It's pointer reserved for filter's internal use. So
+ it should be pointer to filter's internal variables if required.
+ Following is example implementation of get-instance with
+ allocating of such additional structure. In case nothing similar
+ is required you should use directly createfilter at getinstance's
+ place.
+
+ static struct filter *getinstance(struct filteraction *a)
+ {
+ struct filter *f = createfilter(a); /*create filter structure*/
+ struct stereogramdata *i=calloc(sizeof(*i),1);
+ /*allocate internal variables*/
+ /*initialize your variables here*/
+ f->data=i; /*add pointer to internal data*/
+ return (f);
+ }
+
+ The destroyinstance is expected to free memory used by filter
+structure and all internal data of filter. To free filter structure use
+normal free(filter); So implementation of such function should look
+like:
+ static void destroyinstance(struct filter *f)
+ {
+ destroyinheredimage(f);
+ free(f->data);
+ free(f);
+ }
+ The meaning of destroyinheredimage will be described later.
+
+Initialization
+==============
+
+ During initialization phaste each filter says to his parent what kind
+of images it supports (this should depend on images supported by his
+child), parent chooses best supported image format for his purposes and
+gives it to the child. Initialization is done in two pases.
+
+ First pass start by lowest filter in the queue and each filter
+passes to his parents requirement structure.
+
+ Second pass starts by the highest filter and each filter passes to
+child an image and some other stuff. Then calculation should begin.
+
+ Queue needs to be reinitialized after creating, resizing,
+adding/removing of filter and similar operations.
+
+ First pass is implemented using require function. This function is
+expected to take care at child's requirements it received as parameter,
+fill requirements structure and call require function of his parent
+filter.
+ struct requirements {
+ int nimages;
+ int supportedmask;
+ int flags;
+ };
+ The nimages field should be set to 1 or 2. In case it is 2, parent
+filter must pass image with two buffers. Note that in case it is 1,
+parent should pass image with two buffers too.
+
+ Supported mask is mask of supported image types by filter. Image
+types are following:
+`C256'
+ An normal 8bpp image with palette
+
+`TRUECOLOR24'
+ An 24bpp truecolor image with 8bits for each color.
+
+`TRUECOLOR16'
+ An 16bpp truecolor image
+
+`TRUECOLOR'
+ An 32bpp truecolor image with 8bits for each color.
+
+`LARGEITER'
+ An 16bpp image but w/o colors. It is expected to hold number of
+ iterations it should be also tought as 16bpp grayscale image
+
+`SMALLITER'
+ Similar to `LARGEITER' but 8bpp
+
+ In case you don't worry about palettes, allocations of colors and
+you do just some operation with bitmap, so you worry just about depth
+of image you should use mask of following: `MASK1BPP' for 8 bit images,
+`MASK2BPP' for 16bit and so on.
+
+ The latest field of requirements structure is flags. It mask from
+following constants:
+
+`IMAGEDATA'
+ in case your filter requires data from previous frame untouched.
+ In case this is not set, filters should reuse your image and
+ change it. But some filters like and motion blur or zooming
+ engine requires data from previous frame to construct new, so
+ this flag should be set there is no more flags supported at the
+moment. Function require should also save child's require structure
+into filter->req for later use by initialize pass. So you should look
+like:
+ static int requirement(struct filter *f,struct requirements *r)
+ {
+ f->req=*r; /*Save an child's requirements*/
+ r->nimages=1; /*Just one image is required*/
+ r->flags&=~IMAGEDATA;/*unset the imagedata field*/
+ r->supportedmask=C256|TRUECOLOR|HICOLOR|REALCOLOR;
+ /*mask of all supported image types*/
+ return (f->next->action->requirement(f->next, r));
+ /*call parent*/
+ }
+ Next pass is main initialization. It goes in opposite order(from
+parent to child) and child's infers some stuff from parent like images
+etc... The initialize structure receives an initdata structure:
+ struct initdata {
+ void (*wait_function) (struct filter *f);
+ struct image *image;
+ struct fractal_context *fractalc;
+ int flags;
+ };
+ an wait_function is function called by filter during calculation that
+lets the parent filters(usually user interface layer) to inform user
+how calculation continues. Image is an image expected to be filled by
+image in calculation phaste. Fractalc is pointer to structure that will
+contain information about fractal during calculation(like formula type
+etc...) Flags is mask of following constants:
+`DATALOST'
+ this is set in case, that data in image was lost(image was cleared
+ or resized or freshly allocated). Filters that uses data from
+ previous frames should take care to this flag. Zooming engine for
+ example recalculates whole image since pixels from previous frame
+ was lost. Note that data should be lost also in case, filter
+ receives different image that in previous initialization since
+ some filter behind was removed. An inhering process is done
+using function:
+
+ - Function: void inhermisc (struct filter *F,struct initdata *I);
+ This function sets fields in filter structure like as fractalc or
+ wait_func. Inhering of image is quite complex, since new image
+ needs to be prepared for child. In order to save memory it is
+ highly recommended to use same image or at least same memory for
+ data when passing to child. But this is not allays possible.
+ Following function implements heuristic to do this:
+
+ - Function: int inherimage (struct filter *F,struct initdata *DATA,
+ int FLAGS, int WIDTH, int HEIGHT, struct palette *PALETTE,
+ float PIXELWIDTH, float PIXELHEIGHT)
+ You should call this function in your initialize pass. It fills
+ image and childimage in filter structure, prepares initdata for
+ child and creates image for child. Note that it should fail in
+ some cases and return 0. In this case filter is expected to
+ interrupt initialization and return 0 too.
+
+ An FLAGS parameter is mask of following constants:
+ `IMAGEDATA'
+ in case your filter requires data from previous frame
+
+ `TOUCHDATA'
+ In case your filter touches data in output image. This is
+ very usual but there is some filters (like interlace or
+ subwindow that don't)
+
+ `NEWIMAGE'
+ Set in case your filter can not deal with shared images
+ (images that have input data in same memory are as output)
+ WIDTH and HEIGHT should be set to 0 in case you want same
+ width/height as in parent image or width and height of image you
+ want to pass to child. PALETTE is palette of image you want to
+ pass. Set to `NULL' if palette should be inhered from parent's
+ image (usual). PIXELWIDTH and PIXELHEIGHT specifies physical size
+ of pixel in centimeters. If set to 0 they are inhered from
+ parent's image.
+
+ In case you use inherimage mechanism you also must call
+destroyinheredimage in destroyinstance function and updateinheredimage
+at the beginning of calculate function.
+
+ Example implementation:
+ static int initialize(struct filter *f,struct initdata *i)
+ {struct stereogramdata *s=f->data;
+ inhermisc(f,i);
+ if(!inherimage(f,i,TOUCHIMAGE,0,0,NULL,0,0) return 0;
+ /*initialize here*/
+ return(f->previous->action->initialize(f->previous,i));
+ }
+ Also note that fractal context hold pointer to fractal palette. In
+case You don't change image palette everything is OK. But in case
+child's image differs from parents image, there should be two
+behaviors--fractal's palette is child one (this should be common for
+example in conversion filters ( 8bpp to truecolor etc)) or fractal's
+palette is parent's one (like in edge detection filter). By default
+fractal's palette is kept to parent's one. This should be changed by
+setfractalpalette call. It has two parameters--filter structure and
+palette. When you pass as palette child's palette, fractal's palette
+will be changed to child. In case you pass NULL. Changing of palette
+will be disabled (like in motion blur filter in 8bpp mode). Note that
+this is changed just in case you still have access to fractal palette.
+Some parent should redirect palette before. Than this function does
+nothing.
+
+Caluclation
+===========
+
+ Main calculation is done using doit function. It is expected to call
+child's calculation function when required and apply filter at output.
+It receives flags. Only flag in `INTERRUPTIBLE' for now. It is mainly
+for zooming engine so I do not describe it here. But filter is expected
+to pass this flag to child. Next parameter is time in milliseconds that
+expired since last doit call. It should be used to calculate speed of
+animation.
+
+ Calculation loops returns flags. Flags is mask from following
+constants:
+`ANIMATION'
+ in case filter performs some animation and expect that calculation
+ will be called again soon
+
+`CHANGED'
+ in case something changed in output image (usual)
+
+`INEXACT'
+ This is enabled by zooming engine in `INTERRUPTIBLE' mode in case
+ that time exceeded.
+
+ An doit function changes image. Image structure contains following
+fields significant for you:
+`bytesperpixel'
+ number of bytes per pixel (image depth)
+
+`palette'
+ palette of image.
+
+`currlines'
+ array of pointers to beginnings of every scanline of image
+
+`oldlines'
+ array of pointers like currlines but for previous image in case
+ doublebuffering is enabled
+
+`nimages'
+ set to 2 in case doublebuffering is active
+
+`flipimage'
+ pointer to function that flips oldlines and currlines.
+
+ palette structure contains following significant fields:
+
+`type'
+ type of palette/image (`C256', `TRUECOLOR' etc...)
+
+`size'
+ number of allocated entries
+
+`pixels'
+ array of allocated entries. Conversion table from number of
+ iteration to pixel value.
+
+`rgb'
+ Rgb values for pixels (`NULL' for `TRUECOLOR', `HICOLOR' and
+ similiar types)
+
+ To make easier writing calculation loops for different depths
+`pixel8_t', `pixel16_t' and `pixel32_t' are predefined. You also can
+use include system as in edge detection filter, that lets you write
+calculation loops just once and use cpixel_t and it will be compiled
+for every bitmap depth. See edge detection filter (engine/edge.c and
+engine/edged.c) for implementation details.
+
+Conversion
+==========
+
+ Convertup and convertdown functions are used for converting screen
+coordinates to position in fractal and back. Convertup is function that
+receives coordinates in child's image and is expected to convert them
+into coordinates in parents image and call parent's convertup function.
+
+ Convertdown is reversed(from parent to child).
+
+ In case coordinates respond 1:1 you should use convertupgeneric and
+convertdowngeneric. In other case implementation should look like:
+
+ static void convertup(struct filter *f,int *x,int *y)
+ {
+ *y*=2;
+ *x*=2;
+ if(f->next!=NULL) f->next->action->convertup(f->next,x,y);
+ }
+ static void convertdown(struct filter *f,int *x,int *y)
+ {
+ *y/=2;
+ *x/=2;
+ if(f->previous!=NULL) f->previous->action->convertdown(f->previous,x,y);
+ }
+
+Removing of filter
+==================
+
+ Before filter is removed from queue, removefilter function is called.
+It is expected to clean up thinks filter changed. Should be NULL in
+most cases.
+
+Registering of filter
+=====================
+
+ Once filteraction structure is filled, filter is done and you should
+try to enable it. To enable it in user interface you need to edit
+ui/ui_helper.c, add filter into uih_filters structure and increase
+uih_nfilters. Note that order of filters in uih_filter is significant,
+since same order is kept in filter queue, so you should specify if you
+want to be called before/after filter xy.
+
+ Then it is high time to start experimenting.
+
+ Good luck!
+
+
+File: xaosdev.info, Node: algorithm, Next: timerlib, Prev: filters, Up: Top
+
+Algorithm description
+*********************
+
+ The main idea behind XaoS is that it is not required to calculate the
+whole image every frame. Most pixels are already calculated in the
+previous frames. You usually don't have exactly the pixels you want,
+but all within a range lower than a step between pixels are acceptable.
+That is why the image flicker a bit and why points do not blink
+randomly as in recalculated animations.
+
+ This document describes some of the most important algorithms in XaoS
+ * Saving Previous Pixels
+
+ * Approximation Algorithm
+
+ * Moving Pixels to New Positions
+
+ * Calculating New Pixels
+
+ * Symmetry
+
+ * Calculation of Mandelbrot Set
+
+ * Dynamic Resolution
+
+ * Autopilot
+
+Saving Previous Pixels
+======================
+
+ Ideally, all recalculated points should be saved and used for
+building successive frames. I could not figure out a practical way to
+implement this. To save all frames for half an hour would require 24 Mb
+of memory, and searching the saved frames would be more computationally
+expensive than recalculating an entirely new frame.
+
+ One way was later used by program Frang. It remembers all pixels as
+x,y and value fields and when it builds new image, it draws all pixels
+to it and then browses image and fills it by new pixels. Possibly some
+rle cache should be used for calculated pixels. Frang actually uses
+algorithm, that takes away pixels out of screen, so it behaves exactly
+in same way as algorihm described here. At the other hand, this method
+seems to require much more memory than XaoS algorithm and drawing
+pixels/browsing image cost quite a lot, so algorithm described here
+seems to be faster. Since it never requires examining of whole image
+and new image is constructed using block move operations.
+
+ For this reason only the last generated frame is used as reference.
+This way the memory requirements are proportional to xsize * ysize. It
+can be shown that this method is only about 2-5% slower during zooming.
+Of course unzooming back to once browsed areas is much slower.
+
+ Because only the previous frame is used, another optimization can be
+performed: Imaginary and real parts of the calculated image are not
+precise since they are the result of successive iterations of same
+algorithm. In order to prevent errors from being distributed to the
+following frames their exact coordinates need to be known.
+Fortunately, it isn't necessary to save their values since it is known
+that all real components in a row and all imaginary components in a
+column are equal. Thus, the only things that must be saved are the real
+components for every row and the imaginary components for every column.
+
+ This allows for a substantial speed-up in approximation because the
+calculation requires less data. Of course, some rows and columns fall
+out of the threshold and new ones need to be calculate to fill in the
+gaps in the frame.
+
+ Obviously, much less work is done. There are only xsize + ysize
+calculations instead of xsize * ysize. So the main loop in XaoS looks
+like this:
+ * Make approximations for rows
+
+ * Make approximations for columns
+
+ * Move old pixels to their new positions
+
+ * Calculate pixels for which there is no good approximation for
+ their row
+
+ * Calculate pixels for which there is not good approximation for
+ their column but there is one for their row
+
+Approximation Algorithm
+=======================
+
+Introduction to problem
+-----------------------
+
+ You can see that the approximation algorithm is central to the
+implementation of XaoS. If the guess is incorrect the image will look
+strange, boundaries will not be smooth and the zoom will flicker. On
+the other hand, if it adds more new rows or columns than required,
+zooming will become much slower. Also, in the instance of doubling
+(i.e., using an old row or column more than once) the resolution will
+lower. It is important to keep the increasing imaginary and real
+components in the correct order. If a row and column of complex
+coordinates follows one with higher coordinate values an improved
+approximation can be attained by swapping their values.
+
+ The algorithm needs to be relatively fast. It is only used for xsize
++ ysize values but if its speed is proportional to O(n^2), it can be
+slower than a whole recalculation of the image. Speeds of O(n) or O(n *
+log(n)) are acceptable.
+
+Some simple algorithms to solve it
+----------------------------------
+
+ Initially, a very simple algorithm was used:
+
+ Find the old row/column nearest the row/column that needs to be
+regenerated. If the difference between them is less than one step
+(step = (end - beginning) / resolution) then use it. Otherwise,
+recalculate a new one.
+
+ Finding the nearest row/column pair is very simple since it is always
+greater or equal to the pair needing to be generated.
+
+ Surprisingly, this simple algorithm has almost all the problems
+described above. Doubling was fixed by lowering the limit to step / 2.
+This cause a considerable slowdown so the limit was returned to step.
+Instead, the algorithm was changed to search for only row/column pairs
+that are greater than the previous frame's row/column pairs. This is
+the algorithm that was used in version 1.0
+
+ This algorithm still added to many new rows and columns and did not
+generate smooth boundaries. For version 1.1 a heuristic was added that
+preferred approximating rows/columns with lower values. This way it did
+not occupy possible rows/columns for the next approximation. The result
+was a speedup by a magnitude of four. In versions 1.1 to 2.0 many
+improvements were made to the heuristic to give it added performance.
+The following example tries to explain how complicated the problem is
+(O is the old coordinates and X is the values to be approximated):
+ X1 X2 X3 X4 X5 X6 X7
+ O1 O2 O3 O4 O5 O6 O7 O8
+
+ The normal algorithm will aproximate X1 by O2, X3 by O4 but nothing
+more. For the algorithm with threshold step instead of step / 2:
+
+ O2 to X1
+ O3 to X2
+ O4 to X3
+ O5 to X4
+ O6 to X5
+ O8 to X6
+
+ But this will fail with X7. The second algorithm which relies on
+lower values will do the following:
+
+ O1 to X1
+ O3 to X2
+ O4 to X3
+ O5 to X4
+ O6 to X5
+ O7 to X6
+ O8 to X7
+
+ O1 to X1 is wrong. And there is many and many other situations that
+may occur. But you may see that the normal algorithm will calculate 4
+new rows/columns but the heuristic saves all of these calculations.
+
+Current algorithms used
+-----------------------
+
+ In version 2.1 work on this heuristic was disabled after I discovered
+a surprisingly simple algorithm that solves all these problems. First I
+decided to define exactly what is best approximation. This should be
+done by defining a price for every approximation and choose the
+approximation with the lowest price. Prices are defined as such:
+
+ Approximating row/column x by y costs dist(x, y) ^ 2.
+
+ This prefers two smaller approximation errors before a single larger
+error and describes my goal quite well.
+
+ The cost for adding a new row/column specifies when it is better to
+do a bad approximation and when to add a new row/column. I use (4 *
+step) * (4 * step). This means that the approximation is acceptable when
+dist(x, y) < 4 * step. Otherwise, adding a new row/column costs less.
+Now the best approximation is known. All that is required is a fast
+algorithm to do this. Surprisingly, this is possible in linear time
+using a relatively simple dynamic algorithm. It uses approximations of
+length < n to make a guess at the length of n. It can start by
+approximating one row/column and then again for two, three up to
+xsize/ysize rows/columns.
+
+ The algorithm starts by calculating prices for all possible new
+positions for old row/column 1. Because of the pricing there are
+maximally 8 new positions. (Other ones must cost more than adding new
+row/column). Of course it is possible that there are no new positions.
+
+ For calculating the price of approximations for row/column 2 I may
+use previous one: Try new position n. Calculate the price and add the
+best approximation for the previous (row/column 1) one that uses a new
+position lower than n(prohibits doubling or swapping). This should be
+one of 8 positions or eventually adding of new one and not using
+row/column 1 at all.
+
+ The same method can be used for the rest of the rows/columns. At the
+end the best price may be found for the last row/column and return by
+the way it was calculated. (For this I need the saved "calculated
+using" values.) At this step the best approximation has been determined.
+
+ To fill the table, 9 * n steps are required and n steps to backtrack
+best approximation. The only problem is that this algorithm is still a
+little slow (chiefly because of slow memory access on Intel
+architectures). -But with some optimizing it works well.
+
+ This algorithm is almost perfect except that it occasionally adds new
+rows/columns to the wrong locations. It does not prefer to add new
+rows/columns into holes. But it does not seem that this is the real
+problem. The last optimization made was based upon the face that added
+rows/columns do not have the exact real and imaginary components
+calculated by (beginning + x * step) but lies at the average of left
+and right neighbors. This makes the boundaries smooth and distributes
+coordinates better. It also has the added benefit of making the input
+better for future approximations.
+
+ Another danger during implementation if this algorithm is that
+adding new rows/columns into their ideal positions should cause
+miss-ordered results, since some rows/columns should be off more that
+is distance between them. To avoid this, I use algorithm that always
+examine start and end of block of new rows/columns and linearly
+interpolates value between them. Special care needs to be at the blocks
+that start at the beginning or overs at the end.
+
+ Implementation should be much faster using custom fixedpoint
+routines--first recalculate values that 0 means start of image and
+65536 means end. Than calculation is much cleaner. Values <0 and
+>65536 are of screen, calculation is independent at scale and many
+thinks should be recalculated--like tables for calculating price from
+distance. Also dividing main loops into many specialized parts and
+avoiding filing unnecessary parts of table helps. So current algorithm
+in XaoS is about 5 or 6 times faster than first naive implementation.
+
+Moving Pixels to New Positions
+==============================
+
+ Since XaoS is using the approximation algorithm the following table
+is filled for every row/column:
+ * calculate
+
+ * oldpoint
+
+ * position calculate is 1 if the current row/column is new and
+needs to be calculated or 0 if no old pixels need to be moved. oldpoint
+is a pointer to the old row/column that corresponds to the new one. This
+pixel needs to be copied to the new location. position is the real and
+imaginary components of the coordinates used for future approximations.
+Because almost all points will be moved, the solution seems to be
+simple: for every new point look at the row and column table; copy it
+if required.
+
+ There is the problem that this minimally needs three memory reads for
+every pixel (read calculate, oldpoint and index of old point). This is
+too slow, so a small optimization is performed. Instead rewriting the
+piece of code in assembly, normal memcpy is used to move blocks of
+pixels to their new locations. This minimizes the internal loop and
+access can be done more quickly since memcpy is usually optimized for
+each architecture.
+
+ Using the row table, a list of blocks to move for every row is
+created. With this new table all the pixels can be moved quickly. This
+increased the speed of XaoS about four times and made this function so
+fast that it is no longer a problem. (In fact, it takes much less
+processing than all other parts of XaoS.)
+
+Calculating New Pixels
+======================
+
+ The above optimizations make XaoS very fast, but another 30% increase
+in speed is acquired by using a clever method for calculating the new
+pixels. Many methods are known for saving calculations during the
+generation of fractal images. The most powerful is boundary detection.
+It relies on the fact that the Mandelbrot Set is connected with lakes.
+You need only one pixel at the boundary, then traverse the whole set
+and then fill the solid area inside. This method saves many
+calculations but is too complex for adding just one line. Many claim
+that it does not introduce any errors, but this is not true. It is
+possible for a connected part of the lake to be so small that it is not
+visible in smaller resolutions. In this case, boundary detection misses
+the whole area. This algorithm is actually used just for calculating of
+new images (i.e. at the startup).
+
+ XaoS uses modification of method known as solid guessing. The pixels
+at the boundaries of a rectangle are calculated. If they are all the
+same you may assume that this rectangle does not does not contain
+anything and fill it.
+
+ This algorithm is further modified to operate on added lines. For
+this it is at least as good as boundary detection and produces more
+tangible errors. When adding a single line, the upper and lower line
+may be examined for the nearest three pixels. If they are all the same
+then it is assumed that 9x9 pixels are the same. This disables all
+calculations inside solid areas and calculates as many points as
+boundary detection. The only possibility of creating a larger error
+with this method as opposed to boundary detection is in the instance
+that the shape of the set is so sharp that it does not set any of the
+tested points but comes from the right (i.e., uncalculated) location.
+This situation is not very common.
+
+ Later, rules were added for new rows and columns that crossed each
+other. In this instance you can test only four pixels. This situation
+is very rare. It is hoped that it does not introduce many errors.
+
+ If multiple blocks of new lines need to be calculated there are not
+reference pixels to use for solid guessing. Interlacing does the trick.
+By calculating the odd lines without any guessing, the guessing
+algorithm is now possible for the remaining uncalculated lines. This
+simple trick saves about 30% of the calculation of the main Mandelbrot
+image.
+
+ A similar approximation can also be done for the X coordinate. This
+makes it possible to improve solid guessing at even pixels because all
+surrounding pixels are available, further reducing errors.
+
+Symmetry
+========
+
+ Many fractals are horizontally or vertically symmetrical. This is
+implemented in the approximation code. When there is no good
+approximation available, try to mirror the opposite side if the line is
+available.
+
+ This method primarily speeds up the initial image.
+
+Calculation of the Mandelbrot Set
+=================================
+
+ Internal Mandelbrot calculation loop is unrolled--it calculates
+first 8 iterations using normal method and then it expects that number
+of iterations will be probably large so it switches into mode, where it
+calculates iterations in block of 8 with one bailout test at the end.
+When bailout is received, saved values from previous iterations is
+restored and last 8 iterations are recalculated slowly to get exact
+values. This helps a lot especially at Pentium, where conditionals in
+floating point code is slow.
+
+ Another stuff is periodicity checking. XaoS has both version of
+loops--with an without periodicity checks. In most cases it uses
+nonperiodicity checking version. Periodicity check version is used just
+in case, some inside set pixel has been found during solid guessing
+paste around. This is done mainly because periodicity checking version
+of loop is significantly slower.
+
+Dynamic Resolution
+==================
+
+ The above optimizations often do not help enough and image
+calculation is still too slow. One option was to reduce the framerate,
+but a framerate lower than 5 frames per second is unbearable. Another
+option is simply to calculate only the details that can be determined
+within a time interval.
+
+ Rows/columns not calculated are simple approximated by referencing
+the nearest other row/column. The result is an image with larger pixels.
+One problem is the fact that the order of calculating the rows/columns
+is significant. Previous versions of XaoS simply calculated all rows
+from top to bottom and then columns from left to right. Using the
+dynamic resolution code with this algorithm would result in distorted
+images. This was solved by adding priority to every row/column and
+calculating the high priority row/column first. The algorithm for
+adding these priorities is as follows:
+ * Find middle row/column of uncalculated block. Priority is the size
+ of the block (in floating point coordinates)
+
+ * Start function for left block and right block
+
+ This function produces quite good results. It tends to make same size
+rectangles on the whole image and does not depend on resolution.
+
+ Another interesting optimization is that during the zoom it is more
+advantageous to calculate rows/columns in the center of the zoom
+instead of the borders since these will be in the viewport longer and
+the user is usually focusing on center of the zoom anyhow.
+
+ This is done by simply adding to the calculated priority
+normal_priority / (abs(newposition - oldposition) / step + 1). This
+prefers rows/columns that do not move a great deal. Of course,
+unzooming uses the formula reversed.
+
+ The last variable to consider is the time interval for one frame.
+Setting it too low makes the calculation slow. Setting it too high
+makes the framerate too low. So the amount of time spent in other parts
+of the program is calculated and multiplied by 5 to determine the
+interval. If time is then lower than 15FPS, 15FPS is used instead,
+since slower animations are unacceptable. At the other hand if it is
+higher than 35FPS, it is set to 35FPS, since higher framerate is just
+wasting of computer resources. When image is not animating, this values
+is changed, so framerate is choose between 5FPS and 15FPS. This caused
+that images are calculated quickly after zooms stops.
+
+Autopilot
+=========
+
+ Another interesting algorithm controls the autopilot. It is actually
+quite simple. Interesting parts are found at the boundaries of the set.
+It randomly looks around and zooms to the first area containing both
+outside and inside set points. Some fractals (such as the Newton) do
+not have points inside the set at all. In this case it selects a point
+where many (more than 2) different colors are around. (i.e., It zooms
+into noisy areas.)
+
+ In the instance that there are no such areas, the autopilot will
+unzoom. Also detects oscillating.
+
+ Current implementation also does detection of out of range numbers
+and randomly choosed points are choosed near the old one, to avoid too
+often changes of direction.
+
+SMP support
+===========
+
+ Since version 3.0 XaoS supports SMP. This is done using threads.
+Most of XaoS routines should be threaded easily--for example
+moveoldpoints just divides image into n equal part and each part is
+proceeded by one processor. Only unthreaded part is realloc table
+calculation routines. I don't see any way to paraelize it except it
+calculates both--x and y approximation at one time (using two
+processors). Another interesting algorithm to paraelize is boundary
+trace. See comments `btrace.c' for discussion about current
+implementation. Only problem of current implementation I see is
+possibility, that calculation is divided into too many parts (realloc
+tables, move points, calculate, symmetries, dynamic resolution) and
+tasks needs to synchronize between each part. So this should be too
+slow at real SMP box.
+
+
+File: xaosdev.info, Node: timerlib, Next: registry, Prev: algorithm, Up: Top
+
+The timer library
+*****************
+
+ Timer library is library I did for timing in XaoS. But I found it
+useful in many other programs (like demonstrations, games, animation
+players and all other stuff that needs to be timed). So you should read
+this description and possibly use it in your application and save some
+coding time.
+
+ There is many ways how to design of such timed application (game)
+
+ 1. read user input, move badies, display and again this way has one
+ disadvantage. Speed of game depends on speed of computer. This
+ was acceptable in old times where only processor was Z80 :) but now
+ with wide variety of various hardwares such internal loop is
+ unacceptable
+
+ 2. read user input, measure time since last loop and calculate step
+ for badies, move badies for set step, display and again. This way
+ fixes problem with speed. But moving badies just for calculated
+ step, that should differ a much is quite complex, usually
+ introduces complex calculation, floating/fixedpoint math and other
+ unnecesarry stuff that makes program long and introduces many bugs.
+
+ 3. Set the fixed framerate that is high enough to make game smooth
+ but low enough to do whole internal loop in time. So internal loop
+ should look like: read user input, move badies, display, measure
+ time spent in loop an sleep rest of time until next frame. This
+ is quite popular scheme but has another disadvantage--game can not
+ be designed to use whole CPU power since on slower computers
+ internal loop should take longer time that is reserved for one
+ frame. Game will run slowly again.
+
+ 4. To take away disadvantage of previous method, many games times just
+ moving of badies and user input. Other stuff like displaying
+ should be done in rest of time. In DOS games moving and user input
+ is often at asynchronous interrupt and drawing runs as main loop.
+ This solves problem in case that drawing of game takes
+ significantly longer time than moving of badies. This is quite
+ usual so this scheme works well.
+
+ 5. previous scheme still has one problem--since timer interrupt works
+ asynchronously, there should happend many race condition, in case
+ moving takes longer time than time reserved from frame, computer
+ can crash. So this scheme should be enhanced into synchronous one
+ with exactly same result but avoiding problem with race condition:
+
+ read user input, measure time spent by loop and calculate how many
+ simulated frame interrupts activated since last activation, if
+ zero sleep until simulated interrupt, move badies as many times as
+ required, display
+
+ this is an combination of 4 and 3 and seems to be most comfortable
+ way for writing games but since main loop is now quite complex
+ many games don't do that.
+
+ 6. there is still one small problem. Method 5 expect that moving takes
+ significantly lower time that displaying. This may not be truth.
+ Simple work around is to write moving routine, that should move
+ for x moves by faster way that calling move x times. This is often
+ possible and makes easy extension to scheme 5. This scheme allows
+ you to use very large maximal framerate (say 100FPS) and to have
+ same results as method 2 (that is maximally exact method)
+
+ As you can see, designing of main loop isn't so easy. This is just
+very simple example. More advanced application for example should want
+to move one set of badies at one framerate and other at different
+framerate. This requires two such timings. Another complication is that
+there is many different ways to measure time exactly at different
+platforms. Under Linux you can measure using gettimeofday but under DOS
+this is exact just to 1/18 of second and thats too low for smooth
+animation and so on.
+
+ Thats why I decided to design portable easy to use timer library,
+that makes easy to implement all described method, combining of them
+and much more. During design I taken care at the following thinks:
+quality of timing, how easy to use it is, speed, portability and to
+minimalize inexpected situations (like race conditions in asynchronous
+interrupts and so on)
+
+The name of game
+================
+
+ Timer library operates with "timers". They should be created, you
+should measure time since last reset, pause them or set "handler" and
+"interval". But handler is not activated at given interval yet. Since
+timer library is not asynchronous, you must activate them.
+
+ For activating is used "groups". You should process group at some
+place in your program. Then all timers in group are checked and their
+handlers activated if required. When time spent since last activation
+is higher than interval, handler is activated more times. Also interval
+to next invocation is calculated to keep frequency. Simple scheduling
+is performed at handler--handler is activated just once and then all
+other timers are checked before it is activated again. You should also
+define an multihandler--handler that is activated just once and
+receives argument how many intervals has left.
+
+ There is two special groups--`asyncgroup'. Timers in this group are
+activated asynchronously like from interrupt. It is not recommended to
+use it, since it brings many problems and usually isn't required. Also
+it does not work at many platforms. `Syncgroup' is the default group.
+Program is expected to process is quite often. In case you don't need
+to use more groups, you should use this one.
+
+ Time in timerlib is bit strange, since it does not flow continuously
+but jumps. It is updated every time you call `tl_updatetime'. I used
+this way in order to minimize context switches but later I found this
+scheme very useful, since you should lookup timer, do something and
+then reset it and don't wory about time spend between lookup and reset
+since it is 0 in case you did not called tl_updatetime. This helps to
+keep frequency of timers exact w/o any errors caused by such
+situations. At the other hand you need to call tl_updatetime at least
+once in your main loop.
+
+ Maybe you don't know why to create more groups, but I found it quite
+useful. For example an autopilot in XaoS has such special group--I
+need to call it approx. every 1/20 of second but just at one place in
+program. Invoking of autopilot when calculation is active should
+produce incorrect results, so I have special group for autopilot and
+process just at one place where I am sure it is safe.
+
+ Timers should be also emulated. You should stop them and then
+control flow of time for given timer. This should be quite useful for
+example when you want precalculate animation at given framerate.
+
+ To control group of timers, you might create "emulators". It is just
+another time controlled by you. It is useful in cases you want to
+emulate fixed framerate (for animation rendering) or such.
+
+Time functions
+==============
+
+ - Function: void tl_update_time (void)
+ Update time used by timerlib. This must be called at least once in
+ main loop otherwise time will not flow. See above.
+
+ - Function: void tl_sleep (int TIME)
+ Sleep given time. Similar to usleep at POSIX.
+
+Group functions
+===============
+
+ - Function: tl_group* tl_create_group (void)
+ Allocate and initialize group header. Returns NULL when malloc
+ fails.
+
+ - Function: void tl_free_group (tl_group *GROUP)
+ Free memory storage used by group structure
+
+ - Function: int tl_process_group (tl_group *GROUP, int *ACTIVATED)
+ Process timers in group and activates their handlers. Returns time
+ until next invocation. Main loop should sleep returned time then.
+ An ACTIVATED parameter sould be `NULL'. If it is non `NULL',
+ variable is set to number of activated handlers.
+
+Timer functions
+===============
+
+ - Function: tl_timer* tl_create_timer (void)
+ Create timer structure.
+
+ - Function: void tl_free_timer (tl_timer *TIMER)
+ Free memory storage used by timer structure
+
+ - Function: void tl_reset_timer (tl_timer *TIMER);
+ Reset timer to current time. (time of last actication of
+ `tl_update_time')
+
+ - Function: int tl_lookup_timer (tl_timer *TIMER);
+ Return time since last call of tl_reset_timer or last activation
+ of handler.
+
+ - Function: void tl_set_interval (tl_timer *TIMER, int INTERVAL);
+
+ - Function: void tl_set_handler (tl_timer *TIMER, void (*HANDLER)
+ (void *),void *userdata);
+
+ - Function: void tl_set_multihandler (tl_timer *TIMER, void (*HANDLER)
+ (void *,int),void *userdata);
+ Handler, multihandler and interval control functions
+
+ - Function: void tl_add_timer (tl_group *GROUP, tl_timer *TIMER)
+ Add timer to given group. Timer should be added into just one
+ group.
+
+ - Function: void tl_stop_timer (tl_timer *TIMER)
+
+ - Function: void tl_resume_timer (tl_timer *TIMER)
+ Stop and resume timer.
+
+ - Function: void tl_slowdown_timer (tl_timer *TIMER,int TIME)
+ Time in timer is moved back for given time.
+
+Emulator functions
+==================
+
+ - Function: struct timeemulator *tl_create_emulator (void);
+ This function creates new emulator--you need to create one first
+ before emulating.
+
+ - Function: void tl_free_emulator (struct timeemulator *T);
+ Destroy emulator's data
+
+ - Function: void tl_elpased (struct timeemulator *T, int ELPASED);
+ Move emulated time.
+
+ - Function: void tl_emulate_timer (struct timer *T, struct
+ timeemulator *E);
+ Set timer to the emulated mode. Since now all time is controled by
+ emulator E. All other behavior of timer keeps unchanged.
+
+ - Function: void tl_unemulate_timer (struct timer *T);
+ Disable emulated mode for the timer.
+
+Example main loop
+=================
+
+ while(1)
+ {
+ time=tl_process_group(syncgroup,activated); /*Call game control functions*/
+ update_keys();
+ if(activated) /*something changed*/
+ display();
+ else tl_sleep(time);
+ }
+
+
+File: xaosdev.info, Node: registry, Next: index, Prev: timerlib, Up: Top
+
+XaoS function registry
+**********************
+
+ XaoS has an ui helper library, which provides functionality provided
+by user interface. All it's useful functions are registered into
+central registry. This registry is used to generate menus and dialogs
+as well as command line options or scripting language. So it is very
+significant think in XaoS design.
+
+ Not only those who want hack XaoS ui-helper layer needs to know
+this, but also authors of drivers should use this to add new driver
+depended functions into XaoS's menu. Also external user interface is
+based at this. Main idea behind external user interfaces (currently
+one for TCL/Tk and Gtk is under development) is following: XaoS
+transfers it's registry to interface (using simple description
+language). User interface starts XaoS in it's window and builds menus
+and dialogs based at this registry. Then once user select some
+function, it creates an command for scripting language and sends it back
+to XaoS' engine.
+
+ So knowledge of this part is essential for many developers. Please
+take care for this part.
+
+ The implementation of registry is in file `xmenu.c', header is
+`xmenu.h'. Mainly for historical reasons it speaks about menus and
+dialogs. (It was designed for the GUI at the beginning) I am keeping
+this terminology, since it is quite clean and easy to understand
+instead of talking in some cryptic abstract term.
+
+Function description
+====================
+
+ To add function into database, you need write it's description into
+menuitem structure. It has following prototype:
+
+ typedef struct menuitem
+ {
+ char *menuname;
+ char *key;
+ char *name;
+ char *shortname;
+ int type;
+ int flags;
+ void (*function) ();
+ int iparam;
+ void *pparam;
+ int (*control) (struct uih_context *);
+ menudialog *(*dialog) (struct uih_context *);
+ }
+ menuitem;
+
+ - Variable: menuname
+ Name of menu (or category) function belongs in. The root of all
+ categories is called `"root"'. XaoS alternativly uses an
+ `"animroot"' when animation replay is active. If you are adding an
+ function, it is better to add it into some subcategory like as
+ `"ui"' (it will be placed into UI menu then) or create an new
+ category for your functions if needed. It will appear as submenu
+ in main menu in the UI.
+
+ - Variable: key
+ Ascii code of hotkey to activate this function. Use `NULL' if none.
+
+ - Variable: name
+ Longer name of functions used in the menu entry, or `xaos --help'
+ listing
+
+ - Variable: shortname
+ One-word name of function used in command language and references
+ to function.
+
+ - Variable: type
+ type of function--this is not return type. Type should be one of
+ following constants:
+ `MENU_SUBMENU'
+ An submenu. This is not real function, but name for submenu.
+ You might fill the KEY, NAME, SHORTNAME functions. An name
+ of this new submenu is placed in the field PPARAM.
+
+ `MENU_NOPARAM'
+ An normal function without any parameters. When actived,
+ function FUNCTION with just an pointer to `uih_context'
+ will be called.
+
+ `MENU_INT'
+ This should be used to simplify entering of more similar
+ functions (handled by just one universal function in the c
+ code). This function is handled in same way as
+ `MENU_NOPARAM', but also in one integer parameters taken
+ from `iparam' is passed.
+
+ `MENU_STRING'
+ Similar to `MENU_INT' but uses string instead of integer.
+
+ `MENU_DIALOG'
+ If you function needs some paramters, use dialog structure to
+ describe them. In scripting language your function will
+ have parameters then, in user interface dialog will be
+ displayed. PPARAM must then point to array of dialog
+ entries. Witting them will be described later. If your
+ function has just one parameter described in dialog
+ structure, it will be called in normal c way--if you want
+ string parameter, one pointer pointing to string (in
+ addition to `uih_context') will be passed to the functions.
+
+ In case of multiple parameters are requested, it is
+ impossible to call function in c way without special
+ wrapper for each such case. So it will receive pointer to
+ array of `dialogparam' unions, wich contains one entry for
+ each parameter. `dialogparam' is declared as follows:
+ typedef union
+ {
+ char *dstring;
+ int dint;
+ number_t number;
+ number_t dcoord[2];
+ xio_path dpath;
+ void *dummy;
+ }
+ dialogparam;
+
+ `MENU_CDIALOG'
+ In some cases, it is useful to add some context specific
+ default values to the dialog structure. In this case you
+ might use this type instead. In this case function DIALOG
+ is called first, and it is expected to return pointer to
+ correct dialog structure. Dialog structure must lie in
+ static storage (since it is not freed) and always must have
+ the same fields, just differ in the default values.
+ Also this function must work correctly even in the case
+ pointer to `uih_context' is `NULL', since it is often
+ called in the initialization stages (parameter parsing
+ etc.)
+
+ - Variable: flags
+ Flags are used to set additional information about function:
+ `MENUFLAG_CHECKBOX'
+ Some features act like check-box--i.e. by one calling of
+ function they are enabled, second call disables this. In menu
+ it is useful to add an check-box for this function indicating
+ whether feature is on or off.
+
+ And thats exactly what this flag does :). You need also
+ define the function CONTROL wich return's `1' when enabled
+ and `0' when disabled. In order to let external GUI's work
+ correctly you need also call `uih_updatemenus("name")' every
+ time state of this function changes.
+
+ In the scripting language this adds an first parameter, wich
+ if `#t' or `#f'. Engine then calls function just when it is
+ necessary. For `#t' dialog is requested, with `#f' function
+ is called just as `NOPARAM'. I.e. dialog is displayed just
+ when enabling feature.
+
+ `MENUFLAG_DIALOGATDISABLE'
+ In checkbox display dialog when this feature is disabled
+ instead when enabled.
+
+ `MENUFLAG_RADIO'
+ Other features act like radio-button. Control function in
+ this case receives same parameter as defined for `MENU_INT'
+ or `MENU_STRING' types and is expected to return `1' when
+ enabled. You also need to call `uih_updatemenus' when
+ changed. No special parameter is added in the scripting
+ language.
+
+ `MENUFLAG_INTERRUPT'
+ Interrupt current calculation when this function called (it
+ is used by functions with causes recalculation of screen)
+
+ `MENUFLAG_INCALC'
+ By default XaoS queues functions and calls later when they
+ are activated in caluclation. This flag disables this feature.
+
+ `MENUFLAG_ATSTARTUP'
+ By default XaoS queues functions and calls later when they
+ are activated as command line parameters (in time engine is
+ not fully initialized yet). This flag disables this feature.
+
+ `MENUFLAG_NOMENU'
+ Function will not be visible in the menu
+
+ `MENUFLAG_NOPLAY'
+ Function will not be available as command in scripts
+
+ `MENUFLAG_NOOPTION'
+ Function will not be available as command line option
+
+Initializing menuitem structure as static variable
+==================================================
+
+ In most case menuitems should be wrote as static variables. Because
+contents of this structure should change in future, please use one of
+macros defined in `xmenu.h'. They provides cleaner and easier to extend
+way to define this entries.
+
+ For example to define `MENU_NOPARAM' function use following macro:
+
+ - Function: MENUNOP (MENUNAME, KEY, NAME, SHORTNAME, FLAGS, FUNCTION)
+ Similar macros exist for the other types too. They ends for `CB' or
+`RB' for check-boxed or radio-boxes functions. See `menu.c' for large
+example of definitions. They should look like this:
+
+ static menuitem menuitems[] = /*XaoS menu specifications */
+ {
+ SUBMENU ("", NULL, "Root menu", "root"),
+ SUBMENU ("", NULL, "Replay only commands", "plc"),
+ MENUNOP ("comm", NULL, "print menus specifications of all menus",
+ "print_menus", MENUFLAG_NOMENU|MENUFLAG_NOPLAY|MENUFLAG_ATSTARTUP,
+ uih_printallmenus),
+ ...
+
+Dialog description
+==================
+
+ Dialog description is similar to menuitem. It is array of following
+structures:
+ typedef struct dialog
+ {
+ char *question;
+ int type;
+ int defint;
+ char *defstr;
+ number_t deffloat;
+ number_t deffloat2;
+ }
+ menudialog;
+ It is terminated by QUESTION pointer set to `NULL'.
+
+ The QUESTION contains string ui should display when is asking for
+this field.
+
+ TYPE should be one of following values: `DIALOG_INT',
+`DIALOG_FLOAT', `DIALOG_STRING', `DIALOG_KEYSTRING' (the difference
+between string and keystring is, that in scripting language string is
+passed as `"hello"', but keystring is passed as scheme keyword as
+`'hello'), `DIALOG_IFILE' (input file), `DIALOG_OFILE', `DIALOG_CHOICE'
+(choice between different keystrings), `DIALOG_ONOFF' (boolean
+parameter), `DIALOG_COORD' (two floats--complex number)
+
+ Set to corresponding DEF* field for default value. In case of files
+use string in the format `"[PREFIX]*[EXTENSION]"'. For type
+`DIALOG_CHOICE' set DEFSTR to pointer to array of strings terminated by
+`NULL' entry.
+
+ To write dialog structures again use macros defined in `xmenu.h'
+like:
+ DIALOGSTR(question,default)
+ The definition should look like:
+
+ static menudialog uih_viewdialog[] =
+ {
+ DIALOGCOORD ("center:", 0, 0),
+ DIALOGFLOAT ("Radius:", 1),
+ DIALOGFLOAT ("Angle:", 0),
+ {NULL}
+ };
+
+Modifying registry
+==================
+
+ - Function: void menu_add (menuitem *ITEM, int N);
+ Add array of N items to the database.
+
+ - Function: void menu_delete (menuitem *ITEMS, int N);
+ Remove array of N items from database.
+
+Querying registry
+=================
+
+ - Function: menuitem* menu_findkey (char *KEY, char *ROOT);
+ Find item for given key. ROOT is menu where to start (submenus are
+ searched recursively)
+
+ - Function: menuitem* menu_findcommand (char *NAME);
+ Find item for given short name
+
+ - Function: char* menu_fullname (char *MENU);
+ Long name for the short name of menu
+
+ - Function: menuitem* menu_item (char *MENU, int N);
+ Nth entry of the MENU. Return `NULL' if no more entries available.
+
+ - Function: int menu_enabled (menuitem *ITEM, struct uih_context *C);
+ Check whether given item is activated (for check-boxed and
+ radio-boxed functions)
+
+ - Function: int menu_havedialog (menuitem *ITEM, struct uih_context
+ *C);
+ Does this function have dialog?
+
+ - Function: menu_getdialog (CONTEXT, M)
+ Macro returns pointer to dialog structure. (function must have it,
+ otherwise garbage is returned).
+
+ - Function: int menu_available (menuitem *ITEM, char *ROOT);
+ Check whether item is available as one of entries of ROOT (or it's
+ submenus)
+
+
+File: xaosdev.info, Node: index, Prev: registry, Up: Top
+
+Index of functions, variables, types and constants
+**************************************************
+
+* Menu:
+
+* alloc_buffers: driver.
+* ANIMATION: filters.
+* C256 <1>: filters.
+* C256: driver.
+* CHANGED: filters.
+* createfilter: filters.
+* display: driver.
+* ethreads: xthreads.
+* filter: filters.
+* filteraction: filters.
+* FIXEDCOLOR <1>: filters.
+* FIXEDCOLOR: driver.
+* flip_buffer: driver.
+* flush: driver.
+* free_buffers: driver.
+* FULLSCREEN: driver.
+* getinstance: filters.
+* getsize: driver.
+* GRAYSCALE <1>: filters.
+* GRAYSCALE: driver.
+* image <1>: filters.
+* image: design.
+* INEXACT: filters.
+* inherimage: filters.
+* inhermisc: filters.
+* init: driver.
+* initdata: filters.
+* MASK1BPP: filters.
+* MAXCONDS: xthreads.
+* MAXSEMAPHORS: xthreads.
+* menu_add: registry.
+* menu_available: registry.
+* MENU_CDIALOG: registry.
+* menu_delete: registry.
+* MENU_DIALOG: registry.
+* menu_enabled: registry.
+* menu_findcommand: registry.
+* menu_findkey: registry.
+* menu_fullname: registry.
+* menu_getdialog: registry.
+* menu_havedialog: registry.
+* MENU_INT: registry.
+* menu_item: registry.
+* MENU_NOPARAM: registry.
+* MENU_STRING: registry.
+* MENU_SUBMENU: registry.
+* menudialog: registry.
+* MENUFLAG_ATSTARTUP: registry.
+* MENUFLAG_CHECKBOX: registry.
+* MENUFLAG_DIALOGATDISABLE: registry.
+* MENUFLAG_INCALC: registry.
+* MENUFLAG_INTERRUPT: registry.
+* MENUFLAG_NOMENU: registry.
+* MENUFLAG_NOOPTION: registry.
+* MENUFLAG_NOPLAY: registry.
+* MENUFLAG_RADIO: registry.
+* menuitem: registry.
+* MENUNOP: registry.
+* mousetype: driver.
+* nthreads: xthreads.
+* P_FLOAT: driver.
+* P_NUMBER: driver.
+* P_STRING: driver.
+* P_SWITCH: driver.
+* palette: design.
+* params: driver.
+* PIXELSIZE: driver.
+* print: driver.
+* processevents: driver.
+* RANDOM_PALETTE_SIZE: driver.
+* requirements: filters.
+* RESIZE_COMMAND: driver.
+* RESOLUTION: driver.
+* SCREENSIZE: driver.
+* set_color: driver.
+* set_range: driver.
+* timeemulator: timerlib.
+* tl_add_timer: timerlib.
+* tl_create_group: timerlib.
+* tl_create_timer: timerlib.
+* tl_elpased: timerlib.
+* tl_emulate_timer: timerlib.
+* tl_free_emulator: timerlib.
+* tl_free_group: timerlib.
+* tl_free_timer: timerlib.
+* tl_lookup_timer: timerlib.
+* tl_process_group: timerlib.
+* tl_reset_timer: timerlib.
+* tl_resume_timer: timerlib.
+* tl_set_handler: timerlib.
+* tl_set_interval: timerlib.
+* tl_set_multihandler: timerlib.
+* tl_sleep: timerlib.
+* tl_slowdown_timer: timerlib.
+* tl_stop_timer: timerlib.
+* tl_unemulate_timer: timerlib.
+* tl_update_time: timerlib.
+* TRUECOLOR <1>: filters.
+* TRUECOLOR: driver.
+* TRUECOLOR24 <1>: filters.
+* TRUECOLOR24: driver.
+* TRUECOLOR32 <1>: filters.
+* TRUECOLOR32: driver.
+* UI_C256: driver.
+* ui_driver: driver.
+* UI_FIXEDCOLOR: driver.
+* UI_GRAYSCALE: driver.
+* UI_TRUECOLOR: driver.
+* UI_TRUECOLOR24: driver.
+* UI_TRUECOLOR32: driver.
+* uninit: driver.
+* UPDATE_AFTER_RESIZE: driver.
+* xshl_line: eui.
+* xth_bgjob: xthreads.
+* xth_function: xthreads.
+* xth_init: xthreads.
+* xth_lock: xthreads.
+* xth_nthread: xthreads.
+* xth_sleep: xthreads.
+* xth_sync: xthreads.
+* xth_uninit: xthreads.
+* xth_unlock: xthreads.
+* xth_wakeall: xthreads.
+* xth_wakeup: xthreads.
+
+
+
+Tag Table:
+Node: Top501
+Node: design1475
+Node: driver9067
+Node: gui-driver25868
+Node: eui32613
+Node: ui-helper43320
+Node: xthreads47876
+Node: filters52923
+Node: algorithm69506
+Node: timerlib89511
+Node: registry99566
+Node: index111446
+
+End Tag Table
diff --git a/doc/xaosdev.texinfo b/doc/xaosdev.texinfo
new file mode 100644
index 0000000..49203d8
--- /dev/null
+++ b/doc/xaosdev.texinfo
@@ -0,0 +1,2842 @@
+\input texinfo @c -*-texinfo-*-
+
+@c Use A4 paper - If you don't like that, remove the following 3 lines.
+@iftex
+@afourpaper
+@end iftex
+
+@setfilename xaosdev.info
+@settitle A fast real-time interactive fractal zoomer --- hacker's guide
+@dircategory Graphics
+@direntry
+* XaoS: (xaosdev). The fast real-time interactive fractal zoomer
+ (developers documentation)
+@end direntry
+
+
+@ifinfo
+@copyright{} 1997 Jan Hubicka
+
+Permission is granted to make and distribute verbatim
+copies of this manual provided the copyright notice and
+this permission notice are preserved on all copies.
+
+@end ifinfo
+
+@c %**end of header
+
+@set VERSION 3.1.1
+@set DATE Feb 5, 2005
+
+@titlepage
+
+@title XaoS @value{VERSION}
+@subtitle A fast real-time fractal zoomer --- hacker's guide
+
+@author Jan Hubi@v cka
+@tex
+Dukelsk\'ych bojovn\'\i ku 1944
+@end tex
+@*
+390 03 T@'abor @*
+Czech Republic
+
+Email: @code{jh@@ucw.cz}
+
+@value{DATE}
+
+@page
+@vskip 0pt plus 1filll
+@vskip 0pt plus 1filll
+
+@copyright{} 1997 @tex Jan Hubi\v cka
+@end tex
+
+Permission is granted to make and distribute verbatim
+copies of this manual provided the copyright notice and
+this permission notice are preserved on all copies.
+
+@end titlepage
+
+@c %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+@node Top, , (dir), (dir)
+
+@ifinfo
+@top XaoS @value{VERSION}
+@flushright 1.0
+A real-time interactive fractal zoomer
+Hacker's guide
+@value{DATE}
+@end flushright
+
+This manual contains documentation for those who are interested in
+studying and improving the XaoS sources or using them in other programs.
+It includes a description of the algorithm and documentation of those parts
+of XaoS that I think might be useful for others.
+@end ifinfo
+
+@menu
+* design:: Overview of the XaoS design
+* driver:: Driver API description
+* gui-driver:: Writing user interface driver
+* eui:: Writing an external user interface
+* ui-helper:: UI helper library
+* xthreads:: XaoS thread library
+* filters:: Filters
+* algorithm:: Algorithm description
+* timerlib:: The timer library
+* registry:: XaoS function registry
+* index:: Function command and variable index
+@end menu
+
+@node design, driver ,Top ,Top
+@chapter Overview of the XaoS design
+
+XaoS is divided into several ``libraries'' (some of them have been merged
+together; nonetheless the conceptual divisions are there and they can be
+separated easily).
+
+Understanding the design philosophy should help you to navigate in the sources.
+I also expect that much of the lower level stuff may be useful in other
+projects, since it is designed to be fairly generic.
+
+So here is an overview, from the lowest level stuff to the highest.
+
+@section Palette and image library
+
+@findex image
+@findex palette
+The sources for this are in the directory @code{src/filter}.
+The aim of the palette library is to provide a relatively abstract interface to
+the various visuals, and hide differences in the hardware and driver
+implementations. Fixed color, pseudocolor, grayscale and truecolor visuals
+should be handled in almost the same way.
+
+It provides the @code{palette} structure, containing a palette. You might
+allocate new colors here (you give an RGB value and the corresponding pixel
+is returned), interpolate colors where possible, cycle colors and so on.
+
+Every palette contains two parts --- the preallocated color cells and the actual
+palette. For instance, this could be used to allow the GUI the possibility to
+allocate static, unchanging colors for its texts and dialogs, while the rest of
+the palette is under the control of different parts of XaoS.
+
+This library also contains a set of functions to allocate different palettes
+used by other parts of XaOS. I expected that different parts of XaoS could share
+the same palette. This hasn't happened yet, but the functions are kept here just
+in case.
+
+The image library is built on top of the palette library, providing
+functionality for handling actual image data. Each image is represented by one
+or two frame-buffers (useful for double-buffering). One frame-buffer is
+called `current' and the other `old'. They are flipped by a special function.
+The program can draw into either of them.
+
+Frame-buffers are held as a set of pointers to scan-lines. This provides more
+flexibility than more obvious representations, because tricks like sub-windows
+and flipped bitmaps are possible. It's also fast, since you should avoid one
+multiplication.
+
+The last significant information the image structure holds is of course the bpp
+depth. It is counted in bytes, and ranges from 0--4 (where 0 is used for 1bit
+bitmaps).
+
+@section Filter library
+Sources are available in @code{src/filter}.
+This library controls the process of image creation. It handles a queue of
+filters, where each filter modifies the image in some way. The filters at the
+beginning and end of the queue are special; the first filter is usually the
+actual fractal engine which creates the image, and the last filter is usually
+the user interface helper library.
+
+@section Xthread library
+This library provides an interface to various multi-threading libraries;
+currently the BeOS, plan9 and POSIX implementations are available. It allows the
+running of various functions in parallel, and provides some synchronization
+primitives (semaphores). It is simple, but has all the functionality required
+for the XaoS engine.
+
+@section Fractal library
+Sources are available in @code{src/engine/}, headers in @code{fractal.h}.
+This library contains the actual fractal calculation routines. It is governed by
+a fractal context, which contains information like the current formula, the seed
+(for julia sets), the palette, and so on.
+
+Functions for calculating the various fractal types and various coloring modes
+are also available here.
+
+@section Zooming engine and other filters.
+Sources are available in @code{src/engine/}.
+This is the actual zooming engine filter. It is fairly independent of the
+fractal library, so it could possibly be used for zooming other stuff. (It has
+already been used for zooming large scale images containing maps of Hungary).
+
+The file @code{ui_helper} contains the implementation of all filters not already
+mentioned, and a structure containing all functions exported from the filter to
+the user interface. One other terminal filter is implemented --- the Julia
+morpher. Other filters add special effects (such as motion blur), or do
+conversions (such as rotation or dithering).
+
+@section Timer library
+This library provides many useful timing primitives (such as timers).
+It is used by some other programs too.
+
+@section xio library
+This library aims to provide a unified, portable interface to the file
+system. Some strange systems (such as MacOS) have a very different filesystem
+API to UNIX; perhaps they don't represent filenames as a string, use special
+structures, or something; this library abstracts away from all that.
+
+@section xshl library
+Xshl stands for XaoS simple hypertext library. It contains a fairly universal
+engine parsing an `xshl' language, similar to HTML, with some additions and many
+restrictions. It can render text for both proportional and monospaced fonts, in
+various sizes.
+
+@section help library
+This is built on top of the xshl and xio libraries. It can read help files
+containing help chapters, can parse keywords in chapters, and so on.
+
+@section xmenu library
+This is the XaoS function registry. All functions from UI-Helper library are
+registered in the registry. From this registry the menus, dialogs, command
+line options and scripting language are built.
+
+@section Catalog library
+This is a library for handling message catalogs. It should read catalogs and
+convert keywords into an actual message.
+
+@section PNG library
+This library provides a function for saving an image from the Image library to a
+file, in PNG format. Other formats could be added as well if required.
+
+@section UI-helper library
+This library controls all the low-level stuff and provides a high-level
+interface to it. It has functions for playing animations, zooming/un-zooming
+and suchlike. It all the other libraries heavily. It doesn't implement
+functions for handling menus and such, but could be helpful for such
+implementations, because of the function registry database.
+
+@section Ugly interface
+This is currently the only real user interface for XaoS (there is another, wich
+is used for rendering animations, but it is not a user interface as users
+understand the term). It is built above the UI-helper library and provides
+functions for drawing menus, dialogs and so on. It has drivers for many
+platforms, and can be easily ported to others.
+
+In the future, it should be quite easily extended to let drivers specify their
+own menu/dialog handling code; so it should be possible to give it a ``native''
+look on each platform.
+
+It can also operate in a mode where the GUI drawing routines are disabled; the
+function registry database is transferred through a pipe to an external program,
+which should build the menus and act as an external user interface, sending back
+commands in the scripting language (presumably representing things that the user
+has done). This provides another way to give a native look to the ugly interface,
+and could also be used to interface other scripting languages to XaoS.
+
+The ugly interface has one serious limitation --- for historical reasons, it is
+coded to handle just one window (the rest of XaoS can probably do multiple
+windows, but this is untested), so in windowed environments it is impossible to
+open multiple menus with fractals. On the other hand, this limitation is not so
+important once external GUIs enter the picture, as they could just start
+multiple XaoS engines. This is also preferred because it brings extra
+robustness, multitasking and some other advantages. That's why I don't plan to
+remove this limitation yet.
+
+@node driver, gui-driver ,design ,Top
+@chapter Driver API description
+
+To port XaoS successfully to some platform you need:
+
+@itemize @bullet
+@item
+An ISO C compatible optimizing compiler. Note that an optimizing compiler is
+really required, since XaoS is coded to be a good target for optimizations and
+doesn't have many routines coded in assembly; so if you will use a bad compiler,
+you will notice drastic slowdowns (a slowdown of 10x or more). Some compilers
+have serious problems compiling XaoS; this applies to most DOS compilers (Watcom
+C, Borland C, Microsoft C) for instance. They generate incorrect code or crash
+during compilation. I highly recommend using the GNU C compiler, but even some
+versions of GNU C have difficulty. Please read @code{compilers.txt} for more
+information.
+@item
+A fast way to avoid division by zero/overflow and other floating point
+exceptions. XaoS is carefully coded to not crash in this case, but doesn't have
+any tests to avoid such situations; expect random results in such cases. Many
+platforms provide a means to switch coprocessor into a mode where 1/0 produces
+Inf and so on. If there is no such means, try to use some kind of signal handler
+that will ignore such exceptions.
+
+The ``normal'' solution --- add @code{if}s to avoid division by zero --- is
+almost impossible. Division is quite easy to check for, but other cases (such as
+overflows) are much harder. I don't think it is possible to avoid all crashes
+just by adding @code{if}s.
+
+XaoS doesn't depend on IEEE arithmetic. The result in the sort of edge cases
+where IEEE makes a difference is mostly undefined. XaoS usually works well with
+compiler switches for inexact math enabled (such as @code{-ffast-math} in GCC),
+but, of course, there are no guarantees. For example on Alphas this is not true,
+since they usually generate exceptions in that case.
+@item
+A text or graphics output device. If you only have a text output device you may
+use the AA driver, which renders fractals into high quality ASCII art. In this
+case you might want to skip this chapter, download AA-lib
+(http://www.ta.jcu.cz/aa) and read the porting chapter of AAlib manual. A
+graphics device must be one of:
+
+@findex C256
+@findex FIXEDCOLOR
+@findex GRAYSCALE
+@findex TRUECOLOR
+@findex TRUECOLOR24
+@findex TRUECOLOR32
+@itemize @bullet
+@item 8 bits per pixel with user definable palette @code{C256}, static palette @code{FIXEDCOLOR}, or static grayscale @code{GRAYSCALE}
+@item 16 bits per pixel with arbitrary bits per color @code{TRUECOLOR}
+@item 24 bits per pixel with 8 bits per color, arbitrary order @code{TRUECOLOR24}
+@item 32 bits per pixel with arbitrary order of colors, where each color fits in exactly one byte @code{TRUECOLOR}
+@item 1 bit per pixel bitmap, either least or most significant bit first
+@end itemize
+
+Please contact me if you have a different kind of device. Some modes (like
+mis-ordered truecolor modes) could be added really easily if required. Note
+that mono/4/16 colors devices will probably never be supported internally by
+XaoS, since I expect they will be slower than 8bpp, so XaoS will internally work
+in 8bpp and then convert to 1/2/4bpp. Contact me if you want to write such a
+converter. (For bitmap one already exists --- see @code{dither.c}.)
+@item
+Some way to save images. By default XaoS uses @code{libpng}, which is ported to
+many platforms, but there are many platforms where it isn't ported yet. If your
+system has some standard image format which is easier to handle than
+@code{.png}, contact me and I will show you how to add such support to XaoS (see
+@code{png.c}).
+@item
+Stdio compatible library (this is a problem on the Mac and BeOS). XaoS has an
+abstract layer above stdio, so it can use other input/output libraries too. You
+could write another implementation of this layer, called @code{xio}. See
+@code{xio.h}, @code{xstdio.c}, and @code{xstdio_mac.h} for an example.
+@end itemize
+
+The ugly interface is designed to make writing new drivers as easy as possible.
+Use the file @code{ui_template} when starting to write a new driver from
+scratch. You need to write only a few functions, filling out the following
+table:
+@findex ui_driver
+@example
+struct ui_driver @{
+ char *name;
+ int (*init)(void); /*initializing function. returns 0 if fail*/
+ void (*getsize)(int *,int *); /*get current size..in full-screen versions
+ i.e svga and dos asks user for it*/
+ void (*processevents)(int,int *,int *,int *,int *);
+ /*processevents..calls ui_resize,ui_key
+ also returns positions of mouse..
+ waits for event if first parameter is
+ 1*/
+ void (*getmouse)(int *,int *,int *);
+ /*returns current mouse positions*/
+ void (*uninit)(); /*called before exit*/
+ int (*set_color)(int,int,int,int);
+ /*alloc palette color and returns number*/
+ int (*set_range)(ui_palette *palette,int start,int end)
+ /*Set palette range*/
+ void (*print)(int,int,char *);/*prints text*/
+ void (*display)(); /*displays bitmap*/
+ int (*alloc_buffers)(char **buffer1,char **buffer2);/*makes buffers*/
+ void (*free_buffers)(char *buffer1,char *buffer2);/*frees buffers*/
+ void (*flip_buffers)(void); /*prints text*/
+ void (*mousetype) (int type); /*Change mouse cursor*/
+ void (*flush) (void); /*Flush current state to screen*/
+ int textwidth; /*width of text*/
+ int textheight; /*height of text*/
+ struct params *params; /*command line parameters*/
+ int flags;
+ float width,height;
+ int maxwidth,maxheight;
+ int imagetype;
+ int palettestart,paletteend,maxentries;
+ int rmask, gmask, bmask;
+ struct gui_driver gui_driver;
+@};
+@end example
+
+@section Functions
+
+@code{ui} uses the following functions to communicate with a driver:
+
+@defun init
+ Initializes the driver and returns 1 on success and 0 on failure.
+@end defun
+@defun getsize (int *@var{width}, int *@var{height})
+ Returns the size of screen (or window) in x and y dimensions.
+@end defun
+@defun processevents (int @var{wait}, int *@var{x},int *@var{y}, int *@var{buttonmask}, int &@var{keys})
+ Gets new keyboard/mouse events. Parameters are:
+ @table @var
+ @item wait
+ If 1, the function can block, waiting indefinitely for the next event,
+ otherwise it just determines if something's already arrived. This is
+ useful on multi-tasked OSes, where eating unnecessary CPU time on
+ busy-waiting is discouraged.
+ @item *x,*y
+ Returns the current mouse coordinates.
+ @item *b
+ Returns a mouse button bitmask of @code{BUTTON1}, @code{BUTTON2}, and @code{BUTTON3}.
+ @item *k
+ Returns a cursor key bitmask:
+ @table @code
+ @item 1
+ @key{left}
+ @item 2
+ @key{right}
+ @item 4
+ @key{up}
+ @item 8
+ @key{down}
+ @end table
+ @end table
+ The function calls @code{ui_key} (ASCII character) and @code{ui_resize}
+ if required. For special keys use @code{UIKEY_UP}, @code{UIKEY_DOWN}, etc.
+ See @code{ui.h} for a complete list of these constants.
+
+ In case of problems freeing/allocating inside @code{processevents} you may
+ call @code{ui_call_resize}, which calls resize later outside this function.
+@end defun
+
+@defun uninit
+ Uninitialises driver---called before exit.
+@end defun
+
+@defun set_range (ui_palette *@var{palette}, int @var{start}, int @var{end})
+This is the preferred way to set the palette (the other way is with
+@code{set_color}). When @var{imagetype} is @code{UI_C256} (256 color with
+palette) one of these two functions @emph{must} be used. In truecolor modes they
+are unused. If direct palette access is possible on your platform, define this
+function. The function is expected to set all color cells between @var{start}
+and @var{end} to colors defined in @var{palette}. @var{ui_palette} is array of
+@var{ui_rgb} elements. @var{palette[0]} is the color of entry number
+@var{start}. @var{ui_rgb} is an array of @code{char}. @var{palette[0][0]} is
+the red field of entry number @var{start}, @var{palette[0][1]} is the green and
+@var{palette[0][2]} is the blue. @code{0} means black and @code{255} means full
+intensity. Use @code{NULL} if your driver doesn't support this call.
+@end defun
+
+@defun set_color (int @var{r}, int @var{g}, int @var{b}, int @var{init})
+ This is a secondary way to set the palette, that should be used at platforms
+ w/o direct palette access (like X11 or static color schemes). It receives the
+ RGB value of the color, and returns the index of the color cell with this
+ color, or -1 if no more color cells are available. The @var{init} parameter is
+ set to 1 when this function is called for the first time on a given
+ palette; @code{set_color} is then expected to free all color entries
+ previously allocated. Use @code{NULL} if your driver doesn't support
+ this call.
+@end defun
+
+@defun print (int @var{x},int @var{y}, char *@var{text})
+ Prints text to screen at position x/y. This function is a bit archaic
+ (XaoS now uses its own functions drawing directly to the buffer in most
+ cases), but in some cases --- initialization messages or calculation ---
+ the functions are unusable, so we still need this primitive. In the
+ @code{C256} mode you can rely on the first allocated color always being
+ black and the second being white.
+@end defun
+
+@defun display (void)
+ Displays current buffer on screen
+@end defun
+
+@defun alloc_buffers (char **@var{buffer1},char **@var{buffer2})
+ Allocates two buffers that can hold a bitmap the size of the screen.
+ Also sets the current buffer to @var{buffer1}. Since version 2.1, this
+ returns the scan-line size in bytes (usually the screen width) or 0
+ on failure. This is useful on systems that allocate a bitmap bigger
+ than the window/screen (divisible by 4 or thereabouts).
+@end defun
+
+@defun free_buffers (char *@var{buffer1}, char *@var{buffer2})
+ Frees allocated buffers.
+@end defun
+
+@defun flip_buffer (void)
+ Flips buffers --- sets the current buffer to the other one.
+@end defun
+
+@defun flush (void)
+ This function should be used by drivers with buffered output to flush
+ those buffers. Other drivers should set it to @code{NULL}.
+@end defun
+
+@defun mousetype (int type)
+ This function is used to change the mouse cursor. @var{type} has the
+ following values:
+ @table @code
+ @item NORMALMOUSE
+ This pointer is that usually displayed, while the UI waits for user
+ input.
+ @item WAITMOUSE
+ This pointer is displayed when the UI is busy (perhaps the famous
+ hourglass) or you may use that defined in ui_dos --- a Mandelbrot
+ set.
+ @item REPLAYMOUSE
+ This pointer is displayed during replay. There should be none in
+ fullscreen drivers, since a blinking mouse cursor during replay
+ looks ugly. On windowed systems, disabling the mouse looks ugly,
+ so it should be some funny cursor.
+ @end table
+ You should use @code{NULL} if your driver doesn't support this.
+@end defun
+
+@section Other information
+Some additional variables are also used to inform the ui library about the
+driver. All these values can be changed by init functions in case they were
+unknown beforehand.
+
+@table @var
+@item textheight, textwidth
+ Width and height of your font
+@item palettestart, paletteend
+ First and last palette entry that can be changed. You should use this
+ to avoid changing entries reserved for the window system, UI objects,
+ mouse, etc.
+@item rmask, gmask, bmask
+ These fields are used in truecolor modes to specify where each color is
+ defined.
+@item maxentries;
+ Number of allocatable entries. Normally should be
+ @var{palettestart}-@var{paletteend}
+@item imagetype
+ Defines the type of image. Should be one of the following values:
+@findex UI_C256
+@findex UI_FIXEDCOLOR
+@findex UI_GRAYSCALE
+@findex UI_TRUECOLOR
+@findex UI_TRUECOLOR24
+@findex UI_TRUECOLOR32
+ @table @code
+ @item UI_C256
+ The classical 256 color with palette scheme used by most older graphics
+ adapters. You should also use it for static-color schemes, but they are
+ not well supported in current versions of XaoS.
+ @item UI_TRUECOLOR
+ 32bpp truecolor mode
+ @item UI_TRUECOLOR24
+ 24bpp truecolor mode
+ @item UI_TRUECOLOR16
+ 16bpp truecolor mode
+ @end table
+@end table
+
+What follows is @emph{not required} to get the driver working at first,
+so you may skip to @emph{registering driver} on the first read and return
+here later.
+
+@table @var
+
+@item params
+ You may define command line options for your driver.
+
+ They are defined using a @var{params} structure like:
+@findex params
+ @example
+ static struct params params[]=@{
+ @{"-mode",P_NUMBER,&defmode,
+ "Select graphics mode(same number as in interactive menu)"@},
+ @{NULL,0,NULL,NULL@} /*this MUST be last option field*/
+ @};
+ @end example
+
+ where every line is one parameter. The list ends with @code{@{NULL,0,NULL,NULL@}}.
+ The first field is the option name.
+ The second field is the parameter type:
+@findex P_SWITCH
+@findex P_NUMBER
+@findex P_STRING
+@findex P_FLOAT
+ @table @code
+ @item P_SWITCH
+ No parameter --- variable is just set to 1 if the option is supplied.
+ @item P_NUMBER
+ Integer number
+ @item P_STRING
+ String
+ @item P_FLOAT
+ Floating point number (variable is float)
+ @end table
+ The third element is a pointer to a variable that is changed if the option is
+ supplied. (For instance, it is @code{int*} for @code{P_NUMBER} or
+ @code{P_SWITCH}.)
+ The last element is help text displayed by @code{ui -h}.
+
+
+@item width,height
+ See @var{flags}. May be set to @code{0.0, 0.0} at the start.
+
+@item maxwidth,maxheight
+ See @var{flags}. May be set to 0,0 at the start.
+
+@item @var{flags}
+ This variable says more about your driver. A good starting value is 0.
+ But for the final version it is recommended to read the following carefully.
+
+ Flags are uppercase constants and should be set as follows:
+
+ @code{ASYNC_PALETTE | RANDOM_PALETTE_SIZE}
+
+ The following flag constants are supported:
+
+ @table @code
+@findex RANDOM_PALETTE_SIZE
+@findex UPDATE_AFTER_RESIZE
+@findex RESIZE_COMMAND
+ @item RANDOM_PALETTE_SIZE
+ States that the palette is randomly sized. This is used in X where the
+ palette is shared between many programs. By default XaoS allocates all
+ available colors up to 256. This is not very nice to other applications in
+ X, so this flag states that that a random number of colors (in the range
+ 8--256) are allocated.
+
+ When this variable is off XaoS expects that the same number of colors is
+ always available.
+ @item UPDATE_AFTER_RESIZE
+ Causes the screen to be recalculated and redrawn upon a resize, even if
+ its size has not changed, in case the resize procedure destroys data in
+ XaoS' buffers.
+ @item RESIZE_COMMAND
+ Some drivers (mainly the fullscreen ones) may ask the user for the size
+ and color depth to use, in the function @code{get_size}. It would be nice
+ to let the user change this parameter at runtime and force XaoS to
+ reinitialize all its images. This is done with the @code{ui_resize}
+ call
+
+ In windowed drivers, this is called by external window-system events, but in
+ fullscreen drivers you'll need a key or menu item for this. You could add
+ this function directly into XaoS's function registry (see for example the
+ GGI driver) --- it is useful mainly when you want to use a size selection
+ dialog that is standard for your environment, or let XaoS use its default
+ one. For example, see the SVGAlib or DOS driver.
+ @end table
+
+ Screen/window size information:
+
+ Xaos needs to know the exact physical size of displayed images. This is
+ required for random dot stereograms and also for keeping the aspect ratio
+ of fractals correct (do not make them wide in 640x200 resolution etc.)
+ At least one of the following values should be defined (given in the order I
+ prefer)
+@findex SCREENSIZE
+@findex PIXELSIZE
+@findex FULLSCREEN
+@findex RESOLUTION
+ @table @code
+ @item SCREENSIZE
+ The @var{width}/@var{height} values specify the exact size of the
+ screen/window in centimeters
+ @item PIXELSIZE
+ The @var{width}/@var{height} values specify the exact size of one pixel in
+ centimeters. This is better for windowed environments, where the window
+ size is often changed.
+ @item FULLSCREEN
+ The driver runs fullscreen. XaoS automatically uses the default screen size
+ (29.0cm x 21.5cm)
+ @item RESOLUTION
+ The driver does not know the exact screen size, but knows the resolution
+ used (in the @var{width}/@var{height} variables); XaoS automatically
+ calculates pixel width using width = 29.0cm/maxwidth and height =
+ 21.5/maxheight.
+ @end table
+ Of course the default width and height can be changed by command line
+ options. You may also use combinations like:
+
+ @table @code
+ @item SCREENSIZE | FULLSCREEN
+ The best for fullscreen drivers
+ @item PIXELSIZE | RESOLUTION
+ The best for windowed drivers
+ @item FULLSCREEN
+ For fullscreen drivers that have no idea about screen size...
+ @end table
+
+ Do not forget to set the @var{width}, @var{height}, @var{maxwidth},
+ @var{maxheight} fields if required.
+
+@item gui_driver
+ See the next section for description.
+@end table
+
+
+@section Registering the driver
+
+Once you've done the above, you just register the driver in @code{drivers.c} and
+you may compile :) You can use @code{ui_template.c} as a driver template.
+
+You may also look at the xthreads library description if you are porting XaoS to
+some SMP platform.
+
+Please let me know if you want to start to code a driver.
+
+@node gui-driver, eui ,driver ,Top
+@chapter Writing a GUI driver
+
+XaoS has a builtin GUI. Many operating systems have native GUI toolkits and XaoS
+default GUI might look strange there. To avoid this problem, you might write an
+external GUI program (see eui section) or write mappings from the XaoS GUI
+functions to the native ones. The advantage of an external GUI process is
+multitasking; XaoS is not thread safe and the GUI must be synchronous with
+calculation. Also, the ugly interface code currently doesn't support multiple
+windows (although this should be solved in the future). This solution is
+suitable mainly for those systems where two cooperating programs sharing one
+window is a problem (like Windows).
+
+To write a GUI driver you need to fill out the following structure:
+@example
+struct gui_driver
+@{
+ void (*setrootmenu)(struct uih_context *c, char *name);
+ void (*enabledisable)(struct uih_context *c, char *name);
+ void (*menu)(struct uih_context *c, char *name);
+ void (*dialog)(struct uih_context *c, char *name);
+ void (*help)(struct uih_context *c, char *name);
+@};
+@end example
+
+All functions have a @code{uih_context} parameter. You don't need to worry about
+its contents; just pass it to the functions that require it. This parameter is
+for multiple window support, which is not implemented yet.
+
+The @code{setrootmenu} function draws the root menu according to the menu called
+@code{name}. To get the menu fields you might use the following piece of code:
+@example
+#include <ui.h>
+#include <xmenu.h>
+
+....
+
+int i;
+menuitem *item;
+for (i = 0; (item = menu_item (name, i)) != NULL; i++)
+ @{
+ if (item->type == MENU_SUBMENU) @{
+ /* This field is a submenu. You might call a function to
+ construct the submenu here. item->shortname contains
+ the name for the submenu. */
+ @}
+ /* Add menu field here.
+
+ You might check flags here:
+ item->flags&MENUFLAG_CHECKBOX
+ field has a checkbox
+ item->flags&MENUFLAG_RADIO
+ field is part of a radio button group. In the current
+ implementation, there is one radio button group per menu.
+
+ in both cases you can call menu_enabled(uih, item) to see
+ if the item is checked or not.
+
+ item->name contains the field's text
+
+ item->key contains a hotkey (a one letter string in the
+ current implementation)
+ @}
+@end example
+Once the field is selected, call the function @code{ui_menuactivate(item, NULL)}
+where @code{item} is a pointer to the @code{menuitem} record of the selected
+field.
+
+The @code{enabledisable} function is called when the checkbox or radiobutton
+state is changed. The @code{name} parameter is the same as the
+@code{item->shortname} of the changed field, so you need to search all the
+menus, compare @code{name} to @code{item->shortname}, and if it matches, call
+@code{menu_enabled} to get the new state. For radiobuttons, only enable events
+are noticed. Your code is expected to automatically disable all other
+radiobuttons in the same submenu.
+
+The @code{menu} function works similarly to @code{setrootmenu}, but displays a
+popup menu.
+
+The @code{dialog} function is called for dialogs. The function should look like:
+@example
+menuitem *item = menu_findcommand(name);
+menudialog *dialog = menu_getdialog(uih, item);
+int i;
+for(i=0; dialog[i].question; i++)
+@{
+ /* Construct dialog, where the left side contains labels with
+ dialog[i].question, and the right side contains input entities based on the
+ dialog[i].type. Dialog[i].type is one of the following:
+
+ DIALOG_INT: integer value input. The default value is: dialog[i].defint
+ DIALOG_FLOAT: floating point input value (long double, where available).
+ Default value is dialog: dialog[i].deffloat
+ DIALOG_COORD: complex value floating point input (two floats), default
+ values are dialog[i].deffloat and dialog[i].deffloat2
+ DIALOG_STRING: string input. Default value is dialog[i].defstr
+ DIALOG_IFILE: input file
+ DIALOG_OFILE: output file
+ default mask is dialog[i].defstr
+ DIALOG_CHOICE: choice between various strings.
+ cast dialog[i].defstr to char ** to get a pointer to a NULL
+ terminated array of choices.
+@}
+@end example
+Once the dialog is filled by the user, @code{gui_driver} is expected to allocate
+an array of union @code{dialogparam}:
+@example
+dialogparam *p = calloc (sizeof (*p), nitems);
+@end example
+and fill in the selected values. @code{p[i].dint} is used to pass an integer
+value, or the number of a DIALOG_CHOICE selection, @code{p[i].number} is used
+for floating point numbers, @code{p[i].dstring} for strings and filenames,
+@code{p[i].dcoord[0]} and @code{p[i].dcoord[1]} for complex values.
+
+The string values are expected to be in separately @code{malloc}ed chunks. Once
+the array is filled, call @code{ui_menuactivate(item, p)}.
+
+The function @code{help} is used to display help about a given topic. To
+implement it you could either convert XaoS help file to some native format, or
+use the xshl library to render the help page for you. To render an xshl page
+use:
+@example
+#include <xshl.h>
+xshl_line *lines;
+int getwidth (void *data, int flags, char *text)
+@{
+ return width of text with given flags
+ flags is mask of the following:
+ XSHL_BIG - large text
+ XSHL_EMPH - emphasized text
+ XSHL_MONOSPACE - monospaced text (typewriter)
+ XSHL_LINK - line (should be underlined or suchlike)
+ XSHL_WHITE
+ XSHL_RED
+ XSHL_BLACK - color of text (not very meaningful here)
+ XSHL_RIGHTALIGN
+ XSHL_CENTERALIGN - alignment of text
+
+@}
+lines = help_make (name, getwidth, textheight, largetextheight);
+if (lines == NULL)
+ lines = help_make ("main", getwidth, textheight, largetextheight);
+
+@end example
+Now you might use @code{lines} to draw the help. It is a pointer to the array of
+structures:
+@example
+struct xshl_line @{
+ int y;
+ struct xshl_item *first;
+@};
+@end example
+@var{y} is the position of the line from the beginning of the text, and
+@var{first} is a pointer to the blocks of text on the line. The last line
+contains a @code{NULL} pointer in the first section.
+
+@code{first} is a linked list of @code{xshl_item} structures:
+@example
+struct xshl_item @{
+ struct xshl_context c;
+ char *text;
+ int x;
+ int width;
+ struct xshl_item *next;
+@};
+@end example
+
+You can draw @code{text} at position @code{x} (and @code{y} from the line
+record) using the text style described by @code{xshl_context}:
+@example
+struct xshl_context @{
+ int flags;
+ char *linktext;
+@};
+@end example
+@code{flags} has the same meaning as in the @code{getwidth}
+section. @code{linktext} is the name of the next help page when the field has
+the @code{XSHL_LINK} atribute.
+
+For an example of @code{gui_driver}, see the win32 driver code.
+
+
+
+
+@node eui, ui-helper ,gui-driver ,Top
+@chapter Writing an external user interface
+
+This part describes how to make an external user interface --- that is, a
+separate program which constructs a window with all menus and dialogs. It uses
+the XaoS engine to calculate the fractal as a separate process. This design
+brings many advantages --- the external GUI implementation could have a ``native
+look'' for given platform and could contain many extensions (perhaps multiple
+windows). Also all calculation is done while multitasking, so the user interface
+is usable even when the engine is busy.
+
+The X Window System provides a way for programs to draw into others' windows ---
+the ``master'' program creates window the sub-window where it wants to put the
+fractal, then calls the engine with @code{-windowid} @var{number_of_window}
+parameters. Instead of creating a new window, the engine uses uses the specified
+window. The most famous example of such cooperation is probably
+ghostscript/ghostview.
+
+Other windowed environments probably provide similar means for for
+cooperation. In most others it will probably be implemented using shared memory,
+so it should work on most platforms, I expect.
+
+Of course, you might also design the UI as a separate button box in another
+window, like most animation players, or ImageMagick do. In fact, the external
+GUI could be very similar in style to ImageMagick...
+
+@section Basic concept
+
+The UI implementation has a function to disable its GUI functions. Because of
+the function registry, all its menus and dialogs are described in a fairly
+simple database, which is also mapped to the Scheme-like scripting language.
+The external UI implementation can just translate the user's actions into this
+scripting language and send that through the pipe.
+
+The commands, menus, and dialogs should be created automatically from the
+database, so the UI doesn't need to have special code for each XaoS feature. At
+the beginning it should use XaoS' @code{(print_menus)} command to force it to
+send information about the database, then build menus using this information.
+
+For this you only need some equivalent to UNIX pipes, so again I expect it is
+doable on most platforms.
+
+@section Starting XaoS as a slave process
+
+One of the first things the engine needs to do is to initialize XaoS in the
+right mode to work as a slave process. For this you need to do several things:
+
+
+@itemize @bullet
+@item Open the pipe
+@item Disable the builtin GUI
+@item Read the menu hierarchy (this is optional --- GUI can also have all menus
+coded into it. But it is not recommended, since it will cause problems with
+adding new features in future)
+@end itemize
+
+Opening pipe is done via the @code{-pipe} option. It takes one parameter, the
+name of the FIFO you want to use. If you specify ``@code{-}'', XaoS will read
+input from stdin.
+
+To disable the XaoS GUI use @code{-nogui}. This will disable all menus, dialogs
+and help text.
+
+To read the menu hierarchy, just add @code{-print_menus} parameter and then
+parse XaoS's output. This will print the whole menu hierarchy. If you are
+building menus at the time they are selected, you might prefer to use the
+@code{print_menu} command, which prints just one menu without its submenus; its
+output could be immediately used for building a menu. The command takes one
+string parameter, the name the menu you want to print; i.e., to print the root
+menu use @code{-print_menu root}.
+
+Under the X Window System you also need to specify the @code{-windowid}; also
+the @code{-shared} option is quite recommended. Otherwise in pseudocolor visuals
+XaoS will create its own colormap, wich will likely collide with the UI's
+colormap, and either XaoS or the UI will have wrong colors. If you have any
+idea how to avoid this, let me know.
+
+You might also let the user specify some extra parameters from the command line,
+by simply adding those options to the end of the command line. The @code{-nogui}
+and @code{-print_menus} commands must be first for a simple reason: XaoS parses
+its command line early in initialization. Some commands (like
+@code{-print_menus}) should be processed at this time, while others (like
+@code{-loadpos} need a working engine. Such commands are queued and processed
+later, once the engine is initialized. XaoS never reorders commands; if an
+option that requires queuing is located before @code{-print_menus} on the
+command line, it will queue @code{-print_menus} too. This will cause the menus
+to be printed much later, slowing startup.
+
+So the proper calling sequence for the user interface under X should look like:
+
+
+@example
+xaos -nogui -print_menus -windowid <id> -share -pipe - @var{[other options]}
+@end example
+
+@section Parsing the menu structure
+
+The structure is printed menu by menu. Each menu contains a header, some
+entries, then @code{endmenu}. The listing from @code{print_menus} is terminated
+by @code{endmenus}.
+
+The header starts with @code{menu} and then contains a menu identifier, and the
+menu's full name, e.g.
+
+@example
+menu "fractal" "Fractal"
+@end example
+
+Each entry which follows has its own line. It starts with a menu type, which
+should be @code{submenu} or @code{menuentry}.
+
+@code{submenu} has a similar format to the header --- the full menu name, and an
+identifier.
+
+The next few fields are @code{menuentry}-related. It has an entry type, which
+could be @code{normal}, @code{radio} or @code{checkbox}. @code{radio} and
+@code{checkbox} are followed by @code{on} or @code{off} specifying whether it is
+enabled or disabled by default. (The radio-buttons don't have explicit
+information about which group they belong to. For now I expect that each menu
+contains just one such group, so it is clear in any case.)
+
+A set of flags should follow. Currently two flags are defined: @code{dialog},
+wich specifies that the function has a dialog box, and
+@code{dialogatdisable}. By default, dialogs for check-boxed functions are
+displayed only when the checkboxes are enabled. The second flag reverses this
+behaviour. It is currently used for the @code{mandelbrot} function, which
+behaves in this way; when you disable it, the user is prompted for the Julia
+seed.
+
+So a specification should look something like this:
+
+@example
+menu fractal "Fractal"
+submenu "formulae" "mformula"
+submenu "Incoloring mode" "mincoloring"
+submenu "Outcoloring mode" "moutcoloring"
+submenu "Plane" "mplane"
+submenu "Palette" "palette"
+menuentry "Mandelbrot mode" "uimandelbrot" checkbox off dialogatdisable dialog
+menuentry "Perturbation" "uiperturbation" checkbox off dialog
+menuentry "View" "uiview" normal dialog
+menuentry "Reset to defaults" "initstate" normal
+endmenu
+@end example
+
+@section Activating functions and dialogs
+
+Once the menu structure is built and the user selects some item, it should be
+activated. This is done by a simple command: @code{(@var{name})}. Once
+``@code{)}'' is sent, the command is executed by XaoS.
+
+Check-boxed functions has one extra parameter --- @code{#t} to enable them and
+@code{#f} to disable. So if you want to enable the @code{autopilot} item, send:
+@code{autopilot #t}
+
+Radio-buttons don't have any such parameter, because disabling radio-buttons
+makes no sense.
+
+If the item has a dialog enabled, the engine expects that the UI will make the
+dialog first, ask the user for values and then pass back a function with
+parameters. But first, the UI needs to know what parameters the function
+expects. This is done by sending the command @code{(print_dialog
+"@var{name}")}. XaoS replies with a dialog specification very similar to the
+menu specification.
+
+This has the header @code{dialog} followed by the name of the function being
+described. Then one dialog entry per line is sent, started by
+@code{dialogentry}, followed by the question the UI should display. Next is a
+type, which should be one of the following:
+@table @code
+@item integer
+Integer number such as @code{123}
+@item float
+Floating point number such as @code{123.123}
+@item string
+String such as @code{"ahoj"}
+@item keyword
+String such as @code{'ahoj}. Keywords are mostly similar to strings, except that
+they can not contain spaces. They are used, for example, for specifying types of
+formulae. Strings are used for printing text and so on.
+@item inputfile
+@item outputfile
+Here the UI should display a file selection dialogs. With @code{outputfile} it
+is also a good idea to check whether the file exists and ask the user if he
+wants to overwrite it.
+@item onoff
+Boolean value (@code{#f}, or @code{#t})
+@item complex
+Complex value --- two floating point numbers such as @code{123.123 123.123}
+@item choice
+Choice between some keywords. The keywords are sent after @code{choice},
+enclosed in @code{@{} @code{@}}.
+@end table
+The last information on the line is the default value, in the same format as the
+examples above. For files, the default value is in the format
+@code{"@var{[prefix]}*@var{[extension]}"}.
+
+Some examples:
+
+@example
+customdialog "uiview"
+dialogentry "center:" complex 0.000000 0.000000
+dialogentry "Radius:" float 0.000000
+dialogentry "Angle:" float 0.000000
+enddialog
+
+dialog "load"
+dialogentry "Filename:" inputfile "fract*.xpf"
+enddialog
+
+customdialog "color"
+dialogentry "Color" choice @{white black red @}white
+enddialog
+
+@end example
+
+To activate a function, send a command consisting of the function name followed
+by a sequence of parameters, mapped one-to-one to dialog box fields, in the same
+order as those fields. The parameters have the same format as in the above
+examples; checkbox fields return @code{#t} and @code{#f}. For instance:
+
+@example
+(uiview 0 0 0.5 0)
+(load "text.xpf")
+(color 'white)
+@end example
+
+@section Synchronization
+
+In some cases, XaoS can change radio-box and check-box values itself (when user
+presses a key, or loads some file, for instance). All such changes are sent to
+the GUI so that it can update what the user sees correspondingly. They are sent
+to standard output in the following format:
+
+@example
+checkbox "name" on/off
+radio "name" on/off
+@end example
+
+Your GUI code should parse this and change its menus when necessary.
+
+XaoS's menus can contain multiple distinct trees. In some cases (like when
+animation replay is active) the root of the menu structure should change. To
+indicate this to the GUI, XaoS sends a command:
+
+@example
+root "name"
+@end example
+
+Also, the user can press keys which normally display menus, dialogs or
+help. If XaoS has the keyboard focus, it will receive these instead of the
+GUI. XaoS sends commands to indicate this:
+
+@example
+menu "name"
+dialog "name"
+help "topic"
+@end example
+
+All these commands should be taken into account by the GUI, or could be ignored
+(not recommended!)
+
+@section help
+
+XaoS's help is in a simple hypertext language. In order to simplify its parsing,
+I've made xshl and help libraries. Making a help window with these libraries
+should be quite easy; just call the help function:
+@deftypefn Function struct xshl_line *help_make (char *@var{command}, int @var{getwidth} (void *, int @var{flags}, char *@var{text}), int @var{width}, int @var{smallheight}, int @var{bigheight});
+@end deftypefn
+and you will receive a stream of text with coordinates describing where to
+display the text into the shared window.
+
+The @code{command} parameter is the help topic. The @code{getwidth} function
+returns the width of a given piece of text. @code{width} is the width of the
+window, @code{smallheight} is the height of the small font, and @code{bigheight}
+is the height of the big font.
+
+Please ask me for more details if necessary.
+
+And thats all. Good luck with coding.
+
+@node ui-helper, xthreads ,eui ,Top
+@chapter UI-helper library
+
+UI helper library takes care of all of XaoS' engine functions and features and
+provides a higher level API which is quite easy to understand. If you want to
+write a completely new user interface (a replacement for the ugly interface ---
+not just new bindings for native menus or external user interfaces) or you want
+to use the XaoS engine in your program, you will probably want to use this
+library.
+
+Its API has many calls and features. This section gives a brief overview of its
+calls. Please ask me for details.
+
+@section initialization
+
+To initialize the UI helper library, you need to prepare a palette and image.
+The palette is created using the palette library call
+@code{createpalette}. Creating a truecolor palette should look like this:
+
+@example
+ struct palette *pal = createpalette (0, 0, TRUECOLOR, 0, 0, NULL,
+ NULL, NULL, NULL);
+@end example
+
+For details about creating palettes see @code{ui.c} or ask me.
+
+To create an image, call:
+
+@example
+ struct *image img = create_image_mem (width, height, 2, pal,
+ pixelwidth, pixelheight);
+@end example
+
+This creates an image in memory. If you want to create it in your own buffers,
+you might use @code{create_image_cont} or @code{create_image} calls. Again see
+@code{ui.c}.
+
+Then it is time to fire up the main library:
+
+@example
+ struct uih_context *uih = uih_mkcontext (0, img, passfunc,
+ NULL, NULL);
+@end example
+
+The @code{passfunc} is called when the engine is calculating. It might process
+external events and display progress information. It should look like this:
+
+@example
+static int
+ui_passfunc (struct uih_context *c, int display, char *text, float percent)
+@{
+ /*process events */
+ if (uih->display)
+ @{
+ uih_drawwindows (uih);
+ /*display */
+ @}
+ if (display)
+ @{
+ if (percent)
+ sprintf (str, "%s %3.2f%% ", text, (double) percent);
+ else
+ sprintf (str, "%s ", text);
+ /*display it */
+ @}
+@}
+@end example
+It can set @code{uih->interrupt} if it wants to interrupt the current
+calculation (whereupon the main calculation loop will return to its caller).
+
+You can also load the catalog file in order to make tutorials work:
+
+@example
+ uih_loadcatalog (uih, "english");
+@end example
+
+Once this is done, the ui_helper library is fully functional and you can enter
+the main loop.
+
+@section main loop
+The UI helper library does not have any timing primitives; so it expects a
+standard form of main loop. It asks it caller to redisplay a changed image when
+necessary. The library also uses the generic timerlib library for its timing,
+for which see elsewhere in this document.
+
+The main loop should look like this:
+
+@example
+while (1)
+ @{
+ if (uih->display)
+ @{
+ uih_prepare_image (uih);
+ uih_drawwindows(uih);
+ /*display current image buffer*/
+ @}
+ uih_update (uih, mousex, mousey, buttons);
+ if ((time = tl_process_group (syncgroup, NULL)) != -1 &&
+ !uih->inanimation) @{
+ /*relax for the given time in usec - wait for events etc..*/
+ @}
+ /*and repeat*/
+ @}
+@end example
+
+@section Calling functions
+
+The UI helper library has many functions declared in @code{ui_helper.h} for
+various actions. There are too many of them to describe here, but their names
+are quite informative, so I hope you will not have problems.
+
+(You could also use the XaoS function registry, which does all this stuff for
+you; you will just draw menus and dialogs based on this registry and all
+features will be automatically made available. If you are writing an ordinary
+user interface, this is the preferred way.)
+
+Note that the @code{ui_helper} library is not reentrant, so you can't call most
+of these functions from the @code{passfunc}. If you are using the registry, the
+activating function handles this automatically and queues functions when
+necessary. To process them you need to flush the queue in the main loop as
+follows:
+
+@example
+static void
+processbuffer (void)
+@{
+ menuitem *item;
+ dialogparam *d;
+ if (uih->incalculation)
+ return;
+ while ((item = menu_delqueue (&d)) != NULL)
+ @{
+ menu_menuactivate (item, d);
+ @}
+@}
+@end example
+
+@section closing library
+
+This is done using:
+
+@example
+ uih_freecontext (uih);
+@end example
+
+One user of this library is the ugly interface code in XaoS; see the
+@code{src/ui} directory. Another, much simpler user is
+@code{src/ui-hlp/render.c}, which does animation rendering.
+
+@node xthreads, filters ,ui-helper ,Top
+@chapter XaoS thread library
+
+This description should be useful for those who want to port XaoS to
+multiprocessor platforms, and those who want to implement a filter or other
+relatively computationally expensive code. Note that the thread library uses
+nothread calls as a degenerate case when only one thread is used, when the host
+does not allow multi-threading or it is not an SMP architecture (since this
+library is used only to distribute calculation into other CPUs).
+
+XaoS thread library is a simple map of a few functions required by XaoS to the
+system's library for threads.
+
+It has the following variables:
+
+@deffn Variable ethreads
+This is set to 1 in the case that threads are enabled
+@end deffn
+
+@deffn Variable nthreads
+Number of threads
+@end deffn
+
+It provides the following functions:
+
+@deftypefn Function {void} xth_init (int @var{threads})
+This function initializes the threading library (starts threads, sets
+@var{ethread} to @code{1} and @var{nthreads} to @var{n}. @var{threads} parameter
+should be set to 0 for auto-detection, or to the number of threads the user
+wants. If threads is set to 1, the threading library is disabled and the
+following functions are mapped to the @code{nothread_} equivalents defined in
+@code{xthread.h}.
+
+Note that all threads are not interchangeable --- there is a main thread (the
+one that called @code{xth_init}) that communicates with drivers, controls
+calculation, and so on, and there are child threads that are waiting for orders
+from the main thread. The latter threads can't use any functions from the
+xthread library.
+@end deftypefn
+
+@deftypefn Function {void} xth_uninit (void)
+This function un-initializes the thread library --- kills child threads and sets
+@var{ethread} to 0 and @var{nthreads} to 1.
+@end deftypefn
+
+@deftypefn Function {void} xth_function (xfunction *@var{function}, void *data, int @var{range})
+This function is used when the engine wants to perform some operation on the
+image in parallel. It is expected to wait until all threads are ready, then
+start @var{function} on all threads, including the control one, with the
+following parameters: @var{data} --- the same as @var{data} passed to
+@code{xth_function}, @var{taskinfo} --- pointer to a platform-dependent
+@code{taskinfo} structure (defined in @code{xthread.h}), but must have at least
+a field @code{n}, that holds the thread number (where the control thread is
+numbered 0 and other threads are numbered in the range 1 -- @var{nthreads}).
+The next two parameters are the range of images across which the function is
+expected to work. @code{xth_function} is expected to divide @var{range} into
+@var{nthreads} equal pieces and pass to each thread the start of a piece and the
+start of the next piece (@var{range} for the last one). The function does not
+wait for other threads to finish at the end, but returns immediately to main
+thread after @var{function} returns.
+
+This function is called approx. 5--10 times per frame.
+@end deftypefn
+
+@deftypefn Function {void} xth_sync (void)
+This function waits until all threads are ready for the next order from the main
+task.
+
+This function is called approx 5--10 times per frame.
+@end deftypefn
+
+@deftypefn Function {void} xth_bgjob (xfunction *@var{function}, void *@var{data})
+This function is expected to behave as follows: if there are any threads waiting
+for orders, ask one of them to call @var{function} with similar conventions as
+in @code{xth_function} except that the @var{range} parameters are set to 0.
+Otherwise it starts function in the foreground, as usual.
+
+This function is called once per frame.
+@end deftypefn
+
+@deftypefn Function {void} xth_nthread (struct taskinfo *@var{s})
+This function should be used to determine the current thread number. Do not use
+@code{taskinfo->n} instead, since if threads are disabled this will be defined
+to 0 to allow the optimizer to perform better optimizations. This function can
+be called by all threads.
+@end deftypefn
+
+@deftypefn Function {void} xth_lock (int @var{n})
+@end deftypefn
+@deftypefn Function {void} xth_unlock (int @var{n})
+Lock/unlock lock number @var{n}. At least @code{MAXSEMAPHORS} locks must be
+available.
+@findex MAXSEMAPHORS
+
+Note that locks are used for very short fragments of code, so they need to be
+fast; so spinlocks may be better than classical Dijkstra semaphores (although
+this is untested). They are called once per calculated line/row during zoom and
+once per approx 10 pixels during calculation of a new image.
+@end deftypefn
+
+@findex MAXCONDS
+@deftypefn Function {void} xth_sleep (int @var{n}, int @var{l})
+Expected to atomically unlock lock @var{l} and sleep in queue @var{n}. At least
+@code{MAXCONDS} queues must be available. After the function is woken up, lock
+@var{l} again. This mechanism is used by the new image calculation algorithm,
+but it is designed to minimize its calls, so I expect it should be called once
+or twice.
+@end deftypefn
+
+@deftypefn Function {void} xth_wakeup (int @var{n})
+Wake up some thread from queue @var{n}. The lock used by sleep calls is locked
+in this case. The function should wake up all threads if a single-thread awaken
+is not supported by the host API.
+
+With luck, this function will not be called at all; it will be called by the new
+image calculation routines when the queue is empty. This happens when there are
+50 threads or thereabouts, but happens rarely at two or eight threads in my
+tests.
+@end deftypefn
+
+@deftypefn Function {void} xth_wakeall (int @var{n})
+Similar to wakeup but wake up all threads.
+@end deftypefn
+
+
+@node filters, algorithm ,xthreads ,Top
+@chapter Filters
+
+This is a brief description of the filter system used internally by XaoS.
+Filters in XaoS provide an object oriented interface to every part of the XaoS
+engine. The main filters are the user interface implemented in ui_helper.c and
+the zooming engine implemented in zoom.c. Active filters are kept in a queue ---
+in the beginnning there are just two filters here (zoom and ui), but at any
+later time additional filters (stereogram generation, and so on) can be inserted
+into the middle of the queue.
+
+When calculating, every filter should use data calculated by the filter
+immediately before it in the queue, which that filter placed into the image it
+passes to its child. For example, the stereogram filter should take the fractal
+generated by the zooming engine and create a stereogram from it (assuming that
+the zooming engine is immediately after the zooming engine in the filter queue).
+
+This makes XaoS's code more flexible and makes future enhancements easy (perhaps
+a different zooming engine, or image rotation, other special effects, plug-ins
+or some other funny stuff) since the enhancements are forced to be decoupled by
+the filter library, and since each filter has a degree of control over filters
+that follow it in the queue. For instance, the stereogram filter should change
+the palette, force the zooming engine to change the depth, width and height of
+the calculated image to fit its needs, and so on.
+
+This document mainly describes the creation of a filter like the stereogram
+generator --- i.e. a filter placed into the middle of the queue --- since I
+don't expect there will be many people creating ``terminal'' filters (zooming
+engines/user interface layers). Note that different user interfaces are
+possible, since the user interface layer is not the real user interface, just a
+set of high level functions that should be called by the main application, like
+@code{set_view}. So if you want to use XaoS as a calculation engine in your
+program this document is probably not for you.
+
+Each filter is defined by a @var{filteraction} structure, as follows::
+@findex filteraction
+@example
+struct filteraction @{
+ char *name;
+ char *shortname;
+ int flags;
+ struct filter *(*getinstance)(struct filteraction *a);
+ void (*destroyinstance)(struct filter *f);
+ int (*doit)(struct filter *f,int flags,int time);
+ int (*requirement)(struct filter *f,struct requirements *r);
+ int (*initialize)(struct filter *f,struct initdata *i);
+ void (*convertup)(struct filter *f,int *x,int *y);
+ void (*convertdown)(struct filter *f,int *x,int *y);
+ void (*removefilter)(struct filter *f);
+@};
+@end example
+This structure describes unchanging parameters to the filter (like its name) and
+a basic set of methods required for communication with the rest of XaoS. The
+@var{name} field is a comparatively long description of the filter's name, such
+as ``A random dot stereogram generator''. @var{name} is displayed by the ugly
+interface in the Filters menu, so it is expected to be descriptive (but shorter
+than 30 characters). The short name is a one word long name for the filter, like
+``stereogram''. This name is used in save files and command line parameters;
+everywhere that the user might need to write it, so writing a long descriptive
+name would just be wasteful of time and disk space.
+
+The flags field is reserved for future enhancements and is expected to be 0 for
+now.
+
+@section Instance creation / destruction
+
+Functions @code{getinstance} and @code{destroyinstance} are equivalent to the
+constructor and destructor in object-oriented languages. @code{getinstance} is
+expected to create and fill out the following structure:
+
+@findex filter
+@example
+struct filter @{
+ struct filter *next,*previous;
+ struct queue *queue;
+ struct filteraction *action;
+ struct image *image,*childimage;
+ struct requirements req;
+ struct fractal_context *fractalc;
+ void *data;
+ char *name;
+ int flags;
+ void (*wait_function) (struct filter *f);
+ /*stuff for wait_function*/
+ int pos,max,incalculation,readyforinterrupt,interrupt;
+ char *pass;
+@};
+@end example
+Although this structure seems to be long and complex, most of the fields are
+currently unused, and the rest of them are filled out automatically by a helper
+function:
+
+@deftypefn Function {struct filter *} createfilter (struct filteraction *@var{fa});
+
+This function should be used to do the dirty work of instance creation and fill
+out the @var{filter} structure. The only possibly interesting field is
+@var{data}, a pointer reserved for the filter's internal use; it can be a
+pointer to the filter's internal variables if required. This is what a
+@code{getinstance} implementation that allocates such an additional structure
+might look like:
+
+@findex getinstance
+@example
+static struct filter *getinstance(struct filteraction *a)
+@{
+ struct filter *f = createfilter(a); /*create filter structure*/
+ struct stereogramdata *i=calloc(sizeof(*i),1);
+ /*allocate internal variables*/
+ /*initialize your variables here*/
+ f->data=i; /*add pointer to internal data*/
+ return (f);
+@}
+@end example
+
+If nothing similar is required you can simply put @code{creatfilter} into the
+@var{getinstance} field.
+
+@end deftypefn
+
+@code{destroyinstance} is expected to free the memory used by the filter
+structure and all the filter's internal data. To free the filter structure use
+the normal @code{free} call. An implementation of such function should look
+something like
+:
+@example
+static void destroyinstance(struct filter *f)
+@{
+ destroyinheredimage(f);
+ free(f->data);
+ free(f);
+@}
+@end example
+The meaning of @code{destroyinheredimage} will be described later.
+
+
+@section Initialization
+
+During the initialization phase, each filter says to its parent what kind of
+images it supports (which should depend on the images that it's child has said
+it supported), the parent chooses the best supported image format for its
+purpose and gives that to the child (while passing that information on up the
+queue of filters). Initialization is done in two passes:
+
+The first pass starts at the lowest filter in the queue (zoom, by default); each
+filter passes a @var{requirements} structure to its parent.
+
+The second pass starts at the highest filter (the ui filter), and each filter
+passes to its child an image and some other stuff. Then calculation should
+begin.
+
+The queue needs to be reinitialized after creating, resizing, adding or removing
+a filter, and similar operations.
+
+The first pass is implemented using the @code{require} function. This function
+is expected to look at the child's requirements it received as a parameter, fill
+out its own @var{requirements} structure, and call the @code{require} function
+of its parent filter.
+@findex requirements
+@example
+struct requirements @{
+ int nimages;
+ int supportedmask;
+ int flags;
+@};
+@end example
+The @var{nimages} field should be set to 1 or 2. When it is 2, the parent filter
+@emph{must} pass the image in two buffers (double-buffered). Note that if it is
+1, the parent @emph{should} pass the image in two buffers, but is not required
+to.
+
+@var{supportedmask} is a mask giving the image types supported by the
+filter. Valid image types are:
+@findex C256
+@findex FIXEDCOLOR
+@findex GRAYSCALE
+@findex TRUECOLOR
+@findex TRUECOLOR24
+@findex TRUECOLOR32
+@table @code
+@item C256
+ A normal 8bpp image with palette
+@item TRUECOLOR24
+ A 24bpp truecolor image with 8 bits for each color.
+@item TRUECOLOR16
+ A 16bpp truecolor image
+@item TRUECOLOR
+ A 32bpp truecolor image with 8 bits for each color.
+@item LARGEITER
+ A 16bpp image, but without colors. The pixels are expected to hold an
+ iteration count; it could also be thought of as a 16bpp grayscale image.
+@item SMALLITER
+ Similar to @code{LARGEITER}, but 8bpp.
+@end table
+
+@findex MASK1BPP
+If you don't want to worry about palettes, color allocations and so on, but just
+want to do some non-display operation with a bitmap, you probably only care
+about the image depth and not the precise meaning of the pixels; in that case,
+you can use one of the bitmasks @code{MASK1BPP} for 8 bit images,
+@code{MASK2BPP} for 16 bit and so on.
+
+The final field in the @var{requirements} structure is @var{flags}. It's a mask
+composed from the following constants:
+
+@table @code
+@item IMAGEDATA
+ Set this if your filter requires the data from previous frame untouched. When
+ this is not set, filters can reuse your image and change it. But some
+ filters, like motion blur or the zooming engine, require data from the
+ previous frame to construct the new one; for such filters, this flag should be
+ set.
+@end table
+There are no more flags supported at the moment. The @code{require} function
+should also save the child's @code{requirements} structure into
+@var{filter->req} for later use by the initialize pass. The code for a
+@code{requirement} function might look like
+@example
+static int requirement(struct filter *f,struct requirements *r)
+@{
+ f->req=*r; /*Save an child's requirements*/
+ r->nimages=1; /*Just one image is required*/
+ r->flags&=~IMAGEDATA;/*unset the imagedata field*/
+ r->supportedmask=C256|TRUECOLOR|HICOLOR|REALCOLOR;
+ /*mask of all supported image types*/
+ return (f->next->action->requirement(f->next, r));
+ /*call parent*/
+@}
+@end example
+The next pass is the main initialization pass. It goes in the opposite order
+(from parent to child, from the top of the queue to the bottom, in the same
+direction as image flow), and the child receives some stuff from the parent
+(such as images). The @code{initialize} function receives an @var{initdata}
+structure:
+@findex initdata
+@example
+struct initdata @{
+ void (*wait_function) (struct filter *f);
+ struct image *image;
+ struct fractal_context *fractalc;
+ int flags;
+@};
+@end example
+@var{wait_function} points to a function called by the filter during calculation
+that lets the parent filter (usually the user interface layer) inform the user
+of calculation progress. @var{image} is an image expected to be filled with an
+image in the calculation phase. @var{fractalc} is a pointer to a structure that
+will contain information about the fractal itself during calculation (formula
+type and so on). @var{flags} is a mask of the following constants:
+@table @code
+@item DATALOST
+ This is set if the data in the previous image was lost (if the image was
+ cleared or resized or freshly allocated). Filters that use data from previous
+ frames should pay attention to this flag. The zooming engine, for example,
+ recalculates the whole image if this flag is set, since all pixels from
+ the previous frame were lost.
+ Note that data will also be lost if the filter receives a different
+ @var{image} than in the previous initialization (since some filter before it in
+ the queue was removed).
+@end table
+Inheritance is carried out using these functions:
+
+@deftypefn Function void inhermisc (struct filter *@var{f},struct initdata *@var{i});
+
+This function sets fields in the filter structure like @var{fractalc} or
+@var{wait_func}. Inheritance of images is quite complex, since the new image
+needs to be prepared for the child filter. In order to save memory it is highly
+recommended to use the same image --- or at least the same memory --- for data
+when passing to the child, but this is not allays possible. The following
+function implements a heuristic to reuse the image where possible:
+@end deftypefn
+@deftypefn Function int inherimage (struct filter *@var{f},struct initdata *@var{data}, int @var{flags}, int @var{width}, int @var{height}, struct palette *@var{palette}, float @var{pixelwidth}, float @var{pixelheight})
+You should call this function in your @code{initialize} pass. It fills out
+@var{image} and @var{childimage} in the @var{filter} structure, and prepares
+@var{initdata} and @var{image} for the child. Note that in some cases it may
+fail and return 0. In this case the filter is expected to interrupt
+initialization and return 0 too.
+
+The @var{flags} parameter is a mask of the following constants:
+@table @code
+@item IMAGEDATA
+ Set if your filter requires data from the previous frame.
+@item TOUCHDATA
+ Set if your filter touches data in the output image. This is the usual case,
+ but some filters, like interlace or subwindow, don't touch the image data at
+ all.
+@item NEWIMAGE
+ Set if your filter cannot use the same image for output as it uses for input
+ (that is, if the two images must be distinct blocks of memory).
+@end table
+@var{width} and @var{height} are the width and height of the image you want to
+pass to the child; it should be set to 0 if you want the same width/height as in
+the parent image. @var{palette} is the palette of the image you want to pass;
+set to @code{NULL} if the palette should be inherited from the parent's image
+(as is usual). @var{pixelwidth} and @var{pixelheight} give the physical size of
+a pixel in centimeters; if set to 0 they are inherit from the parent's image.
+@end deftypefn
+
+If you use the @code{inherimage} mechanism, you must also call
+@code{destroyinheredimage} in the @code{destroyinstance} function and
+@code{updateinheredimage} at the beginning of the @code{calculate} function.
+
+Example implementation:
+@example
+static int initialize(struct filter *f,struct initdata *i)
+@{struct stereogramdata *s=f->data;
+ inhermisc(f,i);
+ if(!inherimage(f,i,TOUCHIMAGE,0,0,NULL,0,0) return 0;
+ /*initialize here*/
+ return(f->previous->action->initialize(f->previous,i));
+@}
+@end example
+Also note that the fractal context holds a pointer to the fractal's palette. If
+you don't change the image's palette everything is OK; but if the child's image
+differs from the parent's, there should be two behaviors --- the fractal's
+palette is the child's one (this is common in color conversion filters, going
+from 8bpp to TrueColor and suchlike), or the fractal's palette is the parent's
+one (like in the edge detection filter). By default the fractal's palette is set
+to the parent's one, because this is most likely to be generally useful;
+anything else requires explicit work from the parent to set up the child's new
+palette.
+
+This can be changed by the @code{setfractalpalette} call, which has two
+parameters --- the @var{filter} structure, and the new palette. When you pass
+the child's palette as @var{palette}, the fractal's palette will be changed to
+the child's. If you pass @code{NULL}, changing the palette will be disabled (as
+in the motion blur filter in 8bpp mode). This is only changeable if you still
+have access to the fractal's palette; some parent might have already redirected
+the palette beforehand, in which case this function does nothing.
+
+
+@section Calculation
+
+The calculation is done using the @code{doit} function:
+
+@deftypefn Function int (*doit)(struct filter *f,int flags,int time)
+
+This function is expected to call the child's calculation function when
+required, and apply its filter to the child's output.
+
+The @var{flags} are mostly undefined; only @code{INTERRUPTIBLE} is defined for
+now, and @emph{that} is mainly for the zooming engine so I do not describe it
+here. Nonetheless, the filter is expected to pass the @var{flags} to its
+child. Finally, @var{time} is the time in milliseconds that expired since the
+last @code{doit} call. It can be used to calculate the animation speed, perhaps
+in an attempt to keep the speed constant.
+
+@end deftypefn
+
+Calculation loops return a bitmask composed of the following flags:
+@findex ANIMATION
+@findex CHANGED
+@findex INEXACT
+@table @code
+@item ANIMATION
+ Set if the filter performs some animation, and expects that its calculation
+ function will be called again soon.
+@item CHANGED
+ Set if something changed in the output image (the usual case).
+@item INEXACT
+ This is enabled by the zooming engine in @code{INTERRUPTIBLE} mode in case the
+ @var{time} was exceeded.
+@end table
+
+Most @code{doit} functions change the image. The @var{image} structure contains
+following fields that might be significant to filters:
+@findex image
+@table @code
+@item bytesperpixel
+ Number of bytes per pixel (image depth).
+@item palette
+ Palette of image.
+@item currlines
+ Array of pointers to the beginning of each scanline in the image.
+@item oldlines
+ Like @var{currlines}, but for the previous image, when double-buffering is
+ enabled.
+@item nimages
+ Set to 2 when double-buffering is active.
+@item flipimage
+ Pointer to a function that flips @var{oldlines} and @var{currlines}.
+@end table
+
+The @var{palette} structure contains the following significant fields:
+
+@table @code
+@item type
+ Type of palette/image (@code{C256}, @code{TRUECOLOR} etc...)
+@item size
+ The number of allocated entries in the palette.
+@item pixels
+ The array of allocated entries; a conversion table mapping from the iteration
+ number to a pixel value.
+@item rgb
+ @sc{RGB} values for pixels (@code{NULL} for @code{TRUECOLOR}, @code{HICOLOR}
+ and similar paletteless types)
+@end table
+
+To make writing calculation loops for different bit-depths easier,
+@code{pixel8_t}, @code{pixel16_t} and @code{pixel32_t} are predefined. You also
+can use preprocessor magic as the edge detection filter does; this lets you
+write calculation loops just once, using @code{cpixel_t}, and the code will be
+compiled for every bitmap depth. See the edge detection filter
+(@code{src/engine/edge.c} and @code{src/engine/edged.c}) for implementation
+details.
+
+
+@section Coordinate conversion
+
+The @code{convertup} and @code{convertdown} functions are used for converting
+screen coordinates to a position in the fractal and back. @code{convertup}
+receives coordinates in the child's image, and is expected to convert them into
+coordinates in the parent's image and call the parent's @code{convertup}
+function.
+
+@code{convertdown} is the reverse of @code{convertup} (going from parent to
+child).
+
+If coordinates correspond 1:1 you should use @code{convertupgeneric} and
+@code{convertdowngeneric}; otherwise, the implementation should look something
+like this:
+
+@example
+static void convertup(struct filter *f,int *x,int *y)
+@{
+ *y*=2;
+ *x*=2;
+ if(f->next!=NULL) f->next->action->convertup(f->next,x,y);
+@}
+static void convertdown(struct filter *f,int *x,int *y)
+@{
+ *y/=2;
+ *x/=2;
+ if(f->previous!=NULL) f->previous->action->convertdown(f->previous,x,y);
+@}
+@end example
+
+@section Filter removal
+
+Before the filter is removed from the queue, the @code{removefilter} function is
+called. It is expected to clean up anything that the filter changed.
+
+In most cases, it should be left at @code{NULL}.
+
+@section Filter registration
+
+Once the @var{filteraction} structure is filled, the filter is ready, and you
+should try to enable it. To enable it in the user interface you need to edit
+@code{src/ui-hlp/ui_helper.c}, add the filter to the @var{uih_filters}
+structure, and increase @var{uih_nfilters}. Note that the order of filters in
+@var{uih_filter} defines the order of the filters in the filter queue.
+
+Then it is high time to start experimenting.
+
+Good luck!
+@node algorithm, timerlib, filters ,Top
+@chapter Algorithm description
+The main idea behind XaoS is that it is not necessary to calculate the whole
+image in every frame; most pixels were already calculated by the previous
+frames. You usually don't have exactly the pixels you want, but all within a
+range lower than a step between pixels are acceptable. That is why the image
+flickers a bit and why points do not blink randomly as in recalculated
+animations.
+
+ This document describes some of the most important algorithms in XaoS:
+ @itemize @bullet
+ @item Saving Previous Pixels
+ @item Approximation Algorithm
+ @item Moving Pixels to New Positions
+ @item Calculating New Pixels
+ @item Symmetry
+ @item Calculation of Mandelbrot Set
+ @item Dynamic Resolution
+ @item Autopilot
+ @end itemize
+
+@section Saving Previous Pixels
+
+Ideally, all recalculated points should be saved and used for
+building successive frames. I could not figure out a practical way to
+implement this. To save all frames for half an hour would require 24
+Mb of memory, and searching the saved frames would be more
+computationally expensive than recalculating an entirely new frame.
+
+One way was later used by the program Frang. It remembers all pixels as
+triplets of (x,y,value), and when it builds a new image, it draws all
+the pixels that it remembers to that image and then browses the image
+and fills it with new pixels. (Possibly an @sc{rle} encoding should be
+used for calculated pixels to conserve memory.) Frang actually uses an
+algorithm that takes away pixels from the screen, so it behaves in
+exactly the same way as the algorithm described here. On the other hand,
+this method seems to require much more memory than XaoS' algorithm, and
+drawing pixels/browsing the image costs quite a lot, so the algorithm
+described here seems to be faster, since it never requires examining the
+whole image, and the new image is constructed using block move
+operations.
+
+For this reason, only the last generated frame is used as a reference.
+This way the memory requirements are proportional to @math{xsize *
+ysize}. It can be shown that this method is only about 2--5% slower
+during zooming. (Of course unzooming back to once browsed areas is much
+slower.)
+
+Because only the previous frame is used, another optimization can be
+performed: The imaginary and real parts of the calculated image are not
+precise, since they are the result of successive iterations of the
+algorithm. In order to prevent errors from being propagated to the
+following frames, their exact coordinates need to be known.
+Fortunately, it isn't necessary to save their values since it is known
+that all real components in a row and all imaginary components in a
+column are equal. Thus, the only things that must be saved are the real
+components for every row and the imaginary components for every column.
+
+This allows for a substantial speed-up in approximation because the
+calculation requires less data. Of course, some rows and columns fall
+out of the threshold and new ones need to be calculated to fill in the
+gaps in the frame.
+
+Obviously, much less work is done than in a brute-force calculation:
+there are only @math{xsize + ysize} calculations instead of
+@math{xsize * ysize}. So the main loop in XaoS looks like this:
+ @itemize @bullet
+ @item Make approximations for rows
+ @item Make approximations for columns
+ @item Move old pixels to their new positions
+ @item Calculate pixels for which there is no good approximation for
+ their row
+ @item Calculate pixels for which there is no good approximation for
+ their column, but there is one for their row
+ @end itemize
+
+@section Approximation Algorithm
+
+ @unnumberedsubsec Introduction to problem
+
+You can see that the approximation algorithm is central to the
+implementation of XaoS. If a guess is incorrect the image will look
+strange, boundaries will not be smooth and the zoom will flicker. On the
+other hand, if it adds more new rows or columns than required, zooming
+will become much slower. Also, if doubling should happen (i.e., using an
+old row or column more than once) the resolution will lower and the
+image will look jagged. It is important to keep the increasing imaginary
+and real components in the correct order. If a row and column of complex
+coordinates follows one with higher coordinate values, an improved
+approximation can be attained by swapping their values.
+
+The algorithm needs to be relatively fast. It is only used for @math{xsize + ysize}
+values, but if its speed is proportional to @math{O(n^2)}, it can be
+slower than a whole recalculation of the image. Speeds of @math{O(n)} or @math{O(n * log(n))} are acceptable.
+
+ @unnumberedsubsec Some simple algorithms to solve it
+
+Initially, a very simple algorithm was used:
+
+ Find the old row/column nearest the row/column that needs to be
+ regenerated. If the difference between them is less than one step
+ (@math{step = (end - beginning) / resolution}) then use it. Otherwise,
+ recalculate a new one.
+
+Finding the nearest row/column pair is very simple since it is always
+greater than or equal to the pair needing to be generated.
+
+Surprisingly, this simple algorithm has almost all the problems
+described above. Doubling was fixed by lowering the limit to @math{step / 2.}
+This caused a considerable slowdown so the limit was returned to @math{step}.
+Instead, the algorithm was changed to search for only row/column pairs
+that are greater than the previous frame's row/column pairs. This is
+the algorithm that was used in version 1.0.
+
+This algorithm still added too many new rows and columns, and did not
+generate smooth boundaries. For version 1.1 a heuristic was added that
+preferred approximating rows/columns with lower values. This way it
+did not occupy possible rows/columns for the next approximation. The
+result was a speedup by a magnitude of four. In versions 1.1 to 2.0
+many improvements were made to the heuristic to give it added
+performance. The following example tries to explain how complicated
+the problem is (O is the old coordinates and X is the values to be
+approximated):
+@example
+ X1 X2 X3 X4 X5 X6 X7
+O1 O2 O3 O4 O5 O6 O7 O8
+@end example
+
+The normal algorithm will aproximate X1 by O2, X3 by O4 but nothing
+more. For the algorithm with threshold step instead of @math{step / 2}:
+
+@example
+ O2 to X1
+ O3 to X2
+ O4 to X3
+ O5 to X4
+ O6 to X5
+ O8 to X6
+@end example
+
+But this will fail with X7. The second algorithm which relies on lower
+values will do the following:
+
+@example
+ O1 to X1
+ O3 to X2
+ O4 to X3
+ O5 to X4
+ O6 to X5
+ O7 to X6
+ O8 to X7
+@end example
+
+O1 to X1 is wrong. And there is many and many other situations that
+may occur. But you may see that the normal algorithm will calculate 4
+new rows/columns but the heuristic saves all of these calculations.
+
+ @unnumberedsubsec Current algorithms used
+
+In version 2.1 work on this heuristic was disabled after I discovered a
+surprisingly simple algorithm that solves all these problems. First I
+decided to exactly define the ``best approximation''. This should be
+done by defining a price for every approximation and choose the
+approximation with the lowest price. Prices are defined as such:
+
+ Approximating row/column x by y costs @math{dist(x, y) ^ 2}.
+
+This prefers two smaller approximation errors before a single larger
+error and describes my goal quite well.
+
+The cost for adding a new row/column specifies when it is better to do
+a bad approximation and when to add a new row/column. I use @math{(4 * step)
+* (4 * step)}. This means that the approximation is acceptable when
+@math{dist(x, y) < 4 * step}. Otherwise, adding a new row/column costs less.
+Now the best approximation is known. All that is required is a fast
+algorithm to do this. Surprisingly, this is possible in linear time
+using a relatively simple dynamic algorithm. It uses approximations of
+@math{length < n} to make a guess at the length of @math{n}. It can start by
+approximating one row/column and then again for two, three up to
+xsize/ysize rows/columns.
+
+The algorithm starts by calculating prices for all possible new
+positions for old row/column 1. Because of the pricing there are
+maximally 8 new positions. (Other ones must cost more than adding new
+row/column). Of course it is possible that there are no new positions.
+
+
+For calculating the price of approximations for row/column 2 I may use
+the previous column: Try new position n. Calculate the price and add the
+best approximation for the previous (row/column 1) that uses a new
+position lower than n (thus prohibiting doubling or swapping). This
+should be one of 8 positions or (eventually) adding a new one and not
+using row/column 1 at all.
+
+The same method can be used for the rest of the rows/columns. At the
+end the best price may be found for the last row/column and return by
+the way it was calculated. (For this I need the saved ``calculated
+using'' values.) At this step the best approximation has been
+determined.
+
+To fill the table, @math{9 * n} steps are required and n steps to
+backtrack to the best approximation. The only problem is that this
+algorithm is still a little slow (chiefly because of slow memory access
+on the Intel architectures). But, with some optimizing, it works well.
+
+This algorithm is almost perfect except that it occasionally adds new
+rows/columns to the wrong locations --- it does not prefer to add new
+rows/columns into holes --- but it does not seem that this is a real
+problem. The last optimization made was based upon the fact that added
+rows/columns do not have the exact real and imaginary components
+calculated by (@math{beginning + x * step}) but lie at the average of
+their left and right neighbors. This makes the boundaries smooth and
+distributes coordinates better. It also has the added benefit of making
+the input better for future approximations.
+
+Another danger during implementation of this algorithm is that adding new
+rows/columns into their ideal positions could cause misordered results,
+since some rows/columns could be off more than the distance between
+them. To avoid this, I use an algorithm that always examines the start
+and end of a block of new rows/columns and linearly interpolates the
+value between them. Special care needs to be taken with the blocks that
+start at the beginning or finish at the end.
+
+Implementation should be much faster using custom fixed-point
+routines --- first recalculate values such that 0 means start of image
+and 65536 means end. Than calculation is much cleaner. Values <0 and
+>65536 are off screen, calculation is independent of scale, and many
+things should be recalculated --- like tables for calculating price from
+distance. Also dividing the main loops into many specialized parts and
+avoiding filling unnecessary parts of tables helps. So current algorithm
+in XaoS is about 5 or 6 times faster than first naive implementation.
+
+@section Moving Pixels to New Positions
+
+Since XaoS is using the approximation algorithm the following table is
+filled for every row/column:
+ @itemize @bullet
+ @item calculate
+ @item oldpoint
+ @item position
+ @end itemize
+
+calculate is 1 if the current row/column is new and needs to be
+calculated or 0 if no old pixels need to be moved. oldpoint is a
+pointer to the old row/column that corresponds to the new one. This
+pixel needs to be copied to the new location. position is the real and
+imaginary components of the coordinates used for future
+approximations. Because almost all points will be moved, the solution
+seems to be simple: for every new point look at the row and column
+table; copy it if required.
+
+There is the problem that this minimally needs three memory reads for
+every pixel (read calculate, oldpoint and index of old point). This is
+too slow, so a small optimization is performed. Instead of rewriting the
+piece of code in assembly, normal memcpy is used to move blocks of pixels
+to their new locations. This minimizes the internal loop and access can
+be done more quickly since memcpy is usually optimized for each
+architecture.
+
+Using the row table, a list of blocks to move for every row is
+created. With this new table all the pixels can be moved quickly. This
+increased the speed of XaoS by about four times and made this function
+so fast that it is no longer a problem. (In fact, it takes much less
+time than all other parts of XaoS.)
+
+@section Calculating New Pixels
+
+The above optimizations make XaoS very fast, but another 30% increase in
+speed is acquired by using a clever method for calculating the new
+pixels. Many methods are known for saving calculations during the
+generation of fractal images. The most powerful is boundary detection.
+It relies on the fact that the Mandelbrot Set is connected with lakes.
+You need only one pixel at the boundary, then can traverse the whole set
+and fill the solid area inside. This method saves many calculations but
+is too complex for adding just one line. Many claim that it does not
+introduce any errors, but this is not true. It is possible for a
+connected part of the lake to be so small that it is not visible in
+smaller resolutions. In this case, boundary detection misses the whole
+area. This algorithm is actually used just for calculating of new images
+(i.e. at the startup).
+
+XaoS uses modification of method known as solid guessing. The pixels
+at the boundaries of a rectangle are calculated. If they are all the
+same you may assume that this rectangle does not does not contain
+anything and fill it.
+
+This algorithm is further modified to operate on added lines. For this
+it is at least as good as boundary detection and produces more
+tangible errors. When adding a single line, the upper and lower line
+may be examined for the nearest three pixels. If they are all the same
+then it is assumed that 9x9 pixels are the same. This disables all
+calculations inside solid areas and calculates as many points as
+boundary detection. The only possibility of creating a larger error
+with this method as opposed to boundary detection is in the instance
+that the shape of the set is so sharp that it does not set any of the
+tested points but comes from the right (i.e., uncalculated) location.
+This situation is not very common.
+
+Later, rules were added for new rows and columns that crossed each
+other. In this instance you can test only four pixels. This situation
+is very rare. It is hoped that it does not introduce many errors.
+
+If multiple blocks of new lines need to be calculated there are no
+reference pixels to use for solid guessing. Interlacing does the
+trick. By calculating the odd lines without any guessing, the guessing
+algorithm is now possible for the remaining uncalculated lines. This
+simple trick saves about 30% of the calculation of the main Mandelbrot
+image.
+
+A similar approximation can also be done for the X coordinate. This
+makes it possible to improve solid guessing at even pixels because all
+surrounding pixels are available, further reducing errors.
+
+@section Symmetry
+
+Many fractals are horizontally or vertically symmetrical. This is
+implemented in the approximation code. When there is no good
+approximation available, try to mirror the opposite side if the line
+is available.
+
+This method primarily speeds up the initial image.
+
+@section Calculation of the Mandelbrot Set
+
+The internal Mandelbrot calculation loop is unrolled --- it calculates
+the first 8 iterations using the normal method, and then it expects that
+number of iterations will probably be large, so it switches into a mode
+where it calculates iterations in blocks of 8 with one bailout test at
+the end. When the bailout is attained, saved values from previous
+iterations are restored and the last 8 iterations are recalculated slowly
+to get exact values. This especially helps on the Pentium, where
+conditionals in floating point code are slow.
+
+Another stuff is periodicity checking. XaoS has loops with and without
+periodicity checks. In most cases it uses the no-periodicity-checking
+version. The periodicity check version is used just in the case where
+some inside-set pixel has been found during the solid guessing
+phase. This is done mainly because the periodicity checking version of
+the loop is significantly slower.
+
+@section Dynamic Resolution
+
+The above optimizations often do not help enough and image calculation
+is still too slow. One option was to reduce the framerate, but a
+framerate lower than 5 frames per second is unbearable. Another option
+is simply to calculate only the details that can be determined within
+a time interval.
+
+Rows/columns not calculated are simply approximated by referencing the
+nearest row/column. The result is an image with larger pixels. One
+problem is the fact that the order of calculating the rows/columns is
+significant. Previous versions of XaoS simply calculated all rows from
+top to bottom and then columns from left to right. Using the dynamic
+resolution code with this algorithm would result in distorted
+images. This was solved by adding a priority to every row/column and
+calculating the high priority row/column first. The algorithm for adding
+these priorities is as follows:
+@itemize @bullet
+ @item Find middle row/column of uncalculated block. Priority is the size
+ of the block (in floating point coordinates)
+ @item Start function for left block and right block
+@end itemize
+
+This function produces quite good results. It tends to make same-sized
+rectangles on the whole image and does not depend on resolution.
+
+Another interesting optimization is that during the zoom it is more
+advantageous to calculate rows/columns in the center of the zoom
+instead of the borders since these will be in the viewport longer and
+the user is usually focusing on the center of the zoom anyhow.
+
+This is done by simply adding to the calculated priority
+@math{normal_priority / (abs(newposition - oldposition) / step + 1)}. This
+prefers rows/columns that do not move a great deal. (Of course,
+unzooming uses the reverse of this formula.)
+
+The last variable to consider is the time interval for one frame.
+Setting it too low makes the calculation slow. Setting it too high makes
+the framerate too low. So the amount of time spent in other parts of the
+program is calculated and multiplied by 5 to determine the interval. If
+this indicates a framerate lower than 15FPS, 15FPS is used instead, since
+slower animations are unacceptable. On the other hand, if it is higher
+than 35FPS, it is set to 35FPS, since a higher framerate than that is
+just wasting computer resources. When the image is not animating, this
+value is changed, so a framerate between 5FPS and 15FPS is selected. This
+ensures that images are calculated quickly after zooming stops.
+
+@section Autopilot
+
+Another interesting algorithm controls the autopilot. It is actually
+quite simple. Interesting parts are found at the boundaries of the
+set. It randomly looks around and zooms to the first area containing
+both outside and inside set points. Some fractals (such as the Newton)
+do not have points inside the set at all. In this case it selects a
+point where many (more than 2) different colors are around. (i.e., It
+zooms into noisy areas.)
+
+In the instance that there are no such areas, the autopilot will
+unzoom. It also detects oscillations / vacillations and breaks them.
+
+The current implementation also does detection of out of range numbers;
+randomly chosen points are chosen near the old one, to avoid frequent
+changes of direction.
+
+@section SMP support
+Since version 3.0 XaoS supports SMP. This is done using threads. Most of
+XaoS routines should be threaded easily --- for example
+@code{moveoldpoints} just divides image into @math{n} equal parts and
+each part is computed by one processor. The only unthreaded part is the
+realloc table calculation routines. I don't see any way to paralellize it
+except for calculating both @math{x} and @math{y} approximations
+simultaneously (using two processors). Another interesting algorithm to
+parallelize is boundary trace; see the comments in
+@code{src/engine/btrace.c} for discussion of the current implementation.
+The only problem I see in the current implementation is the possibility
+that calculation is divided into too many parts (realloc tables, move
+points, calculate, symmetries, dynamic resolution) causing too much
+synchronization between each part. So this may be too slow on a real SMP
+box.
+
+@node timerlib, registry,algorithm ,Top
+@chapter The timer library
+
+Timer library is a library originally written for timing in XaoS; but I
+found it useful in many other programs (like demonstrations, games,
+animation players and other stuff that needs to be timed). So you should
+read this description and possibly use it in your application and save
+some coding time.
+
+There are many ways to design a timed application (such as a game)
+
+@enumerate
+@item
+Read user input, move baddies, display and loop again.
+
+This way has one disadvantage; the speed of game depends on the speed of
+the computer. This was acceptable in olden times where the only
+processor was the Z80 :) but now with a wide variety of hardware with
+widely differing speeds such a loop is unacceptable.
+
+@item
+Read user input, measure time since last loop and calculate step for
+baddies, move baddies for set step, display and loop again.
+
+This way fixes the problem with speed. But moving baddies just for
+calculated step, that should differ a much is quite complex, usually
+introduces complex calculation, floating/fixedpoint math and other
+unnecessary stuff that makes program long and introduces many bugs.
+
+@item
+Set a fixed framerate that is high enough to make the game smooth but low
+enough to do the whole internal loop in time. The internal loop then
+looks like this: read user input, move baddies, display, measure time
+spent in loop, sleep until next frame.
+
+This is quite a popular scheme but has another disadvantage --- game can
+not be designed to use the whole CPU power, since on slower computers
+internal loop would longer than is available for one frame, so the game
+will run slowly again.
+
+@item
+To take away disadvantage of previous method, many games time just the
+moving of baddies and user input. Other stuff like displaying should be
+done in the `untimed' rest of the time. In DOS games moving and user
+input is often done in an asynchronous interrupt and drawing runs as the
+main loop. This solves the case where the drawing of the game takes a
+significantly longer time than the moving of baddies. This is quite
+common so this scheme works well.
+
+@item
+The previous scheme still has one problem --- since the timer interrupt
+works asynchronously, there could be many race conditions: if moving
+takes a longer time than the time reserved for it, the computer can
+crash. So this scheme should be enhanced into a synchronous one with
+exactly the same result but avoiding the problem with race conditions:
+
+Read user input, measure the time spent by the loop and calculate how
+many simulated frame interrupts were activated since last activation: if
+zero, sleep until simulated interrupt, move baddies as many times as
+required, display, and loop again.
+
+This is a combination of 4 and 3 and seems to be the most comfortable way
+for writing games, but since the main loop is now quite complex many
+games don't do that.
+
+@item
+there is still one small problem. Method 5 expects that moving takes a
+significantly smaller time than displaying. This may not be the truth. A
+simple work around is to write a moving routine that should move for
+@math{x} moves in a faster way than calling move @math{x} times. This is
+often possible, and makes extension to scheme 5 easy. This scheme allows
+you to use a very large maximal framerate (say 100FPS) and to have the
+same results as method 2 (which is the maximally exact method)
+@end enumerate
+
+As you can see, designing the main loop isn't so easy. This is just a
+very simple example: a more advanced application might want to move one
+set of baddies at one framerate and another at a different
+framerate. This requires two such timings. Another complication is that
+there are many different ways to measure time exactly on different
+platforms. Under Linux you can measure using @code{gettimeofday}, but
+under DOS this is exact to just 1/18 of second and thats too low for
+smooth animation, and so on.
+
+That's why I decided to design a portable easy to use timer library, that
+makes it easy to implement all methods described above, combinations of
+them, and much more. During the design I took care of the following
+things: quality of timing, how easy to use it is, speed, portability and
+to minimise unexpected situations (like race conditions in asynchronous
+interrupts and so on)
+
+@section The name of the game
+
+The timer library operates with @dfn{timers}. They should be created, you can
+measure time since last reset, pause them or set @dfn{handler} and
+@dfn{interval}. But handler is not yet activated at the given interval. Since
+timer library is not asynchronous, you must activate them yourself.
+
+For activating @dfn{groups} are used. You should process a group at some place
+in your program, whereupon all timers in the group are checked and their
+handlers activated if required. When the time spent since last activation is
+higher than the interval, the handler is activated more than once. Also, the
+interval to next invocation is calculated to keep frequency. Simple scheduling
+is performed for handler --- handler is activated just once and then all other
+timers are checked before it is activated again. You can also define a
+multihandler --- a handler that is activated just once and receives as an
+argument a count of intervals.
+
+There are two special groups --- @code{asyncgroup}. Timers in this group are
+activated asynchronously (as though they were called from interrupts). Thisis
+not recommended, since the asynchronicity brings many problems and usually isn't
+required. Also it does not work on many platforms. @code{syncgroup} is the
+default group. The program is expected to process it quite often. If you don't
+need to use more than one group, you should use this one.
+
+Time in timerlib is bit strange, since it does not flow continuously but
+jumps. It is updated every time you call @code{tl_updatetime}. I did this in
+order to minimize context switches, but later I found this scheme very useful,
+since you normally look up the timer, do something and then reset it and don't
+want to worry about any time spent between lookup and reset. This helps to keep
+frequency of timers exact w/o any errors caused by such situations. At the other
+hand you need to call @code{tl_updatetime} at least once in your main loop.
+
+Maybe you don't know why you'd want to create more groups, but I found it quite
+useful. For example, an autopilot in XaoS has such a special group --- I need
+to call it approx. every 1/20 of second, but just at one place in the
+program. Invocation of the autopilot when calculation is active would produce
+incorrect results, so I have a special group for autopilot and process it in
+just one place where I am sure it is safe.
+
+Timers can also be emulated. You can stop them and then control the flow of time
+for given timer. This should be quite useful; for example, when you want to
+precalculate animation at a given framerate.
+
+To control a group of timers, you can create @dfn{emulators}, which are just
+other timers controlled by you. They are useful in cases where you want to
+emulate fixed framerates (for animation rendering) or suchlike.
+
+@section Time functions
+
+@deftypefn Function void tl_update_time (void)
+Update time used by timerlib. This must be called at least once in the main loop
+otherwise time will not flow. See above.
+@end deftypefn
+@deftypefn Function void tl_sleep (int @var{time})
+Sleep for the given @var{time}. Similar to @code{usleep} in @sc{POSIX}.
+@end deftypefn
+@section Group functions
+
+@deftypefn Function tl_group* tl_create_group (void)
+Allocate and initialize the group header. Returns @code{NULL} when @code{malloc} fails.
+@end deftypefn
+@deftypefn Function void tl_free_group (tl_group *@var{group})
+Free memory storage used by group structure.
+@end deftypefn
+@deftypefn Function int tl_process_group (tl_group *@var{group}, int *@var{activated})
+Process timers in @code{group} and activate their handlers. Returns time until
+next invocation; the main loop should sleep for that long. The @var{activated}
+parameter is either @code{NULL}, or a pointer to a variable that is set to
+the number of activated handlers.
+@end deftypefn
+@section Timer functions
+
+@deftypefn Function tl_timer* tl_create_timer (void)
+Create timer structure.
+@end deftypefn
+@deftypefn Function void tl_free_timer (tl_timer *@var{timer})
+Free memory storage used by timer structure.
+@end deftypefn
+@deftypefn Function void tl_reset_timer (tl_timer *@var{timer});
+Reset timer to current time (the time of last actication of @code{tl_update_time}).
+@end deftypefn
+@deftypefn Function int tl_lookup_timer (tl_timer *@var{timer});
+Return time since last call of tl_reset_timer or last activation of handler.
+@end deftypefn
+@deftypefn Function void tl_set_interval (tl_timer *@var{timer}, int @var{interval});
+@end deftypefn
+@deftypefn Function void tl_set_handler (tl_timer *@var{timer}, void (*@var{handler}) (void *),void *userdata);
+@end deftypefn
+@deftypefn Function void tl_set_multihandler (tl_timer *@var{timer}, void (*@var{handler}) (void *,int),void *userdata);
+
+Handler, multihandler and interval control functions
+@end deftypefn
+
+
+@deftypefn Function void tl_add_timer (tl_group *@var{group}, tl_timer *@var{timer})
+Add timer to given group. A timer should be in only one group.
+@end deftypefn
+@deftypefn Function void tl_stop_timer (tl_timer *@var{timer})
+@end deftypefn
+@deftypefn Function void tl_resume_timer (tl_timer *@var{timer})
+Stop and resume timer.
+@end deftypefn
+
+@deftypefn Function void tl_slowdown_timer (tl_timer *@var{timer},int @var{time})
+The time in the timer is moved back to the given time.
+@end deftypefn
+
+@section Emulator functions
+@deftypefn Function struct timeemulator *tl_create_emulator (void);
+This function creates new a emulator --- you need to create one first before
+emulating.
+@end deftypefn
+@deftypefn Function void tl_free_emulator (struct timeemulator *@var{t});
+Destroy emulator's data.
+@end deftypefn
+@deftypefn Function void tl_elpased (struct timeemulator *@var{t}, int @var{elpased});
+Move emulated time.
+@end deftypefn
+@deftypefn Function void tl_emulate_timer (struct timer *@var{t}, struct timeemulator *@var{e});
+Set timer to the emulated mode; the passage of time is now controlled by the
+emulator @var{e}. All other behavior of timer keeps unchanged.
+@end deftypefn
+@deftypefn Function void tl_unemulate_timer (struct timer *@var{t});
+Disable emulated mode for the timer.
+@end deftypefn
+@section Example main loop
+
+@example
+while(1)
+@{
+ time=tl_process_group(syncgroup,activated); /*Call game control functions*/
+ update_keys();
+ if(activated) /*something changed*/
+ display();
+ else tl_sleep(time);
+@}
+@end example
+
+@node registry, index,timerlib ,Top
+@chapter XaoS function registry
+
+XaoS has an ui helper library, which provides functionality used by the user
+interface. All its useful functions are registered into a central registry.
+This registry is used to generate menus and dialogs as well as command line
+options or scripting language; so it is a very significant thing in XaoS design.
+
+This is not just useful for those who want to hack XaoS ui-helper layer, but
+also for authors of drivers, who can use this to add new driver dependent
+functions into XaoS's menu. The external user interface is also based on the
+registry. The main idea behind external user interfaces@footnote{currently one
+for Tcl/Tk and Gtk is under development} is this: XaoS transfers its registry to
+the interface (using asimple description language). The user interface starts
+XaoS in its window and builds menus and dialogs based on the registry. Then,
+once user selects some function, the user interface creates a command in XaoS'
+scripting language and sends it back to XaoS' engine.
+
+Knowledge of this part is thus essential for many developers. Please pay
+attention. :)
+
+The implementation of the registry is in @code{xmenu.c}, and the header is
+@code{xmenu.h}. For historical reasons, it talks about menus and dialogs (it was
+originally designed for the GUI). I am keeping this terminology, since it is
+quite clean and easy to understand instead of talking in some cryptic abstract
+terms.
+
+@section Function description
+
+To add a function into the database, you need to put a description into the
+@var{menuitem} structure. It has the following definition:
+
+@findex menuitem
+@example
+typedef struct menuitem
+ @{
+ char *menuname;
+ char *key;
+ char *name;
+ char *shortname;
+ int type;
+ int flags;
+ void (*function) ();
+ int iparam;
+ void *pparam;
+ int (*control) (struct uih_context *);
+ menudialog *(*dialog) (struct uih_context *);
+ @}
+menuitem;
+@end example
+
+@defvar menuname
+Name of menu (or category) the function belongs in. The root of all categories
+is called @code{"root"}. XaoS also uses an @code{"animroot"} when animation
+replay is active. If you are adding a function, it is better to add it into some
+subcategory like @code{"ui"} (which will place it into the UI menu) or to create
+a new category for your functions, which will appear as a submenu of the main
+menu in the UI.
+@end defvar
+
+@defvar key
+@sc{ASCII} code of the hotkey that activates this function. Use @code{NULL} if
+none.
+@end defvar
+
+@defvar name
+Longer name of the function, used in the menu entry, or @code{xaos --help}
+listing.
+@end defvar
+
+@defvar shortname
+One-word name of function used in command language and other references to
+the function.
+@end defvar
+
+@defvar type
+Type of function --- this is @emph{not} the return type. @var{type} should be
+one of the following constants:
+@table @code
+@findex MENU_SUBMENU
+@item MENU_SUBMENU
+ A submenu. This is not a function, but a name for the submenu. You can fill
+ in the @var{key}, @var{name}, and @var{shortname}. The name of this new
+ submenu is placed in the field @var{pparam}.
+@findex MENU_NOPARAM
+@item MENU_NOPARAM
+ A normal function without any parameters. When activated,
+ @var{function} will be called with a pointer to @code{uih_context} as its
+ parameter.
+@findex MENU_INT
+@item MENU_INT
+ This should be used to simplify entering of many similar functions (handled
+ by just one universal function in the C code). The @var{function} is handled
+ in the same way as @code{MENU_NOPARAM}, but also one integer parameter taken
+ from @code{iparam} is passed in.
+@findex MENU_STRING
+@item MENU_STRING
+ Similar to @code{MENU_INT} but uses a string instead of an integer.
+@findex MENU_DIALOG
+@item MENU_DIALOG
+ If your function needs some paramters, use the dialog structure to describe
+ them. In the scripting language your function then have parameters; in
+ the user interface, a dialog will be displayed. @var{pparam} must point
+ to array of dialog entries (writing them will be described later).
+ If your function has just one parameter described in the dialog structure, it
+ will be called in the normal C way --- if you want a string parameter, one
+ pointer pointing to a string (in addition to @code{uih_context}) will be
+ passed to the functions.
+
+ If multiple parameters are requested, it is impossible to call
+ function in a C way without a special wrapper for each case. So it will
+ receive a pointer to an array of @code{dialogparam} unions, wich contain
+ one entry for each parameter. @code{dialogparam} is declared as follows:
+@example
+typedef union
+ @{
+ char *dstring;
+ int dint;
+ number_t number;
+ number_t dcoord[2];
+ xio_path dpath;
+ void *dummy;
+ @}
+dialogparam;
+@end example
+@findex MENU_CDIALOG
+@item MENU_CDIALOG
+ In some cases, it is useful to add some context specific default values
+ to the dialog structure. In this case you might use this type instead. In
+ this case the function @var{dialog} is called first, and it is expected to
+ return a pointer to the correct dialog structure. The dialog structure must
+ lie in static storage (since it is not freed), and must always have the same
+ fields, and differ only in the default values.
+ This function must also work correctly even when the pointer to
+ @code{uih_context} is @code{NULL}, since it is often called in the
+ initialization stages (parameter parsing etc.)
+@end table
+@end defvar
+@defvar flags
+The @var{flags} are used to set additional information about the function:
+@table @code
+@findex MENUFLAG_CHECKBOX
+@item MENUFLAG_CHECKBOX
+Some features act like check-boxes --- i.e. repeated calls to the function
+toggle the features. In menus it is useful to add a check-box for this function
+indicating whether the feature is on or off. This flag adds such a check-box.
+
+So that the UI can determine the current state of the checkbox, you need to
+define the function @var{control}, which returns @code{1} when enabled and
+@code{0} when disabled. In order to let external GUIs work correctly you also
+need to call @code{uih_updatemenus("name")} every time the state of this
+function changes.
+
+In the scripting language, this adds a single parameter, either @code{#t} or
+@code{#f}. The engine then calls the function only when necessary. When
+@code{#t}, a dialog is requested; when @code{#f}, the function is called just as
+@code{NOPARAM}. I.e. the dialog is displayed only when enabling the feature.
+
+@findex MENUFLAG_DIALOGATDISABLE
+@item MENUFLAG_DIALOGATDISABLE
+Display dialog on disabling of this checkbox feature, instead of on enabling.
+@findex MENUFLAG_RADIO
+@item MENUFLAG_RADIO
+Other features act like radio-buttons. Control functions in this case receive
+the same parameter as is defined for @code{MENU_INT} or @code{MENU_STRING}
+types, and is expected to return @code{1} when enabled and @code{0}
+otherwise. You also need to call @code{uih_updatemenus} when the value is
+changed. No special parameter is added in the scripting language.
+
+@findex MENUFLAG_INTERRUPT
+@item MENUFLAG_INTERRUPT
+Interrupt current calculation when this function is called (used by functions
+with cause recalculation of the screen)
+
+@findex MENUFLAG_INCALC
+@item MENUFLAG_INCALC
+By default XaoS queues functions and calls them later when they are activated in
+the calculation. This flag disables this feature.
+
+@findex MENUFLAG_ATSTARTUP
+@item MENUFLAG_ATSTARTUP
+By default XaoS queues functions and them calls later when they are activated as
+command line parameters (in case the engine is not fully initialized yet). This
+flag disables this feature.
+
+@findex MENUFLAG_NOMENU
+@item MENUFLAG_NOMENU
+If set, the function will not be visible in the menu.
+
+@findex MENUFLAG_NOPLAY
+@item MENUFLAG_NOPLAY
+If set, the function will not be available as a command in scripts (and therefore
+won't be usable by external GUIs).
+
+@findex MENUFLAG_NOOPTION
+@item MENUFLAG_NOOPTION
+If set, the function will not be available as a command line option.
+@end table
+@end defvar
+
+@section Initializing the menuitem structure as a static variable
+In most cases, menuitems should be written as static variables. Because the
+contents of this structure could change in future, please use one of the macros
+defined in @code{xmenu.h}. They provide a cleaner and easier to extend way to
+define these entries than does doing it by hand.
+
+For example to define a @code{MENU_NOPARAM} function, use the following macro:
+@defun MENUNOP (menuname, key, name, shortname, flags, function)
+@end defun
+Similar macros exist for other types too. They end in @code{CB} or @code{RB} for
+check-boxed or radio-box functions. See @code{src/ui-hlp/menu.c} for a large
+number of example definitions. They should look like this:
+
+@findex menuitem
+@example
+static menuitem menuitems[] = /*XaoS menu specifications */
+@{
+ SUBMENU ("", NULL, "Root menu", "root"),
+ SUBMENU ("", NULL, "Replay only commands", "plc"),
+ MENUNOP ("comm", NULL, "print menus specifications of all menus",
+ "print_menus", MENUFLAG_NOMENU|MENUFLAG_NOPLAY|MENUFLAG_ATSTARTUP,
+ uih_printallmenus),
+ ...
+@end example
+
+@section Dialog description
+A dialog description is similar to a menuitem. It is an array of the following
+structures:
+@example
+typedef struct dialog
+ @{
+ char *question;
+ int type;
+ int defint;
+ char *defstr;
+ number_t deffloat;
+ number_t deffloat2;
+ @}
+menudialog;
+@end example
+It is terminated by an element with the @var{question} pointer set to
+@code{NULL}.
+
+The @var{question} contains the string the UI should display when it asks for
+this field.
+
+@var{type} should be one of the following values:
+@code{DIALOG_INT}, @code{DIALOG_FLOAT}, @code{DIALOG_STRING},
+@code{DIALOG_KEYSTRING} (the difference between string and keystring is that
+in the scripting language string is passed as @code{"hello"}, but keystring is
+passed as a Scheme keyword: @code{'hello}), @code{DIALOG_IFILE} (input file),
+@code{DIALOG_OFILE}, @code{DIALOG_CHOICE} (choice between different
+keystrings), @code{DIALOG_ONOFF} (boolean parameter), @code{DIALOG_COORD} (two
+floats --- a complex number)
+
+Set the corresponding @var{def*} field to set the default value. In the case of
+files, use a string in the format @code{"@var{[prefix]}*@var{[extension]}"}. For
+type @code{DIALOG_CHOICE} set @var{defstr} to a pointer to an array of strings,
+terminated by a @code{NULL} entry.
+
+To write dialog structures, as with menus, use macros defined in @code{xmenu.h}
+like:
+@example
+DIALOGSTR(question,default)
+@end example
+The definition should look like:
+
+@findex menudialog
+@example
+static menudialog uih_viewdialog[] =
+@{
+ DIALOGCOORD ("center:", 0, 0),
+ DIALOGFLOAT ("Radius:", 1),
+ DIALOGFLOAT ("Angle:", 0),
+ @{NULL@}
+@};
+@end example
+@section Modifying the registry
+@deftypefn Function void menu_add (menuitem *@var{item}, int @var{n});
+Add an array of @var{n} items to the database.
+@end deftypefn
+@deftypefn Function void menu_delete (menuitem *@var{items}, int @var{n});
+Remove an array of @var{n} items from the database.
+@end deftypefn
+@section Querying registry
+@deftypefn Function menuitem* menu_findkey (char *@var{key}, char *@var{root});
+Find item for given key. @var{root} is menu to start (submenus are searched
+recursively).
+@end deftypefn
+@deftypefn Function menuitem* menu_findcommand (char *@var{name});
+Find item for given short name.
+@end deftypefn
+@deftypefn Function char* menu_fullname (char *@var{menu});
+Return a long name for a menu, given a short name.
+@end deftypefn
+@deftypefn Function menuitem* menu_item (char *@var{menu}, int @var{n});
+Return the @var{n}th entry in the @var{menu}. Return @code{NULL} if that entry
+does not exist.
+@end deftypefn
+@deftypefn Function int menu_enabled (menuitem *@var{item}, struct uih_context *@var{c});
+Check whether the given item is activated (for check-boxed and radio-boxed
+functions).
+@end deftypefn
+@deftypefn Function int menu_havedialog (menuitem *@var{item}, struct uih_context *@var{c});
+Return whether this function has an associated dialog.
+@end deftypefn
+@defun menu_getdialog (@var{context}, @var{m})
+This macro returns a pointer to the dialog structure for a given menu item. (If
+the item doesn't have a dialog, garbage is returned).
+@end defun
+@deftypefn Function int menu_available (menuitem *@var{item}, char *@var{root});
+Check whether an item is available as one of the entries of @var{root} (or it's
+submenus)
+@end deftypefn
+
+@node index, , registry, Top
+@c node-name, next, previous, up
+@unnumbered Index of functions, variables, types and constants
+
+@printindex fn
+
+@contents
+@bye
diff --git a/examples/0rfelyus/0rfel1.xpf b/examples/0rfelyus/0rfel1.xpf
new file mode 100644
index 0000000..1a857b0
--- /dev/null
+++ b/examples/0rfelyus/0rfel1.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'edge2 #t)
+(palette 1 1794309737 0)
+(formula 'mandel)
+(juliaseed -0.41615510946480224709 0.62713787798422807658)
+(julia #t)
+(view -0.267916 -0.050803 0.0406036 0.0406036)
+
diff --git a/examples/0rfelyus/0rfel2.xpf b/examples/0rfelyus/0rfel2.xpf
new file mode 100644
index 0000000..132d1e7
--- /dev/null
+++ b/examples/0rfelyus/0rfel2.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1180946604 0)
+(formula 'mandel)
+(juliaseed -0.41615510946480224709 0.62713787798422807658)
+(outcoloring 1)
+(julia #t)
+(view -0.267916 -0.050803 0.0406036 0.0406036)
+
diff --git a/examples/Hubicka/2spirals.xpf b/examples/Hubicka/2spirals.xpf
new file mode 100644
index 0000000..4190bbc
--- /dev/null
+++ b/examples/Hubicka/2spirals.xpf
@@ -0,0 +1,9 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1082198693 0)
+(formula 'mandel)
+(maxiter 320)
+(view 0.26294324588 -0.0024215732998 6.6382464113E-07 6.6382464113E-07)
+
diff --git a/examples/Hubicka/3d1.xpf b/examples/Hubicka/3d1.xpf
new file mode 100644
index 0000000..21ff2ec
--- /dev/null
+++ b/examples/Hubicka/3d1.xpf
@@ -0,0 +1,15 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'newton)
+(juliaseed 1.0010901162790697673 -0.012500000000000000043)
+(angle 450.4)
+(maxiter 238)
+(outcoloring 9)
+(julia #t)
+(plane 1)
+(view -1.967 0.451 7.936 7.936)
+
diff --git a/examples/Hubicka/3d2.xpf b/examples/Hubicka/3d2.xpf
new file mode 100644
index 0000000..5f36ac1
--- /dev/null
+++ b/examples/Hubicka/3d2.xpf
@@ -0,0 +1,13 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -1.0735871408490181187 -0.08458622263859806199)
+(maxiter 330)
+(outcoloring 5)
+(plane 1)
+(view 1.9364 -0.062527 0.25864 0.25864)
+
diff --git a/examples/Hubicka/3d3.xpf b/examples/Hubicka/3d3.xpf
new file mode 100644
index 0000000..d076506
--- /dev/null
+++ b/examples/Hubicka/3d3.xpf
@@ -0,0 +1,13 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed 1.1751545647170536949 0.18734951556038896103)
+(maxiter 51)
+(outcoloring 1)
+(plane 3)
+(view 0.8974 0.02055 8.381 8.381)
+
diff --git a/examples/Hubicka/3d4.xpf b/examples/Hubicka/3d4.xpf
new file mode 100644
index 0000000..9aa50e2
--- /dev/null
+++ b/examples/Hubicka/3d4.xpf
@@ -0,0 +1,13 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -1.0063238428297288131 0.021582276202805130609)
+(maxiter 320)
+(outcoloring 5)
+(plane 2)
+(view -2.55 -0.684 11.9 11.9)
+
diff --git a/examples/Hubicka/3d5.xpf b/examples/Hubicka/3d5.xpf
new file mode 100644
index 0000000..03d3c41
--- /dev/null
+++ b/examples/Hubicka/3d5.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(juliaseed -0.08611918604651162823 -0.66249999999999999991)
+(maxiter 238)
+(julia #t)
+(view -0.7118 -0.5483 2.133 2.133)
+
diff --git a/examples/Hubicka/3d6.xpf b/examples/Hubicka/3d6.xpf
new file mode 100644
index 0000000..0eed283
--- /dev/null
+++ b/examples/Hubicka/3d6.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(outcoloring 8)
+(view -0.04960739 -0.6748339 0.001703127 0.001703127)
+
diff --git a/examples/Hubicka/3d7.xpf b/examples/Hubicka/3d7.xpf
new file mode 100644
index 0000000..d4dd1a2
--- /dev/null
+++ b/examples/Hubicka/3d7.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'phoenix)
+(outcoloring 8)
+(view 0.31585 0.67379 0.19748 0.19748)
+
diff --git a/examples/Hubicka/3d8.xpf b/examples/Hubicka/3d8.xpf
new file mode 100644
index 0000000..ac08041
--- /dev/null
+++ b/examples/Hubicka/3d8.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'newton)
+(outcoloring 5)
+(view 0.23672 0.27244 0.99213 0.99213)
+
diff --git a/examples/Hubicka/3d9.xpf b/examples/Hubicka/3d9.xpf
new file mode 100644
index 0000000..3b19327
--- /dev/null
+++ b/examples/Hubicka/3d9.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'octal)
+(angle 262.68)
+(plane 6)
+(view 1.201 -0.03054 2.5 2.5)
+
diff --git a/examples/Hubicka/axe.xpf b/examples/Hubicka/axe.xpf
new file mode 100644
index 0000000..3c0492a
--- /dev/null
+++ b/examples/Hubicka/axe.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1193067944 0)
+(formula 'mandel)
+(perturbation 0.30377906976744192824 -0.012500000000000000802)
+(angle -231.94)
+(plane 2)
+(view 899.75780161187167061 -489.31485105671990837 2850.5421224606753126 2850.5421224606753148)
+
diff --git a/examples/Hubicka/barnsl1.xpf b/examples/Hubicka/barnsl1.xpf
new file mode 100644
index 0000000..65ab172
--- /dev/null
+++ b/examples/Hubicka/barnsl1.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1779436629 0)
+(formula 'barnsley)
+(juliaseed 0.031613372093023257869 -1.0500000000000000676)
+(incoloring 1)
+(plane 1)
+(view 0.1308 0.04816 4.578 4.578)
+
diff --git a/examples/Hubicka/barnsl2.xpf b/examples/Hubicka/barnsl2.xpf
new file mode 100644
index 0000000..b959bf0
--- /dev/null
+++ b/examples/Hubicka/barnsl2.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1356055581 0)
+(formula 'barnsley)
+(juliaseed 0.031613372093023257869 -1.0500000000000000676)
+(incoloring 1)
+(plane 3)
+(view 1.066 0.01309 4.98 4.98)
+
diff --git a/examples/Hubicka/barnsl3.xpf b/examples/Hubicka/barnsl3.xpf
new file mode 100644
index 0000000..37b574d
--- /dev/null
+++ b/examples/Hubicka/barnsl3.xpf
@@ -0,0 +1,13 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1355057888 0)
+(formula 'barnsley)
+(juliaseed -1.0221656976744186704 -0.062500000000000004012)
+(angle -310.26)
+(maxiter 33)
+(incoloring 1)
+(plane 1)
+(view -0.78537 0.20149 0.43535 0.43535)
+
diff --git a/examples/Hubicka/barnsl4.xpf b/examples/Hubicka/barnsl4.xpf
new file mode 100644
index 0000000..658c38c
--- /dev/null
+++ b/examples/Hubicka/barnsl4.xpf
@@ -0,0 +1,13 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 371548885 0)
+(formula 'barnsley)
+(juliaseed -1.0221656976744186704 -0.062500000000000004012)
+(angle -310.26)
+(maxiter 20)
+(incoloring 1)
+(plane 1)
+(view 0.1292 -0.2308 3.374 3.374)
+
diff --git a/examples/Hubicka/barnsl5.xpf b/examples/Hubicka/barnsl5.xpf
new file mode 100644
index 0000000..b85398c
--- /dev/null
+++ b/examples/Hubicka/barnsl5.xpf
@@ -0,0 +1,13 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1808462409 0)
+(formula 'barnsley)
+(juliaseed 0.58205451272674395567 0.83592626580482287831)
+(angle -405.48)
+(maxiter 50)
+(incoloring 1)
+(plane 3)
+(view 1.009 0.04757 2.973 2.973)
+
diff --git a/examples/Hubicka/barnsl6.xpf b/examples/Hubicka/barnsl6.xpf
new file mode 100644
index 0000000..a5475ee
--- /dev/null
+++ b/examples/Hubicka/barnsl6.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 558734359 0)
+(formula 'barnsley)
+(juliaseed 0.82617606890462195329 -0.59250450310750061547)
+(maxiter 54)
+(incoloring 1)
+(view -0.5141 0.2394 1.84 1.84)
+
diff --git a/examples/Hubicka/barnsl7.xpf b/examples/Hubicka/barnsl7.xpf
new file mode 100644
index 0000000..70ae56d
--- /dev/null
+++ b/examples/Hubicka/barnsl7.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 2052922397 0)
+(formula 'barnsley)
+(juliaseed 0.0054390291189111917214 -1.0091451435058578867)
+(maxiter 38)
+(incoloring 2)
+(plane 1)
+(view 1.0166 -0.015562 0.55972 0.55972)
+
diff --git a/examples/Hubicka/barnsl8.xpf b/examples/Hubicka/barnsl8.xpf
new file mode 100644
index 0000000..f18ed55
--- /dev/null
+++ b/examples/Hubicka/barnsl8.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1152232736 0)
+(formula 'barnsley)
+(juliaseed 1.0499881996553494467 0.083487582093292521238)
+(maxiter 81)
+(incoloring 1)
+(plane 1)
+(view 1.9371 -0.084016 0.28855 0.28855)
+
diff --git a/examples/Hubicka/barnsl9.xpf b/examples/Hubicka/barnsl9.xpf
new file mode 100644
index 0000000..22894f4
--- /dev/null
+++ b/examples/Hubicka/barnsl9.xpf
@@ -0,0 +1,13 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 780290088 0)
+(formula 'barnsley)
+(angle -92.246)
+(maxiter 4)
+(incoloring 3)
+(julia #f)
+(plane 2)
+(view 0.9737 0.02057 0.88426 0.88426)
+
diff --git a/examples/Hubicka/beatle.xpf b/examples/Hubicka/beatle.xpf
new file mode 100644
index 0000000..2449ff0
--- /dev/null
+++ b/examples/Hubicka/beatle.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1634629107 0)
+(formula 'newton)
+(juliaseed -1.1275436046511628632 0)
+(angle 92.571)
+(maxiter 246)
+(julia #t)
+(view -0.33483 0.0033715 0.22029 0.22029)
+
diff --git a/examples/Hubicka/beatle2.xpf b/examples/Hubicka/beatle2.xpf
new file mode 100644
index 0000000..8ff6728
--- /dev/null
+++ b/examples/Hubicka/beatle2.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1233017465 0)
+(formula 'newton)
+(juliaseed -1.1275436046511628632 0)
+(angle 92.571)
+(maxiter 246)
+(julia #t)
+(view -0.33483 0.0033715 0.22029 0.22029)
+
diff --git a/examples/Hubicka/brown.xpf b/examples/Hubicka/brown.xpf
new file mode 100644
index 0000000..bb4c083
--- /dev/null
+++ b/examples/Hubicka/brown.xpf
@@ -0,0 +1,8 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 780175578 0)
+(formula 'mandel)
+(view 0.2989409252714 -0.01731148436377 1.153372743612E-09 1.153372744112E-09)
+
diff --git a/examples/Hubicka/checker.xpf b/examples/Hubicka/checker.xpf
new file mode 100644
index 0000000..79f0d48
--- /dev/null
+++ b/examples/Hubicka/checker.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1787444754 0)
+(formula 'mandel3)
+(maxiter 70)
+(outcoloring 9)
+(incoloring 9)
+(plane 2)
+(view 2.14 -0.14 10.6 10.6)
+
diff --git a/examples/Hubicka/crone.xpf b/examples/Hubicka/crone.xpf
new file mode 100644
index 0000000..4e9743e
--- /dev/null
+++ b/examples/Hubicka/crone.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(defaultpalette 0)
+(formula 'newton)
+(juliaseed 1.0010901162790698318 0)
+(angle 88.884)
+(julia #t)
+(view -0.5467 -0.02844 1.927 1.927)
+
diff --git a/examples/Hubicka/dblspira.xpf b/examples/Hubicka/dblspira.xpf
new file mode 100644
index 0000000..7fb0a4a
--- /dev/null
+++ b/examples/Hubicka/dblspira.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1741193285 0)
+(formula 'mandel)
+(maxiter 144)
+(outcoloring 1)
+(view 0.2944910925 -0.01633561217 1.083571743E-06 1.083571743E-06)
+
diff --git a/examples/Hubicka/dragons.xpf b/examples/Hubicka/dragons.xpf
new file mode 100644
index 0000000..c43d615
--- /dev/null
+++ b/examples/Hubicka/dragons.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 906148114 0)
+(formula 'phoenix)
+(juliaseed 0.43390385732938146351 -0.31608426045400182656)
+(angle -270.31)
+(view 0.04333 0.005463 1.846 1.846)
+
diff --git a/examples/Hubicka/dragons2.xpf b/examples/Hubicka/dragons2.xpf
new file mode 100644
index 0000000..9c5ac52
--- /dev/null
+++ b/examples/Hubicka/dragons2.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1787444754 0)
+(formula 'phoenix)
+(juliaseed 0.45312499999999996921 -0.32499999999999997814)
+(angle -269.73)
+(outcoloring 9)
+(view 0.0045 -0.0262 1.783 1.783)
+
diff --git a/examples/Hubicka/edge.xpf b/examples/Hubicka/edge.xpf
new file mode 100644
index 0000000..bb2221d
--- /dev/null
+++ b/examples/Hubicka/edge.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'edge2 #t)
+(palette 1 863910123 0)
+(formula 'newton)
+(outcoloring 1)
+(view 0 0 2.5 2.5)
+
diff --git a/examples/Hubicka/edge2.xpf b/examples/Hubicka/edge2.xpf
new file mode 100644
index 0000000..cdf5206
--- /dev/null
+++ b/examples/Hubicka/edge2.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'edge2 #t)
+(palette 1 25997414 0)
+(formula 'barnsley)
+(juliaseed -1.0472928330130634481 -0.087398343635324930658)
+(plane 1)
+(view -0.1851 -0.09928 7.507 7.507)
+
diff --git a/examples/Hubicka/edge3.xpf b/examples/Hubicka/edge3.xpf
new file mode 100644
index 0000000..22f192e
--- /dev/null
+++ b/examples/Hubicka/edge3.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'edge2 #t)
+(palette 1 1794703246 0)
+(formula 'phoenix)
+(outcoloring 2)
+(view -0.051043 0.83791 0.13455 0.13455)
+
diff --git a/examples/Hubicka/eifell.xpf b/examples/Hubicka/eifell.xpf
new file mode 100644
index 0000000..e4ba37c
--- /dev/null
+++ b/examples/Hubicka/eifell.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 2020627370 0)
+(formula 'octal)
+(angle 267.92)
+(maxiter 100)
+(incoloring 1)
+(plane 4)
+(view 1.363 0.01996 3.548 3.548)
+
diff --git a/examples/Hubicka/galaxy.xpf b/examples/Hubicka/galaxy.xpf
new file mode 100644
index 0000000..3cad40a
--- /dev/null
+++ b/examples/Hubicka/galaxy.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'starfield #t)
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 139)
+(view 0.23616578 -0.56339523 0.00054982648 0.00054982648)
+
diff --git a/examples/Hubicka/goldrive.xpf b/examples/Hubicka/goldrive.xpf
new file mode 100644
index 0000000..4b96ceb
--- /dev/null
+++ b/examples/Hubicka/goldrive.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1843312520 0)
+(formula 'mandel)
+(juliaseed -0.72892441860465116146 -0.17500000000000001123)
+(outcoloring 1)
+(julia #t)
+(plane 1)
+(view 0.462 1.25 56.2 56.2)
+
diff --git a/examples/Hubicka/head.xpf b/examples/Hubicka/head.xpf
new file mode 100644
index 0000000..f20a526
--- /dev/null
+++ b/examples/Hubicka/head.xpf
@@ -0,0 +1,13 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1357086155 0)
+(formula 'newton)
+(juliaseed -1.1275436046511628632 0)
+(angle 90.841)
+(maxiter 246)
+(julia #t)
+(plane 2)
+(view 0.5762 0.1221 8.249 8.249)
+
diff --git a/examples/Hubicka/head2.xpf b/examples/Hubicka/head2.xpf
new file mode 100644
index 0000000..0d72807
--- /dev/null
+++ b/examples/Hubicka/head2.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 2090959176 0)
+(formula 'octal)
+(juliaseed 0.010537790697674419326 0.86250000000000005547)
+(outcoloring 7)
+(julia #t)
+(view 0.02298 -0.9176 2.769 2.769)
+
diff --git a/examples/Hubicka/head3.xpf b/examples/Hubicka/head3.xpf
new file mode 100644
index 0000000..b76c049
--- /dev/null
+++ b/examples/Hubicka/head3.xpf
@@ -0,0 +1,14 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1251438586 0)
+(formula 'octal)
+(juliaseed 0.0013961132576639388808 -0.42931197236250143498)
+(maxiter 251)
+(outcoloring 7)
+(incoloring 1)
+(julia #t)
+(plane 1)
+(view 0.05096 -0.2509 3.124 3.124)
+
diff --git a/examples/Hubicka/incolor1.xpf b/examples/Hubicka/incolor1.xpf
new file mode 100644
index 0000000..852d079
--- /dev/null
+++ b/examples/Hubicka/incolor1.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1866031764 0)
+(formula 'barnsley)
+(juliaseed 1.1380813953488372826 0.012500000000000000802)
+(maxiter 5)
+(incoloring 4)
+(plane 1)
+(view 0.07659 -1.693 2.031 2.031)
+
diff --git a/examples/Hubicka/incolor2.xpf b/examples/Hubicka/incolor2.xpf
new file mode 100644
index 0000000..e8ebedc
--- /dev/null
+++ b/examples/Hubicka/incolor2.xpf
@@ -0,0 +1,13 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 463989470 0)
+(formula 'barnsley)
+(juliaseed 0 1.2375000000000000798)
+(angle -90.843)
+(maxiter 3)
+(incoloring 7)
+(plane 6)
+(view 1.451 0.005415 2.73 2.73)
+
diff --git a/examples/Hubicka/incolor3.xpf b/examples/Hubicka/incolor3.xpf
new file mode 100644
index 0000000..b3a9158
--- /dev/null
+++ b/examples/Hubicka/incolor3.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 2018811987 0)
+(formula 'barnsley)
+(maxiter 4)
+(incoloring 5)
+(plane 1)
+(view 0.65684 -0.42635 0.3809 0.3809)
+
diff --git a/examples/Hubicka/incolor4.xpf b/examples/Hubicka/incolor4.xpf
new file mode 100644
index 0000000..bf80792
--- /dev/null
+++ b/examples/Hubicka/incolor4.xpf
@@ -0,0 +1,17 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(palette 1 1335687195 0)
+(formula 'newton)
+(juliaseed 1.0221656976744186705 -0.012500000000000000802)
+(angle -33.232)
+(maxiter 8)
+(outcoloring 10)
+(incoloring 10)
+(intcoloring 8)
+(outtcoloring 3)
+(julia #t)
+(view -0.14459 -0.49429 0.16755 0.16755)
+
diff --git a/examples/Hubicka/incolor5.xpf b/examples/Hubicka/incolor5.xpf
new file mode 100644
index 0000000..1b935d0
--- /dev/null
+++ b/examples/Hubicka/incolor5.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 952328163 0)
+(formula 'barnsley)
+(juliaseed -0.010537790697674419217 1.1000000000000000708)
+(maxiter 8)
+(incoloring 4)
+(plane 3)
+(view 0.9876 0.08617 3.062 3.062)
+
diff --git a/examples/Hubicka/julia.xpf b/examples/Hubicka/julia.xpf
new file mode 100644
index 0000000..5bf6125
--- /dev/null
+++ b/examples/Hubicka/julia.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1191063399 0)
+(formula 'mandel)
+(juliaseed 0.30305461922625852807 0.4504536191559173757)
+(maxiter 388)
+(julia #t)
+(plane 1)
+(view 0.2737 -2.017 1.573 1.573)
+
diff --git a/examples/Hubicka/julia2.xpf b/examples/Hubicka/julia2.xpf
new file mode 100644
index 0000000..722c3a3
--- /dev/null
+++ b/examples/Hubicka/julia2.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 2087220895 0)
+(formula 'mandel5)
+(juliaseed 0.33669790083813088669 -0.70478147175782891021)
+(julia #t)
+(plane 1)
+(view 0.092 0.164 11.2 11.2)
+
diff --git a/examples/Hubicka/julia3.xpf b/examples/Hubicka/julia3.xpf
new file mode 100644
index 0000000..9c74195
--- /dev/null
+++ b/examples/Hubicka/julia3.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1586552168 0)
+(formula 'mandel3)
+(juliaseed 0.36882267441860467488 -0.66250000000000004263)
+(julia #t)
+(plane 1)
+(view -0.02118 0.5241 7.847 7.847)
+
diff --git a/examples/Hubicka/julia4.xpf b/examples/Hubicka/julia4.xpf
new file mode 100644
index 0000000..7d709c8
--- /dev/null
+++ b/examples/Hubicka/julia4.xpf
@@ -0,0 +1,13 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 238464747 0)
+(formula 'mandel)
+(juliaseed 0.25739678786865861942 -0.0010321602685012846797)
+(angle 51.516)
+(maxiter 640)
+(julia #t)
+(plane 1)
+(view -0.75055175079211811084 3.8688352662098150318 238.52819218580206609 238.52819218580216)
+
diff --git a/examples/Hubicka/julia5.xpf b/examples/Hubicka/julia5.xpf
new file mode 100644
index 0000000..ae59958
--- /dev/null
+++ b/examples/Hubicka/julia5.xpf
@@ -0,0 +1,14 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1525685027 0)
+(formula 'mandel9)
+;(formula 'user)
+;(usrform "Z^9+C")
+(juliaseed -0.00064301262007510975534 -0.6815436624775897752)
+(maxiter 650)
+(incoloring 2)
+(julia #t)
+(view 0.38169 0.24215 0.35408 0.35408)
+
diff --git a/examples/Hubicka/juliaanim.xaf b/examples/Hubicka/juliaanim.xaf
new file mode 100644
index 0000000..135ccfd
--- /dev/null
+++ b/examples/Hubicka/juliaanim.xaf
@@ -0,0 +1,29 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1034201341 0)
+(formula 'mandel)
+(juliaseed 0.27541729708396692038 -0.0067143955333554104651)
+;(angle 546.9)
+(angle -30.559)
+(maxiter 227)
+(julia #t)
+(plane 4)
+;(fastrotate #t)
+(range 65536)
+;(view -0.6751769451 0.5508651174 5.008322253E-06 5.008322253E-06)
+(view 3.3489798 1.1601067 0.00095219583 0.00095219583)
+;(morphangle 533.9)
+;(usleep 1000000)
+(smoothmorph 'view 3000000 3000000)
+(morphview 0.396 0.209 19.1 19.1)
+;(morphangle -30.559)
+(usleep 25000000)
+
+
+;(maxiter 227)
+;(julia #t)
+;(plane 4)
+;(view 3.3489798 1.1601067 0.00095219583 0.00095219583)
+
diff --git a/examples/Hubicka/lemon.xpf b/examples/Hubicka/lemon.xpf
new file mode 100644
index 0000000..2a51f5b
--- /dev/null
+++ b/examples/Hubicka/lemon.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1307004302 0)
+(formula 'mandel3)
+(angle -23.274)
+(maxiter 411)
+(view -0.451065423507224 -0.022533000686388 6.95555389543592E-11 6.95555389577474E-11)
+
diff --git a/examples/Hubicka/light.xpf b/examples/Hubicka/light.xpf
new file mode 100644
index 0000000..0eab822
--- /dev/null
+++ b/examples/Hubicka/light.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1183407127 0)
+(formula 'barnsley)
+(juliaseed 1.0485101744186047187 -0.041666666666666669341)
+(maxiter 311)
+(outcoloring 1)
+(plane 1)
+(view -0.1884 -0.202 7.146 7.146)
+
diff --git a/examples/Hubicka/magnet.xpf b/examples/Hubicka/magnet.xpf
new file mode 100644
index 0000000..c78eec3
--- /dev/null
+++ b/examples/Hubicka/magnet.xpf
@@ -0,0 +1,9 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 258644272 0)
+(formula 'magnet)
+(angle -538.12)
+(view 1.2689826 -2.0404879 0.000258881 0.00037969213)
+
diff --git a/examples/Hubicka/magnet1.xpf b/examples/Hubicka/magnet1.xpf
new file mode 100644
index 0000000..638e74f
--- /dev/null
+++ b/examples/Hubicka/magnet1.xpf
@@ -0,0 +1,9 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 2104064959 0)
+(formula 'magnet)
+(angle -361.34)
+(view 1.847209822 -1.339254931 7.031666521E-06 1.03131109E-05)
+
diff --git a/examples/Hubicka/magnet2.xpf b/examples/Hubicka/magnet2.xpf
new file mode 100644
index 0000000..36628fc
--- /dev/null
+++ b/examples/Hubicka/magnet2.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1979730731 0)
+(formula 'magnet)
+(angle 26.702)
+(outcoloring 6)
+(view -0.33728908 -0.37438809 0.00018856268 0.0002765586)
+
diff --git a/examples/Hubicka/magnet3.xpf b/examples/Hubicka/magnet3.xpf
new file mode 100644
index 0000000..18c6c45
--- /dev/null
+++ b/examples/Hubicka/magnet3.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 135404364 0)
+(formula 'magnet)
+(angle 88.336)
+(outcoloring 6)
+(view -0.3371366 -0.37663387 0.00069439878 0.0010184515)
+
diff --git a/examples/Hubicka/magnet4.xpf b/examples/Hubicka/magnet4.xpf
new file mode 100644
index 0000000..6c0167d
--- /dev/null
+++ b/examples/Hubicka/magnet4.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1228180748 0)
+(formula 'magnet)
+(angle -88.811)
+(outcoloring 8)
+(view 2.095 -0.01928 1.292 1.895)
+
diff --git a/examples/Hubicka/mand1.xpf b/examples/Hubicka/mand1.xpf
new file mode 100644
index 0000000..cbf90ac
--- /dev/null
+++ b/examples/Hubicka/mand1.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 713934512 0)
+(formula 'mandel)
+(angle 7.2443)
+(outcoloring 1)
+(view -1.94257718066544 -1.77233401902794E-05 7.92857130860539E-11 7.92857135074726E-11)
+
diff --git a/examples/Hubicka/mand2.xpf b/examples/Hubicka/mand2.xpf
new file mode 100644
index 0000000..474067b
--- /dev/null
+++ b/examples/Hubicka/mand2.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1499405657 0)
+(formula 'mandel)
+(angle 7.2443)
+(outcoloring 1)
+(incoloring 1)
+(view -1.94257718066647 -1.77233397601984E-05 2.49864032459204E-11 2.49864033478705E-11)
+
diff --git a/examples/Hubicka/mand3.xpf b/examples/Hubicka/mand3.xpf
new file mode 100644
index 0000000..0bff62e
--- /dev/null
+++ b/examples/Hubicka/mand3.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1361538754 0)
+(formula 'mandel)
+(periodicity #f)
+(maxiter 1090)
+(view -0.8104723634 0.2058660314 4.067601817E-06 4.067601817E-06)
+
diff --git a/examples/Hubicka/mand4.xpf b/examples/Hubicka/mand4.xpf
new file mode 100644
index 0000000..d875e55
--- /dev/null
+++ b/examples/Hubicka/mand4.xpf
@@ -0,0 +1,9 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 420905417 0)
+(formula 'mandel)
+(maxiter 520)
+(view -0.76938957 -0.11612439 0.0003879837 0.0003879837)
+
diff --git a/examples/Hubicka/mand5.xpf b/examples/Hubicka/mand5.xpf
new file mode 100644
index 0000000..0bff62e
--- /dev/null
+++ b/examples/Hubicka/mand5.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1361538754 0)
+(formula 'mandel)
+(periodicity #f)
+(maxiter 1090)
+(view -0.8104723634 0.2058660314 4.067601817E-06 4.067601817E-06)
+
diff --git a/examples/Hubicka/mand7.xpf b/examples/Hubicka/mand7.xpf
new file mode 100644
index 0000000..7b1ea5e
--- /dev/null
+++ b/examples/Hubicka/mand7.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 550371047 0)
+(formula 'mandel3)
+(juliaseed 0.41537706780315403221 -0.0077789120708545871993)
+(incoloring 9)
+(julia #t)
+(plane 1)
+(view -0.02745 0.2291 9.685 9.685)
+
diff --git a/examples/Hubicka/mand8.xpf b/examples/Hubicka/mand8.xpf
new file mode 100644
index 0000000..e46b282
--- /dev/null
+++ b/examples/Hubicka/mand8.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1089717979 0)
+(formula 'mandel4)
+(juliaseed 0.54096954577238983938 -0.026495065869211446404)
+(incoloring 2)
+(julia #t)
+(view 0.01608 -0.03468 1.885 1.885)
+
diff --git a/examples/Hubicka/mandanim.xaf b/examples/Hubicka/mandanim.xaf
new file mode 100644
index 0000000..e60bf0d
--- /dev/null
+++ b/examples/Hubicka/mandanim.xaf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1964145840 0)
+(formula 'mandel)
+(angle -298.35)
+(maxiter 440)
+(outcoloring 1)
+(view -1.7478365664 -0.0010530675304 1.4757008994E-07 1.4664645614E-07)
+(morphview -1.74783652 -0.00105298843 1.31944034E-05 1.31118202E-05)
+(usleep 5000000)
diff --git a/examples/Hubicka/minibrot.xpf b/examples/Hubicka/minibrot.xpf
new file mode 100644
index 0000000..9208322
--- /dev/null
+++ b/examples/Hubicka/minibrot.xpf
@@ -0,0 +1,9 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 860134713 0)
+(formula 'mandel)
+(outcoloring 1)
+(view -1.9854567 -1.351727E-05 0.00029196024 0.00029196024)
+
diff --git a/examples/Hubicka/newton.xaf b/examples/Hubicka/newton.xaf
new file mode 100644
index 0000000..de96a26
--- /dev/null
+++ b/examples/Hubicka/newton.xaf
@@ -0,0 +1,19 @@
+
+;Animation file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -play <filename> to display it
+(initstate)
+(palette 2 448045853 0)
+(formula 'newton)
+(juliaseed -0.57957848837209298431 -1.084202172485504434E-19)
+(angle 90)
+(julia #t)
+(view -0.36734 0.00271247 0.074733 0.074733)
+(usleep 1000000)
+(morphview -0.6026171 9.362795E-05 0.008363483 0.008363483)
+(usleep 10000000)
+(wait)
+(morphview -0.45641 -0.0079525 0.48766 0.48766)
+(usleep 9000000)
+(morphview -0.4944 0.03114 1.61 1.61)
+(usleep 9000000)
diff --git a/examples/Hubicka/newton.xpf b/examples/Hubicka/newton.xpf
new file mode 100644
index 0000000..2ec794e
--- /dev/null
+++ b/examples/Hubicka/newton.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1810645372 0)
+(formula 'newton)
+(juliaseed -1.1275436046511628632 0)
+(angle 92.571)
+(maxiter 246)
+(julia #t)
+(view -0.6110601 -2.484229E-05 0.006533619 0.006533619)
+
diff --git a/examples/Hubicka/newton2.xpf b/examples/Hubicka/newton2.xpf
new file mode 100644
index 0000000..d96414f
--- /dev/null
+++ b/examples/Hubicka/newton2.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1474001267 0)
+(formula 'newton)
+(perturbation 0.3630608199521173342 -0.0025024203536321137096)
+(angle -90.674)
+(plane 6)
+(view 0.7362 -0.1215 5.044 5.044)
+
diff --git a/examples/Hubicka/newton3.xpf b/examples/Hubicka/newton3.xpf
new file mode 100644
index 0000000..ab1532f
--- /dev/null
+++ b/examples/Hubicka/newton3.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 928821037 0)
+(formula 'newton)
+(juliaseed -0.021075581878891157901 -1.084202172485504434E-19)
+(angle -447.54)
+(julia #t)
+(plane 1)
+(view -0.9045 -0.02173 4.838 4.838)
+
diff --git a/examples/Hubicka/octo.xpf b/examples/Hubicka/octo.xpf
new file mode 100644
index 0000000..95edac3
--- /dev/null
+++ b/examples/Hubicka/octo.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1626860739 0)
+(formula 'octal)
+(perturbation 0 0.02499999999999999987)
+(maxiter 400)
+(view 0.0086889 0.22339 0.71627 0.71627)
+
diff --git a/examples/Hubicka/palace.xpf b/examples/Hubicka/palace.xpf
new file mode 100644
index 0000000..068ce1b
--- /dev/null
+++ b/examples/Hubicka/palace.xpf
@@ -0,0 +1,13 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 871883963 0)
+(formula 'newton)
+(juliaseed -0.80087209302325586545 0)
+(angle -90.851)
+(maxiter 251)
+(julia #t)
+(plane 1)
+(view -2.254 0.006638 1.532 1.532)
+
diff --git a/examples/Hubicka/perb1.xpf b/examples/Hubicka/perb1.xpf
new file mode 100644
index 0000000..f5f403c
--- /dev/null
+++ b/examples/Hubicka/perb1.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1298613279 0)
+(formula 'newton)
+(perturbation 0.29505813953488373993 -0.012500000000000000802)
+(angle 270.17)
+(plane 2)
+(view -1.877 0.04055 6.545 6.545)
+
diff --git a/examples/Hubicka/perb2.xpf b/examples/Hubicka/perb2.xpf
new file mode 100644
index 0000000..def526c
--- /dev/null
+++ b/examples/Hubicka/perb2.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 661894305 0)
+(formula 'octal)
+(perturbation 0 -0.025000000000000001605)
+(plane 1)
+(view 0.452 -0.086 14 14)
+
diff --git a/examples/Hubicka/perb3.xpf b/examples/Hubicka/perb3.xpf
new file mode 100644
index 0000000..21fe50e
--- /dev/null
+++ b/examples/Hubicka/perb3.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 783556080 0)
+(formula 'newton)
+(perturbation -0.36882267441860467488 -0.012500000000000000802)
+(incoloring 1)
+(view 2.5795 0.027209 0.99831 0.99831)
+
diff --git a/examples/Hubicka/perb4.xpf b/examples/Hubicka/perb4.xpf
new file mode 100644
index 0000000..7be0ce3
--- /dev/null
+++ b/examples/Hubicka/perb4.xpf
@@ -0,0 +1,14 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(palette 2 2140656163 0)
+(formula 'barnsley)
+(perturbation 1.6755087209302326659 0)
+(angle -90.103)
+(outcoloring 10)
+(outtcoloring 9)
+(julia #f)
+(view 2.036 0.009591 1.128 1.128)
+
diff --git a/examples/Hubicka/perb5.xpf b/examples/Hubicka/perb5.xpf
new file mode 100644
index 0000000..79250c2
--- /dev/null
+++ b/examples/Hubicka/perb5.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1570942905 0)
+(formula 'newton)
+(perturbation -0.23183139534883722422 -0.012500000000000000802)
+(outcoloring 9)
+(incoloring 7)
+(plane 5)
+(view -0.0582 -0.01618 2.798 2.798)
+
diff --git a/examples/Hubicka/phoenix1.xpf b/examples/Hubicka/phoenix1.xpf
new file mode 100644
index 0000000..d811aae
--- /dev/null
+++ b/examples/Hubicka/phoenix1.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'edge2 #t)
+(palette 1 648727946 0)
+(formula 'phoenix)
+(juliaseed 0.45253955912025619886 -0.34249979558792155026)
+(angle -86.66)
+(view 0.29592 -0.011293 0.87138 0.87138)
+
diff --git a/examples/Hubicka/phoenix2.xpf b/examples/Hubicka/phoenix2.xpf
new file mode 100644
index 0000000..4d87571
--- /dev/null
+++ b/examples/Hubicka/phoenix2.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'edge2 #t)
+(palette 1 1818332444 0)
+(formula 'phoenix)
+(juliaseed -1.6254158351760713887 -0.0026744345827714052581)
+(outcoloring 2)
+(view -1.6242919 1.6685891E-05 0.00055702709 0.00055702709)
+
diff --git a/examples/Hubicka/redjulia.xpf b/examples/Hubicka/redjulia.xpf
new file mode 100644
index 0000000..0973d5c
--- /dev/null
+++ b/examples/Hubicka/redjulia.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 155652149 0)
+(formula 'mandel)
+(juliaseed 0.29449576229535342093 -0.016332967445424519366)
+(maxiter 127)
+(outcoloring 1)
+(julia #t)
+(view 0.000765158 -0.000268691 0.0186372 0.0186372)
+
diff --git a/examples/Hubicka/redmand.xpf b/examples/Hubicka/redmand.xpf
new file mode 100644
index 0000000..11a86b4
--- /dev/null
+++ b/examples/Hubicka/redmand.xpf
@@ -0,0 +1,9 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 155652149 0)
+(formula 'mandel)
+(maxiter 127)
+(view 0.19232992 0.59284158 0.00015478901 0.00015478901)
+
diff --git a/examples/Hubicka/redmand2.xpf b/examples/Hubicka/redmand2.xpf
new file mode 100644
index 0000000..1420b85
--- /dev/null
+++ b/examples/Hubicka/redmand2.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 155652149 0)
+(formula 'mandel)
+(maxiter 127)
+(outcoloring 1)
+(view 0.294490997 -0.0163372737 1.38726242E-05 1.38726242E-05)
+
diff --git a/examples/Hubicka/rocks.xpf b/examples/Hubicka/rocks.xpf
new file mode 100644
index 0000000..50b80fb
--- /dev/null
+++ b/examples/Hubicka/rocks.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 985867394 0)
+(formula 'newton)
+(juliaseed 0.0058931089247213081752 0.0044899066259199158438)
+(angle 98.028)
+(julia #t)
+(view 0.04955468 0.3812751 0.004336217 0.004336217)
+
diff --git a/examples/Hubicka/shell.xpf b/examples/Hubicka/shell.xpf
new file mode 100644
index 0000000..731e01f
--- /dev/null
+++ b/examples/Hubicka/shell.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1562608479 0)
+(formula 'octal)
+(perturbation 0 0.037499999999999999913)
+(maxiter 400)
+(plane 1)
+(view 93.5 18.5 11.6 11.6)
+
diff --git a/examples/Hubicka/something.xpf b/examples/Hubicka/something.xpf
new file mode 100644
index 0000000..14e3c15
--- /dev/null
+++ b/examples/Hubicka/something.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1324546019 0)
+(formula 'newton)
+(juliaseed -10.313231153031323321 -0.0036702265483384757111)
+(outcoloring 8)
+(julia #t)
+(plane 5)
+(view 0.1202 0.0131 3.064 3.064)
+
diff --git a/examples/Hubicka/spiral.xpf b/examples/Hubicka/spiral.xpf
new file mode 100644
index 0000000..86479ff
--- /dev/null
+++ b/examples/Hubicka/spiral.xpf
@@ -0,0 +1,13 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(defaultpalette 34)
+(formula 'mandel3)
+(cycling #t)
+(cyclingspeed 45)
+(juliaseed 0.062415825408122496282 -0.77685069099231027928)
+(maxiter 590)
+(julia #t)
+(view 0.0070184 0.003958 0.13512 0.13512)
+
diff --git a/examples/Hubicka/spiral2.xpf b/examples/Hubicka/spiral2.xpf
new file mode 100644
index 0000000..34cebdb
--- /dev/null
+++ b/examples/Hubicka/spiral2.xpf
@@ -0,0 +1,8 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1082198693 0)
+(formula 'mandel)
+(view 0.26295837 -0.0024249198 0.0001027196 0.0001027196)
+
diff --git a/examples/Hubicka/spiral3.xpf b/examples/Hubicka/spiral3.xpf
new file mode 100644
index 0000000..5f62a8d
--- /dev/null
+++ b/examples/Hubicka/spiral3.xpf
@@ -0,0 +1,9 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1910318292 0)
+(formula 'mandel)
+(outcoloring 8)
+(view 0.329878 -0.04210678 0.001420267 0.001420267)
+
diff --git a/examples/Hubicka/spiral4.xpf b/examples/Hubicka/spiral4.xpf
new file mode 100644
index 0000000..13aca67
--- /dev/null
+++ b/examples/Hubicka/spiral4.xpf
@@ -0,0 +1,14 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(defaultpalette 0)
+(formula 'mandel)
+(juliaseed 0.25701005261873154242 -0.00095118413200572324323)
+(outcoloring 10)
+(outtcoloring 4)
+(julia #t)
+(plane 1)
+(view 0.627 0.869 43.7 43.7)
+
diff --git a/examples/Hubicka/sprial.xpf b/examples/Hubicka/sprial.xpf
new file mode 100644
index 0000000..384edcb
--- /dev/null
+++ b/examples/Hubicka/sprial.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1112927008 0)
+(formula 'mandel)
+(juliaseed -0.080850290697674375517 0.68229166666666671054)
+(outcoloring 1)
+(incoloring 1)
+(julia #t)
+(view 0.239593 -0.462394 0.0574963 0.0574963)
+
diff --git a/examples/Hubicka/sun.xpf b/examples/Hubicka/sun.xpf
new file mode 100644
index 0000000..46ae405
--- /dev/null
+++ b/examples/Hubicka/sun.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1283437285 0)
+(formula 'phoenix)
+(juliaseed 0.1901522684107088305 0.76657698818178892958)
+(angle -155.51)
+(maxiter 331)
+(outcoloring 1)
+(view 0.29204 0.63386 0.16135 0.16135)
+
diff --git a/examples/Hubicka/thebug.xpf b/examples/Hubicka/thebug.xpf
new file mode 100644
index 0000000..3662543
--- /dev/null
+++ b/examples/Hubicka/thebug.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1387561158 0)
+(formula 'mandel3)
+(outcoloring 8)
+(incoloring 1)
+(plane 1)
+(view -0.007384 -0.1227 3.917 3.917)
+
diff --git a/examples/Hubicka/tower.xpf b/examples/Hubicka/tower.xpf
new file mode 100644
index 0000000..37a1ad6
--- /dev/null
+++ b/examples/Hubicka/tower.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 959136425 0)
+(formula 'newton)
+(juliaseed 1.0010901162790698318 0)
+(angle 88.884)
+(julia #t)
+(view -0.603817 0.000543598 0.0629232 0.0629232)
+
diff --git a/examples/Hubicka/tree.xpf b/examples/Hubicka/tree.xpf
new file mode 100644
index 0000000..e86f93f
--- /dev/null
+++ b/examples/Hubicka/tree.xpf
@@ -0,0 +1,11 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 959136425 0)
+(formula 'newton)
+(juliaseed 1.0010901162790698318 0)
+(angle 98.028)
+(julia #t)
+(view 0.252905 -0.5152498 0.004158874 0.004158874)
+
diff --git a/examples/Hubicka/triangle.xpf b/examples/Hubicka/triangle.xpf
new file mode 100644
index 0000000..e210a1d
--- /dev/null
+++ b/examples/Hubicka/triangle.xpf
@@ -0,0 +1,10 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 590960451 0)
+(formula 'mandel3)
+(maxiter 311)
+(outcoloring 1)
+(view 0.4441447404 0.0215520724 6.388399051E-06 6.388399051E-06)
+
diff --git a/examples/Hubicka/truecol1.xpf b/examples/Hubicka/truecol1.xpf
new file mode 100644
index 0000000..397cc48
--- /dev/null
+++ b/examples/Hubicka/truecol1.xpf
@@ -0,0 +1,17 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed 1.0167106653307867366 0.13217291168136122235)
+(angle 309.72)
+(maxiter 10)
+(outcoloring 10)
+(incoloring 10)
+(intcoloring 7)
+(outtcoloring 2)
+(plane 1)
+(view -0.009958 -0.03939 3.504 3.504)
+
diff --git a/examples/Hubicka/truecol2.xpf b/examples/Hubicka/truecol2.xpf
new file mode 100644
index 0000000..cc76c72
--- /dev/null
+++ b/examples/Hubicka/truecol2.xpf
@@ -0,0 +1,14 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(maxiter 1)
+(outcoloring 10)
+(incoloring 10)
+(intcoloring 3)
+(plane 3)
+(view 0.9983 -0.05054 2.833 2.833)
+
diff --git a/examples/Hubicka/truecol3.xpf b/examples/Hubicka/truecol3.xpf
new file mode 100644
index 0000000..5d50798
--- /dev/null
+++ b/examples/Hubicka/truecol3.xpf
@@ -0,0 +1,16 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -1.1486191860465117017 -0.0052083333333333336947)
+(maxiter 6)
+(outcoloring 10)
+(incoloring 10)
+(intcoloring 7)
+(outtcoloring 3)
+(plane 1)
+(view 0 0 2.5 2.5)
+
diff --git a/examples/Hubicka/truecol4.xpf b/examples/Hubicka/truecol4.xpf
new file mode 100644
index 0000000..4bcb1e8
--- /dev/null
+++ b/examples/Hubicka/truecol4.xpf
@@ -0,0 +1,14 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -1.061950111406869338 0.04163929049388898334)
+(maxiter 14)
+(incoloring 10)
+(intcoloring 2)
+(plane 1)
+(view 2.61 -0.0867 71.8 71.8)
+
diff --git a/examples/Hubicka/truecol5.xpf b/examples/Hubicka/truecol5.xpf
new file mode 100644
index 0000000..f9ae0a3
--- /dev/null
+++ b/examples/Hubicka/truecol5.xpf
@@ -0,0 +1,14 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -0.95900233293846147919 0.51868772447175426398)
+(maxiter 14)
+(incoloring 10)
+(intcoloring 6)
+(plane 5)
+(view -0.0677 -0.02876 4.106 4.106)
+
diff --git a/examples/Hubicka/truecol6.xpf b/examples/Hubicka/truecol6.xpf
new file mode 100644
index 0000000..bfcb504
--- /dev/null
+++ b/examples/Hubicka/truecol6.xpf
@@ -0,0 +1,15 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 718095456 0)
+(filter 'truecolor #t)
+(formula 'magnet)
+(angle -90)
+(maxiter 3)
+(incoloring 10)
+(intcoloring 2)
+(julia #t)
+(plane 1)
+(view 0.09422 0.004921 1.11 1.11)
+
diff --git a/examples/Hubicka/truecol7.xpf b/examples/Hubicka/truecol7.xpf
new file mode 100644
index 0000000..fb2286c
--- /dev/null
+++ b/examples/Hubicka/truecol7.xpf
@@ -0,0 +1,15 @@
+;Possition file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(palette 3 890748090 0)
+(formula 'barnsley)
+(juliaseed 0.61070761175562445042 -1.0807214554975420139)
+(angle -90.958)
+(maxiter 14)
+(incoloring 10)
+(intcoloring 8)
+(plane 6)
+(view 1.963 -0.02066 3.813 3.813)
+
diff --git a/examples/Hubicka/ufo.xpf b/examples/Hubicka/ufo.xpf
new file mode 100644
index 0000000..b3e75af
--- /dev/null
+++ b/examples/Hubicka/ufo.xpf
@@ -0,0 +1,12 @@
+;Possition file automatically generated by XaoS 3.0
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1272174002 0)
+(formula 'octal)
+(angle 91.79)
+(outcoloring 9)
+(incoloring 1)
+(plane 2)
+(view 0.615 0.734 31 31)
+
diff --git a/examples/Langston/animal.xpf b/examples/Langston/animal.xpf
new file mode 100644
index 0000000..6be6b11
--- /dev/null
+++ b/examples/Langston/animal.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 1 427368893 0)
+(formula 'mandel)
+(angle -237.16)
+(maxiter 2980)
+(outcoloring 9)
+(view -1.039657910478846 0.3483215557764378 1.163060099618196E-12 1.157784670002479E-12)
+
diff --git a/examples/Langston/butterfly-langston.xpf b/examples/Langston/butterfly-langston.xpf
new file mode 100644
index 0000000..4e132cc
--- /dev/null
+++ b/examples/Langston/butterfly-langston.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 3 917234429 0)
+(formula 'newton4)
+(outcoloring 5)
+(plane 2)
+(view 0.9323 1.405 1.48 1.48)
+
diff --git a/examples/Langston/eye.xpf b/examples/Langston/eye.xpf
new file mode 100644
index 0000000..943d12e
--- /dev/null
+++ b/examples/Langston/eye.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 3 9721874 0)
+(formula 'mandel)
+(angle -237.16)
+(maxiter 1000)
+(outcoloring 9)
+(view -1.0396579104749 0.34832155577314 2.6578793094374E-10 2.645819675818E-10)
+
diff --git a/examples/Langston/newcolor.xpf b/examples/Langston/newcolor.xpf
new file mode 100644
index 0000000..4debf7c
--- /dev/null
+++ b/examples/Langston/newcolor.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 1 427368893 0)
+(formula 'mandel)
+(angle -237.16)
+(maxiter 2980)
+(outcoloring 9)
+(view -1.0396579104749 0.34832155577314 2.6578793094374E-10 2.645819675818E-10)
+
diff --git a/examples/Langston/newt.xpf b/examples/Langston/newt.xpf
new file mode 100644
index 0000000..69f76a0
--- /dev/null
+++ b/examples/Langston/newt.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 3 772826840 0)
+(formula 'newton4)
+(outcoloring 5)
+(plane 2)
+(view 4.47 -0.551 42.9 42.9)
+
diff --git a/examples/Langston/newt2.xpf b/examples/Langston/newt2.xpf
new file mode 100644
index 0000000..144fb56
--- /dev/null
+++ b/examples/Langston/newt2.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 1 429494755 0)
+(formula 'newton4)
+(outcoloring 5)
+(plane 3)
+(view 1.078 -0.0161 3.104 3.104)
+
diff --git a/examples/Langston/paisleypillow.xpf b/examples/Langston/paisleypillow.xpf
new file mode 100644
index 0000000..0359704
--- /dev/null
+++ b/examples/Langston/paisleypillow.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 1 427368893 0)
+(formula 'mandel)
+(angle -237.16)
+(maxiter 3530)
+(outcoloring 9)
+(view -1.0396579104786746313 0.34832155577651026376 1.1763593571467723109E-16 1.1899118843028411163E-16)
+
diff --git a/examples/Langston/paramecium.xpf b/examples/Langston/paramecium.xpf
new file mode 100644
index 0000000..3b9bdf0
--- /dev/null
+++ b/examples/Langston/paramecium.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 3 1770716011 0)
+(formula 'mandel)
+(maxiter 1120)
+(view -1.78004340404337635 -0.00140603578700076483 1.46665448882976612E-14 1.46663734700049606E-14)
+
diff --git a/examples/Langston/pretty.xpf b/examples/Langston/pretty.xpf
new file mode 100644
index 0000000..824ce6c
--- /dev/null
+++ b/examples/Langston/pretty.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 2 1364804877 0)
+(formula 'mandel)
+(maxiter 487)
+(outcoloring 9)
+(view 0.45238010154254 0.39608956622847 5.2698759603082E-10 5.2459672847047E-10)
+
diff --git a/examples/Langston/pretty2.xpf b/examples/Langston/pretty2.xpf
new file mode 100644
index 0000000..f7bcf40
--- /dev/null
+++ b/examples/Langston/pretty2.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 3 9721874 0)
+(formula 'mandel)
+(maxiter 1000)
+(outcoloring 9)
+(view -1.03965791284 0.348321559351 3.5236094014E-08 3.5076216803E-08)
+
diff --git a/examples/Langston/royal.xpf b/examples/Langston/royal.xpf
new file mode 100644
index 0000000..70ae4ec
--- /dev/null
+++ b/examples/Langston/royal.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 1 196425230 0)
+(formula 'mandel)
+(maxiter 2290)
+(outcoloring 9)
+(view -1.0760893740981335 -0.27889499350977533 1.0706333822968483E-13 1.0706396164593401E-13)
+
diff --git a/examples/Langston/rpg.xpf b/examples/Langston/rpg.xpf
new file mode 100644
index 0000000..53f9dcb
--- /dev/null
+++ b/examples/Langston/rpg.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 1 427368893 0)
+(formula 'mandel)
+(angle -237.16)
+(maxiter 2980)
+(outcoloring 9)
+(view -1.03965791047867516 0.348321555776510037 1.52938642652977741E-14 1.52239874352810833E-14)
+
diff --git a/examples/Langston/whisp.xpf b/examples/Langston/whisp.xpf
new file mode 100644
index 0000000..82046be
--- /dev/null
+++ b/examples/Langston/whisp.xpf
@@ -0,0 +1,13 @@
+;Position file automatically generated by XaoS 3.4
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 2 209863285 0)
+(formula 'newton)
+(juliaseed -0.021075581878891157901 -1.084202172485504434E-19)
+(angle -447.54)
+(julia #t)
+(plane 1)
+(view -2.422864 0.6175621 0.003080893 0.003080893)
+
diff --git a/examples/Malczak/alien.xpf b/examples/Malczak/alien.xpf
new file mode 100644
index 0000000..1b40ca0
--- /dev/null
+++ b/examples/Malczak/alien.xpf
@@ -0,0 +1,15 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1792731671 0)
+(formula 'user)
+(usrform "C*Z*LOG(Z)")
+(usrformInit "")
+(angle -90.35)
+(maxiter 500)
+(bailout 20)
+(outcoloring 7)
+(plane 1)
+(view 0.537 0.1449 4.178 4.178)
+
diff --git a/examples/Malczak/burnship.xpf b/examples/Malczak/burnship.xpf
new file mode 100644
index 0000000..1657a76
--- /dev/null
+++ b/examples/Malczak/burnship.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(defaultpalette 0)
+(formula 'user)
+(usrform "POWI(RABS(Z)+I*RABS(IM(Z));2)+C")
+(usrformInit "")
+(bailout 120)
+(view -1.758 -0.038464 0.11233 0.11233)
+
diff --git a/examples/Malczak/butterfly.xpf b/examples/Malczak/butterfly.xpf
new file mode 100644
index 0000000..95fa52c
--- /dev/null
+++ b/examples/Malczak/butterfly.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(defaultpalette 0)
+(formula 'user)
+(usrform "Z^2+C")
+(usrformInit "SIN(RE(C))-I*IM(C)")
+(maxiter 520)
+(view -1.747608 -4.104505E-05 0.009723883 0.009723883)
+
diff --git a/examples/Malczak/circle.xpf b/examples/Malczak/circle.xpf
new file mode 100644
index 0000000..65242f6
--- /dev/null
+++ b/examples/Malczak/circle.xpf
@@ -0,0 +1,14 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(defaultpalette 0)
+(formula 'user)
+(usrform "LOGN(5;Z^2)+C")
+(usrformInit "")
+(maxiter 200)
+(outcoloring 1)
+(plane 1)
+(view -0.3714 0.01315 1.778 1.778)
+
diff --git a/examples/Malczak/dark.xpf b/examples/Malczak/dark.xpf
new file mode 100644
index 0000000..09b499b
--- /dev/null
+++ b/examples/Malczak/dark.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1196652293 0)
+(formula 'user)
+(usrform "COSH(Z^3+C)SINH(Z^1.2)+C")
+(usrformInit "")
+(maxiter 360)
+(outcoloring 5)
+(view 0.1534 -0.007112 2.195 2.195)
+
diff --git a/examples/Malczak/eyes.xpf b/examples/Malczak/eyes.xpf
new file mode 100644
index 0000000..64ae444
--- /dev/null
+++ b/examples/Malczak/eyes.xpf
@@ -0,0 +1,15 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(defaultpalette 0)
+(formula 'user)
+(usrform "EXP(Z)+C")
+(usrformInit "")
+(juliaseed -0.94280443112989110202 -0.004527757333355704461)
+(angle 90.364)
+(maxiter 500)
+(julia #t)
+(view -0.2878 -0.1179 2.066 2.066)
+
diff --git a/examples/Malczak/heart.xpf b/examples/Malczak/heart.xpf
new file mode 100644
index 0000000..c2c5a75
--- /dev/null
+++ b/examples/Malczak/heart.xpf
@@ -0,0 +1,16 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 1 1400652044 0)
+(shiftpalette 11)
+(formula 'user)
+(usrform "RTNI(Z;12;6)(1-Z)+C")
+(usrformInit "")
+(angle -90.921)
+(maxiter 100)
+(outcoloring 6)
+(incoloring 7)
+(view 0.88195 -0.012873 0.36361 0.36361)
+
diff --git a/examples/Malczak/helloween.xpf b/examples/Malczak/helloween.xpf
new file mode 100644
index 0000000..e52e57a
--- /dev/null
+++ b/examples/Malczak/helloween.xpf
@@ -0,0 +1,16 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 3 456535883 0)
+(formula 'user)
+(usrform "POWD(SINH(POWD(Z;1.2));2.8)+C")
+(usrformInit "")
+(angle 90.724)
+(maxiter 20)
+(outcoloring 6)
+(incoloring 7)
+(plane 1)
+(view 0.1559 0.1831 5.607 5.607)
+
diff --git a/examples/Malczak/pentafrac.xpf b/examples/Malczak/pentafrac.xpf
new file mode 100644
index 0000000..714e3ce
--- /dev/null
+++ b/examples/Malczak/pentafrac.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(defaultpalette 0)
+(formula 'user)
+(usrform "I*LOGN(10;Z^6)^3+C")
+(usrformInit "")
+(maxiter 710)
+(outcoloring 7)
+(view 0.1072 0.02068 3.225 3.225)
+
diff --git a/examples/Malczak/skullfrm.xpf b/examples/Malczak/skullfrm.xpf
new file mode 100644
index 0000000..a836dde
--- /dev/null
+++ b/examples/Malczak/skullfrm.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(defaultpalette 0)
+(formula 'user)
+(usrform "COSH(Z^3+C)SINH(Z^1.2)+C")
+(usrformInit "")
+(maxiter 360)
+(view 0.11164 0.015088 0.99076 0.99076)
+
diff --git a/examples/Malczak/warriormask.xpf b/examples/Malczak/warriormask.xpf
new file mode 100644
index 0000000..8a89131
--- /dev/null
+++ b/examples/Malczak/warriormask.xpf
@@ -0,0 +1,16 @@
+;Position file automatically generated by XaoS 3.2.3
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'anti #t)
+(palette 3 456535883 0)
+(formula 'user)
+(usrform "POWD(SINH(POWD(Z;1.2));2.8)+C-0.2P^2")
+(usrformInit "")
+(angle 90.724)
+(maxiter 20)
+(outcoloring 6)
+(incoloring 7)
+(plane 1)
+(view 0.1559 0.1831 5.607 5.607)
+
diff --git a/examples/README b/examples/README
new file mode 100644
index 0000000..cc7f222
--- /dev/null
+++ b/examples/README
@@ -0,0 +1,154 @@
+Examples and their authors
+--------------------------
+
+The examples have been grouped into different directories according to
+the authors. To contact Daniel Skarda, visit
+http://atrey.karlin.mff.cuni.cz/~0rfelyus, to write to Zsigmond Kovács,
+go to http://kovzsi.fw.hu.
+
+If you want to order a printed copy in arbitrary size, please go to
+http://wmi.math.u-szeged.hu/~kovzol/particio/Fractals.php and fill in
+the order form. All example fractals are copyrighted by their original
+authors, but may be reproduced in any form. You are also encouraged to
+contribute your own generated fractals.
+
+0rfel1.xpf contains Daniel Skarda: 0rfelyus 1 (1997)
+0rfel2.xpf contains Daniel Skarda: 0rfelyus 2 (1997)
+2spirals.xpf contains Jan Hubicka: Two Spirals (1997)
+3d1.xpf contains Jan Hubicka: 3D 1 (1997)
+3d2.xpf contains Jan Hubicka: 3D 2 (1997)
+3d3.xpf contains Jan Hubicka: 3D 3 (1997)
+3d4.xpf contains Jan Hubicka: 3D 4 (1997)
+3d5.xpf contains Jan Hubicka: 3D 5 (1997)
+3d6.xpf contains Jan Hubicka: 3D 6 (1997)
+3d7.xpf contains Jan Hubicka: 3D 7 (1997)
+3d8.xpf contains Jan Hubicka: 3D 8 (1997)
+3d9.xpf contains Jan Hubicka: 3D 9 (1997)
+axe.xpf contains Jan Hubicka: Axe (1997)
+barnsl1.xpf contains Jan Hubicka: Barnsley 1 (1997)
+barnsl2.xpf contains Jan Hubicka: Barnsley 2 (1997)
+barnsl3.xpf contains Jan Hubicka: Barnsley 3 (1997)
+barnsl4.xpf contains Jan Hubicka: Barnsley 4 (1997)
+barnsl5.xpf contains Jan Hubicka: Barnsley 5 (1997)
+barnsl6.xpf contains Jan Hubicka: Barnsley 6 (1997)
+barnsl7.xpf contains Jan Hubicka: Barnsley 7 (1997)
+barnsl8.xpf contains Jan Hubicka: Barnsley 8 (1997)
+barnsl9.xpf contains Jan Hubicka: Barnsley 9 (1997)
+beatle2.xpf contains Jan Hubicka: Beatle 2 (1997)
+beatle.xpf contains Jan Hubicka: Beatle (1997)
+bolygo.xpf contains <a href=http://kovzsi.fw.hu>Kovács Zsigmond</a>: Bolygó (2004)
+brown.xpf contains Jan Hubicka: Brown (1997)
+checker.xpf contains Jan Hubicka: Checker (1997)
+crone.xpf contains Jan Hubicka: Crone (1997)
+csiga2.xpf contains Kovács Zsigmond: Csiga 2 (2004)
+csiga3.xpf contains Kovács Zsigmond: Csiga 3 (2004)
+csiga4.xpf contains Kovács Zsigmond: Csiga 4 (2004)
+csiga5.xpf contains Kovács Zsigmond: Csiga 5 (2004)
+dblspira.xpf contains Jan Hubicka: Double Spiral (1997)
+dragons2.xpf contains Jan Hubicka: Dragons 2 (1997)
+dragons.xpf contains Jan Hubicka: Dragons 1 (1997)
+edge2.xpf contains Jan Hubicka: Edge 2 (1997)
+edge3.xpf contains Jan Hubicka: Edge 3 (1997)
+edge.xpf contains Jan Hubicka: Edge (1997)
+eifell.xpf contains Jan Hubicka: Eifel l (1997)
+fract0.xpf contains Kovács Zoltán: The Machine (2004)
+fract1.xpf contains Kovács Zoltán: The Machine Needs Another Sacrifice (2004)
+galaxy.xpf contains Jan Hubicka: Galaxy (1997)
+gamma.xpf contains Kovács Zsigmond: Gamma (2004)
+golden.xpf contains Kovács Zsigmond: Golden (2004)
+goldrive.xpf contains Jan Hubicka: goldrive (1997)
+head2.xpf contains Jan Hubicka: Head 2 (1997)
+head3.xpf contains Jan Hubicka: Head 3 (1997)
+head.xpf contains Jan Hubicka: Head 1 (1997)
+impulzus.xpf contains Kovács Zsigmond: Impulzus (2004)
+incolor1.xpf contains Jan Hubicka: Incolor 1 (1997)
+incolor2.xpf contains Jan Hubicka: Incolor 2 (1997)
+incolor3.xpf contains Jan Hubicka: Incolor 3 (1997)
+incolor4.xpf contains Jan Hubicka: Incolor 4 (1997)
+incolor5.xpf contains Jan Hubicka: Incolor 5 (1997)
+julia2.xpf contains Jan Hubicka: Julia 2 (1997)
+julia3.xpf contains Jan Hubicka: Julia 3 (1997)
+julia4.xpf contains Jan Hubicka: Julia 4 (1997)
+julia5.xpf contains Jan Hubicka: Julia 5 (1997)
+julia.xpf contains Jan Hubicka: Julia 1 (1997)
+kovzsi10.2.xpf contains Kovács Zsigmond: Gyöngysor (2004)
+kovzsi12.xpf contains Kovács Zsigmond: Jame's Brown (2004)
+kovzsi14.xpf contains Kovács Zsigmond: Páfrány (2004)
+kovzsi15.xpf contains Kovács Zsigmond: Perzselt lombok (2004)
+kovzsi16.xpf contains Kovács Zsigmond: Kaktusz (2004)
+kovzsi17.xpf contains Kovács Zsigmond: Aréna (2004)
+kovzsi2.1.xpf contains Kovács Zsigmond: Sárkány (2004)
+kovzsi2.xpf contains Kovács Zsigmond: Barlang (2004)
+kovzsi3.1.xpf contains Kovács Zsigmond: Tengerfenék (2004)
+kovzsi3.2.xpf contains Kovács Zsigmond: Vakító (hol)nap (2004)
+kovzsi4.xpf contains Kovács Zsigmond: Kein Schar (2004)
+kovzsi6.1.xpf contains Kovács Zsigmond: Kávéút (2004)
+kovzsi6.2.xpf contains Kovács Zsigmond: Kávé jut (2004)
+kovzsi6.xpf contains Kovács Zsigmond: Tejút (2004)
+kovzsi7.1.xpf contains Kovács Zsigmond: Zöldág (2004)
+kovzsi7.2.xpf contains Kovács Zsigmond: Aranyág (2004)
+kovzsi7.3.xpf contains Kovács Zsigmond: Mimóza (2004)
+kovzsi7.4.xpf contains Kovács Zsigmond: Burjánzás (2004)
+kovzsi7.5.xpf contains Kovács Zsigmond: Intruder (2004)
+kovzsi8.xpf contains Kovács Zsigmond: Genezis (2004)
+kovzsi9.2.xpf contains Kovács Zsigmond: Pyramid I. (2004)
+kovzsi9.xpf contains Kovács Zsigmond: Pyramid 0. (2004)
+kovzsi.xpf contains Kovács Zsigmond: Hab (2004)
+kovzsipro.xpf contains Kovács Zsigmond: Sztrogoff Mihály (2004)
+lemon.xpf contains Jan Hubicka: Lemon (1997)
+lighting.xpf contains Kovács Zsigmond: Lighting (2004)
+light-kovzsi.xpf contains Jan Hubicka: Light (1997)
+magnet1.xpf contains Jan Hubicka: Magnet 1 (1997)
+magnet2.xpf contains Jan Hubicka: Magnet 2 (1997)
+magnet3.xpf contains Jan Hubicka: Magnet 3 (1997)
+magnet4.xpf contains Jan Hubicka: Magnet 4 (1997)
+magnet.xpf contains Jan Hubicka: Magnet (1997)
+mand1.xpf contains Jan Hubicka: Mand 1 (1997)
+mand2.xpf contains Jan Hubicka: Mand 2 (1997)
+mand4.xpf contains Jan Hubicka: Mand 4 (1997)
+mand5.xpf contains Jan Hubicka: Mand 5 (1997)
+mand7.xpf contains Jan Hubicka: Mand 7 (1997)
+mand8.xpf contains Jan Hubicka: Mand 8 (1997)
+mand9.xpf contains Kovács Zoltán: Villámlás (2003)
+minibrot.xpf contains Jan Hubicka: Minibrot (1997)
+nap.xpf contains Kovács Zsigmond: Nap (2004)
+newton2.xpf contains Jan Hubicka: Newton 2 (1997)
+newton3.xpf contains Jan Hubicka: Newton 3 (1997)
+newton.xpf contains Jan Hubicka: Newton 1 (1997)
+octo.xpf contains Jan Hubicka: Octo (1997)
+orveny.xpf contains Kovács Zsigmond: Örvény (2004)
+palace.xpf contains Jan Hubicka: Palace (1997)
+pavaszem2.xpf contains Kovács Zsigmond: Pávaszem 2 (2004)
+pavaszem.xpf contains Kovács Zsigmond: Pávaszem (2004)
+pepita.xpf contains Kovács Zsigmond: Pepita (2004)
+perb1.xpf contains Jan Hubicka: Perb 1 (1997)
+perb2.xpf contains Jan Hubicka: Perb 2 (1997)
+perb3.xpf contains Jan Hubicka: Perb 3 (1997)
+perb4.xpf contains Jan Hubicka: Perb 4 (1997)
+perb5.xpf contains Jan Hubicka: Perb 5 (1997)
+phoenix1.xpf contains Jan Hubicka: Phoenix1 (1997)
+phoenix2.xpf contains Jan Hubicka: Phoenix2 (1997)
+redjulia.xpf contains Jan Hubicka: Red Julia (1997)
+redmand2.xpf contains Jan Hubicka: Red Mand2 (1997)
+redmand.xpf contains Jan Hubicka: Red Mand (1997)
+rocks.xpf contains Jan Hubicka: Rocks (1997)
+shell.xpf contains Jan Hubicka: Shell (1997)
+something.xpf contains Jan Hubicka: Something (1997)
+spiral2.xpf contains Jan Hubicka: Spiral 2 (1997)
+spiral3.xpf contains Jan Hubicka: Spiral 3 (1997)
+spiral4.xpf contains Jan Hubicka: Spiral 4 (1997)
+spiral.xpf contains Jan Hubicka: Spiral (1997)
+sprial.xpf contains Jan Hubicka: Sprial (1997)
+sun.xpf contains Jan Hubicka: Sun (1997)
+thebug.xpf contains Jan Hubicka: The Bug (1997)
+tower.xpf contains Jan Hubicka: Tower (1997)
+tree.xpf contains Jan Hubicka: Tree (1997)
+triangle.xpf contains Jan Hubicka: Triangle (1997)
+truecol1.xpf contains Jan Hubicka: Truecol 1 (1997)
+truecol2.xpf contains Jan Hubicka: Truecol 2 (1997)
+truecol3.xpf contains Jan Hubicka: Truecol 3 (1997)
+truecol4.xpf contains Jan Hubicka: Truecol 4 (1997)
+truecol5.xpf contains Jan Hubicka: Truecol 5 (1997)
+truecol6.xpf contains Jan Hubicka: Truecol 6 (1997)
+truecol7.xpf contains Jan Hubicka: Truecol 7 (1997)
+ufo.xpf contains Jan Hubicka: Ufo (1997)
diff --git a/examples/ZKovacs/fract0.xpf b/examples/ZKovacs/fract0.xpf
new file mode 100644
index 0000000..b1cb6d8
--- /dev/null
+++ b/examples/ZKovacs/fract0.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.2.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(filter 'truecolor #t)
+(palette 3 1171241641 0)
+(formula 'newton)
+(angle -150.19)
+(view -0.0008614612 0.0005988902 0.002088403 0.002088403)
+
diff --git a/examples/ZKovacs/fract1.xpf b/examples/ZKovacs/fract1.xpf
new file mode 100644
index 0000000..c49b35b
--- /dev/null
+++ b/examples/ZKovacs/fract1.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 738969834 0)
+(formula 'mandel)
+(maxiter 400)
+(outcoloring 1)
+(plane 1)
+(view 1.358 -0.02348 3.956 3.956)
+
diff --git a/examples/ZKovacs/hornflake1.xpf b/examples/ZKovacs/hornflake1.xpf
new file mode 100644
index 0000000..985c3fd
--- /dev/null
+++ b/examples/ZKovacs/hornflake1.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.2
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1833823048 0)
+(formula 'hornflake)
+(angle -269.68)
+(outcoloring 8)
+(incoloring 2)
+(view -0.8888 -0.008993 2.626 2.626)
+
diff --git a/examples/ZKovacs/hornflake2.xpf b/examples/ZKovacs/hornflake2.xpf
new file mode 100644
index 0000000..b520548
--- /dev/null
+++ b/examples/ZKovacs/hornflake2.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.2
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(defaultpalette 0)
+(formula 'hornflake)
+(angle -269.68)
+(outcoloring 3)
+(view -0.7818 -0.003706 2.86 2.86)
+
diff --git a/examples/ZKovacs/mand9.xpf b/examples/ZKovacs/mand9.xpf
new file mode 100644
index 0000000..cebbb13
--- /dev/null
+++ b/examples/ZKovacs/mand9.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS pre-3.1-6
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+;Saved by Zoltan Kovacs <kovzol@math.u-szeged.hu>
+(initstate)
+(palette 3 496022352 0)
+(formula 'mandel)
+(maxiter 860)
+(view -1.779346546214150062 0.001338480738707815055 2.229770187933688419E-15 2.227846893747829123E-15)
+
diff --git a/examples/ZsKovacs/bolygo.xpf b/examples/ZsKovacs/bolygo.xpf
new file mode 100644
index 0000000..1f7a6e4
--- /dev/null
+++ b/examples/ZsKovacs/bolygo.xpf
@@ -0,0 +1,9 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 378470941 0)
+(formula 'magnet)
+(angle -361.34)
+(view 1.847208668 -1.339256286 5.070127709E-06 7.436187309E-06)
+
diff --git a/examples/ZsKovacs/csiga2.xpf b/examples/ZsKovacs/csiga2.xpf
new file mode 100644
index 0000000..4e95dd6
--- /dev/null
+++ b/examples/ZsKovacs/csiga2.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1841018718 0)
+(formula 'magnet)
+(angle 88.336)
+(outcoloring 6)
+(view -0.3369098 -0.3762873 0.001193811 0.001750923)
+
diff --git a/examples/ZsKovacs/csiga3.xpf b/examples/ZsKovacs/csiga3.xpf
new file mode 100644
index 0000000..60bd45f
--- /dev/null
+++ b/examples/ZsKovacs/csiga3.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 821561484 0)
+(formula 'magnet)
+(angle 88.336)
+(outcoloring 6)
+(view -0.3369098 -0.3762873 0.001193811 0.001750923)
+
diff --git a/examples/ZsKovacs/csiga4.xpf b/examples/ZsKovacs/csiga4.xpf
new file mode 100644
index 0000000..767fa65
--- /dev/null
+++ b/examples/ZsKovacs/csiga4.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1290469621 0)
+(formula 'magnet)
+(angle 88.336)
+(outcoloring 6)
+(view -0.3369098 -0.3762873 0.001193811 0.001750923)
+
diff --git a/examples/ZsKovacs/csiga5.xpf b/examples/ZsKovacs/csiga5.xpf
new file mode 100644
index 0000000..b5ef9ba
--- /dev/null
+++ b/examples/ZsKovacs/csiga5.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1541168959 0)
+(formula 'magnet)
+(angle 88.336)
+(outcoloring 6)
+(view -0.3369098 -0.3762873 0.001193811 0.001750923)
+
diff --git a/examples/ZsKovacs/gamma.xpf b/examples/ZsKovacs/gamma.xpf
new file mode 100644
index 0000000..3a43d15
--- /dev/null
+++ b/examples/ZsKovacs/gamma.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 11513334 0)
+(formula 'mandel4)
+(juliaseed 0.54096954577238983938 -0.026495065869211446404)
+(incoloring 2)
+(julia #t)
+(view -0.148592 0.103841 0.012825 0.012825)
+
diff --git a/examples/ZsKovacs/golden.xpf b/examples/ZsKovacs/golden.xpf
new file mode 100644
index 0000000..6c5ba6c
--- /dev/null
+++ b/examples/ZsKovacs/golden.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1307004302 0)
+(formula 'mandel3)
+(angle -23.274)
+(maxiter 411)
+(view -0.55067212 -0.17451537 0.00078012605 0.00078012605)
+
diff --git a/examples/ZsKovacs/impulzus.xpf b/examples/ZsKovacs/impulzus.xpf
new file mode 100644
index 0000000..1238882
--- /dev/null
+++ b/examples/ZsKovacs/impulzus.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 532743710 0)
+(formula 'barnsley)
+(juliaseed 1.0485101744186047187 -0.041666666666666669341)
+(maxiter 311)
+(outcoloring 1)
+(plane 1)
+(view -3.98 -2.81 20.4 20.4)
+
diff --git a/examples/ZsKovacs/kovzsi10.2.xpf b/examples/ZsKovacs/kovzsi10.2.xpf
new file mode 100644
index 0000000..d7008ba
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi10.2.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1843768384 0)
+(formula 'barnsley)
+(juliaseed 1.0499881996553494467 0.083487582093292521238)
+(maxiter 81)
+(incoloring 1)
+(plane 1)
+(view -0.71363 0.0075101 0.27275 0.27275)
+
diff --git a/examples/ZsKovacs/kovzsi12.xpf b/examples/ZsKovacs/kovzsi12.xpf
new file mode 100644
index 0000000..55d47f7
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi12.xpf
@@ -0,0 +1,8 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 780175578 0)
+(formula 'mandel)
+(view 0.2989409256291 -0.01731148427383 1.335782348502E-09 1.335782348528E-09)
+
diff --git a/examples/ZsKovacs/kovzsi14.xpf b/examples/ZsKovacs/kovzsi14.xpf
new file mode 100644
index 0000000..79cc870
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi14.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1741193285 0)
+(formula 'mandel)
+(maxiter 144)
+(outcoloring 1)
+(view 0.294492327157 -0.016335566672 2.53190145657E-08 2.53190145654E-08)
+
diff --git a/examples/ZsKovacs/kovzsi15.xpf b/examples/ZsKovacs/kovzsi15.xpf
new file mode 100644
index 0000000..0624539
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi15.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1957368558 0)
+(formula 'mandel3)
+(maxiter 70)
+(outcoloring 9)
+(incoloring 9)
+(plane 2)
+(view 0.96546 1.24782 0.0181954 0.0181954)
+
diff --git a/examples/ZsKovacs/kovzsi16.xpf b/examples/ZsKovacs/kovzsi16.xpf
new file mode 100644
index 0000000..17d95f2
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi16.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 867832577 0)
+(formula 'mandel)
+(angle 7.2443)
+(outcoloring 1)
+(view -1.94257718068738 -1.77233235868353E-05 9.16863387512637E-11 9.16863397212306E-11)
+
diff --git a/examples/ZsKovacs/kovzsi17.xpf b/examples/ZsKovacs/kovzsi17.xpf
new file mode 100644
index 0000000..a8e812b
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi17.xpf
@@ -0,0 +1,9 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 420905417 0)
+(formula 'mandel)
+(maxiter 520)
+(view -0.769502838 -0.116273301 7.88488347E-05 7.88488347E-05)
+
diff --git a/examples/ZsKovacs/kovzsi2.1.xpf b/examples/ZsKovacs/kovzsi2.1.xpf
new file mode 100644
index 0000000..f40980f
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi2.1.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1932989413 0)
+(formula 'mandel)
+(maxiter 402)
+(outcoloring 1)
+(plane 1)
+(view -0.9502523 0.2584479 0.001985157 0.001985157)
+
diff --git a/examples/ZsKovacs/kovzsi2.xpf b/examples/ZsKovacs/kovzsi2.xpf
new file mode 100644
index 0000000..bd5ad58
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi2.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 392298113 0)
+(formula 'mandel)
+(maxiter 402)
+(outcoloring 1)
+(plane 1)
+(view -0.87618 0.299721 0.0564895 0.0564895)
+
diff --git a/examples/ZsKovacs/kovzsi3.1.xpf b/examples/ZsKovacs/kovzsi3.1.xpf
new file mode 100644
index 0000000..8dccb07
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi3.1.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1896280930 0)
+(formula 'magnet)
+(maxiter 400)
+(outcoloring 1)
+(plane 1)
+(view 0.4514631 -0.4518334 0.003683064 0.005401828)
+
diff --git a/examples/ZsKovacs/kovzsi3.2.xpf b/examples/ZsKovacs/kovzsi3.2.xpf
new file mode 100644
index 0000000..bec5ff0
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi3.2.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 581785611 0)
+(formula 'newton)
+(maxiter 400)
+(outcoloring 1)
+(plane 1)
+(view -0.8301499718 0.1223937137 4.130219599E-06 4.130219599E-06)
+
diff --git a/examples/ZsKovacs/kovzsi4.xpf b/examples/ZsKovacs/kovzsi4.xpf
new file mode 100644
index 0000000..49b2e70
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi4.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1990627390 0)
+(formula 'mandel)
+(maxiter 402)
+(outcoloring 1)
+(plane 1)
+(view -0.9509846 0.258386 0.001985157 0.001985157)
+
diff --git a/examples/ZsKovacs/kovzsi6.1.xpf b/examples/ZsKovacs/kovzsi6.1.xpf
new file mode 100644
index 0000000..5ee94a3
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi6.1.xpf
@@ -0,0 +1,8 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1278910061 0)
+(formula 'phoenix)
+(view 0.115843 0.624705 0.0290119 0.0290119)
+
diff --git a/examples/ZsKovacs/kovzsi6.2.xpf b/examples/ZsKovacs/kovzsi6.2.xpf
new file mode 100644
index 0000000..2e4715b
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi6.2.xpf
@@ -0,0 +1,8 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 966102831 0)
+(formula 'phoenix)
+(view 0.105812 0.619032 0.0110159 0.0110159)
+
diff --git a/examples/ZsKovacs/kovzsi6.xpf b/examples/ZsKovacs/kovzsi6.xpf
new file mode 100644
index 0000000..93bfaeb
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi6.xpf
@@ -0,0 +1,8 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1393010519 0)
+(formula 'phoenix)
+(view 0.206607 0.562805 0.0151664 0.0151664)
+
diff --git a/examples/ZsKovacs/kovzsi7.1.xpf b/examples/ZsKovacs/kovzsi7.1.xpf
new file mode 100644
index 0000000..75cde35
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi7.1.xpf
@@ -0,0 +1,8 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1449951317 0)
+(formula 'mandel)
+(view -0.27856551 0.75057008 0.00062031881 0.00062031881)
+
diff --git a/examples/ZsKovacs/kovzsi7.2.xpf b/examples/ZsKovacs/kovzsi7.2.xpf
new file mode 100644
index 0000000..3b9fcba
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi7.2.xpf
@@ -0,0 +1,8 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 948913282 0)
+(formula 'mandel)
+(view -0.27856551 0.75057008 0.00062031881 0.00062031881)
+
diff --git a/examples/ZsKovacs/kovzsi7.3.xpf b/examples/ZsKovacs/kovzsi7.3.xpf
new file mode 100644
index 0000000..01f692f
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi7.3.xpf
@@ -0,0 +1,8 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 2052240142 0)
+(formula 'mandel)
+(view -0.27856551 0.75057008 0.00062031881 0.00062031881)
+
diff --git a/examples/ZsKovacs/kovzsi7.4.xpf b/examples/ZsKovacs/kovzsi7.4.xpf
new file mode 100644
index 0000000..994675b
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi7.4.xpf
@@ -0,0 +1,8 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1954684372 0)
+(formula 'mandel)
+(view -0.278870752 0.750683154 1.06458871E-05 1.06458871E-05)
+
diff --git a/examples/ZsKovacs/kovzsi7.5.xpf b/examples/ZsKovacs/kovzsi7.5.xpf
new file mode 100644
index 0000000..7572d86
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi7.5.xpf
@@ -0,0 +1,8 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1394478746 0)
+(formula 'mandel)
+(view -0.2788770307 0.7506812087 1.789407946E-06 1.789407946E-06)
+
diff --git a/examples/ZsKovacs/kovzsi8.xpf b/examples/ZsKovacs/kovzsi8.xpf
new file mode 100644
index 0000000..e697cb6
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi8.xpf
@@ -0,0 +1,14 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1034201341 0)
+(formula 'mandel)
+(juliaseed 0.27541729708396692038 -0.0067143955333554104651)
+(angle -30.559)
+(maxiter 227)
+(outcoloring 2)
+(julia #t)
+(plane 4)
+(view -4.115 -0.5451 1.417 1.417)
+
diff --git a/examples/ZsKovacs/kovzsi9.2.xpf b/examples/ZsKovacs/kovzsi9.2.xpf
new file mode 100644
index 0000000..8afb9bc
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi9.2.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1399319848 0)
+(formula 'barnsley)
+(juliaseed 0.82617606890462195329 -0.59250450310750061547)
+(maxiter 54)
+(incoloring 1)
+(view -0.083 0.1842 1.753 1.753)
+
diff --git a/examples/ZsKovacs/kovzsi9.xpf b/examples/ZsKovacs/kovzsi9.xpf
new file mode 100644
index 0000000..28b2ff6
--- /dev/null
+++ b/examples/ZsKovacs/kovzsi9.xpf
@@ -0,0 +1,11 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 558734359 0)
+(formula 'barnsley)
+(juliaseed 0.82617606890462195329 -0.59250450310750061547)
+(maxiter 54)
+(incoloring 1)
+(view 0.02737 -0.0569 1.914 1.914)
+
diff --git a/examples/ZsKovacs/light-kovzsi.xpf b/examples/ZsKovacs/light-kovzsi.xpf
new file mode 100644
index 0000000..9676adb
--- /dev/null
+++ b/examples/ZsKovacs/light-kovzsi.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1183407127 0)
+(formula 'barnsley)
+(juliaseed 1.0485101744186047187 -0.041666666666666669341)
+(maxiter 311)
+(outcoloring 1)
+(plane 1)
+(view -3.98 -2.81 20.4 20.4)
+
diff --git a/examples/ZsKovacs/lighting.xpf b/examples/ZsKovacs/lighting.xpf
new file mode 100644
index 0000000..070be29
--- /dev/null
+++ b/examples/ZsKovacs/lighting.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 1844904662 0)
+(formula 'mandel3)
+(maxiter 70)
+(outcoloring 9)
+(incoloring 9)
+(plane 2)
+(view 0.96546 1.24782 0.0181954 0.0181954)
+
diff --git a/examples/ZsKovacs/nap.xpf b/examples/ZsKovacs/nap.xpf
new file mode 100644
index 0000000..a17a7f9
--- /dev/null
+++ b/examples/ZsKovacs/nap.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 2 456523380 0)
+(formula 'mandel)
+(angle 7.2443)
+(outcoloring 1)
+(view -1.94257718068927 -1.7723323966725E-05 8.87044377837973E-11 8.87044386274255E-11)
+
diff --git a/examples/ZsKovacs/orveny.xpf b/examples/ZsKovacs/orveny.xpf
new file mode 100644
index 0000000..27b96cf
--- /dev/null
+++ b/examples/ZsKovacs/orveny.xpf
@@ -0,0 +1,10 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 627993719 0)
+(formula 'mandel)
+(maxiter 144)
+(outcoloring 1)
+(view 0.294492327157 -0.016335566672 2.53190145657E-08 2.53190145654E-08)
+
diff --git a/examples/ZsKovacs/pavaszem.xpf b/examples/ZsKovacs/pavaszem.xpf
new file mode 100644
index 0000000..2979dc2
--- /dev/null
+++ b/examples/ZsKovacs/pavaszem.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1876833598 0)
+(formula 'barnsley)
+(juliaseed 1.0499881996553494467 0.083487582093292521238)
+(maxiter 81)
+(incoloring 1)
+(plane 1)
+(view -0.71363 0.0075101 0.27275 0.27275)
+
diff --git a/examples/ZsKovacs/pavaszem2.xpf b/examples/ZsKovacs/pavaszem2.xpf
new file mode 100644
index 0000000..736ec9f
--- /dev/null
+++ b/examples/ZsKovacs/pavaszem2.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1876833598 0)
+(formula 'barnsley)
+(juliaseed 1.0499881996553494467 0.083487582093292521238)
+(maxiter 81)
+(incoloring 1)
+(plane 1)
+(view -0.656875 -0.00466722 0.0664123 0.0664123)
+
diff --git a/examples/ZsKovacs/pepita.xpf b/examples/ZsKovacs/pepita.xpf
new file mode 100644
index 0000000..d7a7eab
--- /dev/null
+++ b/examples/ZsKovacs/pepita.xpf
@@ -0,0 +1,12 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 3 1787444754 0)
+(formula 'mandel3)
+(maxiter 70)
+(outcoloring 9)
+(incoloring 9)
+(plane 2)
+(view 0.9492169 1.268138 0.008008558 0.008008558)
+
diff --git a/examples/ZsKovacs/zsigapro.xpf b/examples/ZsKovacs/zsigapro.xpf
new file mode 100644
index 0000000..0e37363
--- /dev/null
+++ b/examples/ZsKovacs/zsigapro.xpf
@@ -0,0 +1,14 @@
+;Position file automatically generated by XaoS 3.1
+; - a realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+(initstate)
+(palette 1 1034201341 0)
+(formula 'mandel)
+(juliaseed 0.27541729708396692038 -0.0067143955333554104651)
+(angle -30.559)
+(maxiter 227)
+(outcoloring 2)
+(julia #t)
+(plane 4)
+(view 0.396 0.209 19.1 19.1)
+
diff --git a/examples/nametest.sh b/examples/nametest.sh
new file mode 100755
index 0000000..00669b4
--- /dev/null
+++ b/examples/nametest.sh
@@ -0,0 +1,4 @@
+#!/bin/sh
+# This scripts decides if there are same names in different directories.
+# If yes, we should consider renaming one of the files.
+find -name '*.xpf' -printf "%f\n" | sort | uniq -c | grep -v " 1 "
diff --git a/help/Makefile.in b/help/Makefile.in
new file mode 100644
index 0000000..e793a99
--- /dev/null
+++ b/help/Makefile.in
@@ -0,0 +1,14 @@
+all: rtf html
+
+rtf: xaos.hlp
+ ./rtfconv
+
+chm: xaos.hlp
+ ./winhelpconv
+ hhc xaoshelp.hhp
+
+html: xaos.hlp
+ ./htmlconv
+
+clean:
+ rm -f *.html xaoswin.rtf
diff --git a/help/README b/help/README
new file mode 100644
index 0000000..80fb051
--- /dev/null
+++ b/help/README
@@ -0,0 +1,29 @@
+README file for help/ directory
+-------------------------------
+
+Zoltan Kovacs <kovzol@math.u-szeged.hu>
+
+Last modification information:
+$Header: /home/jblang/XaoS-cvsbackup/XaoS/help/README,v 1.1 2003-02-03 10:16:51 kovzol Exp $
+
+
+This directory contains several files for documentation of XaoS.
+
+The main file is xaos.hlp. From this will all scripts generate
+documentation files.
+
+To create HTML documentation (many .html files), please run
+"make html".
+
+To create TeX documentation (.dvi files) or .info files, go to ../doc
+and type "make".
+
+To create .rtf documentation, type "make rtf" or run "rtfconv.bat" (on
+Windows/CygWin development system). You will need xaoswin.rtf in order
+to generate xaoswin.hlp for your running Windows executable.
+
+To create xaoswin.hlp, you need the HCW package. Note that you also need
+xaoswin.Hpj and xaoswin.rtf (xaoswin.rtf must be generated with
+"make rtf" or using the "rtfconv.bat" utility).
+
+Finally, "make" will generate both .html and .rtf documentation.
diff --git a/help/applehelpconv b/help/applehelpconv
new file mode 100755
index 0000000..051ce1b
--- /dev/null
+++ b/help/applehelpconv
@@ -0,0 +1,77 @@
+#!/bin/sh
+processline()
+{
+ echo "- $1 -"
+ name="$1"
+ anchors="<A NAME=\"$1\"></A>"
+ title=""
+ stylesheet="../style/xaoshelp.css"
+ shift
+ while [ "$1" != "" ] ; do
+ if [ "$1" != "$name" ] ; then
+ anchors="$anchors <A NAME=\"$1\"></A>"
+ fi
+ shift
+ done
+ if [ "$name" == "main" ]; then
+ title='<meta name="AppleTitle" content="XaoS Help">'
+ stylesheet="style/xaoshelp.css"
+ fi
+ # I changed "0" to "$" because my sed
+ # doesn't want to understand "0".
+ # -- Zoltan
+ cat xaos.hlp | sed '/%'"$name"'/H' | sed '1,/%'"$name"'/d;/^%/,$ d' | sed \
+'1,3s_<head>\([^<]*\)</head>_\
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\
+<HTML>\
+<HEAD>\
+ <TITLE>\1</TITLE>\
+ '"$title"'\
+ <LINK HREF="'"$stylesheet"'" REL="stylesheet" TYPE="text/css">\
+</HEAD>\
+<BODY>\
+'"$anchors"'\
+<H1>\1</H1>\
+_g
+s_<head>_<H2>_g
+s_</head>_</H2>_g
+s_<center>__g
+s_</center>__g
+s_<emph>_<STRONG>_g
+s_<submenu>__g
+s_<menuhead>__g
+s_</menuhead>__g
+s_<mainmenu>__g
+s_<main>__g
+s_<math>__g
+s_<menuitems>__g
+s_<notex>__g
+s_</notex>__g
+s_<node.*>__g
+s_</emph>_</STRONG>_g
+s_<tt>_<CODE>_g
+s_</tt>_</CODE>_g
+s_<tutor \([^>]*\)>_<A HREF="help:runscript=/scripts/tutorial.scpt%20string=\1">_g
+s_</tutor>_</A>_g
+s_<a \([^>]*\)>_<A HREF="help:anchor=\1 bookID=XaoS Help">_g
+s/'\'\''/"/g
+s/``/"/g' > $name.html
+ echo "</BODY></HTML>" >> $name.html
+ tidy -qm $name.html
+ case $name in
+ main) mv $name.html XaoSHelp/XaoSHelp.html;;
+ *) mv $name.html XaoSHelp/pages;;
+ esac
+}
+process()
+{
+ while read line ; do
+ eval "processline $line"
+ done
+}
+rm -rf XaoSHelp
+mkdir -p XaoSHelp/{images,pages,scripts,style}
+cp tutorial.scpt XaoSHelp/scripts
+cp xaoshelp.css XaoSHelp/style
+grep "^%" xaos.hlp | sed '/%%/d;s/%//g' | process
+/Developer/Applications/Utilities/Help\ Indexer.app/Contents/MacOS/Help\ Indexer "XaoSHelp" -PantherIndexing YES -IndexAnchors YES -TigerIndexing YES
diff --git a/help/conv b/help/conv
new file mode 100755
index 0000000..2cf3a22
--- /dev/null
+++ b/help/conv
@@ -0,0 +1,118 @@
+#!/bin/sh
+#cut at given keyword
+keyword()
+{
+ # I changed "0" to "\$" because my sed
+ # doesn't want to understand "0".
+ # -- Zoltan
+ sed "1,/^%$1/ d;/^%/,\$ d"
+}
+menus()
+{
+ # I changed "0" to "\$" because my sed
+ # doesn't want to understand "0".
+ # -- Zoltan
+ sed "1,/^%menus/ d;/^%endmenus/,\$ d"
+}
+
+#convert xshl tags into texinfo
+totexinfo1()
+{
+ sed 's/@/@@/g
+ s/^[ ]*//g
+ s/[ ]*$//g
+ s/[ ][ ]*/ /g
+ s/{/@{/g
+ s/}/@}/g
+ s/^%%%*//g
+ s/^\%[a-z_0-9 ]*$//g
+ '
+}
+totexinfo()
+{
+ sed '
+ s/<submenu>//g
+ s/<noprint>/@ifinfo/g
+ s/<\/noprint>/@end ifinfo/g
+ /<menuitems>/, /<\/menuitems>/ s/<p><a \([^>]*\)>\([^<]*\)<\/a>/* \1:: \2/g
+ s/<menuitems>/@menu /g
+ s/<\/menuitems>/@end menu /g
+ s/<tutor [^>]*>//g
+ s/<\/tutor>//g
+ /<notex>/,/<\/notex>/ d
+ s/--/---/g
+ s/^<p><tt>$/\
+\
+@example/g
+ s/^<\/tt><p>$/@end example\
+\
+/g
+ s/<math>/@math{/g
+ s/<\/math>/}/g
+ s/<tt>/@code{/g
+ s/<\/tt>/}/g
+ s/<emph>/@emph{/g
+ s/<\/emph>/}/g
+ s/^<p>$//
+ s/<p>/\
+\
+/g
+ s/<dl>/@table @strong/g
+ s/<\/dl>/@end table/g
+ s/<dt>/@item /g
+ s/<br>//g
+ s/^<dd>//g
+ s/<dd>/\
+/g
+ s/<node \([^,]*\),\([^,]*\),\([^,]*\),\([^>]*\)>/@node \1, \3, \2, \4/g
+ s/<a \([^>]*\)>\(.*\)<\/a>\./\2. @xref{\1}./g
+ s/<a \([^>]*\)>\(.*\)<\/a>/\2/g
+ '
+}
+#convert headers to make new chapter
+chapter()
+{
+ sed '1,/<\/head>/ s/<head>/@chapter /g
+ s/<\/head>//g
+ s/<head>/@section /g
+ '
+}
+menu()
+{
+ sed '
+ s/<p><emph>Syntax<\/emph>:(\([^)]*\))/@defun \1 \
+@end defun/g
+ s/<main><head>/@appendix /g
+ s/<menuhead><head>/@appendixsec /g
+ s/<head>/@appendixsubsec /g
+ s/<center>//g
+ s/<\/center>//g
+ s/<\/head>//g
+ s/<\/main>//g
+ s/<\/menuhead>//g
+ '
+ #s/<main><head>/@chapter /g
+ #s/<menuhead><head>/@section /g
+ #s/<head>/@subsection /g
+ #s/<head>/@unnumberedsubsec /g
+}
+section()
+{
+ sed '1,/<\/head>/ s/<head>/@section /g
+ s/<\/head>//g
+ s/<head>/@subsection /g
+ '
+}
+appendix()
+{
+ sed '1,/<\/head>/ s/<head>/@appendix /g
+ s/<\/head>//g
+ s/<head>/@subsection /g
+ '
+}
+case "$1" in
+chapter) keyword $2 | totexinfo1 | totexinfo | chapter ;;
+section) keyword $2 | totexinfo1 | totexinfo | section ;;
+appendix) keyword $2 | totexinfo1 | totexinfo | appendix ;;
+menus) menus | totexinfo1 | menu | totexinfo ;;
+esac
diff --git a/help/dokuwikiconv b/help/dokuwikiconv
new file mode 100755
index 0000000..83a75c7
--- /dev/null
+++ b/help/dokuwikiconv
@@ -0,0 +1,82 @@
+#!/bin/sh
+processline()
+{
+ echo "- $1 -"
+ name="$1"
+ # I changed "0" to "$" because my sed
+ # doesn't want to understand "0".
+ # -- Zoltan
+ cat xaos.hlp | sed '1,/%'"$1"'/d;/^%/,$ d' | sed \
+'s_<p><tt>_<code>_g
+s_</tt><p>_</code>_g
+s/'\'\''/"/g
+s/``/"/g
+s_LICENSE<p>_LICENSE - _g' | sed \
+'1,2s_<head>\([^<]*\)</head>_====== \1 ======\
+_g
+s_<emph>_**_g
+s_<p>_\
+_g
+s_<head>_===== _g
+s_</head>_ =====\
+_g
+s_<center>__g
+s_</center>__g
+s_<i>_//_g
+s_</i>_//_g
+s_<submenu>__g
+s_<menuhead>__g
+s_</menuhead>__g
+s_<mainmenu>__g
+s_<menuitems>__g
+s_</menuitems>__g
+s_<notex>__g
+s_</notex>__g
+s_<dl>__g
+s_</dl>__g
+s_<dd>__g
+s_</dd>__g
+s_<br>_\
+_g
+s_ [ ]*_ _g
+s_<math>_//_g
+s_</math>_//_g
+s_<dt>_ * _g
+s_</dt>__g
+s_<node.*>__g
+s_</emph>_**_g
+s_<tt>_'\'\''_g
+s_</tt>_'\'\''_g
+s_<tutor [^>]*>_//_g
+s_</tutor>_//_g
+s_<a \([^>]*\)>_[[\1|_g
+s_</a>_]]_g' > $1.txt
+
+ tolower=`echo $1 | awk '{print tolower($1)}'`
+ if [ "$1" != "$tolower" ] ; then
+ ln -sf $1.txt $tolower.txt
+ fi
+
+ shift
+ while [ "$1" != "" ] ; do
+ echo Link "$1" "$name"
+ if [ "$1" != "$name" ] ; then
+ ln -sf $name.txt $1.txt
+ fi
+
+ tolower=`echo $1 | awk '{print tolower($1)}'`
+ if [ "$1" != "$tolower" ] ; then
+ ln -sf $1.txt $tolower.txt
+ fi
+
+
+ shift
+ done
+}
+process()
+{
+ while read line ; do
+ eval "processline $line"
+ done
+}
+grep "^%" xaos.hlp | sed '/%%/d;s/%//g' | process
diff --git a/help/help.jpg b/help/help.jpg
new file mode 100644
index 0000000..b299b1f
--- /dev/null
+++ b/help/help.jpg
Binary files differ
diff --git a/help/hlp2rtf b/help/hlp2rtf
new file mode 100755
index 0000000..a97f2c5
--- /dev/null
+++ b/help/hlp2rtf
@@ -0,0 +1,74 @@
+#!/bin/sh
+echo '{\rtf1
+{\fonttbl
+\f0\fswiss Arial;
+\f1\froman Times New Roman
+\f2\fmodern Courier New;
+\f3\fswiss MS Sans Serif;
+\f4\froman MS Serif;
+}
+\deff0
+\ds18
+'
+ sed '
+ s_\\__g
+ s_'"''"'_"_g
+ s_``_"_g
+ s_</tt>_}_g
+ s/<br>/\\par/g
+ s/<main//g
+ s_</main>__g
+ s/<red>//g
+ s/<math>//g
+ s_</math>__g
+ s/<white>//g
+ s/<black>//g
+ s/<dl>/{\\trgraph360\\cellx2880\\cellx10760 \\intbl\\cell/g
+ s_<dt>_\\cell\\row \\intbl _g
+ s_<dd>_\\cell _g
+ s_</dl>_\\cell\\row\\pard}_g
+ s_</tt>_}_g
+ s/<tt>/{\\f2 /g
+ s/<submenu>/{\\b >}/g
+ s/<menuhead>//g
+ s_</menuhead>__g
+ s/<menuitems>//g
+ s_</notex>__g
+ s/<notex>//g
+ s_</menuitems>__g
+ s/<center>/\\par{\\qc /g
+ s_</center>_\\par}_g
+ s/<tutor [^>]*>/{\\b /g
+ s_</tutor>_}_g
+ s/<emph>/{\\i /g
+ s_</emph>_}_g
+ s/^%%\(.*$\)//g
+ s/^%\(main\)/\\keepn\
+#{\\footnote \1}\
+#{\\footnote CONTENTS}\
+${\\footnote Contents}\
+K{\\footnote Contents}\
+/g
+ s/^%\(.[^ ]*\)\(.*$\)/\\page\
+\\keepn\
+#{\\footnote \1\2}\
+${\\footnote \1}\
+K{\\footnote \1\2}\
+/g
+ s/<p>$/\\par/g
+ s/<p>/\\par /g
+ s/<node.*>//g
+ s/<head>/{\
+\\par\
+\\b\
+\\fs32\
+\\tab\
+/g
+ s_</head>_}\\par\\pard\\sb150 _g
+ s_<a \(.*\)>\(.*\)</a>_{\\uldb \2{\\v \1}}_g
+ s/\(.*\)$/\1 /g
+ s/ / /g
+ s/^ *//g
+ s/ */ /g
+ '
+echo '}'
diff --git a/help/htmlconv b/help/htmlconv
new file mode 100755
index 0000000..caaa6e1
--- /dev/null
+++ b/help/htmlconv
@@ -0,0 +1,60 @@
+#!/bin/sh
+processline()
+{
+ echo "- $1 -"
+ name="$1"
+ # I changed "0" to "$" because my sed
+ # doesn't want to understand "0".
+ # -- Zoltan
+ cat xaos.hlp | sed '1,/%'"$1"'/d;/^%/,$ d' | sed \
+'1,2s_<head>\([^<]*\)</head>_<!-- X-URL: http://xaos.sf.net/help/'"$1"' -->\
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\
+<HTML>\
+<HEAD>\
+ <LINK rev=made href="mailto:jh@ucw.cz">\
+ <META name="description" content="XaoS online help '"$1"'>\
+ <META name="keywords" content="XaoS, realtime, fractal, zoomer">\
+ <TITLE>XaoS online help - \1</TITLE>\
+</HEAD>\
+<BODY BGCOLOR="#ffffff" TEXT="#594941">\
+<CENTER><A HREF="main.html"><IMG BORDER=0 ALT="XaoS online help" SRC="help.jpg"></A>\
+<H1><A NAME="body">\1</A></H1></CENTER>\
+_g
+s_<head>_<center><H2>_g
+s_</head>_</H2></center>_g
+s_<emph>_<strong>_g
+s_<submenu>__g
+s_<menuhead>__g
+s_</menuhead>__g
+s_<mainmenu>__g
+s_<menuitems>__g
+s_<notex>__g
+s_</notex>__g
+s_<node.*>__g
+s_</emph>_</strong>_g
+s_<tt>_<code>_g
+s_</tt>_</code>_g
+s_<tutor [^>]*>_<i>_g
+s_</tutor>_</i>_g
+s_<a \([^>]*\)>_<A HREF="\1.html#body">_g
+s/'\'\''/"/g
+s/``/"/g' > $1.html
+ echo "</BODY></HTML>" >> $1.html
+ shift
+ while [ "$1" != "" ] ; do
+ echo Link "$1" "$name"
+ if [ "$1" != "$name" ] ; then
+ ln -sf $name.html $1.html
+ fi
+ shift
+ done
+}
+process()
+{
+ while read line ; do
+ eval "processline $line"
+ done
+}
+grep "^%" xaos.hlp | sed '/%%/d;s/%//g' | process
+rm -f index.html
+ln -s main.html index.html
diff --git a/help/multfix b/help/multfix
new file mode 100755
index 0000000..e62d369
--- /dev/null
+++ b/help/multfix
@@ -0,0 +1,37 @@
+#!/bin/sh
+sed 's/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g
+s/\(.\){\\footnote \([^ }]*\) \(.*\)}/\1{\\footnote \2}\
+\1{\\footnote \3}\
+/g'
diff --git a/help/rest/Makefile b/help/rest/Makefile
new file mode 100644
index 0000000..7f81b34
--- /dev/null
+++ b/help/rest/Makefile
@@ -0,0 +1,88 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf _build/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html
+ @echo
+ @echo "Build finished. The HTML pages are in _build/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) _build/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in _build/dirhtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) _build/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in _build/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) _build/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in _build/qthelp, like this:"
+ @echo "# qcollectiongenerator _build/qthelp/XaoS.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile _build/qthelp/XaoS.qhc"
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in _build/latex."
+ @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+ "run these through (pdf)latex."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes
+ @echo
+ @echo "The overview file is in _build/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in _build/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) _build/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in _build/doctest/output.txt."
diff --git a/help/rest/X11.txt b/help/rest/X11.txt
new file mode 100644
index 0000000..7653c07
--- /dev/null
+++ b/help/rest/X11.txt
@@ -0,0 +1,31 @@
+.. _X11:
+
+.. index::
+ pair: driver; X11
+ pair: platform; Unix
+
+X11 driver
+==========
+
+This was the first driver done for XaoS. It supports many visuals, shared
+colormaps and MitSHM extension.
+
+Bugs/limitations:
+
+XaoS makes some X servers too busy
+
+ Sometimes XaoS generates images faster than X can display them. In this
+ case XaoS responds poorly to the mouse, and other applications slow down
+ too. This happens especially often on old R4 servers. Use -sync to avoid
+ this problem. Note that -sync does not make all communication with X
+ asynchronous; it just adds one additional XSync call. So the slowdown is
+ not as large as you might expect.
+
+Does not work on all visuals
+
+ This driver supports only 8bpp pseudocolor/grayscales, 15,16,24 and 32bpp
+ truecolor, 1bpp and 8bpp staticolor visuals.
+
+Palette rotating does not work for 8bpp pseudocolor w/o private palette
+
+X11 driver was written by Jan Hubicka and Thomas Marsh, 1997.
diff --git a/help/rest/aa.txt b/help/rest/aa.txt
new file mode 100644
index 0000000..803476c
--- /dev/null
+++ b/help/rest/aa.txt
@@ -0,0 +1,68 @@
+.. index::
+ pair: driver; AA-lib
+ pair: platform; Unix
+
+.. _aa:
+
+AA-lib driver
+=============
+
+The AA driver is currently the most advanced and portable driver for XaoS. It
+is based on AAlib--a high quality ASCII-art library developed by the
+`AA-project`_.
+
+.. _`AA-project`:
+ http://aa-project.sourceforge.net/
+
+It is a fully featured XaoS driver for text mode displays. It supports 256
+colors and the mouse where possible.
+
+It also has some extended features available from the UI menu:
+
+Attributes
+
+ AA-lib may use character attributes to improve image quality. By default it
+ uses normal, dim and bold characters where possible, but you can also
+ enable different attributes like reversed or bold font characters. You may
+ also enable usage of non ansii/reversed characters if your device supports
+ it.
+
+Font
+
+ AA-lib uses a bitmap image of the font to prepare the approximation table
+ used for ASCII art rendering. This bitmap is expected to be same as the one
+ used by your device. AAlib performs detection where possible however some
+ devices (like UNIX text terminals or MDA) do not support this. AAlib has
+ few font images compiled in, so in this case you should try to use one of
+ them to achieve best results.
+
+Inversion
+
+ Some devices use inverse video: use this to get correct results on such
+ devices.
+
+Dithering mode
+
+ Dithering is an way to get more exact color in approximations, by combining
+ more characters; but this method can produce ugly looking noise on certain
+ images. Use this menu to disable or tune it.
+
+Palette options
+
+ By default AA driver uses the XaoS palette to render images, but it quite
+ often looks ugly on text displays. Here you can choose a special text
+ palette instead. Note that with filters enabled, the results may be rather
+ ugly. This function is available from the **palette menu**.
+
+Save text screen
+
+ The normal save function will generate a PNG image instead of nice
+ ASCII-art. To save ASCII art use this function instead. It supports many
+ text file formats like HTML, ANSI, more, etc... It will also ask you for
+ font and attributes(see above). It is available from the **file menu**.
+
+The AA-lib driver also provides the full set of standard AA-lib's command line
+options. You may use them to tune parameters like gamma correction, and so on.
+See xaos -help or the AA-lib documentation for details.
+
+The AA driver was written by Jan Hubicka, 1997.
diff --git a/help/rest/about.txt b/help/rest/about.txt
new file mode 100644
index 0000000..ce2e3f2
--- /dev/null
+++ b/help/rest/about.txt
@@ -0,0 +1,164 @@
+.. _about:
+
+.. index:: About Xaos, Credits, Included Software
+
+About XaoS
+==========
+
+.. toctree::
+
+ background
+ gpl
+ volunteer
+
+XaoS is free software. You are welcome to redistribute it and/or modify it under the terms of
+the :ref:`GNU General Public License <gpl>`. In return, we need :ref:`volunteers <volunteer>` to help
+improve and support XaoS.
+
+Credits
+-------
+
+(alphabetically)
+
+Eric Courteau (ecourteau@cplus.fr)
+ francais.cat (translation of tutorials)
+
+Jean-Pierre Demailly (Jean-Pierre.Demailly@ujf-grenoble.fr)
+ Updates for French translation
+
+Radek Doulik (rodo@atrey.karlin.mff.cuni.cz)
+ TK interface, windowid patches
+
+Martin Dozsa (madsoft@centrum.cz)
+ cs.po (Czech translation of menus)
+
+Arpad Fekete (Fekete.Arpad.2@stud.u-szeged.hu)
+ some new fractals, and the 'More formulae' menu
+
+Tim Goodwin (tgoodwin@cygnus.co.uk)
+ english.cat corrections
+
+Ben Hines
+ autoconf suggestions, Mac OS X port
+
+Jan Hubicka (jh@ucw.cz)
+ Zooming routines, ugly interface, palettes, drivers, autopilot, filters,
+ documentation, tutorials etc.
+
+Jens Kilian (jjk@acm.org)
+ BeOS driver, deutsch.cat
+
+Thomas A. K. Kjaer (takjaer@imv.aau.dk)
+ OS/2 ports (320x200 graphics and AA-lib)
+
+Zoltan Kovacs (kovzol@math.u-szeged.hu)
+ Internationalization, Hungarian translations, finalizing version 3.1, bug
+ fixes, web design, current maintainer
+
+Zsigmond Kovacs (kovzsi@gmail.com)
+ Fractal examples
+
+J.B. Langston III (jb-langston@austin.rr.com)
+ Native Mac OS X port (from version 3.2.2); web redesign; co-maintainer
+
+Andreas Madritsch (amadritsch@datacomm.ch)
+ New fractal types, bailout, many fixes
+
+Mateusz Malczak (xaos@malczak.info)
+ User formula evaluation library
+
+Giorgio Marazzi (gmarazzi@vtr.net)
+ Improvements and fixes for espanhol.cat
+
+Thomas Marsh (thomas.marsh2@gmail.com)
+ First zoomer, formulae, planes, X11 driver, inversions, many ideas
+
+Dominic Mazzoni (dmazzoni@cs.cmu.edu)
+ Macintosh port (version 2.0)
+
+David Meleedy
+ Grammatical and spelling fixed version of xaos.6
+
+Paul Nasca (zynaddsubfx@yahoo.com)
+ Ministatus improvement
+
+Nix (nix@esperi.demon.co.uk)
+ Grammatical and spelling fixed version of xaos.hlp and other files
+
+Terje Pedersen (terjepe@login.eunet.no)
+ Amiga port
+
+Cesar Perez (oroz@users.sourceforge.net)
+ Spanish translations
+
+Fabrice Premel (premelfa@etu.utc.fr)
+ Periodicity checking
+
+Jan Olderdissen (jan@olderdissen.com)
+ Win32 port
+
+Ilinca Sitaru (ilinca.sitaru@gmail.com)
+ Romanian translation
+
+Daniel Skarda
+ Fractal examples
+
+Andrew Stone (Stone Design - www.stone.com)
+ Videator Support, Cocoa improvements, performance mode, bug fixes
+
+Marton Torok (marton.torok@gmail.com)
+ Small fixes for pipes
+
+Pavel Tzekov (paveltz@csoft.bg)
+ Win32 support
+
+Charles Vidal
+ Tcl/Tk interface
+
+Tapio K. Vocaldo (taps@rmx.com)
+ Macintosh port
+
+Tormod Volden
+ Fixes for X11 driver to improve compatability with Xorg, XScreenSaver,
+ Beryl and Compiz
+
+Philippe Wautelet (p.wautelet@fractalzone.be)
+ Bug fixes for version 3.1.1, French translation, gcc 4.0 fixes
+
+Sergio Zanchetta
+ Italian translation
+
+Included Software
+-----------------
+
+XaoS uses the following libraries. These libraries may be included with some
+binary distributions of XaoS.
+
+gettext_
+ | Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc.
+ | License GPLv3+: `GNU GPL version 3 or later`_
+ | This is free software: you are free to change and redistribute it.
+ | There is NO WARRANTY, to the extent permitted by law.
+
+`GNU Scientific Library`_
+ | Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 The GSL Team.
+ | License GPLv3+: `GNU GPL version 3 or later`_
+ | This is free software: you are free to change and redistribute it.
+ | There is NO WARRANTY, to the extent permitted by law.
+
+libpng_
+ | Copyright (c) 1998-2008 Glenn Randers-Pehrson
+ | Copyright (c) 1996-1997 Andreas Dilger
+ | Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+.. _gettext:
+ http://www.gnu.org/software/gettext/
+
+.. _`GNU Scientific Library`:
+ http://www.gnu.org/software/gsl/
+
+.. _libpng:
+ http://www.libpng.org/pub/png/libpng.html
+
+.. _`GNU GPL version 3 or later`:
+ http://gnu.org/licenses/gpl.html \ No newline at end of file
diff --git a/help/rest/addformula.txt b/help/rest/addformula.txt
new file mode 100644
index 0000000..6a19e28
--- /dev/null
+++ b/help/rest/addformula.txt
@@ -0,0 +1,82 @@
+Adding Built-in Formulas
+========================
+
+.. highlight:: c
+
+This provides developers an overview of how XaoS handles built-in formulas
+and how to add one.
+
+Built-in formulas are defined in :file:`/src/engine/formulas.c`.
+
+Defining the Formula
+--------------------
+
+Each formula is defined by a block of ``#defines``, followed by ``#include "docalc.c"``,
+like this::
+
+ #ifdef __i386__
+ #define UNCOMPRESS
+ #endif
+ #define USEHACKS
+ #define PRETEST 0
+ #define FORMULA \
+ rp = zre * (rp - 3 * ip); \
+ zim = zim * (3 * zre * zre - ip) + pim; \
+ zre = rp + pre; \
+ rp = zre * zre; \
+ ip = zim * zim;
+ #define BTEST less_than_4(rp+ip)
+ #define SMOOTH
+ #define SCALC smand3_calc
+ #define SPERI smand3_peri
+ #define CALC mand3_calc
+ #define PERI mand3_peri
+ #define JULIA mand3_julia
+ #define RANGE 2
+ #define RPIP
+ #include "docalc.c"
+
+Every time you include :file:`docalc.c`, it means something different depending
+on how you have defined the macros.
+
+Adding the Formula Description
+------------------------------
+
+After you have defined the macros, there are two other things are to do:
+
+You must put the description of your formula at the end of
+the structure named "formulas". You can make it to be similar to the
+other formula descriptions.
+
+ 1. FORMULAMAGIC
+ 2. CALC function
+ 3. PERI function
+ 4. SCALC function
+ 5. SPERI function
+ 6. JULIA function
+ 7. {"Name of Mandelbrot", "Name of Julia"}
+ 8. "short name"
+ 9. point of view: {x_translate, y_translate, ?, scale}
+ 10. hassymmetry
+ 11. isMandelbrot (or Julia, at startup)
+ 12. pre -- real part of Julia seed
+ 13. pim -- imag part of Julia seed
+ 14. {{}{}... structures about the symmetries of the outcoloring modes}
+ 15. {{}{}... structures about the symmetries of the incoloring modes}
+
+ The symmetry structures take the form:
+ {vertical_symmetry, horizontical_symmetry, size_of_other_symmetries, other_symmetries}
+
+ Horizontical and vertical symmetries can be INT_MAX or 0,
+ INT_MAX means no symmetry, 0 means symmetry
+ The next two is like: {... 2, sym6} {... 2, sym8} or {... 6, sym16}
+
+ 16. some FLAGS, (I still don't know what they mean.)
+
+
+Adding Function Calls to the Formula
+------------------------------------
+
+When this is done, you must put your new functions in the four switch commands at the end of the file.
+
+After compiling XaoS, you should find your fractal at the "More Formulae" menu.
diff --git a/help/rest/animateview.txt b/help/rest/animateview.txt
new file mode 100644
index 0000000..dc54101
--- /dev/null
+++ b/help/rest/animateview.txt
@@ -0,0 +1,18 @@
+.. _animateview:
+
+.. index::
+ pair: command; animateview
+
+Animate view
+============
+
+**Syntax**:(animateview float float float float)
+
+This function is almost identical to function :ref:`view <uiview>`. It expects
+that the view will be changed only slightly, so recalculation is done with
+ANIMATE priority. This means that dynamic resolution is used by default.
+
+Viewport is selected by the center and two radiuses (real and imaginary). See
+:ref:`view <uiview>` for more information.
+
+**Available as**: command
diff --git a/help/rest/animf.txt b/help/rest/animf.txt
new file mode 100644
index 0000000..716979d
--- /dev/null
+++ b/help/rest/animf.txt
@@ -0,0 +1,28 @@
+.. _animf:
+
+.. index::
+ pair: functions; animation
+
+Animation functions
+===================
+
+These functions are used to animate fractal state--to zoom, unzoom and morph
+various parameters. They should be used only in animation files. Animations are
+usually performed for a time selected by an immediately following :ref:`timing
+function <time>`. For example::
+
+ (view 0 0 1 1)
+ (morphview 0 0 2 2)
+ (usleep 5000000)
+
+Will do a 5 second long unzooming animation.
+
+.. toctree::
+
+ animateview
+ smoothmorph
+ morphview
+ morphjulia
+ moveview
+ morphangle
+ zoom
diff --git a/help/rest/animroot.txt b/help/rest/animroot.txt
new file mode 100644
index 0000000..dd04ec7
--- /dev/null
+++ b/help/rest/animroot.txt
@@ -0,0 +1,17 @@
+.. _animroot:
+
+.. index::
+ pair: menu; Animation root
+
+Animation root menu
+===================
+
+This menu is displayed at the top of the screen when animation replay is
+active.
+
+.. toctree::
+
+ file
+ stopreplay
+ ui
+ helpmenu
diff --git a/help/rest/anti.txt b/help/rest/anti.txt
new file mode 100644
index 0000000..8a05848
--- /dev/null
+++ b/help/rest/anti.txt
@@ -0,0 +1,23 @@
+.. _anti:
+
+.. index::
+ pair: command line option; anti
+ pair: menu item; Antialiasing
+ pair: filter; Anitaliasing
+
+Antialiasing
+============
+
+Antialiasing is a technique to increase image quality by eliminating jagged
+edges. XaoS calculates four values for each pixel (on the subpixel boundaries)
+and uses the average of them for the pixel value.
+
+This filter slows XaoS down a **lot** and greatly increases memory
+requirements. It is useful mainly when you want to save images and want to make
+them look as nice as possible. Antialiasing also helps a lot when you want to
+encode JPEG or MPEG files; they are much shorter if antialiased (MPEG and JPEG
+hate jagged edges).
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/autopilot.txt b/help/rest/autopilot.txt
new file mode 100644
index 0000000..31cb159
--- /dev/null
+++ b/help/rest/autopilot.txt
@@ -0,0 +1,24 @@
+.. _autopilot:
+
+.. index::
+ pair: menu item; Autopilot
+ pair: command line option; autopilot
+ pair: command; autopilot
+
+Autopilot
+=========
+
+**Syntax**:(autopilot bool)
+
+To make XaoS yet more impressive, we made a special autopilot mode that
+automatically drives into interesting boundaries of the set; you should press
+A, play your favorite music, drink coffee and relax. I never tried this but it
+should be really relaxing! Many pictures in the XaoS gallery were discovered
+using the autopilot.
+
+The autopilot also has some additional features. It backtracks if the zoomed
+picture is not interesting anymore, and can detect when it's zoomed into really
+a boring part of the fractal or reached the limit of floating point arithmetic
+on the platform, and restart zooming from the top.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/background.txt b/help/rest/background.txt
new file mode 100644
index 0000000..db61062
--- /dev/null
+++ b/help/rest/background.txt
@@ -0,0 +1,49 @@
+.. index:: Background
+
+Background
+==========
+
+What is XaoS?
+-------------
+
+XaoS is a realtime interactive fractal zoomer. This means that it lets you
+zoom smoothly into any place in the fractal you choose without the many hours
+of calculation required by most other fractal generators. It now has many
+other features too, like different fractal types, autopilot, special coloring
+modes, support for various bit depths (8bpp, truecolor, hicolor and realcolor),
+random palette generation, color cycling, etc.
+
+Why yet another fractal generator?
+----------------------------------
+
+We decided to make XaoS, because all fractal browsers we know of take a
+long time to calculate each image. You may browse nice images
+generated by them but real impressions of fractals --- the self
+similarity and infinite zooming into the nice parts of fractals ---
+can be seen only in animations. There are many programs available that
+make nice animations, but they take a long time to calculate and lots
+of space on disk. Most such animations are quite ugly because their
+authors can't see them without many hours of calculations.
+
+A natural question is: is it possible to generate such animations in
+real-time? The answer was negative for many years, since the Mandelbrot set is
+very computationally expensive. Things are changing. Today's computers
+are fast enough to calculate approx. 10.000 of pixels per frame,
+which is enough
+for a very low resolution animation (100x100). Several programs doing that
+are available. But 100x100 animation still looks quite ugly. To make
+animation nice you need at least 320x200 pixels. And that is 6 times more!
+One possibility is to wait until computers will be fast enough, but
+it will take many years, and then 320x200 animations will be obsolete
+and everyone will want 1024x768 resolution instead or more.
+
+We found a special algorithm that saves up to 99.98% of calculations during
+zooming by reusing pixels already calculated in previous frames. There were
+some programs doing similiar tricks before but we don't know about any able
+to do zooming interactively with a speed similar to XaoS. Many other tricks
+were later implemented XaoS to achieve yet higher framerates. Now XaoS does
+up to 120 frames per second on a 120Mhz pentium in a fullscreen 320x200
+animation, and calculates an average of 160 (0.24%) pixels per frame. This makes
+XaoS fast enough to achieve its primary goal, realtime animation, but there
+are still many areas that could improve, since more complex fractals,
+higher resolutions, or slower computers still bring many problems.
diff --git a/help/rest/bailout.txt b/help/rest/bailout.txt
new file mode 100644
index 0000000..38ca4b8
--- /dev/null
+++ b/help/rest/bailout.txt
@@ -0,0 +1,30 @@
+.. _bailout:
+
+.. index::
+ pair: menu item; Bailout
+ pair: command line option; bailout
+ pair: command; bailout
+
+Bailout
+=======
+
+Bailout is the value which is checked for each point of the orbit if the point
+is far enough from the complex zero point in the current iteration. If the
+point is far enough, then the iteration immediately stops and the starting
+point on the screen will be painted with a given colour, depending on the
+fractal type and many other settings.
+
+For the :ref:`Mandelbrot set <mandel>` this value is 4. Other fractal types
+usually have the same bailout value. For most fractals many bailout values give
+more or less similar output. E.g., for the second order Mandelbrot set one can
+prove that the sequence \|z\| (z:=z^2+c) tends to infinity if and only if \|z\|>2
+for some element z of this sequence. In XaoS program, Bailout value is the
+square of this 2, i.e. you can change this to any value greater than 2 for
+similar results.
+
+Other fractal types may use other bailout values. The default is 4 for each
+types.
+
+**Available as**: menu item, command line option, command
+
+**Syntax**:(bailout float)
diff --git a/help/rest/barnsley.txt b/help/rest/barnsley.txt
new file mode 100644
index 0000000..2bc3aef
--- /dev/null
+++ b/help/rest/barnsley.txt
@@ -0,0 +1,14 @@
+.. _barnsley:
+
+.. index::
+ pair: menu item; Barnsley1
+ pair: command line option; barnsley
+ pair: formula; Barnsley1
+
+Barnsley1
+=========
+
+This is a formula by Michael Barnsley. It produces very nice crystalline Julia
+sets. See the :tutor:`tutorial chapter <barnsley.xaf>`.
+
+**Available as**: menu item, command line option
diff --git a/help/rest/blur.txt b/help/rest/blur.txt
new file mode 100644
index 0000000..691ba3a
--- /dev/null
+++ b/help/rest/blur.txt
@@ -0,0 +1,18 @@
+.. _blur:
+
+.. index::
+ pair: menu item; Motion blur
+ pair: command line option; blur
+ pair: filter; Motion blur
+
+Motion blur
+===========
+
+Motion blur mixes the current frame with previous ones to produce a motion-blur
+effect. It might be rather slow in 16bpp truecolor modes. The best results can
+probably be seen in 8bpp modes, so you might want to enable the :ref:`palette
+filter <palettef>` first.
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/calc.txt b/help/rest/calc.txt
new file mode 100644
index 0000000..c22dd29
--- /dev/null
+++ b/help/rest/calc.txt
@@ -0,0 +1,21 @@
+.. _calc:
+
+.. index::
+ pair: menu; Calculation
+
+Calculation
+===========
+
+This menu contains functions that control calculation parameters such as the
+maximum iteration count and periodicity checking.
+
+.. toctree::
+
+ range
+ dynamic
+ periodicity
+ maxiter
+ bailout
+ fastjulia
+ dynamic
+ rotate
diff --git a/help/rest/clearline.txt b/help/rest/clearline.txt
new file mode 100644
index 0000000..7082b48
--- /dev/null
+++ b/help/rest/clearline.txt
@@ -0,0 +1,13 @@
+.. _clearline:
+
+.. index::
+ pair: command; clearline
+
+Clear line
+==========
+
+**Syntax**:(clearline)
+
+Clear current line. This function also increases the line key.
+
+**Available as**: command
diff --git a/help/rest/clearlines.txt b/help/rest/clearlines.txt
new file mode 100644
index 0000000..7bb9b46
--- /dev/null
+++ b/help/rest/clearlines.txt
@@ -0,0 +1,14 @@
+.. _clearlines:
+
+.. index::
+ pair: command; clearlines
+
+Clear all lines
+===============
+
+**Syntax**:(clearlines)
+
+Clear all displayed lines. Lines can also be cleared using the clearscreen or
+display commands available from the :ref:`Misc menu <misc>`.
+
+**Available as**: command
diff --git a/help/rest/clearscreen.txt b/help/rest/clearscreen.txt
new file mode 100644
index 0000000..b653062
--- /dev/null
+++ b/help/rest/clearscreen.txt
@@ -0,0 +1,15 @@
+.. _clearscreen:
+
+.. index::
+ pair: menu item; Clear screen
+ pair: command; clearscreen
+
+Clear screen
+============
+
+**Syntax**:(clearscreen)
+
+Clear the screen. To display the fractal again, use :ref:`display <display>`.
+This function is mainly useful in tutorials and similar animations.
+
+**Available as**: menu item, command
diff --git a/help/rest/cocoa.txt b/help/rest/cocoa.txt
new file mode 100644
index 0000000..e17ce52
--- /dev/null
+++ b/help/rest/cocoa.txt
@@ -0,0 +1,95 @@
+.. _cocoa:
+
+.. index::
+ pair: driver; Cocoa
+ pair: platform; Mac OS X
+
+Mac OS X
+========
+
+XaoS has full support for Mac OS X including native menus, dialogs, help,
+Finder integration, drag and drop, and basic AppleScript support.
+
+The Mac OS X port of XaoS strives to provide a Mac-like experience, while
+retaining compatibility with other platforms. Some Mac-specific details are
+outlined below.
+
+Zooming
+-------
+
+Since most Macs have one button mice, the middle and right buttons are emulated
+with modifier keys. This means there are multiple ways to perform basic zooming
+operations:
+
+Zoom in
+
+ Hold down the main mouse button.
+
+Zoom out
+
+ 1. Hold down the Ctrl key while pressing the main mouse button. 2. Use the
+ right mouse button if you have one. 3. On laptops with gestures enabled,
+ place two fingers on your trackpad and press the main mouse button.
+
+Pan
+
+ 1. Hold down the Shift key while dragging with the main mouse button. 2.
+ Drag with the center button if you have one. 3. Use the scroll wheel or
+ ball if you have one to pan up/down and left/right. 4. On laptops with
+ gestures enabled, swipe two fingers across the trackpad to pan horizontally
+ or vertically.
+
+Keyboard Shortcuts
+------------------
+
+XaoS menu functions have been mapped to commonly used Mac keyboard shortcuts.
+For example, Open is Cmd-O and Undo is Cmd-Z, just as you would expect.
+
+However, XaoS also has its own long-standing tradition of cross-platform
+keyboard shortcuts. These keyboard shortcuts are also displayed in the menus
+inside parentheses. For example, the menu item "Autopilot (a)" means that you
+can press a (with no modifier keys) to activate Autopilot. All of these
+traditional XaoS shortcuts do not use modifier keys, so they do not conflict
+with any standard Mac OS X shortcuts.
+
+In some cases, the same function may be performed with both a traditional XaoS
+shortcut and a Mac OS X-specific shortcut. You can choose whichever one is more
+comfortable for you.
+
+Full Screen Mode
+----------------
+
+The Mac OS X port supports a full screen mode. To enter it, select **Mac OS X
+Full Screen Driver** from the **UI -> Driver** submenu. Once you enter full
+screen mode, the menu bar will automatically hide. To access the menu bar, move
+your mouse to the top of the screen and the menu bar will slide into view. When
+you move your mouse away, it will automatically disappear again. To return to
+windowed mode, select **Mac OS X Windowed Driver** from the **UI -> Driver**
+submenu.
+
+Videator Support
+----------------
+
+XaoS for Mac OS X can send a live video stream to Stone Design's Videator_,
+which can then do post-processing using Mac OS
+X's core video technology. This combination creates mind-blowing visuals that
+are great for VJing (live video performance art).
+
+.. _Videator:
+ http://stone.com/Videator/
+
+To turn on output to Videator, select **Videator Output** from the **UI** menu.
+See these instructions_ for more details on using Videator with XaoS.
+
+.. _instructions:
+ http://stone.com/Videator/VJ.html
+
+Known Issues
+------------
+
+Catseye fractal does not render properly.
+
+ Workaround: Set the bailout to just over 4 (e.g., 4.000000001). After
+ changing this setting, the fractal renders as expected.
+
+The Mac OS X driver was written by J.B. Langston, 2006-2008.
diff --git a/help/rest/color.txt b/help/rest/color.txt
new file mode 100644
index 0000000..e71a19c
--- /dev/null
+++ b/help/rest/color.txt
@@ -0,0 +1,17 @@
+.. _color:
+
+.. index::
+ pair: menu item; Color
+ pair: command line option; color
+ pair: command; color
+
+
+Color
+=====
+
+**Syntax**:(color keyword)
+
+Change text and line color. **keyword** should be one of 'white, 'black and
+'red.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/command.txt b/help/rest/command.txt
new file mode 100644
index 0000000..d62c14f
--- /dev/null
+++ b/help/rest/command.txt
@@ -0,0 +1,15 @@
+.. _command:
+
+.. index::
+ pair: menu item; Command
+ pair: command; command
+
+Command
+=======
+
+You can invoke all XaoS functions using a simple command language reminiscent
+of Scheme. This option lets you run a single command. If you want to run more
+than one, you might want to use an :ref:`XaoS animation file <format>` instead;
+they are written in the same language.
+
+**Available as**: menu item
diff --git a/help/rest/conf.py b/help/rest/conf.py
new file mode 100644
index 0000000..b6f6d5b
--- /dev/null
+++ b/help/rest/conf.py
@@ -0,0 +1,194 @@
+# -*- coding: utf-8 -*-
+#
+# XaoS documentation build configuration file, created by
+# sphinx-quickstart on Tue Mar 31 21:07:33 2009.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+sys.path.append(os.path.abspath('.'))
+
+# -- General configuration -----------------------------------------------------
+
+# Add any Sphinx extension module names here, as strings. They can be extensions
+# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
+extensions = ['sphinx.ext.todo', 'sphinx.ext.pngmath', 'xaosspecific']
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.txt'
+
+# The encoding of source files.
+#source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'XaoS'
+copyright = u'2009, XaoS Development Team'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '4.0'
+# The full version, including alpha/beta/rc tags.
+release = '4.0'
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar. Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_use_modindex = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it. The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'XaoSdoc'
+
+
+# -- Options for LaTeX output --------------------------------------------------
+
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
+
+# The font size ('10pt', '11pt' or '12pt').
+#latex_font_size = '10pt'
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title, author, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'XaoS.tex', u'XaoS Documentation',
+ u'XaoS Development Team', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_use_modindex = True
diff --git a/help/rest/controls.txt b/help/rest/controls.txt
new file mode 100644
index 0000000..6afdd64
--- /dev/null
+++ b/help/rest/controls.txt
@@ -0,0 +1,55 @@
+.. _controls:
+
+.. index:: Basic Controls
+
+Basic Controls
+==============
+
+You can use the mouse to zoom in and out. The pan function allows you to drag and drop the image in any direction to change the center without zooming in or out. The button you press determines the action performed:
+
+========================= ================================== =========================
+Action Mouse Button Mac Equivalent
+========================= ================================== =========================
+Zoom in :kbd:`Left` :kbd:`Click`
+Zoom out :kbd:`Right` :kbd:`Ctrl+Click`
+Pan :kbd:`Center` or :kbd:`Left+Right` :kbd:`Shift+Click`
+========================= ================================== =========================
+
+On Macs with a single button mouse, use the Mac equivalents to simulate the other buttons. XaoS offers two additional ways to pan on a Mac:
+
+* On a Mac laptop, `swipe two fingers`__ across your trackpad to pan in any direction.
+* If you have a Mighty Mouse, you can pan the image using your scroll ball.
+
+__ http://support.apple.com/kb/HT3448
+
+.. note::
+
+ The behavior of the mouse buttons can change when special modes are enabled.
+ If you enable rotation, the first button is used to rotate the image. Also,
+ in fast Julia mode, the first button is used to change the seed.
+
+
+After few minutes of zooming you will probably exceed the precision and the
+fractals will get boring. If you are getting strange big rectangles on the
+screen, you probably reached the numeric limit: there is no way to avoid this
+except un-zoom back and choose a different area. It doesn't hurt so much, since
+you have zoomed approximately 64 051 194 700 380 384 times, so there are quite
+a lot of areas to explore. Algorithms with unlimited precision exist, but they
+are still too slow for real-time zooming.
+
+The other possibility is that you have reached the iteration limit. The fractal
+is calculated approximately, and in this case you need to increase number of
+iterations used for approximation (and decrease the speed in the process). This
+is done from the menu or using the arrow keys **Left** and **Right**.
+
+An **Up** and **Down** keys should be used to change zooming speed. Note that
+higher speed costs more and image will be blocky.
+
+This behavior can also change. With palette cycling enabled, **Left** and
+**Right** keys change cycling speed; in continuous rotation they change
+rotation speed.
+
+All other functions are available from the menu, which (in the default
+configuration) are displayed when you move the mouse to the top of the
+screen/window. It is useful to learn the shortcut keys, which are shown in gray
+next to the menu items they trigger.
diff --git a/help/rest/copy.txt b/help/rest/copy.txt
new file mode 100644
index 0000000..adc0904
--- /dev/null
+++ b/help/rest/copy.txt
@@ -0,0 +1,13 @@
+.. _copy:
+
+.. index::
+ pair: menu item; Copy
+
+Copy
+====
+
+Copy fractal to clipboard. This is a platform-dependent operation that may not
+have an analogue on your platform (e.g. there is no concept of a clipboard
+under aalib).
+
+**Available as**: menu item
diff --git a/help/rest/cycling.txt b/help/rest/cycling.txt
new file mode 100644
index 0000000..c0ed5fe
--- /dev/null
+++ b/help/rest/cycling.txt
@@ -0,0 +1,41 @@
+.. index::
+ pair: menu item; Color cycling
+ pair: command line option; cycling
+ pair: command; cycling
+ pair: menu item; Reversed color cycling
+ pair: command line option; rcycling
+ pair: command; rcycling
+ pair: menu item; Color cycling speed
+ pair: command; cyclingspeed
+ pair: command line option; cyclingspeed
+
+.. _cycling:
+.. _rcycling:
+.. _cyclingspeed:
+
+Color cycling
+=============
+
+**Syntax**:(cycling bool)
+
+Color cycling is an old and simple effect to animate fractals. The Mandelbrot
+set looks particularly nice when color-cycled. On truecolor displays, color
+cycling fails to initialize (since those displays don't have a palette). You
+can enable :ref:`palette emulation filter <palettef>` to make it possible.
+
+**Available as**: menu item, command line option, command
+
+In the user interface, colors can also be cycled in the opposite direction with
+the "**Reversed color cycling**" function.
+
+To control the cycling speed, you coan use arrow keys or the "**Color cycling
+speed**" function.
+
+**Available as**: menu item
+
+**Syntax**:(cyclingspeed integer)
+
+The parameter specifies the number of skips per second. It can be negative to
+cycle in the opposite direction.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/dX-fullscreen.txt b/help/rest/dX-fullscreen.txt
new file mode 100644
index 0000000..43b39ba
--- /dev/null
+++ b/help/rest/dX-fullscreen.txt
@@ -0,0 +1,30 @@
+.. _dX-fullscreen:
+
+.. index::
+ pair: driver; DirectX fullscreen
+ pair: platform; Windows
+
+DirectX fullscreen driver
+=========================
+
+This is da river for Windows 9x and NT. It is new since version 3.1 and because
+of some oddities of Windows API and kludges in DirectX it may be rather
+unstable. Please report all bugs. In case of problems you could use the DOS
+version of XaoS instead.
+
+This driver allows the Windows port of XaoS to run in full screen mode. The
+driver supports 256, 65536 and 16777216 color modes (24bpp and 32bpp) in all
+resolutions supported by DirectX. You can change graphics mode by pressing the
+= key (or by using the UI/Resize menu). If the selected mode is not supported,
+the driver will restore the previous setting.
+
+Use the -mode WIDTHxHEIGHTxDEPTH (like -mode 640x480x16) command line option to
+change graphics mode.
+
+If you want to start XaoS in DirectX, use the -driver dX-fullscreen option.
+
+See the :ref:`Win32 driver <win32>` documentation for some more Windows
+releated information.
+
+DirectX driver was written by Jan Hubicka, Jan Olderdissen and Pavel Tzekov,
+1999.
diff --git a/help/rest/dX-window.txt b/help/rest/dX-window.txt
new file mode 100644
index 0000000..2e7ba6e
--- /dev/null
+++ b/help/rest/dX-window.txt
@@ -0,0 +1,30 @@
+.. _dX-window:
+
+.. index::
+ pair: driver; DirectX windowed
+ pair: platform; Windows
+
+DirectX windowed driver
+=======================
+
+This is a driver for Windows 9x and NT. It is new since version 3.1 and because
+of some oddities of Windows API and kludges in DirectX it may be rather
+unstable. Please report all bugs. In case of problems you could use the DOS
+version of XaoS instead.
+
+The DirectX driver is an alternative to the windowed :ref:`win32 driver
+<win32>`. If you have DirectX installed, this driver is used by default. It has
+almost the same behaviour as the :ref:`win32 driver <win32>` so please read its
+documentation for more details. The only difference should be the display
+speed.
+
+The driver supports only hicolor and truecolor modes. There is no support for
+256 and 16 color modes because of palette collision problems. The win32 driver
+will be used in these cases by default, so this should cause no problems.
+
+If you are experiencing problems with this driver, you might want to use the
+:ref:`win32 driver <win32>` by default; to do this, use the -driver win32
+command line option.
+
+DirectX driver was written by Jan Hubicka, Jan Olderdissen and Pavel Tzekov,
+1999.
diff --git a/help/rest/defpalette.txt b/help/rest/defpalette.txt
new file mode 100644
index 0000000..4b08ae9
--- /dev/null
+++ b/help/rest/defpalette.txt
@@ -0,0 +1,20 @@
+.. _defpalette:
+
+.. index::
+ pair: menu item; Default palette
+ pair: command line option; defaultpalette
+ pair: command; defaultpalette
+
+Default palette
+===============
+
+**Syntax**:(defaultpalette number)
+
+Create a default palette. In the scripting language, number specifies how much
+the palette is shifted by.
+
+Note that changing the palette in truecolor modes forces recalculation of the
+whole screen. To avoid this, you can enable the :ref:`palette emulation filter
+<palettef>` first.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/devel.txt b/help/rest/devel.txt
new file mode 100644
index 0000000..e51596f
--- /dev/null
+++ b/help/rest/devel.txt
@@ -0,0 +1,20 @@
+.. _devel:
+
+.. index:: Development
+
+If you want to do some development, you are encouraged to send your work back
+to the :ref:`authors <about>`; if it is well done, it will be added to the next
+release. All changes should be submitted to the SourceForge patch tracker:
+http://sourceforge.net/tracker/?group_id=5771&atid=305771
+
+XaoS is quite easily extensible. You might want to read a bit about its
+internals in the file **doc/xaosdev.info**. XaoS is also portable, so if it
+doesn't work on your favorite platform (or there is just an old version
+available), you could quite easily port it.
+
+
+.. toctree::
+
+ writehelp
+ xaosdev
+ addformula
diff --git a/help/rest/display.txt b/help/rest/display.txt
new file mode 100644
index 0000000..1d74885
--- /dev/null
+++ b/help/rest/display.txt
@@ -0,0 +1,15 @@
+.. _display:
+
+.. index::
+ pair: menu item; Display fractal
+ pair: command; display
+
+Display fractal
+===============
+
+**Syntax**:(display)
+
+Display fractal. This functions reverses the effect of the clearscreen, line
+drawing and text output functions.
+
+**Available as**: menu item, command
diff --git a/help/rest/drivers.txt b/help/rest/drivers.txt
new file mode 100644
index 0000000..aec5442
--- /dev/null
+++ b/help/rest/drivers.txt
@@ -0,0 +1,19 @@
+.. _drivers:
+
+.. index:: Platforms, Drivers
+
+Platform-specific documentation
+===============================
+
+XaoS is portable and works on many different platforms. Since not all platforms
+are exactly the same, there are some differences between the behavior of XaoS
+on different platforms. Here is documentation about each specific port.
+
+.. toctree::
+
+ cocoa
+ win32
+ dX-window
+ dX-fullscreen
+ X11
+ aa
diff --git a/help/rest/dynamic.txt b/help/rest/dynamic.txt
new file mode 100644
index 0000000..85b5e8a
--- /dev/null
+++ b/help/rest/dynamic.txt
@@ -0,0 +1,36 @@
+.. _dynamic:
+.. _nodynamic:
+.. _dynamicanimation:
+.. _dynamicnew:
+.. _fastmode:
+
+.. index::
+ pair: menu item; Dynamic resolution
+ pair: command line option; fastmode
+ pair: command; fastmode
+
+Dynamic resolution
+==================
+
+**Syntax**:(fastmode keyword)
+
+XaoS performs many optimizations, but fairly often this is not enough. In order
+to keep a high framerate, XaoS automatically lowers the resolution of the
+image, increasing it when there is time for more calculation. This feature is
+enabled by default when animating, but you might also like to enable it for new
+images (which makes the image 'come into focus' when it is recalculated from
+scratch for whatever reason), or disable it completely if you don't like it.
+
+In the scripting languge, the keyword should be one of the following:
+
+'never
+
+ Disable dynamic resolution
+
+'animate
+
+ Use only for animations (default)
+
+'new
+
+ Use also for new images
diff --git a/help/rest/edge.txt b/help/rest/edge.txt
new file mode 100644
index 0000000..eb185f3
--- /dev/null
+++ b/help/rest/edge.txt
@@ -0,0 +1,20 @@
+.. _edge:
+
+.. index::
+ pair: command line option; edge
+ pair: menu item; Edge detection
+ pair: filter; Edge detection
+
+Edge detection
+==============
+
+This filter is a standard edge detection algorithm; solid areas are filled in
+black. Some fractals look very interesting with this filter (and some areas of
+some fractals just look like noise). This version of the filter produces
+relatively wide lines, so is useful at higher resolutions. The filter
+:ref:`edge detection2 <edge2>` makes thinner lines, for the low resolution
+modes.
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/edge2.txt b/help/rest/edge2.txt
new file mode 100644
index 0000000..1a8253f
--- /dev/null
+++ b/help/rest/edge2.txt
@@ -0,0 +1,20 @@
+.. _edge2:
+
+.. index::
+ pair: command line option; edge2
+ pair: menu item; Edge detection2
+ pair: filter; Edge detection2
+
+Edge detection2
+===============
+
+This filter is a standard edge detection algorithm; solid areas are filled in
+black. Some fractals look very interesting with this filter (and some areas of
+some fractals just look like noise). This version of the filter produces
+relatively tight lines, so is useful at lower resolutions. The filter
+:ref:`edge detection <edge>` makes thinner lines, for the high resolution
+modes.
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/edit.txt b/help/rest/edit.txt
new file mode 100644
index 0000000..7d54a16
--- /dev/null
+++ b/help/rest/edit.txt
@@ -0,0 +1,16 @@
+.. _edit:
+
+.. index::
+ pair: menu; Edit
+
+Edit
+====
+
+A fairly ordinary Edit menu.
+
+.. toctree::
+
+ undo
+ redo
+ copy
+ paste
diff --git a/help/rest/emboss.txt b/help/rest/emboss.txt
new file mode 100644
index 0000000..393fbd6
--- /dev/null
+++ b/help/rest/emboss.txt
@@ -0,0 +1,17 @@
+.. _emboss:
+
+.. index::
+ pair: command line option; emboss
+ pair: menu item; Emboss
+ pair: filter; Emboss
+
+Emboss
+======
+
+This is a standard emboss filter, as seen in programs such as the GIMP or
+Photoshop. It produces especially nice results with the smooth
+:ref:`outcoloring mode <outcoloring>`.
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/fastjulia.txt b/help/rest/fastjulia.txt
new file mode 100644
index 0000000..fd5b7f6
--- /dev/null
+++ b/help/rest/fastjulia.txt
@@ -0,0 +1,23 @@
+.. _fastjulia:
+
+.. index::
+ pair: menu item; Fast Julia mode
+ pair: command line option; fastjulia
+ pair: command; fastjulia
+
+Fast Julia mode
+===============
+
+**Syntax**:(fastjulia bool)
+
+By default, changing the seed for the Julia set requires recalculation of the
+image (which is quite slow). It's a nice effect to change the seed smoothly and
+show the Julia set morphing as the seed changes. XaoS has a special algorithm
+which can calculate such morphings in realtime. It is very inexact, but it is
+good enough for a fast preview.
+
+If you want to select a good seedpoint, enable fast Julia mode and find a nice
+place by dragging with the first mouse button depressed; then change to the
+:ref:`Julia mode <uimandelbrot>` to see the exact image.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/file.txt b/help/rest/file.txt
new file mode 100644
index 0000000..c1e3cee
--- /dev/null
+++ b/help/rest/file.txt
@@ -0,0 +1,18 @@
+.. _file:
+
+.. index::
+ pair: menu; File
+
+File
+====
+
+.. toctree::
+
+ loadpos
+ savepos
+ record
+ play
+ saveimg
+ loadexample
+ savecfg
+ quit
diff --git a/help/rest/filter.txt b/help/rest/filter.txt
new file mode 100644
index 0000000..b2c09c6
--- /dev/null
+++ b/help/rest/filter.txt
@@ -0,0 +1,54 @@
+.. _filter:
+
+.. index::
+ pair: command; filter
+
+Filter command
+==============
+
+**Syntax**:(filter keyword bool)
+
+This command is used to enable or disable :ref:`filters <mfilter>`. The
+**keyword** specifies the filter to change, and should be one of the following:
+
+'edge
+
+ :ref:`Edge detection <edge>`
+
+'edge2
+
+ :ref:`Edge detection2 <edge2>`
+
+'starfield
+
+ :ref:`Starfield <starfield>`
+
+'stereogram
+
+ :ref:`Random dot stereogram <stereogram>`
+
+'interlace
+
+ :ref:`Interlace filter <interlace>`
+
+'blur
+
+ :ref:`Motion blur <blur>`
+
+'emboss
+
+ :ref:`Emboss <emboss>`
+
+'palette
+
+ :ref:`Palette emulator <palette>`
+
+'anti
+
+ :ref:`Antialiasing <anti>`
+
+'truecolor
+
+ :ref:`Truecolor <truecolor>`
+
+**Available as**: command
diff --git a/help/rest/format.txt b/help/rest/format.txt
new file mode 100644
index 0000000..1972704
--- /dev/null
+++ b/help/rest/format.txt
@@ -0,0 +1,136 @@
+.. _format:
+
+.. index::
+ pair: file; format
+
+File Format
+===========
+
+.. highlight:: scheme
+
+This section describes the format used by XaoS for animations, configuration
+files and saved positions. All these files have a common format, designed to be
+easily readable, to allow manual editing of files and easy conversion by other
+programs.
+
+I also taken care to make it easily extensible for future versions of XaoS so I
+hope there will not be many incompatibilities between various XaoS versions.
+
+The format is a simple set of commands executed sequentially. XaoS does not
+provide any variables/cycles as usual scripting languages do, but future
+extension to full-blown Scheme should be easy since the format uses Scheme-like
+syntax. The syntax of every command is::
+
+ (command_name [param1] [param2])
+
+where parameters are optional and separated by whitespace (an arbitrary number
+of spaces, tabs and newlines). The parameters can have the following types:
+
+integer
+ number w/o decimal point (123)
+
+float
+ floating point number in decimal notation with optional exponent (1.23E2)
+
+keyword
+ text started by quote '. It is used to pass various string constants like
+ formula name ('mandel) Quote is required for scheme compatibility
+
+string
+ Text inside double quotes. The only parameter that should contain
+ whitespace
+
+boolean
+ #t for true or #f for false
+
+There is a complete description of all XaoS functions (with some examples) and
+an index of functions in the :ref:`XaoS registry <menus>`. You may particularly want to
+read about the :ref:`animation functions <animf>`. Also, the following functions are
+significant:
+
+load
+ This function loads and interprets a file. It works similarly to #include
+ in C.
+
+initstate
+ Available in version 3.0 and above, this function resets XaoS's state to
+ default values. This command should be at the beginning of each animation
+ file, since otherwise some stuff previously enabled by user could cause
+ unexpected effects. State is not reset by default before playing animations
+ since it would make it impossible to write macros. Current versions don't
+ really need macros, but in future versions, when the Scheme programming
+ language will be available, this should be a much more interesting subject.
+
+usleep
+ This function waits for a selected amount of time(in usec) before
+ processing the next command. The screen is recalculated and displayed at
+ the beginning of the sleep if necessary. The remaining time is spent by
+ waiting, calculating if necessary, or performing any animation you entered
+ via animation commands.
+
+wait
+ Waits until the animation or image rendering is complete. Do not call this
+ function when zoom, or continuous rotation is active otherwise deadlock
+ happens. It is a good idea to call it immediately before text subtitles are
+ displayed, since it looks ugly when they are displayed over a blocky
+ unfinished fractal. Because the degree of blockiness at a given instant is
+ a function of your machine speed, it may look nice for you but ugly for
+ others with slower machines. Also you should call this after an animation
+ is performed, before the switch to another fractal happens; since the
+ switch involves calculation, the screen is stopped for a while and an
+ unfinished fractal there looks ugly. You should also call it, when you want
+ to do something as soon as possible.
+
+Example::
+
+ ;configure everything for the first frame
+ (inistate)
+ (palette 1 1163254293 0) ;custom palette
+ (cycling #t) ;enable cycling
+ (cyclingspeed 7)
+ (maxiter 276) ;higher number of iterations
+ (range 3) ;default range for solid guessing
+ (usleep 1000000) ;second frame starts here
+ (moveview -1.8101154154614007889 -8.2687205907162041209E-05)
+ ;just move the image
+ (usleep 1000000) ;third frame
+ (morphview -1.8101154154614007889 -8.2687205907162041209E-05
+ 6.277210971069452361E-10 6.2772109785334669875E-10)
+ ;10 seconds of zooming into selected
+ rectangle
+ (usleep 100000000)
+
+The best way to learn XaoS command language is probably to read position files
+and modify them. For example, to create zooming animation from the original
+file::
+
+ (initstate)
+ (defaultpalette 0)
+ (formula 'mandel)
+ (view -1.64128273713 -5.50393226816E-05 9.69332308848E-08 9.69332308834E-08)
+
+Just change the view command to morphview, and add usleep::
+
+ (initstate)
+ (defaultpalette 0)
+ (formula 'mandel)
+ (morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08 9.69332308834E-08)
+ (usleep 10000000)
+
+The following code produces Julia morphing in the real axis::
+
+ (initstate)
+ (fastjulia #t)
+ (juliaseed -2 0)
+ (morphjulia 2 0)
+ (usleep 2000000)
+
+And following is the "rotozooming" animation::
+
+ (initstate)
+ (fastrotate #t)
+ (morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08 9.69332308834E-08)
+ (morphangle 300)
+ (usleep 10000000)
+ (wait)
+ (fastrotate #f) \ No newline at end of file
diff --git a/help/rest/formula.txt b/help/rest/formula.txt
new file mode 100644
index 0000000..964d0f9
--- /dev/null
+++ b/help/rest/formula.txt
@@ -0,0 +1,53 @@
+.. _formula:
+
+.. index::
+ pair: command; formula
+
+Formula
+=======
+
+**Syntax**:(formula keyword)
+
+Set the current fractal formula. keyword should be one of the following:
+
+'mandel
+
+ Standard :ref:`Mandelbrot set <mandel>`.
+
+'mandel3
+
+ :ref:`Mandelbrot set, power 3 <mandel3>`.
+
+'mandel4
+
+ Mandelbrot set, power 4.
+
+'mandel5
+
+ Mandelbrot set, power 5.
+
+'mandel6
+
+ Mandelbrot set, power 6.
+
+'newton
+
+ :ref:`Newton's approximation method <newton>`.
+
+'barnsley
+
+ :ref:`First Barnsley's formula <barnsley>`.
+
+'octo
+
+ :ref:`Fractint's octo <octal>`.
+
+'phoenix
+
+ :ref:`Phoenix <phoenix>`.
+
+'magnet
+
+ :ref:`Magnet <magnet>`.
+
+**Available as**: command
diff --git a/help/rest/fractal.txt b/help/rest/fractal.txt
new file mode 100644
index 0000000..2febdaa
--- /dev/null
+++ b/help/rest/fractal.txt
@@ -0,0 +1,24 @@
+.. _fractal:
+
+.. index::
+ pair: menu; Fractal
+
+Fractal
+=======
+
+This menu contains all functions related to fractal parameters and display; you
+can change things like the formula used, coloring modes, seeds and much else.
+
+.. toctree::
+
+ formula
+ mformula
+ incoloring
+ outcoloring
+ plane
+ palettemenu
+ uimandelbrot
+ uiperturbation
+ uiview
+ initstate
+ tcolor
diff --git a/help/rest/gpl.txt b/help/rest/gpl.txt
new file mode 100644
index 0000000..ad2fb87
--- /dev/null
+++ b/help/rest/gpl.txt
@@ -0,0 +1,349 @@
+.. _gpl:
+
+.. index::
+ pair: license; GPL
+
+GNU GENERAL PUBLIC LICENSE
+==========================
+
+Version 2, June 1991
+
+::
+
+
+ Copyright © 1989, 1991 Free Software Foundation, Inc.
+ 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
+
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+..
+
+
+
+Preamble
+````````
+
+The licenses for most software are designed to take away your freedom to share and
+change it. By contrast, the GNU General Public License is intended to guarantee your
+freedom to share and change free software—to make sure the software is free for all
+its users. This General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to using it.
+(Some other Free Software Foundation software is covered by the GNU Lesser General
+Public License instead.) You can apply it to your programs, too.
+
+When we speak of free software, we are referring to freedom, not price. Our General
+Public Licenses are designed to make sure that you have the freedom to distribute
+copies of free software (and charge for this service if you wish), that you receive
+source code or can get it if you want it, that you can change the software or use
+pieces of it in new free programs; and that you know you can do these things.
+
+To protect your rights, we need to make restrictions that forbid anyone to deny you
+these rights or to ask you to surrender the rights. These restrictions translate to
+certain responsibilities for you if you distribute copies of the software, or if you
+modify it.
+
+For example, if you distribute copies of such a program, whether gratis or for a
+fee, you must give the recipients all the rights that you have. You must make sure
+that they, too, receive or can get the source code. And you must show them these
+terms so they know their rights.
+
+We protect your rights with two steps: (1) copyright the software, and (2) offer you
+this license which gives you legal permission to copy, distribute and/or modify the
+software.
+
+Also, for each author's protection and ours, we want to make certain that everyone
+understands that there is no warranty for this free software. If the software is
+modified by someone else and passed on, we want its recipients to know that what
+they have is not the original, so that any problems introduced by others will not
+reflect on the original authors' reputations.
+
+Finally, any free program is threatened constantly by software patents. We wish to
+avoid the danger that redistributors of a free program will individually obtain
+patent licenses, in effect making the program proprietary. To prevent this, we have
+made it clear that any patent must be licensed for everyone's free use or not
+licensed at all.
+
+The precise terms and conditions for copying, distribution and modification follow.
+
+TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+```````````````````````````````````````````````````````````````
+
+1. This License applies to any program or other work which contains a notice placed
+ by the copyright holder saying it may be distributed under the terms of this
+ General Public License. The “Programâ€, below, refers to any such program or
+ work, and a “work based on the Program†means either the Program or any
+ derivative work under copyright law: that is to say, a work containing the
+ Program or a portion of it, either verbatim or with modifications and/or
+ translated into another language. (Hereinafter, translation is included without
+ limitation in the term “modificationâ€.) Each licensee is addressed as “youâ€.
+
+ Activities other than copying, distribution and modification are not covered by
+ this License; they are outside its scope. The act of running the Program is not
+ restricted, and the output from the Program is covered only if its contents
+ constitute a work based on the Program (independent of having been made by
+ running the Program). Whether that is true depends on what the Program does.
+
+2. You may copy and distribute verbatim copies of the Program's source code as you
+ receive it, in any medium, provided that you conspicuously and appropriately
+ publish on each copy an appropriate copyright notice and disclaimer of warranty;
+ keep intact all the notices that refer to this License and to the absence of any
+ warranty; and give any other recipients of the Program a copy of this License
+ along with the Program.
+
+ You may charge a fee for the physical act of transferring a copy, and you may at
+ your option offer warranty protection in exchange for a fee.
+
+3. You may modify your copy or copies of the Program or any portion of it, thus
+ forming a work based on the Program, and copy and distribute such modifications
+ or work under the terms of Section 1 above, provided that you also meet all of
+ these conditions:
+
+ a. You must cause the modified files to carry prominent notices stating that
+ you changed the files and the date of any change.
+
+ b. You must cause any work that you distribute or publish, that in whole or in
+ part contains or is derived from the Program or any part thereof, to be
+ licensed as a whole at no charge to all third parties under the terms of
+ this License.
+
+ c. If the modified program normally reads commands interactively when run, you
+ must cause it, when started running for such interactive use in the most
+ ordinary way, to print or display an announcement including an appropriate
+ copyright notice and a notice that there is no warranty (or else, saying
+ that you provide a warranty) and that users may redistribute the program
+ under these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but does not
+ normally print such an announcement, your work based on the Program is not
+ required to print an announcement.)
+
+ These requirements apply to the modified work as a whole. If identifiable
+ sections of that work are not derived from the Program, and can be reasonably
+ considered independent and separate works in themselves, then this License, and
+ its terms, do not apply to those sections when you distribute them as separate
+ works. But when you distribute the same sections as part of a whole which is a
+ work based on the Program, the distribution of the whole must be on the terms of
+ this License, whose permissions for other licensees extend to the entire whole,
+ and thus to each and every part regardless of who wrote it.
+
+ Thus, it is not the intent of this section to claim rights or contest your
+ rights to work written entirely by you; rather, the intent is to exercise the
+ right to control the distribution of derivative or collective works based on the
+ Program.
+
+ In addition, mere aggregation of another work not based on the Program with the
+ Program (or with a work based on the Program) on a volume of a storage or
+ distribution medium does not bring the other work under the scope of this
+ License.
+
+4. You may copy and distribute the Program (or a work based on it, under Section 2)
+ in object code or executable form under the terms of Sections 1 and 2 above
+ provided that you also do one of the following:
+
+ a. Accompany it with the complete corresponding machine-readable source code,
+ which must be distributed under the terms of Sections 1 and 2 above on a
+ medium customarily used for software interchange; or,
+
+ b. Accompany it with a written offer, valid for at least three years, to give
+ any third party, for a charge no more than your cost of physically
+ performing source distribution, a complete machine-readable copy of the
+ corresponding source code, to be distributed under the terms of Sections 1
+ and 2 above on a medium customarily used for software interchange; or,
+
+ c. Accompany it with the information you received as to the offer to distribute
+ corresponding source code. (This alternative is allowed only for
+ noncommercial distribution and only if you received the program in object
+ code or executable form with such an offer, in accord with Subsection b
+ above.)
+
+ The source code for a work means the preferred form of the work for making
+ modifications to it. For an executable work, complete source code means all the
+ source code for all modules it contains, plus any associated interface
+ definition files, plus the scripts used to control compilation and installation
+ of the executable. However, as a special exception, the source code distributed
+ need not include anything that is normally distributed (in either source or
+ binary form) with the major components (compiler, kernel, and so on) of the
+ operating system on which the executable runs, unless that component itself
+ accompanies the executable.
+
+ If distribution of executable or object code is made by offering access to copy
+ from a designated place, then offering equivalent access to copy the source code
+ from the same place counts as distribution of the source code, even though third
+ parties are not compelled to copy the source along with the object code.
+
+5. You may not copy, modify, sublicense, or distribute the Program except as
+ expressly provided under this License. Any attempt otherwise to copy, modify,
+ sublicense or distribute the Program is void, and will automatically terminate
+ your rights under this License. However, parties who have received copies, or
+ rights, from you under this License will not have their licenses terminated so
+ long as such parties remain in full compliance.
+
+6. You are not required to accept this License, since you have not signed it.
+ However, nothing else grants you permission to modify or distribute the Program
+ or its derivative works. These actions are prohibited by law if you do not
+ accept this License. Therefore, by modifying or distributing the Program (or any
+ work based on the Program), you indicate your acceptance of this License to do
+ so, and all its terms and conditions for copying, distributing or modifying the
+ Program or works based on it.
+
+7. Each time you redistribute the Program (or any work based on the Program), the
+ recipient automatically receives a license from the original licensor to copy,
+ distribute or modify the Program subject to these terms and conditions. You may
+ not impose any further restrictions on the recipients' exercise of the rights
+ granted herein. You are not responsible for enforcing compliance by third
+ parties to this License.
+
+8. If, as a consequence of a court judgment or allegation of patent infringement or
+ for any other reason (not limited to patent issues), conditions are imposed on
+ you (whether by court order, agreement or otherwise) that contradict the
+ conditions of this License, they do not excuse you from the conditions of this
+ License. If you cannot distribute so as to satisfy simultaneously your
+ obligations under this License and any other pertinent obligations, then as a
+ consequence you may not distribute the Program at all. For example, if a patent
+ license would not permit royalty-free redistribution of the Program by all those
+ who receive copies directly or indirectly through you, then the only way you
+ could satisfy both it and this License would be to refrain entirely from
+ distribution of the Program.
+
+ If any portion of this section is held invalid or unenforceable under any
+ particular circumstance, the balance of the section is intended to apply and the
+ section as a whole is intended to apply in other circumstances.
+
+ It is not the purpose of this section to induce you to infringe any patents or
+ other property right claims or to contest validity of any such claims; this
+ section has the sole purpose of protecting the integrity of the free software
+ distribution system, which is implemented by public license practices. Many
+ people have made generous contributions to the wide range of software
+ distributed through that system in reliance on consistent application of that
+ system; it is up to the author/donor to decide if he or she is willing to
+ distribute software through any other system and a licensee cannot impose that
+ choice.
+
+ This section is intended to make thoroughly clear what is believed to be a
+ consequence of the rest of this License.
+
+9. If the distribution and/or use of the Program is restricted in certain countries
+ either by patents or by copyrighted interfaces, the original copyright holder
+ who places the Program under this License may add an explicit geographical
+ distribution limitation excluding those countries, so that distribution is
+ permitted only in or among countries not thus excluded. In such case, this
+ License incorporates the limitation as if written in the body of this License.
+
+10. The Free Software Foundation may publish revised and/or new versions of the
+ General Public License from time to time. Such new versions will be similar in
+ spirit to the present version, but may differ in detail to address new problems
+ or concerns.
+
+ Each version is given a distinguishing version number. If the Program specifies
+ a version number of this License which applies to it and “any later versionâ€,
+ you have the option of following the terms and conditions either of that version
+ or of any later version published by the Free Software Foundation. If the
+ Program does not specify a version number of this License, you may choose any
+ version ever published by the Free Software Foundation.
+
+11. If you wish to incorporate parts of the Program into other free programs whose
+ distribution conditions are different, write to the author to ask for
+ permission. For software which is copyrighted by the Free Software Foundation,
+ write to the Free Software Foundation; we sometimes make exceptions for this.
+ Our decision will be guided by the two goals of preserving the free status of
+ all derivatives of our free software and of promoting the sharing and reuse of
+ software generally.
+
+12. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE
+ PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED
+ IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM “AS
+ IS†WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
+ NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
+ PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+ PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+13. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY
+ COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE
+ PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL,
+ SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY
+ TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+ RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF
+ THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
+ PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
+
+Appendix: How to Apply These Terms to Your New Programs
+```````````````````````````````````````````````````````
+
+If you develop a new program, and you want it to be of the greatest possible use to
+the public, the best way to achieve this is to make it free software which everyone
+can redistribute and change under these terms.
+
+To do so, attach the following notices to the program. It is safest to attach them
+to the start of each source file to most effectively convey the exclusion of
+warranty; and each file should have at least the “copyright†line and a pointer to
+where the full notice is found.
+
+::
+
+
+ one line to give the program's name and a brief idea of what it does.
+ Copyright (C) yyyy name of author
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 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 General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+
+..
+
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this when it
+starts in an interactive mode:
+
+::
+
+
+ Gnomovision version 69, Copyright (C) year name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type 'show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type 'show c' for details.
+
+..
+
+
+
+The hypothetical commands 'show w' and 'show c' should show the appropriate parts of
+the General Public License. Of course, the commands you use may be called something
+other than 'show w' and 'show c'; they could even be mouse-clicks or menu
+items—whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your school, if
+any, to sign a “copyright disclaimer†for the program, if necessary. Here is a
+sample; alter the names:
+
+::
+
+
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ 'Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+ signature of Ty Coon, 1 April 1989
+ Ty Coon, President of Vice
+
+..
+
+
+
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may consider it
+more useful to permit linking proprietary applications with the library. If this is
+what you want to do, use the GNU Lesser General Public License instead of this
+License.
diff --git a/help/rest/helpmenu.txt b/help/rest/helpmenu.txt
new file mode 100644
index 0000000..b17fd11
--- /dev/null
+++ b/help/rest/helpmenu.txt
@@ -0,0 +1,9 @@
+.. _helpmenu:
+
+.. index::
+ pair: menu; Help
+
+Help
+====
+
+This menu contains help and tutorials.
diff --git a/help/rest/incoloring.txt b/help/rest/incoloring.txt
new file mode 100644
index 0000000..80eff95
--- /dev/null
+++ b/help/rest/incoloring.txt
@@ -0,0 +1,87 @@
+.. _incoloring:
+.. _mincoloring:
+.. _in1:
+.. _in2:
+.. _in3:
+.. _in4:
+.. _in5:
+.. _in6:
+.. _in7:
+.. _in8:
+.. _in9:
+.. _in10:
+.. _in0:
+
+.. index::
+ pair: command line option; incoloring
+ pair: command; incoloring
+ pair: menu; Incoloring mode
+
+Inside coloring mode
+====================
+
+**Syntax**:(incoloring integer)
+
+Areas inside the set are usually filled in black, but this is only a
+convention; you could color them in differently to make the fractal look more
+interesting. The only method available to make areas inside the set visible is
+to display the value of the latest orbit as the value of each pixel.
+
+The :tutor:`tutorial on incoloring <incolor.xaf>` has more information
+and examples.
+
+XaoS has many different ways to show that value. The cryptic names of the modes
+are mathematical formulae, where **real** means the real part of the latest
+orbit, and **imag** means the imaginary part. **zmag** uses the magnitude of
+the value. The **Decomposition-like** method uses the angle of the orbit. Also,
+:ref:`truecolor <tcolor>` incoloring modes are available, that display one
+value in each of the red, blue and green color planes (or, for some modes, in
+each of the hue, saturation and value planes). In the scripting language, the
+incoloring mode is specified by one of the following integers:
+
+0
+
+ 0 (default)
+
+1
+
+ zmag
+
+2
+
+ Decomposition-like
+
+3
+
+ real/imag
+
+4
+
+ abs(abs(c)-abs(r))
+
+5
+
+ cos(mag)
+
+6
+
+ mag*cos(real^2)
+
+7
+
+ sin(real^2-imag^2)
+
+8
+
+ atan(real*imag*creal*cimag)
+
+9
+
+ squares
+
+10
+
+ Truecolor. To set exact parameters for truecolor coloring use the
+ :ref:`tcolor <tcolor>` command.
+
+**Available as**: command line option, command
diff --git a/help/rest/index.txt b/help/rest/index.txt
new file mode 100644
index 0000000..3f43a52
--- /dev/null
+++ b/help/rest/index.txt
@@ -0,0 +1,42 @@
+.. _main:
+
+XaoS
+====
+
+Welcome to XaoS - a real-time fractal zoomer.
+
+| :ref:`About XaoS <about>`
+| Learn who's behind XaoS and how you can help.
+|
+| :ref:`Getting started <start>`
+| Start here to learn how to use XaoS's basic features.
+|
+| :ref:`Getting support <support>`
+| How to report problems and get help from the XaoS community.
+|
+| :ref:`User formulas <sffe>`
+| Learn how to render your own formulas in XaoS.
+|
+| :ref:`Encoding videos <video>`
+| Learn how to create videos from your XaoS animations.
+|
+| :ref:`Platform-specific documentation <drivers>`
+| XaoS runs on many platforms. Read instructions specific to yours.
+|
+| :ref:`XaoS's file format <format>`
+| Learn how to tweak your saved fractals and animations.
+|
+| :ref:`Menus, commands and parameter index <menus>`
+| An in-depth discussion of all of XaoS's commands.
+
+.. toctree::
+
+ about
+ controls
+ tutorial
+ support
+ sffe
+ video
+ format
+ drivers
+ menus \ No newline at end of file
diff --git a/help/rest/initstate.txt b/help/rest/initstate.txt
new file mode 100644
index 0000000..2c49876
--- /dev/null
+++ b/help/rest/initstate.txt
@@ -0,0 +1,18 @@
+.. _initstate:
+
+.. index::
+ pair: menu item; Reset to defaults
+ pair: command line option; initstate
+ pair: command; initstate
+
+Reset to defaults
+=================
+
+**Syntax**:(initstate)
+
+This function resets most of XaoS's values to their defaults. It is useful when
+you get lost and want to start from the beginning. It should also be used as
+the first command of every animation file, to ensure that the file is always
+played with the same settings in effect.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/interlace.txt b/help/rest/interlace.txt
new file mode 100644
index 0000000..641d146
--- /dev/null
+++ b/help/rest/interlace.txt
@@ -0,0 +1,17 @@
+.. _interlace:
+
+.. index::
+ pair: command line option; interlace
+ pair: menu item; Interlace
+ pair: filter; Interlace
+
+Interlace filter
+================
+
+The interlace filter halves the horizontal resolution, and in each frame
+alternates between drawing only the even and only the odd lines. This speeds up
+the calculation, and in higher resolutions produces a motion-blur-like effect.
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/interrupt.txt b/help/rest/interrupt.txt
new file mode 100644
index 0000000..b46d885
--- /dev/null
+++ b/help/rest/interrupt.txt
@@ -0,0 +1,16 @@
+.. _interrupt:
+.. _animinterrupt:
+
+.. index::
+ pair: menu item; Interrupt
+ pair: command line option; interrupt
+ pair: command; interrupt
+
+Interrupt
+=========
+
+**Syntax**:(interrupt)
+
+Interrupt current calculation.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/letterspersec.txt b/help/rest/letterspersec.txt
new file mode 100644
index 0000000..4adb5b7
--- /dev/null
+++ b/help/rest/letterspersec.txt
@@ -0,0 +1,17 @@
+.. _letterspersec:
+.. _animletterspersec:
+
+.. index::
+ pair: command line option; letterspersec
+ pair: command; letterspersec
+
+Letters per second
+==================
+
+**Syntax**:(letterspersec integer)
+
+Speed of subtitles for the :ref:`textsleep <textsleep>` function. The user can
+set this value to suit; it can also be changed with the left and right arrow
+keys during animation replay.
+
+**Available as**: command line option, command
diff --git a/help/rest/line.txt b/help/rest/line.txt
new file mode 100644
index 0000000..2f3e587
--- /dev/null
+++ b/help/rest/line.txt
@@ -0,0 +1,16 @@
+.. _line:
+
+.. index::
+ pair: command; line
+
+Draw line
+=========
+
+**Syntax**:(line keyword complex complex)
+
+Draw line between two points.
+``keyword`` specifies type of coordinates and should be one of the
+following: ``'fractal``, ``'screen`` or ``'scaled``.
+This function also increases the line key.
+
+*Available as*: command \ No newline at end of file
diff --git a/help/rest/linekey.txt b/help/rest/linekey.txt
new file mode 100644
index 0000000..3b61e5c
--- /dev/null
+++ b/help/rest/linekey.txt
@@ -0,0 +1,13 @@
+.. _linekey:
+
+.. index::
+ pair: command; linekey
+
+Set line key
+============
+
+**Syntax**:(linekey integer)
+
+Set current line key.
+
+**Available as**: command
diff --git a/help/rest/linemenu.txt b/help/rest/linemenu.txt
new file mode 100644
index 0000000..32c630a
--- /dev/null
+++ b/help/rest/linemenu.txt
@@ -0,0 +1,49 @@
+.. _linemenu:
+.. _line:
+
+.. index::
+ pair: functions; Line drawing
+ pair: command; line
+
+Line drawing functions
+======================
+
+XaoS has support for drawing lines. These functions are available only in
+animations and could be used to show some parts of fractals or draw simple
+diagrams. See the tutorial ":tutor:`Introduction to fractals <intro.xaf>`" for examples of this feature.
+
+Lines can be drawn in **screen** coordinates, where 0,0 is the top left corner
+and 1,1 is bottom right, **scaled** coordinates, which are similar, but scaled
+to keep 0,0--1,1 rectangular, or **Fractal** coordinates, to draw a line at an
+exact position on the screen.
+
+The color of the line should be specified by the :ref:`color <color>` command.
+You might draw an arbitrary number of lines and, later, morph them. Each line
+is identified by a unique numeric key; the current key can be set using
+linekey. Commands for changing lines operate on the line with the current key.
+(Lines drawn in sequence have consecutive numbers.)
+
+For example::
+
+ (color 'red)
+ (line 'scaled 0.3 0.5 0.7 0.5)
+ (line 'scaled 0.3 0.5 0.7 0.5)
+ (line 'scaled 0.3 0.5 0.3 0.5)
+ (line 'scaled 0.7 0.5 0.7 0.5)
+ (linekey 0)
+ (morphline 'scaled 0.3 0.3 0.7 0.3)
+ (morphline 'scaled 0.3 0.7 0.7 0.7)
+ (morphline 'scaled 0.3 0.3 0.3 0.7)
+ (morphline 'scaled 0.7 0.3 0.7 0.7)
+ (usleep 1000000)
+
+Creates line morphing to rectangle.
+
+.. toctree::
+
+ line
+ morphline
+ morphlastline
+ linekey
+ clearline
+ clearlines
diff --git a/help/rest/load.txt b/help/rest/load.txt
new file mode 100644
index 0000000..205f981
--- /dev/null
+++ b/help/rest/load.txt
@@ -0,0 +1,15 @@
+.. _load:
+
+.. index::
+ pair: command; load
+
+Include file
+============
+
+**Syntax**:(load file)
+
+This function lets you include another file in your script. It works similarly
+to #include in C or load in Scheme. The file is searched for in the same
+directory as the current source file.
+
+**Available as**: command
diff --git a/help/rest/loadexample.txt b/help/rest/loadexample.txt
new file mode 100644
index 0000000..55c7dd0
--- /dev/null
+++ b/help/rest/loadexample.txt
@@ -0,0 +1,16 @@
+.. _loadexample:
+
+.. index::
+ pair: menu item; Load random example
+ pair: command line option; loadexample
+ pair: command; loadexample
+
+Load random example
+===================
+
+**Syntax**:(loadexample)
+
+Choose random .xpf file from the examples directory and load it. You might use
+it as the starting point for next exploration.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/loadpos.txt b/help/rest/loadpos.txt
new file mode 100644
index 0000000..744cef1
--- /dev/null
+++ b/help/rest/loadpos.txt
@@ -0,0 +1,13 @@
+.. _loadpos:
+
+.. index::
+ pair: menu item; Load
+ pair: command line option; loadpos
+
+Load XaoS position file
+=======================
+
+Load a XaoS position file (\*.xpf). See the :ref:`format description <format>`
+for more information.
+
+**Available as**: menu item, command line option
diff --git a/help/rest/magnet.txt b/help/rest/magnet.txt
new file mode 100644
index 0000000..6665de8
--- /dev/null
+++ b/help/rest/magnet.txt
@@ -0,0 +1,15 @@
+.. _magnet:
+
+.. index::
+ pair: menu item; Magnet
+ pair: command line option; magnet
+ pair: formula; Magnet
+
+Magnet
+======
+
+This is a formula that comes from theoretical physics. It is derived from the
+study of theoretical lattices in the context of magnetic renormalization
+transformations. See the :tutor:`tutorial chapter <phoenix.xaf>`.
+
+**Available as**: menu item, command line option
diff --git a/help/rest/mandel.txt b/help/rest/mandel.txt
new file mode 100644
index 0000000..f233d42
--- /dev/null
+++ b/help/rest/mandel.txt
@@ -0,0 +1,14 @@
+.. _mandel:
+
+.. index::
+ pair: menu item; Mandelbrot
+ pair: command line option; mandel
+ pair: formula; Mandelbrot
+
+Mandelbrot
+==========
+
+The Mandelbrot set is the most famous escape time fractal ever. It has the
+simple formula z=z^2+c. See the :tutor:`tutorial chapter <mset.xaf>`.
+
+**Available as**: menu item, command line option
diff --git a/help/rest/mandel3.txt b/help/rest/mandel3.txt
new file mode 100644
index 0000000..37f40f0
--- /dev/null
+++ b/help/rest/mandel3.txt
@@ -0,0 +1,33 @@
+.. _mandel3:
+.. _mandel4:
+.. _mandel5:
+.. _mandel6:
+.. _mandel9:
+
+.. index::
+ pair: menu item; Mandelbrot^3
+ pair: formula; Mandelbrot^3
+ pair: command line option; mandel3
+ pair: menu item; Mandelbrot^4
+ pair: formula; Mandelbrot^4
+ pair: command line option; mandel4
+ pair: menu item; Mandelbrot^5
+ pair: formula; Mandelbrot^5
+ pair: command line option; mandel5
+ pair: menu item; Mandelbrot^6
+ pair: formula; Mandelbrot^6
+ pair: command line option; mandel6
+ pair: menu item; Mandelbrot^9
+ pair: formula; Mandelbrot^9
+ pair: command line option; mandel9
+
+Mandelbrot^3--Mandelbrot^6
+==========================
+
+This fractal is a simple modification of the standard :ref:`Mandelbrot set
+<mandel>` formula, using z=z^3+c instead of z=z^2+c.
+
+Other derivations of the Mandelbrot set (Mandelbrot^4 and so on) use even
+higher powers. See the :tutor:`tutorial chapter <power.xaf>`.
+
+**Available as**: menu item, command line option
diff --git a/help/rest/maxiter.txt b/help/rest/maxiter.txt
new file mode 100644
index 0000000..2cb56fa
--- /dev/null
+++ b/help/rest/maxiter.txt
@@ -0,0 +1,30 @@
+.. _maxiter:
+
+.. index::
+ pair: menu item; Iterations
+ pair: command line option; maxiter
+ pair: command; maxiter
+
+Iterations
+==========
+
+**Syntax**:(maxiter integer)
+
+When the fractal set is calculated, a orbital trajectory is examined for each
+point. If the orbit diverges to infinity, the point is outside the set.
+Otherwise, the point is inside the set. For exact calculations, you need to
+know the entire orbital trajectory, which is infinitely long for areas inside
+the set, so fractals cannot be calculated exactly. By default, XaoS calculates
+at most 170 positions (iterations) and then gives up; if the point is still
+inside the bail-out value, it guesses that the point is inside the set.
+
+When zoomed into a detailed area, especially one close to the set boundary,
+this value could become too low, and the fractal will become boring. You might
+try increasing this value if you want to get the image interesting again; but
+this necessarily slows down the calculation at the same time.
+
+The tutorial chapter ":tutor:`Escape time fractals <escape.xaf>`" has
+more information on fractal calculation in XaoS, and there is a lengthy section
+in the hacker's manual (xaosdev.texinfo) devoted to the subject.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/menus.txt b/help/rest/menus.txt
new file mode 100644
index 0000000..2136529
--- /dev/null
+++ b/help/rest/menus.txt
@@ -0,0 +1,17 @@
+.. _menus:
+
+.. index:: Menus, Functions, Command Line Parameters
+
+Menus, functions and command line parameters
+============================================
+
+All XaoS functions are referenced by a central function registry. The scripting
+language, menus, dialogs and command line options are built from this database.
+This section contains information about all functions available in this
+registry.
+
+.. toctree::
+
+ root
+ animroot
+ plc
diff --git a/help/rest/message.txt b/help/rest/message.txt
new file mode 100644
index 0000000..5f75275
--- /dev/null
+++ b/help/rest/message.txt
@@ -0,0 +1,17 @@
+.. _message:
+
+.. index::
+ pair: command line option; message
+ pair: command; message
+
+Message
+=======
+
+**Syntax**:(message string)
+
+This function is almost identical to the :ref:`text <text>` function, except
+that it uses message catalogs in the catalog directory to translate messages
+into other languages. It should be used only in the multi-lingual XaoS
+tutorials.
+
+**Available as**: command line option, command
diff --git a/help/rest/mfilter.txt b/help/rest/mfilter.txt
new file mode 100644
index 0000000..0181a9e
--- /dev/null
+++ b/help/rest/mfilter.txt
@@ -0,0 +1,27 @@
+.. _mfilter:
+
+.. index::
+ pair: menu; Filters
+
+Filters
+=======
+
+Filters are a post-calculation effect applied to the resulting image. They can
+do things like motion blurring, edge detection, emulation of palettes or
+truecolor on displays that can't handle them, and such things. There is a
+:tutor:`tutorial chapter <filter.xaf>` about them.
+
+.. toctree::
+ :maxdepth: 2
+
+ filter
+ edge
+ edge2
+ starfield
+ stereogram
+ interlace
+ blur
+ emboss
+ palettef
+ anti
+ truecolor
diff --git a/help/rest/mformula.txt b/help/rest/mformula.txt
new file mode 100644
index 0000000..cd3159a
--- /dev/null
+++ b/help/rest/mformula.txt
@@ -0,0 +1,20 @@
+.. _mformula:
+
+.. index::
+ pair: menu; Formulae
+
+formulae
+========
+
+Each escape time fractal has its own formula. XaoS supports the following
+formulae:
+
+.. toctree::
+
+ mandel
+ mandel3
+ octal
+ newton
+ barnsley
+ phoenix
+ magnet
diff --git a/help/rest/ministatus.txt b/help/rest/ministatus.txt
new file mode 100644
index 0000000..478e819
--- /dev/null
+++ b/help/rest/ministatus.txt
@@ -0,0 +1,17 @@
+.. _ministatus:
+.. _animministatus:
+
+.. index::
+ pair: menu item; Ministatus
+ pair: command line option; ministatus
+ pair: command; ministatus
+
+Ministatus
+==========
+
+**Syntax**:(ministatus bool)
+
+Enable/disable status line. This contains basic information such as how much
+you are zoomed and the framerate.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/misc.txt b/help/rest/misc.txt
new file mode 100644
index 0000000..e34db66
--- /dev/null
+++ b/help/rest/misc.txt
@@ -0,0 +1,22 @@
+.. _misc:
+
+.. index::
+ pair: menu; Misc
+
+Misc
+====
+
+Miscellaneous functions.
+
+.. toctree::
+
+ command
+ renderanim
+ clearscreen
+ display
+ text
+ color
+ xtextpos
+ ytextpos
+ textposition
+ message
diff --git a/help/rest/morphangle.txt b/help/rest/morphangle.txt
new file mode 100644
index 0000000..fdbccd2
--- /dev/null
+++ b/help/rest/morphangle.txt
@@ -0,0 +1,24 @@
+.. _morphangle:
+
+.. index::
+ pair: command; morphangle
+
+Morph angle
+===========
+
+**Syntax**:(morphangle float) Smoothly rotate the image to another angle. By
+default rotation causes recalculation of the whole screen. To avoid this you
+need to enable :ref:`fast rotate mode <rotate>`. Don't forget to disable it
+later, since it slows down other animations.
+
+A simple "rotozooming" animation::
+
+ (initstate)
+ (fastrotate #t)
+ (morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08 9.69332308834E-08)
+ (morphangle 300)
+ (usleep 10000000)
+ (wait)
+ (fastrotate #f)
+
+**Available as**: command
diff --git a/help/rest/morphjulia.txt b/help/rest/morphjulia.txt
new file mode 100644
index 0000000..7db837d
--- /dev/null
+++ b/help/rest/morphjulia.txt
@@ -0,0 +1,19 @@
+.. _morphjulia:
+
+.. index::
+ pair: command; morphjulia
+
+Morph Julia
+===========
+
+**Syntax**:(morphjulia complex) For the time selected by the next :ref:`usleep
+<usleep>` or other timing function, the Julia seed is smoothly interpolated
+from the current one to that selected by morphjulia. By default this will cause
+recalculation of the whole screen. To avoid this, use :ref:`fast Julia mode
+<fastjulia>`.
+
+A simple animation morphing Julia seed in the X axis:
+
+(initstate) (fastjulia #t) (juliaseed -2 0) (morphjulia 2 0) (usleep 2000000)
+
+**Available as**: command
diff --git a/help/rest/morphlastline.txt b/help/rest/morphlastline.txt
new file mode 100644
index 0000000..d21f319
--- /dev/null
+++ b/help/rest/morphlastline.txt
@@ -0,0 +1,16 @@
+.. _morphlastline:
+
+.. index::
+ pair: command; morphlastline
+
+Morph last line
+---------------
+
+**Syntax**:(morphlastline keyword complex complex)
+
+This function has the same functionality as :ref:`morphline <morphline>`, but
+it doesn't increase the line key, and touches the line with the previous key.
+This is useful when you want to move a just-drawn line--you don't need to set
+:ref:`linekey <linekey>` back.
+
+**Available as**: command
diff --git a/help/rest/morphline.txt b/help/rest/morphline.txt
new file mode 100644
index 0000000..9673b76
--- /dev/null
+++ b/help/rest/morphline.txt
@@ -0,0 +1,16 @@
+.. _morphline:
+
+.. index::
+ pair: command; morphline
+
+Morph line
+----------
+
+**Syntax**:(morphline keyword complex complex)
+
+Morph current line to given coordinates. keyword specifies type of coordinates
+and should be one of the following: `fractal, `screen or `scaled. The line will
+start moving at the next :ref:`timing command <time>`, and reach the final
+position before the end of it. This function also increases the line key.
+
+**Available as**: command
diff --git a/help/rest/morphview.txt b/help/rest/morphview.txt
new file mode 100644
index 0000000..1493852
--- /dev/null
+++ b/help/rest/morphview.txt
@@ -0,0 +1,33 @@
+.. _morphview:
+
+.. index::
+ pair: command; morphview
+
+Morph view
+==========
+
+**Syntax**:(morphview float float float float) For the time selected by the
+next :ref:`usleep <usleep>` or other timing function, the viewpoint is smoothly
+morphed from the current one to that selected by morphview.
+
+Viewport is selected by the center and two radiuses (real and imaginary). See
+:ref:`view <uiview>` for more information.
+
+This function can easily be used for creating zooming/unzooming animations
+using position files. This is an example position file generated by XaoS::
+
+ (initstate)
+ (defaultpalette 0)
+ (formula 'mandel)
+ (view -1.64128273713 -5.50393226816E-05 9.69332308848E-08 9.69332308834E-08)
+
+By replacing the view command with morphview and adding usleep you can create a
+zooming animation::
+
+ (initstate)
+ (defaultpalette 0)
+ (formula 'mandel)
+ (morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08 9.69332308834E-08)
+ (usleep 10000000)
+
+**Available as**: command
diff --git a/help/rest/moveview.txt b/help/rest/moveview.txt
new file mode 100644
index 0000000..fe398a5
--- /dev/null
+++ b/help/rest/moveview.txt
@@ -0,0 +1,13 @@
+.. _moveview:
+
+.. index::
+ pair: command; moveview
+
+Move view
+=========
+
+**Syntax**:(moveview complex)
+
+Smoothly move the image center to another position.
+
+**Available as**: command
diff --git a/help/rest/newton.txt b/help/rest/newton.txt
new file mode 100644
index 0000000..90e7c7f
--- /dev/null
+++ b/help/rest/newton.txt
@@ -0,0 +1,19 @@
+.. _newton:
+
+.. index::
+ pair: menu item; Newton
+ pair: command line option; newton
+ pair: formula; Newton
+
+Newton
+======
+
+This is Newton's approximation method for finding the roots of a polynomial. It
+uses the polynomial x^3=1 and counts the number of iterations needed to reach
+the approximate value of the root. See the :tutor:`tutorial chapter <newton.xaf>`.
+
+This fractal doesn't have Julia sets, but XaoS is able to generate Julia-like
+sets which are also very interesting (they are sometimes called "Nova
+formulae").
+
+**Available as**: menu item, command line option
diff --git a/help/rest/nogui.txt b/help/rest/nogui.txt
new file mode 100644
index 0000000..68ec5f1
--- /dev/null
+++ b/help/rest/nogui.txt
@@ -0,0 +1,17 @@
+.. _nogui:
+
+.. index::
+ pair: command line option; nogui
+ pair: command; nogui
+
+Disable XaoS's builtin GUI
+==========================
+
+**Syntax**:(nogui bool)
+
+Disable XaoS menus and dialogs. This function should be used by external GUI
+programs; these manipulate XaoS via a pipe, so the internal GUI should be
+disabled at the same time. See the hacker's manual (xaosdev.texinfo) for more
+details.
+
+**Available as**: command line option, command
diff --git a/help/rest/octal.txt b/help/rest/octal.txt
new file mode 100644
index 0000000..49aa3f2
--- /dev/null
+++ b/help/rest/octal.txt
@@ -0,0 +1,15 @@
+.. _octal:
+
+.. index::
+ pair: menu item; Octal
+ pair: command line option; octal
+ pair: formula; Octal
+
+Octal
+=====
+
+This is a less well-known fractal that Thomas discovered in Fractint. It has an
+interesting shape when displayed in the alternative :ref:`planes <mplane>`. See
+the :tutor:`tutorial chapter <octo.xaf>`.
+
+**Available as**: menu item, command line option
diff --git a/help/rest/outcoloring.txt b/help/rest/outcoloring.txt
new file mode 100644
index 0000000..ad26779
--- /dev/null
+++ b/help/rest/outcoloring.txt
@@ -0,0 +1,92 @@
+.. _outcoloring:
+.. _moutcoloring:
+.. _out1:
+.. _out2:
+.. _out3:
+.. _out4:
+.. _out5:
+.. _out6:
+.. _out7:
+.. _out8:
+.. _out9:
+.. _out10:
+.. _out0:
+
+.. index::
+ pair: command line option; outcoloring
+ pair: command; outcoloring
+ pair: menu; Outcoloring mode
+
+Outside coloring mode
+=====================
+
+**Syntax**:(outcoloring integer)
+
+Outcoloring modes are similar to :ref:`incoloring modes <incoloring>`, but
+indicate how to display the areas outside the set instead. As with incoloring
+modes, the value of the latest orbit can be used to determine the color of each
+pixel, but the default is to use the number of iterations needed for the value
+at that point to become recognisably divergent as the color.
+
+The :tutor:`tutorial on outcoloring <outcolor.xaf>` has more information
+and examples.
+
+The cryptic names of the modes are mathematical formulae, where **iter** means
+the number of iterations required for the value to become recognisably
+divergent, **real** means the real part of the latest orbit, and **imag** means
+the imaginary part. **binary decomposition** uses a different color when the
+imaginary part of the orbit is lower than zero, and **smooth** attempts to
+remove stripes and discontinuities. Also, :ref:`truecolor <tcolor>` outcoloring
+modes are available, that display one value in each of the red, blue and green
+color planes (or, for some modes, in each of the hue, saturation and value
+planes).
+
+In the scripting language, the outcoloring mode is specified by one of the
+following integers:
+
+0
+
+ iter (default)
+
+1
+
+ iter+real
+
+2
+
+ iter+imag
+
+3
+
+ iter+real/imag
+
+4
+
+ iter+real+imag+real/imag
+
+5
+
+ binary decomposition
+
+6
+
+ biomorphs
+
+7
+
+ potential
+
+8
+
+ color decomposition
+
+9
+
+ smooth
+
+10
+
+ True-color outcoloring mode. To set exact parameters for truecolor coloring
+ use :ref:`outtcoloring <tcolor>`.
+
+**Available as**: command line option, command
diff --git a/help/rest/palette.txt b/help/rest/palette.txt
new file mode 100644
index 0000000..15f861d
--- /dev/null
+++ b/help/rest/palette.txt
@@ -0,0 +1,39 @@
+.. _palette:
+
+.. index::
+ pair: menu item; Custom palette
+ pair: command line option; palette
+ pair: command; palette
+
+Custom palette
+==============
+
+**Syntax**:(palette integer integer integer)
+
+A custom palette lets you re-create some of the random palettes. The first value
+specifies the algorithm, which should currently be one of the following:
+
+0
+
+ Default palette
+
+1
+
+ Black to color gradient
+
+2
+
+ Black to color to white gradient
+
+3
+
+ Cubistic-like algorithm.
+
+The seed specifies a random seed for the palette; different seeds generate
+different palettes. The last value is the amount by which the palette is shifted.
+
+Note that changing the palette in the truecolor modes forces recalculation of
+the whole screen. To avoid this, you can enable the
+:ref:`palette emulation filter <palettef>` first.
+
+**Available as**: menu item, command line option, command \ No newline at end of file
diff --git a/help/rest/palettef.txt b/help/rest/palettef.txt
new file mode 100644
index 0000000..54e0b9e
--- /dev/null
+++ b/help/rest/palettef.txt
@@ -0,0 +1,21 @@
+.. _palettef:
+
+.. index::
+ pair: menu item; Palette emulator
+ pair: command line option; palette
+ pair: filter; Palette emulator
+
+Palette emulator
+================
+
+XaoS can work in either palette or :ref:`truecolor <truecolor>` mode. Both
+modes have advantages and disadvantages. Palette mode allows effects such as
+palette rotation, while truecolor mode allows smoother :ref:`incoloring
+<incoloring>` and :ref:`outcoloring <outcoloring>` modes and the
+:ref:`truecolor coloring <tcolor>` modes. If your display is truecolor, you can
+enable this filter to get palette emulation (albeit not as cheaply as in a real
+paletted mode).
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/palettemenu.txt b/help/rest/palettemenu.txt
new file mode 100644
index 0000000..d236a96
--- /dev/null
+++ b/help/rest/palettemenu.txt
@@ -0,0 +1,18 @@
+.. _palettemenu:
+
+.. index::
+ pair: menu; Palette
+
+Palette
+=======
+
+This menu contains functions to change the palette the fractal is displayed
+with.
+
+.. toctree::
+
+ defpalette
+ randompalette
+ palette
+ cycling
+ shiftpalette
diff --git a/help/rest/paste.txt b/help/rest/paste.txt
new file mode 100644
index 0000000..e83c7c4
--- /dev/null
+++ b/help/rest/paste.txt
@@ -0,0 +1,13 @@
+.. _paste:
+
+.. index::
+ pair: menu item; Paste
+
+Paste
+=====
+
+Paste fractal from clipboard. This is a platform-dependent operation that may
+not have an analogue on your platform (e.g. there is no concept of a clipboard
+under aalib).
+
+**Available as**: menu item
diff --git a/help/rest/periodicity.txt b/help/rest/periodicity.txt
new file mode 100644
index 0000000..8f700b2
--- /dev/null
+++ b/help/rest/periodicity.txt
@@ -0,0 +1,44 @@
+.. _periodicity:
+
+.. index::
+ pair: menu item; Periodicity checking
+ pair: command line option; periodicity
+ pair: command; periodicity
+
+Periodicity checking
+====================
+
+**Syntax**:(periodicity bool)
+
+Periodicity checking is one way to speed up the calculation. Areas inside the
+set always need :ref:`maxiter <maxiter>` iterations to determine that the point
+is probably inside the set (while it is rare for areas outside to need anywhere
+near that much). Often the orbital trajectory falls into a periodic, repeating
+cycle; if that can be detected, the calculation can be stopped early, as
+there's no way that the orbit can ever leave the cycle again (hence it cannot
+diverge, hence the point must be inside the set).
+
+Implementing this method efficiently is quite problematic. It slows down the
+cases where cycles are not found, because cycle-checking is quite hard work and
+has to take place for all points, even those that don't become cyclic. Because
+of the inexactness of floating-point calculations, the cycles are never exact,
+so you need to use an error value. Higher error values mean that cycles will be
+detected sooner, while lower error values increase the exactness of the
+calculation. Higher values can introduce serious errors, especially at the
+front of the Mandelbrot set. XaoS detects this automatically and corrects for
+it in most cases, but sometimes it might be wrong. Also, other optimizations in
+XaoS (such as boundary tracing) don't give this method much of a chance to run,
+since areas inside the set are usually not calculated at all.
+
+That's why the advantages of this optimization are questionable. You should
+probably experiment with enabling and disabling it. Sometimes XaoS is faster
+with this enabled, sometimes when disabled. Also, this method works only when
+:ref:`incoloring <incoloring>` methods are disabled, and only for some fractal
+types (some fractal types, e.g. newton, don't have any concept of an area
+'inside the set' at all.)
+
+The tutorial chapter ":tutor:`Escape time fractals <escape.xaf>`" has
+more information on fractal calculation in XaoS, and there is a lengthy section
+in the hacker's manual (xaosdev.texinfo) devoted to the subject.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/phoenix.txt b/help/rest/phoenix.txt
new file mode 100644
index 0000000..c409017
--- /dev/null
+++ b/help/rest/phoenix.txt
@@ -0,0 +1,13 @@
+.. _phoenix:
+
+.. index::
+ pair: menu item; Phoenix
+ pair: command line option; phoenix
+ pair: formula; Phoenix
+
+Phoenix
+=======
+
+This formula produces very nice Julia sets. See the :tutor:`tutorial chapter <phoenix.xaf>`.
+
+**Available as**: menu item, command line option
diff --git a/help/rest/plane.txt b/help/rest/plane.txt
new file mode 100644
index 0000000..5a28610
--- /dev/null
+++ b/help/rest/plane.txt
@@ -0,0 +1,83 @@
+.. _plane:
+.. _mplane:
+.. _plane0:
+.. _plane1:
+.. _plane2:
+.. _plane3:
+.. _plane4:
+.. _plane5:
+.. _plane6:
+.. _plane7:
+.. _plane8:
+.. _plane9:
+.. _plane10:
+
+.. index::
+ pair: command line option; plane
+ pair: command; plane
+
+Plane
+=====
+
+**Syntax**:(plane integer)
+
+All fractals displayed by XaoS are functions with a complex parameter. They can
+be be displayed in the normal complex plane where the x coordinate is the real
+part of the number and the y is imaginary; but they can also be displayed
+differently:
+
+mu
+
+ Normal complex plane (default)
+
+1/mu
+
+ Inversion--infinity is at 0 and 0 is at infinity.
+
+1/(mu+0.25)
+
+ Similar to inversion, but moves the center outside the Mandelbrot set, so
+ it looks parabolic.
+
+lambda plane, 1/lambda, 1/lambda-1
+
+ Lambda plane and its inversion, and with a different center.
+
+1/(mu-1.40115)
+
+ A very interesting mode for the Mandelbrot set, this makes small things
+ large, for easier browsing of the set's details.
+
+The :tutor:`tutorial about planes <plane.xaf>` has some examples.
+
+In the scripting language, the planes are numbered as follows:
+
+0
+
+ mu
+
+1
+
+ 1/mu
+
+2
+
+ 1/(mu+0.25)
+
+3
+
+ lambda
+
+4
+
+ 1/lambda
+
+5
+
+ 1/(lambda-1)
+
+6
+
+ 1/(mu-1.40115)
+
+**Available as**: command line option, command
diff --git a/help/rest/play.txt b/help/rest/play.txt
new file mode 100644
index 0000000..e9fffb8
--- /dev/null
+++ b/help/rest/play.txt
@@ -0,0 +1,12 @@
+.. _play:
+
+.. index::
+ pair: menu item; Replay
+ pair: command line option; play
+
+Replay animation
+================
+
+Replay a XaoS animation file (.xaf).
+
+**Available as**: menu item, command line option
diff --git a/help/rest/plc.txt b/help/rest/plc.txt
new file mode 100644
index 0000000..df9f44c
--- /dev/null
+++ b/help/rest/plc.txt
@@ -0,0 +1,17 @@
+.. _plc:
+
+.. index::
+ pair: functions; Replay only
+
+Replay only commands
+====================
+
+Some commands, such as timing primitives or animation functions, are available
+only in animation files.
+
+.. toctree::
+
+ linemenu
+ animf
+ time
+ load
diff --git a/help/rest/quit.txt b/help/rest/quit.txt
new file mode 100644
index 0000000..b238c59
--- /dev/null
+++ b/help/rest/quit.txt
@@ -0,0 +1,17 @@
+.. _quit:
+.. _quitmenu:
+.. _noquit:
+
+.. index::
+ pair: menu item; Quit
+ pair: command line option; quit
+ pair: command; quit
+
+Quit
+====
+
+**Syntax**:(quit)
+
+Quit XaoS.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/randompalette.txt b/help/rest/randompalette.txt
new file mode 100644
index 0000000..fceb7c5
--- /dev/null
+++ b/help/rest/randompalette.txt
@@ -0,0 +1,20 @@
+.. _randompalette:
+
+.. index::
+ pair: menu item; Random palette
+ pair: command line option; randompalette
+ pair: command; randompalette
+
+Random palette
+==============
+
+**Syntax**:(randompalette)
+
+Create a random palette. XaoS will automatically pick one of its
+palette-generation algorithms and create one.
+
+Note that changing the palette in truecolor modes forces recalculation of the
+whole screen. To avoid this, you can enable the :ref:`palette emulation filter
+<palettef>` first.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/range.txt b/help/rest/range.txt
new file mode 100644
index 0000000..6d10027
--- /dev/null
+++ b/help/rest/range.txt
@@ -0,0 +1,32 @@
+.. _range:
+.. _mguess:
+.. _guess0:
+.. _guess1:
+.. _guess2:
+.. _guess3:
+.. _guess4:
+.. _guess5:
+.. _guess6:
+.. _guess7:
+.. _guess8:
+.. _guess9:
+.. _guessall:
+
+.. index::
+ pair: command line option; range
+ pair: command; range
+ pair: menu; Solid guessing
+
+Solid guessing range
+====================
+
+**Syntax**:(range integer)
+
+XaoS has a solid guessing optimization: if all corners of a rectangle have the
+same color, it assumes that the whole rectangle is a solid colored block, and
+doesn't calculate points inside the rectangle. This optimization saves lots of
+calculation, but sometimes introduces errors. This value alters the maximum
+size of the rectangle that can be guessed at one time. The default value is 3;
+use 0 to disable the optimization.
+
+**Available as**: command line option, command
diff --git a/help/rest/recalculate.txt b/help/rest/recalculate.txt
new file mode 100644
index 0000000..88f8ba6
--- /dev/null
+++ b/help/rest/recalculate.txt
@@ -0,0 +1,17 @@
+.. _recalculate:
+
+.. index::
+ pair: menu item; Recalculate
+ pair: command line option; recalculate
+ pair: command; recalculate
+
+Recalculate
+===========
+
+**Syntax**:(recalculate)
+
+Recalculate current fractal. This should be used when the fractal on the screen
+is strange because of error propagation caused by :ref:`solid guessing
+<range>`.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/record.txt b/help/rest/record.txt
new file mode 100644
index 0000000..4cdf5ab
--- /dev/null
+++ b/help/rest/record.txt
@@ -0,0 +1,20 @@
+.. _record:
+
+.. index::
+ pair: menu item; Record
+ pair: command line option; record
+ pair: command; record
+
+Record animation
+================
+
+**Syntax**:(record bool [ file ])
+
+e Toggle recording to a XaoS animation file (\*.xaf). This file is
+human-readable, and can easily be improved by hand after recording. See the
+:ref:`format description <format>` for more information.
+
+From the scripting language, (record #t) enables recording, and (record #f)
+disables it.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/redo.txt b/help/rest/redo.txt
new file mode 100644
index 0000000..c93d644
--- /dev/null
+++ b/help/rest/redo.txt
@@ -0,0 +1,11 @@
+.. _redo:
+
+.. index::
+ pair: menu item; Redo
+
+Redo
+====
+
+Redo last undone operation. See :ref:`undo <undo>`.
+
+**Available as**: menu item
diff --git a/help/rest/renderanim.txt b/help/rest/renderanim.txt
new file mode 100644
index 0000000..e4573bf
--- /dev/null
+++ b/help/rest/renderanim.txt
@@ -0,0 +1,12 @@
+.. _renderanim:
+
+.. index::
+ pair: menu item; Render animation
+
+Render animation
+================
+
+Render an animation to image files. See :ref:`How to encode video files <video>`
+for more information.
+
+**Available as**: menu item,
diff --git a/help/rest/rest.pri b/help/rest/rest.pri
new file mode 100644
index 0000000..268939c
--- /dev/null
+++ b/help/rest/rest.pri
@@ -0,0 +1,134 @@
+OTHER_FILES += \
+ X11.txt \
+ aa.txt \
+ about.txt \
+ addformula.txt \
+ animateview.txt \
+ animf.txt \
+ animroot.txt \
+ anti.txt \
+ autopilot.txt \
+ background.txt \
+ bailout.txt \
+ barnsley.txt \
+ blur.txt \
+ calc.txt \
+ clearline.txt \
+ clearlines.txt \
+ clearscreen.txt \
+ cocoa.txt \
+ color.txt \
+ command.txt \
+ controls.txt \
+ copy.txt \
+ cycling.txt \
+ dX-fullscreen.txt \
+ dX-window.txt \
+ defpalette.txt \
+ devel.txt \
+ display.txt \
+ drivers.txt \
+ dynamic.txt \
+ edge.txt \
+ edge2.txt \
+ edit.txt \
+ emboss.txt \
+ fastjulia.txt \
+ file.txt \
+ filter.txt \
+ format.txt \
+ formula.txt \
+ fractal.txt \
+ gpl.txt \
+ helpmenu.txt \
+ incoloring.txt \
+ index.txt \
+ initstate.txt \
+ interlace.txt \
+ interrupt.txt \
+ letterspersec.txt \
+ line.txt \
+ linekey.txt \
+ linemenu.txt \
+ load.txt \
+ loadexample.txt \
+ loadpos.txt \
+ magnet.txt \
+ mandel.txt \
+ mandel3.txt \
+ maxiter.txt \
+ menus.txt \
+ message.txt \
+ mfilter.txt \
+ mformula.txt \
+ ministatus.txt
+ misc.txt \
+ morphangle.txt \
+ morphjulia.txt \
+ morphlastline.txt \
+ morphline.txt \
+ morphview.txt \
+ moveview.txt \
+ newton.txt \
+ nogui.txt \
+ octal.txt \
+ outcoloring.txt \
+ palette.txt \
+ palettef.txt \
+ palettemenu.txt \
+ paste.txt \
+ periodicity.txt \
+ phoenix.txt \
+ plane.txt \
+ play.txt \
+ plc.txt \
+ quit.txt \
+ randompalette.txt \
+ range.txt \
+ recalculate.txt \
+ record.txt \
+ redo.txt \
+ renderanim.txt \
+ root.txt \
+ rotate.txt \
+ savecfg.txt \
+ saveimg.txt \
+ savepos.txt \
+ sffe.txt \
+ shiftpalette.txt \
+ smoothmorph.txt \
+ speed.txt \
+ starfield.txt \
+ start.txt \
+ status.txt \
+ stereogram.txt \
+ stopreplay.txt \
+ support.txt \
+ tcolor.txt \
+ text.txt \
+ textposition.txt \
+ textsleep.txt \
+ time.txt \
+ truecolor.txt \
+ tutorial.txt \
+ ui.txt \
+ uimandelbrot.txt \
+ uiperturbation.txt \
+ uiview.txt \
+ undo.txt \
+ usleep.txt \
+ video.txt \
+ volunteer.txt \
+ wait.txt \
+ win32.txt \
+ writehelp.txt \
+ xaosdev.txt \
+ xtextcenter.txt \
+ xtexteight.txt \
+ xtextleft.txt \
+ xtextpos.txt \
+ ytextbottom.txt \
+ ytextmiddle.txt \
+ ytextpos.txt \
+ ytextup.txt \
+ zoom.txt
diff --git a/help/rest/root.txt b/help/rest/root.txt
new file mode 100644
index 0000000..0513923
--- /dev/null
+++ b/help/rest/root.txt
@@ -0,0 +1,22 @@
+.. _root:
+
+.. index::
+ pair: menu; Root
+
+Root menu
+---------
+
+This menu is usually displayed at the top of the screen or window. It contains
+all currently available submenus. During animation another menu is
+displayed--the :ref:`Animation root menu <animroot>`.
+
+.. toctree::
+
+ file
+ edit
+ fractal
+ calc
+ mfilter
+ ui
+ misc
+ helpmenu
diff --git a/help/rest/rotate.txt b/help/rest/rotate.txt
new file mode 100644
index 0000000..f77c6b4
--- /dev/null
+++ b/help/rest/rotate.txt
@@ -0,0 +1,57 @@
+.. _rotate:
+.. _norotate:
+.. _controtate:
+.. _mouserotate:
+.. _rotationspeed:
+.. _autorotate:
+.. _fastrotate:
+
+.. index::
+ pair: menu; Rotation
+ pair: command line option; fastrotate
+ pair: command; fastrotate
+ pair: menu item; Continuous rotation
+ pair: command line option; autorotate
+ pair: command; autorotate
+ pair: menu item; Rotation speed
+ pair: command line option; rotationspeed
+ pair: command; rotationspeed
+
+
+Image rotation
+==============
+
+XaoS has support for rotation of the image to any angle. By default, changing
+the angle requires recalculation of the whole screen, but when **fast rotation
+mode** is enabled, the angle can be changed smoothly. In this mode XaoS
+calculates a larger non-rotated image and rotates it when needed, so it
+increases memory requirements and slows XaoS down; hence, it should be disabled
+when rotation is not being used.
+
+The user interface provides two rotation modes--**rotate by mouse** which
+allows the angle to be changed by dragging with the first mouse button
+depressed, and **continuous rotation mode**, where the image is rotated
+clockwise continuously, and the arrow keys can be used to change the rotiation
+speed.
+
+**Syntax**:(fastrotate bool)
+
+This function is used to enable and disable fast rotation mode.
+
+**Available as**: command line option, command
+
+Automatic rotation
+------------------
+
+**Syntax**:(autorotate bool)
+
+Use this function to enable continuous rotation. In the scripting language you
+can also use :ref:`morphangle <morphangle>` to get an outwardly similar but
+more controllable effect.
+
+**Syntax**:(rotationspeed float)
+
+Specify the speed of continuous rotation, in degrees per second. Negative
+values are allowed and rotate anticlockwise.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/savecfg.txt b/help/rest/savecfg.txt
new file mode 100644
index 0000000..1294623
--- /dev/null
+++ b/help/rest/savecfg.txt
@@ -0,0 +1,17 @@
+.. _savecfg:
+
+.. index::
+ pair: menu item; Save configuration
+ pair: command line option; savecfg
+ pair: command; savecfg
+
+Save configuration
+==================
+
+**Syntax**:(savecfg)
+
+Save current configuration to ~/.xaosrc (under Unix) or xaos.cfg (under DOS and
+Windows). XaoS automatically reloads the configuration from this file when it
+starts.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/saveimg.txt b/help/rest/saveimg.txt
new file mode 100644
index 0000000..ea4ea8b
--- /dev/null
+++ b/help/rest/saveimg.txt
@@ -0,0 +1,21 @@
+.. _saveimg:
+
+.. index::
+ pair: menu item; Save image
+ pair: command line option; saveimg
+ pair: command; saveimg
+
+Save image
+==========
+
+**Syntax**:(saveimg file)
+
+Save current state to an image file. This file is in .png (portable network
+graphics) format, which can be read by many applications varying from graphics
+programs all the way to Web browsers.
+
+This function needs an external library called libpng. If the library wasn't
+available during compilation, this function is unavailable too. Please see
+INSTALL for more information about obtaining libpng and recompiling XaoS.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/savepos.txt b/help/rest/savepos.txt
new file mode 100644
index 0000000..3c37e77
--- /dev/null
+++ b/help/rest/savepos.txt
@@ -0,0 +1,18 @@
+.. _savepos:
+
+.. index::
+ pair: menu item; Save
+ pair: command line option; savepos
+ pair: command; savepos
+
+Save XaoS position file
+=======================
+
+**Syntax**:(savepos file)
+
+Save current state to a XaoS position file (\*.xpf). This file is
+human-readable, and can easily be improved by hand after saving, or used as a
+base for animations. See the :ref:`format description <format>` for more
+information.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/sffe.txt b/help/rest/sffe.txt
new file mode 100644
index 0000000..674300d
--- /dev/null
+++ b/help/rest/sffe.txt
@@ -0,0 +1,79 @@
+.. _sffe:
+.. _usrform:
+.. _usrformInit:
+
+.. index::
+ pair: menu item; User formula
+ pair: menu item; User initialization
+ pair: command; usrform
+ pair: command line option; usrform
+ pair: command; usrformInit
+ pair: command line option; usrformInit
+ single: sffe
+
+User Formulas
+=============
+
+XaoS supports entering your own custom formulas. Select User formula from the
+Fractal menu to define a custom fractal formula. Select User initialization to
+change the sequence starting point **z0**. By default **z0** is set to 0. User
+formulas should be interpreted as functions in the form **Z(n+1) = formula
+(Z(n), Z(n-1), C)**.
+
+Variables
+---------
+
+In user formulas, as shown above, three variables are available:
+
+z
+
+ current sequance point Z(n)
+
+c
+
+ current plane 'point'
+
+p
+
+ previous sequence point Z(n-1)
+
+Constants
+---------
+
+Format for complex numbers is **{re;im}** eg. {3;2} is complex number 3+2i.
+
+
+Functions
+---------
+
+Available functions are listed below:
+
+basic operations
+
+ +, -, \*, /
+
+basic trigonometry
+
+ sin, cos, tan, cot asin, acos, atan, acot sinh, cosh, tanh, coth
+
+Exponential and logarithmic functions
+
+ exp log - natural logarithm log2, log10 logN (base, z) - logarithm of base
+ N (where N is integer) logCN (base, z) - logarithm of base CN (where CN is
+ complex)
+
+power functions
+
+ powi - power with integer exponent (fastest) powd - power with real
+ exponent powdc - power with complex exponent pow - same as powd sqr -
+ square
+
+square functions
+
+ sqrt - square root of a complex number rtni (z, n, i) - i-th root of n-th
+ orgder
+
+other functions
+
+ rand (max) - random real number in range [0, max) inv - inverse abs -
+ absolute value re - real part im - imaginary part
diff --git a/help/rest/shiftpalette.txt b/help/rest/shiftpalette.txt
new file mode 100644
index 0000000..08ebf64
--- /dev/null
+++ b/help/rest/shiftpalette.txt
@@ -0,0 +1,25 @@
+.. _shiftpalette:
+.. _fshift:
+.. _bshift:
+
+.. index::
+ pair: menu item; Shift palette
+ pair: command line option; shiftpalette
+ pair: command; shiftpalette
+
+Shift palette
+=============
+
+**Syntax**:(shiftpalette integer)
+
+Shift palette by the specified number of cells. This can be used to tune the
+palette's position on the fractal. You can also use the **Shift one forward**
+and **Shift one backward** functions for fine-tuning. Note that shifted and
+rotated palettes could look different on different displays (because they may
+have different palette sizes).
+
+Shifting the palette on truecolor displays causes a recalculation of the
+screen. To avoid this, you could use :ref:`palette emulation filter
+<palettef>`.
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/smoothmorph.txt b/help/rest/smoothmorph.txt
new file mode 100644
index 0000000..73d68b5
--- /dev/null
+++ b/help/rest/smoothmorph.txt
@@ -0,0 +1,32 @@
+.. _smoothmorph:
+
+.. index::
+ pair: command; morphview
+
+Smooth Morphing
+===============
+
+**Syntax**:(morphview keystring starttime endtime)
+
+This function lets you
+smoothly start and stop morphing. Specify starttime and stoptime as nonzero,
+and morphing will speed up and slow down for that number of usecs.
+
+The keystring is used to select what morphing you want to control. It is one of
+the following:
+
+'view
+
+ control :ref:`morphview <morphview>`
+
+'angle
+
+ control :ref:`morphangle <morphangle>`
+
+'julia
+
+ control :ref:`morphjulia <morphjulia>`
+
+'line
+
+ control :ref:`morphline <morphline>`
diff --git a/help/rest/speed.txt b/help/rest/speed.txt
new file mode 100644
index 0000000..8e723a2
--- /dev/null
+++ b/help/rest/speed.txt
@@ -0,0 +1,39 @@
+.. _speed:
+.. _speedup:
+.. _maxstep:
+
+.. index::
+ pair: menu item; Zooming speed
+ pair: command line option; speed
+ pair: command; speed
+ pair: command; maxstep
+ pair: command; speedup
+
+Zooming speed
+=============
+
+**Syntax**:(speed float)
+
+Change zooming speed, where 1 is the default, 2 means twice as fast, and so on.
+
+**Available as**: menu item, command line option, command
+
+In the scripting language you can use the following functions for better
+control:
+
+**Syntax**:(maxstep float)
+
+Selects the zooming/unzooming speed. The parameter specifies how much of the
+range will be removed each twentieth of a second; 0 means nothing, 1 means
+everything (the parameter obviously has to be less than 1). Higher values mean
+faster zooming.
+
+**Available as**: command
+
+**Syntax**:(speedup float) When zooming/unzooming, every twentieth of a second
+the speedup value is added to the current step until maxstep is reached. So
+this value selects the rate at which zooming stops and starts. Both these
+functions are more for internal use of XaoS then for manually written scripts,
+but they could come in useful nonetheless.
+
+**Available as**: command
diff --git a/help/rest/starfield.txt b/help/rest/starfield.txt
new file mode 100644
index 0000000..4104c16
--- /dev/null
+++ b/help/rest/starfield.txt
@@ -0,0 +1,17 @@
+.. _starfield:
+
+.. index::
+ menu item; Starfield
+ command line option; starfield
+ filter; Starfield
+
+Starfield
+=========
+
+The starfield filter generates random stars whose density depends on the
+iteration count. Choose your favorite spiral fractal and enable this filter to
+get a Grand Design spiral galaxy :)
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/start.txt b/help/rest/start.txt
new file mode 100644
index 0000000..0f0c74e
--- /dev/null
+++ b/help/rest/start.txt
@@ -0,0 +1,27 @@
+.. _start:
+
+Getting Started
+===============
+
+| :ref:`Basic controls <controls>`
+| Learn the basic commands to control XaoS.
+|
+| :tutor:`An introduction to fractals <fractal.xaf>`
+| Try this animated tutorial if you don't know what a fractal is. If you are new to XaoS you should try it too, since it is quite a good example of XaoS's features.
+|
+| :tutor:`XaoS features overview <features.xaf>`
+| Watch this tutorial to discover more of XaoS's features.
+
+.. note::
+
+ Both the tutorials are divided into chapters and available from help menu, so you
+ don't need to watch them all at once (they are about half an hour long).
+
+| :ref:`XaoS Overview <tutorial>`
+| A written introduction to all of XaoS's features.
+
+.. toctree::
+ :hidden:
+
+ controls
+ tutorial
diff --git a/help/rest/status.txt b/help/rest/status.txt
new file mode 100644
index 0000000..33cb262
--- /dev/null
+++ b/help/rest/status.txt
@@ -0,0 +1,18 @@
+.. _status:
+.. _animstatus:
+
+.. index::
+ pair: menu item; Status
+ pair: command line option; status
+ pair: command; status
+
+Status
+======
+
+**Syntax**:(status bool)
+
+Enable/disable status information. This displays some useful information about
+the current fractal, such as viewpoint etc. (In low-resolution modes it also
+almost completely obscures the current fractal...)
+
+**Available as**: menu item, command line option, command
diff --git a/help/rest/stereogram.txt b/help/rest/stereogram.txt
new file mode 100644
index 0000000..3f48bfa
--- /dev/null
+++ b/help/rest/stereogram.txt
@@ -0,0 +1,109 @@
+.. _stereogram:
+
+.. index::
+ pair: menu item; Random dot stereogram
+ pair: command line option; stereogram
+ pair: filter; Random dot stereogram
+
+Random dot stereogram
+=====================
+
+Fractal images are good as a base for random dot stereograms. In case you don't
+know what these are, please point your browser to Google or another search
+engine and find some articles about such images, because learning to read such
+images takes some effort. They make it possible to generate three dimensional
+images on a normal monitor without any additional hardware, by exploiting bugs
+in the human brain (although you need two working eyes, and some people never
+learn to see them; they can simply ignore this feature).
+
+XaoS is able to generate these images in animations, so you may use all normal
+XaoS functions (except palette changing and palette rotation, which makes no
+sense applied to a stereogram). To make the animation yet more exciting, XaoS
+emulates "falling" into the set; while you zoom in, your distance from the set
+drops and drops--but you never hit it; when the set reaches the level of your
+monitor, the distance is changed again so you are far away.
+
+To make this work right, XaoS needs to know the **exact size of your monitor**.
+Because most platforms have no way to determine this, you need to use **command
+line options** to tune it. If it's not set or is wrong, the stereograms will
+probably be impossible to see (if your monitor is too big or resolution too
+low), or the images will seem to be shallow (if your monitor is too small or
+resolution too high).
+
+By default XaoS expects my 15" monitor (29.0cm x 21.5 cm). Another cause of
+problems is the virtual screen supported by some windowed environments (like
+some X servers) that makes a program think that the resolution is higher than
+it actually is, and you see only part of this extra-large screen.
+
+The worst thing you could possibly do is to run full-screen XaoS in some
+graphical windowing system (OS/2 on top of Windows or Wine on top of Linux,
+perhaps) where XaoS can't tell the real size of its window at all. In such
+cases, it's normally better (not to mention faster) to run XaoS natively,
+rather than under such an emulation layer.
+
+The following command line options are provided to specify sizes:
+
+-screenwidth, -screenheight
+
+ Lets you specify the size of your screen in centimeters. Note that you need
+ to specify the size of the visible image on the monitor, not the size with
+ edge borders, or the size of the tube. The simplistic 'my monitor is 17",
+ just turn 17" into centimeters' doesn't work; that 17" is a marketing
+ figure and has only a vague connection to reality. Get out a ruler and
+ measure it.
+
+-pixelwidth, -pixelheight
+
+ Lets you specify the exact size of a single pixel, if XaoS cannot determine
+ this for itself from your screen size.
+
+These options are used by some other parts of XaoS as well, so you should use
+them even when you don't want to see stereograms. You should probably write a
+small starting script (or alias, or shortcut; whatever your environment uses)
+that passes the correct parameters to XaoS.
+
+If the window is **smaller than 8cm in any direction**, you will probably be
+unable to see anything; make the window bigger. The correct way to see XaoS
+stereograms is:
+
+1
+
+ Start XaoS with options specifying the exact size of your screen or one
+ pixel on it
+
+2
+
+ Sit 60cm away from monitor
+
+3
+
+ If you use a windowed environment, resize XaoS's window to make it wider
+ than, say, 15 cm.
+
+4
+
+ Enable the filter (by pressing E)
+
+5
+
+ focus on a point far away from the monitor (try to use your own reflection,
+ if your monitor's not antireflective); the random blurring should
+ eventually fall into the pattern of a Mandelbrot set.
+
+6
+
+ Carefully use your mouse to zoom into interesting areas (it is easy to lose
+ concentration when you are not trained; but you can use the autopilot...)
+
+7
+
+ Enjoy animation :)
+
+If you still can't see the stereograms, it could be that the fractal, or your
+eye, is deformed. A deformed fractal can be caused by your specifying your
+monitor size wrongly. Visual problems that damage depth perception, as well as
+problems like astigmatism, can make it impossible to see stereograms at all.
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/stopreplay.txt b/help/rest/stopreplay.txt
new file mode 100644
index 0000000..b24bd0e
--- /dev/null
+++ b/help/rest/stopreplay.txt
@@ -0,0 +1,11 @@
+.. _stopreplay:
+
+.. index::
+ pair: menu item; Stop replay
+
+Stop replay
+===========
+
+Terminate animation replay.
+
+**Available as**: menu item
diff --git a/help/rest/support.txt b/help/rest/support.txt
new file mode 100644
index 0000000..73af87f
--- /dev/null
+++ b/help/rest/support.txt
@@ -0,0 +1,70 @@
+.. _support:
+
+.. index:: Support, Home Page, Discussion Groups, Issue Tracker, Bugs
+
+Getting Support
+===============
+
+XaoS is a community-supported free software project.
+
+Home Page
+---------
+
+Visit the `XaoS home page`__ for the latest news and
+information about XaoS and to download the latest versions.
+
+__ http://xaos.sourceforge.net/
+
+
+
+Users' Discussion Group
+-----------------------
+
+The `xaos-users`__ discussion group on Google Groups provides a place for XaoS users
+to help each other get the most out of XaoS. XaoS developers also monitor this
+discussion and answer questions from time to time.
+
+__ http://groups.google.com/group/xaos-users
+
+You can browse the archives freely but you must join the group in order to post.
+However, Google Groups provides a range of options for participation from a
+traditional mailing list to a completely web-based forum, so you don’t have to get
+emails if you don’t want to.
+
+If you have a question or problem, please feel free to ask for help. We also
+encourageyou to share examples (.xaf or .xpf files), hints and tips. If you have
+a gallery of images created using XaoS, feel free to post a link to the group.
+
+
+Developers' Discussion Group
+----------------------------
+
+The `xaos-devel`__ discussion group on Google Groups is where XaoS developers
+discuss and coordinate the further development of XaoS. XaoS users are welcome to
+monitor this forum as well, but general discussion and requests for help should be
+posted to the Users’ Discussion Group instead.
+
+__ http://groups.google.com/group/xaos-devel
+
+
+Issue Tracker
+-------------
+
+Issues are tracked on `Google Code`__. If you think you have found a bug in XaoS or
+have an idea for a great new feature, please let us know about it. However, if
+you’re not sure how to submit a useful issue report, please ask on the xaos-users
+discussion group first (see above).
+
+__ http://code.google.com/p/gnuxaos/issues/list
+
+Please don’t submit duplicate issues. Search the existing ones first to make sure
+nobody has already reported it. You can add additional information about a bug by
+entering a comment on an existing bug. You can also express your interest in an issue
+by using the “Star†function on Google Code. This lets the developers know how many
+users are interested in an issue and also allows you receive status updates.
+
+The developers will do their best to respond to issues in a timely manner. However,
+keep in mind that XaoS is developed on a volunteer basis and the developers work on
+it in their spare time. Therefore, we can’t guarantee that issues will be addressed
+in a certain timeframe.
+
diff --git a/help/rest/tcolor.txt b/help/rest/tcolor.txt
new file mode 100644
index 0000000..09e5ede
--- /dev/null
+++ b/help/rest/tcolor.txt
@@ -0,0 +1,108 @@
+.. _tcolor:
+.. _intcoloring:
+.. _outtcoloring:
+.. _tincoloring:
+.. _toucoloring:
+.. _int0:
+.. _int1:
+.. _int2:
+.. _int3:
+.. _int4:
+.. _int5:
+.. _int6:
+.. _int7:
+.. _int8:
+.. _int9:
+.. _int10:
+.. _int11:
+.. _outt0:
+.. _outt1:
+.. _outt2:
+.. _outt3:
+.. _outt4:
+.. _outt5:
+.. _outt6:
+.. _outt7:
+.. _outt8:
+.. _outt9:
+.. _outt10:
+.. _outt11:
+
+.. index::
+ pair: menu; True-color outcoloring mode
+ pair: command line option; intcoloring
+ pair: command; intcoloring
+ pair: menu; True-color incoloring mode
+ pair: command line option; outtcoloring
+ pair: command; outtcoloring
+
+Truecolor coloring mode
+=======================
+
+**Syntax**:(intcoloring integer)
+
+**Syntax**:(outtcoloring integer)
+
+Truecolor coloring modes are similar to :ref:`incolor <incoloring>` and
+:ref:`outcolor <outcoloring>` coloring modes; but instead of using a palette,
+they directly calculate the red, green and blue components of the color. This
+lets you display more parameters at once, and produces interesting and often
+attractive results. On 8bpp displays you need to enable the :ref:`palette
+emulator filter <palettef>` first to see anything, amd the quality won't be so
+good, as far fewer colors are available per parameter.
+
+The :tutor:`tutorial on truecolor coloring modes <truecol.xaf>` has more
+information and examples.
+
+The cryptic names of the modes are always three mathematical formulae (one for
+each color component), where **real** means the real part of the latest orbit,
+and **imag** means the imaginary part.
+
+To enable inside/outside truecolor coloring mode in the scripting language, set
+incoloring/outcoloring value to 10 (truecolor coloring mode) before (or after)
+calling intcoloring or outtcoloring.
+
+In the scripting language, the coloring mode is specified by one of the
+following integers:
+
+0
+
+ black
+
+1
+
+ re*im sin(re^2) angle
+
+2
+
+ sin(re) sin(im) sin(square)
+
+3
+
+ hsv
+
+4
+
+ hsv2
+
+5
+
+ cos(re^c) cos(im^2) cos(square)
+
+6
+
+ abs(re^2) abs(im^2) abs(square)
+
+7
+
+ re*im re*re im*im
+
+8
+
+ abs(im*cim) abs(re*cre) abs(re*cim)
+
+9
+
+ abs(re*im-csqr) abs(re^2-csqr) abs(im^2-csqr)
+
+**Available as**: command line option, command
diff --git a/help/rest/text.txt b/help/rest/text.txt
new file mode 100644
index 0000000..edabde4
--- /dev/null
+++ b/help/rest/text.txt
@@ -0,0 +1,28 @@
+.. _text:
+
+.. index::
+ pair: menu item; Display text
+ pair: command line option; text
+ pair: command; text
+
+Display text
+============
+
+**Syntax**:(text string)
+
+Display the given text on the screen. This function is mainly useful in tutorials.
+Text should be cleared by printing lots of spaces, or using the
+:ref:`clearscreen` or :ref:`display` functions. You might also want to use the
+:ref:`textposition` function to select the part of the screen to display the text on.
+
+To wait for the user to read the text, you can use the :ref:`textsleep` function.
+
+Example::
+
+ (clearscreen)
+ (textposition 'center 'middle)
+ (text "Welcome into my animation")
+ (textsleep)
+ (display)
+
+**Available as**: menu item, command line option, command \ No newline at end of file
diff --git a/help/rest/textposition.txt b/help/rest/textposition.txt
new file mode 100644
index 0000000..4863150
--- /dev/null
+++ b/help/rest/textposition.txt
@@ -0,0 +1,19 @@
+.. _textposition:
+
+.. index::
+ pair: menu; Horizontal text position
+ pair: menu; Vertical text position
+ pair: command line option; textposition
+ pair: command; textposition
+
+Text position
+=============
+
+**Syntax**:(textposition keyword keyword)
+
+Select :ref:`text <text>` position. The first keyword specifies the horizontal
+position, the second the vertical position. The horizontal position should be
+one of 'left, 'center, and 'right. The vertical should be one of 'top, 'middle,
+and 'bottom.
+
+**Available as**: command line option, command
diff --git a/help/rest/textsleep.txt b/help/rest/textsleep.txt
new file mode 100644
index 0000000..6143313
--- /dev/null
+++ b/help/rest/textsleep.txt
@@ -0,0 +1,18 @@
+.. _textsleep:
+
+.. index::
+ pair: command; textsleep
+
+Wait for text
+=============
+
+**Syntax**:(textsleep)
+
+This function's behavior is very similar to :ref:`usleep <usleep>`, but the
+time is calculated from the number of letters currently displayed onscreen. If
+you want to wait just long enough for the user to read the subtitle, use this
+function. The user can alter the replay speed as desired using
+:ref:`letterspersec <letterspersec>`. This value can be changed during replay
+with the arrow keys.
+
+**Available as**: command
diff --git a/help/rest/time.txt b/help/rest/time.txt
new file mode 100644
index 0000000..b46695b
--- /dev/null
+++ b/help/rest/time.txt
@@ -0,0 +1,18 @@
+.. _time:
+
+.. index::
+ pair: functions; Timing
+
+Timing functions
+================
+
+Timing functions are used to control the animation replay daemon. It can wait
+for a given time, or wait until calculation is complete. The animation
+functions are controlled by such waiting; animations that are running while
+delays start keep running through the delay.
+
+.. toctree::
+
+ usleep
+ textsleep
+ wait
diff --git a/help/rest/truecolor.txt b/help/rest/truecolor.txt
new file mode 100644
index 0000000..e9c6c93
--- /dev/null
+++ b/help/rest/truecolor.txt
@@ -0,0 +1,21 @@
+.. _truecolor:
+
+.. index::
+ pair: menu item; Truecolor emulator
+ pair: command line option; truecolor
+ pair: filter; Truecolor emulator
+
+Truecolor emulator
+==================
+
+XaoS can work in either :ref:`palette <palettef>` or truecolor mode. Both modes
+have advantages and disadvantages. Palette mode allows effects such as palette
+rotation, while truecolor mode allows smoother :ref:`incoloring <incoloring>`
+and :ref:`outcoloring <outcoloring>` modes and the :ref:`truecolor coloring
+<tcolor>` modes. If your display is 8bpp, you can enable this filter to get
+truecolor emulation (but, obviously, not with as many colors as a real
+truecolor display).
+
+:ref:`More information about filters <filter>`
+
+**Available as**: menu item, command line option
diff --git a/help/rest/tutorial.txt b/help/rest/tutorial.txt
new file mode 100644
index 0000000..2757a78
--- /dev/null
+++ b/help/rest/tutorial.txt
@@ -0,0 +1,254 @@
+.. _tutorial:
+
+.. index:: Tutorial, Features, Overview
+
+Feature Overview
+================
+
+This is a brief introduction to the basic XaoS features.
+
+How to zoom
+-----------
+
+The main advantage of XaoS is that after a few seconds' delay to calculate the
+first image, you may choose any point with the mouse and press the **left**
+button. The image will start to zoom smoothly into the point you choose. You
+may move the mouse and zoom smoothly into interesting areas. By pressing the
+**middle button** (or **left+right** buttons) you may also **move the image**
+using "drag & drop" if you missed an interesting place. **Unzooming** is also
+possible by using the **right button**, but it is much slower because
+optimizations are not so effective as for zooming.
+
+In case you think that the default **speed** is boring (it is quite slow, to
+make XaoS smooth on a slow computer) you may change it by pressing **arrow
+up/down**. But faster zooming is more expensive, so if the speed is too high
+you will see little but funny colorful blinking rectangles.
+
+Autopilot
+---------
+
+To make XaoS yet more impressive we made a special autopilot that automatically
+drives into interesting boundaries of the set. So you can press A, play your
+favorite music, drink coffee and relax. I never tried this but it should be
+really relaxing! Many pictures in the XaoS gallery were discovered using the
+autopilot.
+
+The autopilot also has some additional features. It turns back when the zoomed
+picture stops being interesting, and is able to spot when it's zoomed into a
+really boring part (or has reached the limit of floating point numbers) and
+restart zooming from the top.
+
+Various fractal formulae
+------------------------
+
+XaoS also supports formulae other than the Mandelbrot set. You may change
+**formula** using the **number keys** or **SHIFT+letters**.
+
+On keys 1 to 5 are **Mandelbrot sets of various power**. The "normal"
+Mandelbrot set is on key 1.
+
+On key 6 is a fractal called **Newton**. It is Newton's famous formula for
+finding roots.
+
+On key 7 is the **fourth ordered Newton** fractal.
+
+On key 8 is a fractal called **Barnsley**.
+
+On key 9 is **Barnsley's second** fractal.
+
+On key 0 is **Barnsley's third** fractal.
+
+With keys SHIFT-A you can display a fractal called **octo**. It is a fractal
+that Thomas discovered in fractint.
+
+With keys SHIFT-B you can display a fractal called **Phoenix**. It is a very
+nice and quite famous fractal.
+
+With keys SHIFT-C you can display a fractal called **Magnet**. This fractal has
+quite a complex formula so it is a bit slow.
+
+With keys SHIFT-D you can display the **Magnet2** fractal.
+
+The rest of the built-in fractals are accessible through an other menu, but you
+can still use the hotkeys.
+
+On SHIFT-E is a fractal called **Triceratops** found by Arpad.
+
+On SHIFT-F is a fractal called **Catseye** found by Arpad. This is more
+interesting if you change the bailout value.
+
+On SHIFT-G is a fractal called **Mandelbar**. It was in Gnofract4d, and they
+found it at: http://mathworld.wolfram.com/MandelbarSet.html
+
+On SHIFT-H is the **Lambda** fractal.
+
+On SHIFT-I and SHIFT-J are the **Manowar** and **Spider** fractals, they were
+found by users of fractint. (Scott Taylor or Lee Skinner) It was on
+http://spanky.triumf.ca/www/fractint/ taylor_skinner_type.html
+
+The next 3 fractals are famous classic fractals.
+
+On SHIFT-K is the **Sierpinski** Gasket. You can change its shape by selecting
+another Julia seed. (This is for technical reasons.)
+
+On SHIFT-L is the **Sierpinski Carpet.** It's shape can also be changed by
+selecting another Julia seed.
+
+On SHIFT-M is the **Koch Snowflake.**
+
+Out-coloring modes
+------------------
+
+To make fractals yet more interesting, more coloring modes for points outside
+the set are provided. "Classical coloring mode" uses the number of iterations
+that the orbit required to escape to (nearly) infinity. You can change this
+mode from the **Fractal menu** or by pressing key C To see more about coloring
+modes, try the tutorial on :tutor:`Incoloring modes <incolor.xaf>` from
+the XaoS features overview.
+
+Those cryptic names for coloring modes are mathematical formulae, where
+**iter** means number of iterations, **real** means real coordinate of last
+orbit, and **imag** means imaginary coordinate of last orbit.
+
+In-coloring mode
+----------------
+
+In-coloring mode is similar to out-coloring, except that it changes how things
+inside the set are displayed. This can also be changed from the **fractal
+menu** or by pressing F.
+
+You might also want to see the tutorial on :tutor:`Out-coloring modes <outcolor.xaf>` from the XaoS features overview.
+
+Planes
+------
+
+All fractals displayed by XaoS are functions with a complex parameter. It can
+be displayed in the normal complex plane, where x is the real part of the
+number, and y is the imaginary part; but it can also be displayed in a number
+of other planes. You can select the plane to use from the **Fractal menu**, or
+by pressing I.
+
+Like the coloring modes, planes have cryptic names. You guessed it, they're
+mathematical formulae. Here mu means coordinates in the normal complex plane.
+If you have coordinates in 1/mu plane, and you need coordinates in the a
+complex plane (to calculate the Mandelbrot set) you simply use the coordinates
+as mu. Lambda is another plane that can be converted to mu using a similar
+formula.
+
+mu
+
+ normal mode.
+
+1/mu
+
+ Inversion: infinity goes to 0 and 0 goes to infinity.
+
+1/(mu+0.25)
+
+ Similar to inversion, but moves the center outside of the Mandelbrot set so
+ that it looks parabolic.
+
+lambda
+
+ Lambda plane.
+
+1/lambda
+
+ Inversion of lambda plane.
+
+1/lambda-1
+
+ Inversion with moved center.
+
+1/(mu-1.40115)
+
+ A very interesting mode for the Mandelbrot set. It makes small things big,
+ so you can browse the set's details easily.
+
+Mandelbrot/Julia switching
+--------------------------
+
+Most of the fractals displayed by XaoS (currently all of them) have two forms:
+Mandelbrot and Julia. Every point in a Mandelbrot set has its own Julia set. To
+see more about this correspondence, try the tutorial on :tutor:`Julia set <julia.xaf>` from the Introduction to fractals.
+
+In the Mandelbrot mode, you can get a corresponding Julia by moving the mouse
+to an interesting point and pressing M. To get back press M again. Some
+fractals (Barnsley and phoenix) are already in their Julia versions, because
+the Mandelbrot ones are boring. But by pressing M in such fractal you should
+get the Mandelbrot version, and by choosing another point as the base point and
+pressing M again you should get a completely different fractal. The most
+interesting points for Julia sets are at the boundaries of the Mandelbrot set.
+Most of the Julias inside or outside the set are boring.
+
+Fast Julia preview mode
+-----------------------
+
+Fast Julia mode is a quick way to find a point to use as a base for the Julia
+set.. Just press J and a small Julia set will be displayed in the top left
+corner. Then move the mouse around with button 1 depressed, and the Julia for
+the point the mouse is over will be automatically generated.
+
+Palette
+-------
+
+If you think that the default XaoS colors are ugly or you are just bored by
+them you can change it by pressing P. XaoS will automatically generate random
+palettes. Many of them look ugly, so press P again to get another one until you
+find one you like.
+
+Filters
+-------
+
+Many interesting effects are done by post-calculation :ref:`filters <filter>`.
+XaoS has filters that do everything from embossing, through motion-blurring,
+right through to turning the fractal into a stereogram. To enable them use the
+filter menu or press E.
+
+Palette cycling
+---------------
+
+This is a very old trick that makes the Mandelbrot set a little flashier. You
+may enable or disable it using Y. In the truecolor modes you need to enable the
+:ref:`palette emulator filter <palettef>` first. This is done via the E key, or
+from the filter menu.
+
+Changing number of iterations
+-----------------------------
+
+To calculate fractals perfectly, you need an infinite number of iterations.
+XaoS does just the first few of them, so after lots of zooming you may get into
+a place that looks quite boring, and the boundaries of the set are rounded,
+without any interesting details. This can be changed by changing the number of
+iterations:
+
+Press and hold arrow right and wait until iterations are high enough. This may
+slow down calculation much. To reduce number of iterations press arrow left.
+
+Changing resolution
+-------------------
+
+XaoS usually starts in a low resolution (320x200 or thereabouts) to make
+calculations faster. If you have a fast computer or you need to save bigger
+.gif images, you may change the resolution. This can be done by pressing = in
+the full screen drivers, or simply by resizing the XaoS window.
+
+Changing driver
+---------------
+
+XaoS usually has more than one driver available. You may change it on the fly
+in case you want a different one. For example, XaoS started in X11 can be
+switched at runtime to use the AA driver. This can be done from the UI menu.
+
+This action is bit dangerous, because XaoS can crash during initialization if
+there is some problem with initialization; XaoS tries to initialize a new
+driver, and if it fails it attempts to return back to the original. Sometimes
+this is impossible, and all XaoS can do is terminate..
+
+Other features
+--------------
+
+XaoS has many other features, but they don't fit into this tutorial. Most of
+them are available from the menu, so you can experiment with them. You might
+also want to see the **animated tutorials** from the **help menu**, to have an
+idea what XaoS can do.
diff --git a/help/rest/ui.txt b/help/rest/ui.txt
new file mode 100644
index 0000000..690c882
--- /dev/null
+++ b/help/rest/ui.txt
@@ -0,0 +1,22 @@
+.. _ui:
+.. _uia:
+
+.. index::
+ pair: menu; UI
+
+UI
+==
+
+This menu contains functions to control the user interface layer of XaoS:
+zooming speed, the autopilot, realtime status information, and so on.
+
+.. toctree::
+
+ speed
+ letterspersec
+ autopilot
+ recalculate
+ interrupt
+ nogui
+ status
+ ministatus
diff --git a/help/rest/uimandelbrot.txt b/help/rest/uimandelbrot.txt
new file mode 100644
index 0000000..3edf916
--- /dev/null
+++ b/help/rest/uimandelbrot.txt
@@ -0,0 +1,48 @@
+.. _uimandelbrot:
+.. _julia:
+.. _juliaseed:
+
+.. index::
+ pair: menu item; Mandelbrot mode
+ pair: command line option; julia
+ pair: command; julia
+ pair: command line option; juliaseed
+ pair: command; juliaseed
+
+Mandelbrot/Julia mode
+=====================
+
+Most fractals rendered by XaoS can be represented as Mandelbrot sets or Julias.
+Each point in the Mandelbrot set has its own Julia set. To learn more about
+this correspondence, see the tutorial on the :tutor:`Julia set <julia.xaf>`.
+
+This function switches between Mandelbrot and Julia representations. When
+switching to Julia, you need to set the seed--a point selected from the
+Mandelbrot set.
+
+If you run this function from the menu, you are prompted for the Julia seed as
+a number. Often, this can be clumsy, and it would be easier to specify a point
+with the mouse pointer. If you hit the M key instead of using the menu, the
+current mouse position is used.
+
+Good seedpoints lie at the boundaries of the Mandelbrot set; other seeds
+usually generate quite a boring fractal. You can also explore various seeds at
+high speed using the :ref:`Fast Julia mode <fastjulia>`.
+
+Not all fractals have Julias, but XaoS can generate fake Julia sets for those
+that do not, which use some Julia-like modification of the formula; so this
+function is currently usable for all fractal types.
+
+**Available as**: menu item
+
+**Syntax**:(julia bool)
+
+This function is used to enable/disable julia mode in animation files.
+
+**Available as**: command line option, command
+
+**Syntax**:(juliaseed complex)
+
+Select the current julia seed.
+
+**Available as**: command line option, command
diff --git a/help/rest/uiperturbation.txt b/help/rest/uiperturbation.txt
new file mode 100644
index 0000000..4195af9
--- /dev/null
+++ b/help/rest/uiperturbation.txt
@@ -0,0 +1,37 @@
+.. _uiperturbation:
+.. _perturbation:
+
+.. index::
+ pair: menu item; Perturbation
+ pair: command line option; perturbation
+ pair: command; perturbation
+
+Perturbation
+============
+
+Perturbation is a simple trick which changes the point at which orbits start.
+Traditionally zero is used, but other values can generate interesting results
+too.
+
+On enabling this function from the menu, you will be asked for a complex number
+specifying the perturbation. It is a toggle; selecting it again resets the
+perturbation to zero without prompting.
+
+It can be used to specify a complex number representing a point on the screen.
+If you hit the B key instead of using the menu, the current mouse position is
+used. This too is a toggle, so B again will disable perturbation by setting it
+to zero.
+
+This function only has an effect for certain formulae (like the
+:ref:`Mandelbrot set <mandel>`) and only then in :ref:`Mandelbrot mode
+<uimandelbrot>`.
+
+**Available as**: menu item
+
+**Syntax**:(perturbation complex)
+
+This is the scripting-language variation of the perturbation function. Instead
+of toggling, you always specify the perturbation to use. Use 0 0 to disable
+perturbation.
+
+**Available as**: command line option, command
diff --git a/help/rest/uiview.txt b/help/rest/uiview.txt
new file mode 100644
index 0000000..7db5c18
--- /dev/null
+++ b/help/rest/uiview.txt
@@ -0,0 +1,56 @@
+.. _uiview:
+.. _view:
+.. _angle:
+
+.. index::
+ pair: menu item; View
+ pair: command line option; view
+ pair: command; view
+ pair: command line option; angle
+ pair: command; angle
+
+View
+====
+
+Set your current viewpoint in the fractal. This function is useful when you
+have found some interesting coordinates somewhere (on a web page, perhaps) and
+you want to see that position in XaoS.
+
+In the dialog you will be asked for the **center**, **radius** and **angle** of
+the image.
+
+The center specifies the point which is displayed at the center of the screen.
+The radius is the radius of a circle around this point; XaoS will size the
+image so that this circle only just fits on the screen. The angle gives the
+rotation of the image in degrees.
+
+People specify fractal coordinates in many ways. Some people use the
+coordinates of the upper-left and lower-right visible points, specifying the
+coordinates as four numbers x1, y1, x2, y2. To set the same viewpoint in XaoS,
+set the real portion of the center to (x1+x2)/2, the imaginary part of center
+to (y1+y2)/2, and the radius to the greater of x2-x1 and y2-y1.
+
+Other programs use a zoom factor instead of a radius. For these, you can set
+the radius to 2/zoom.
+
+**Available as**: menu item
+
+**Syntax**:(view float float float float)
+
+This function is used to set the visible area of fractal in animation files. It
+doesn't let let you specify the angle, (for that, see the separate function
+angle), but lets you specify an ellipse instead of a circle. You can specify
+both a real and an imaginary radius, so you have better control over the area
+that will be visible. XaoS will size the image so that the ellipse only just
+fits on the screen.
+
+**Available as**: command line option, command
+
+**Syntax**:(angle float)
+
+Set the rotation angle in degrees. By default this causes recalculation of the
+screen. You can enable the :ref:`fast rotation mode <rotate>`, which lets you
+rotate the screen without recalculation; but it slows down other things, so
+don't forget to disable it later.
+
+**Available as**: command line option, command
diff --git a/help/rest/undo.txt b/help/rest/undo.txt
new file mode 100644
index 0000000..e93948a
--- /dev/null
+++ b/help/rest/undo.txt
@@ -0,0 +1,13 @@
+.. _undo:
+
+.. index::
+ pair: menu item; Undo
+
+Undo
+====
+
+Undo last operation. 'Last operation' is quite hard to define in XaoS (where
+changes are continuous), so it might be surprising. I hope it will do what you
+want.
+
+**Available as**: menu item
diff --git a/help/rest/usleep.txt b/help/rest/usleep.txt
new file mode 100644
index 0000000..dfe4b54
--- /dev/null
+++ b/help/rest/usleep.txt
@@ -0,0 +1,16 @@
+.. _usleep:
+
+.. index:
+ pair: command; usleep
+
+Usleep
+======
+
+**Syntax**:(usleep integer)
+
+This function waits for a given amount of time (in usec) before processing the
+next command. The screen is recalculated and displayed at the beginning of
+usleep if necessary necessary. The remaining time is spent in waiting or
+performing animation.
+
+**Available as**: command
diff --git a/help/rest/video.txt b/help/rest/video.txt
new file mode 100644
index 0000000..bc4adf3
--- /dev/null
+++ b/help/rest/video.txt
@@ -0,0 +1,99 @@
+.. _video:
+
+.. index::
+ pair: Encoding; Videos
+
+Encoding Videos
+===============
+
+To create a video, make and xaf file first (the easiest way to do this is to
+use the **record** function in the file menu). Then you need to render the
+animation. XaoS can output sequences of ordinary PNG images, that can later be
+used by a video encoder.
+
+Generating image sequences for video
+------------------------------------
+
+To generate an image sequence, choose **Render Animation** from the **Misc**
+menu. You can also use the following command on the command line:
+
+xaos -render [filename] -size 352x240 -antialiasing -renderframerate 24
+-basename [basename]
+
+**File to render** ([filename]) is the name of the xaf file, **Basename**
+([basename]) is the name used as the base filename for rendered images. This
+should also include the path where you want to save the images. XaoS adds a
+four digit sequence number and .png extension to this name automatically.
+
+You might also want to change the resolution. Make sure that the resolution you
+choose is supported by the video codec you wish to use.
+
+The framerate can also be altered. Make sure you choose a framerate that is
+supported by the video codec you wish to use.
+
+**Antialiasing** (-antialiasing) is used to produce anti-aliased images. It
+takes a much longer time and much more memory to calculate them, but resulting
+images are better for video compression and they result in a much smaller video
+file. (the same is true of **JPEG images**)
+
+On the other hand, the other XaoS rendering option **Always Recalculate**
+(-alwaysrecalc) (which disables XaoS's zooming optimizations) is **not
+recommended**. If that's used, the sequence of animation then contains quite a
+lot of extra information, which increases size of video file, but because of
+the codec's lossy compression it is hard to see any difference, so it's not
+worth it.
+
+Rendered files
+--------------
+
+Once you start it, XaoS will generate thousands of frames. They take quite a
+long time to calculate and save, and consume plenty of disk space. (e.g. to
+render part 1 of the tutorial you need about 60MB and half an hour of time).
+
+All images are named [basename]framenum.png. For example intro0001.png is the
+first frame of the animation intro. If consecutive frames are the same, XaoS
+doesn't save them, so some frames may be missing. If your encoder can't handle
+that, you will need to write a simple script which will fill in the gaps by
+means of mv or symbolic linking.
+
+A list of all filenames is saved into the file [basename].par, where each line
+is the name of one frame. The names repeat here if necessary, so you can use
+this file to supply filenames to the encoder.
+
+Encoding videos
+---------------
+
+Once XaoS has generated the png files for each frame of the animation, you can
+use a third-party video encoder to convert the sequence of images into a video
+file. We currently recommend the following encoders, which support a wide
+variety of video codecs and file formats:
+
+ffmpeg
+
+* `ffmpeg home page`_
+* `ffmpeg instructions`_
+
+.. _`ffmpeg home page`:
+ http://ffmpeg.mplayerhq.hu/
+
+.. _`ffmpeg Instructions`:
+ http://ffmpeg.mplayerhq.hu/faq.html#SEC12
+
+mencoder (part of mplayer)
+
+* `mplayer homepage`_
+* `mencoder instructions`_
+
+.. _`mplayer homepage`:
+ http://www.mplayerhq.hu/
+
+.. _`mencoder instructions`:
+ http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html
+
+These are both command line tools. If you prefer a graphical tool, you may
+prefer `Quicktime Pro`_ from Apple. However, this software costs approximately
+US $30. Although QuickTime may be easier to use, the two free
+encoders above are just as capable once you learn how to use them.
+
+.. _`Quicktime Pro`:
+ http://www.apple.com/quicktime/pro/
diff --git a/help/rest/volunteer.txt b/help/rest/volunteer.txt
new file mode 100644
index 0000000..1ef88d9
--- /dev/null
+++ b/help/rest/volunteer.txt
@@ -0,0 +1,36 @@
+.. _volunteer:
+
+.. index::
+ pair: Volunteer; Opportunities
+
+Volunteer Opportunities
+=======================
+
+XaoS is free software. One of the most significant rights its :ref:`license
+<gpl>` grants to you is the right to **freely get, study and improve** its
+source code.
+
+In return, we need your help to make it the best fractal program it can be.
+You don't have to be a programmer to contribute. The following tasks open to
+volunteers:
+
+* Helping other users on the :ref:`forums <forums>`
+* Testing new versions and :ref:`reporting bugs <bugs>`
+* Creating additional tutorials and examples
+* Improving the :ref:`documentation <writehelp>`
+* Translating XaoS into your language
+* Compiling binaries for your favorite operating system
+* Reviewing and documenting the source code
+* Implementing new features and fixing bugs
+
+All development activities are coordinated through `Google Code`__. If you want to
+contribute, we recommend that you sign up for an account so that you can
+use its facilities to coordinate your activites with the rest of the team.
+
+__ http://gnuxaos.googlecode.com/
+
+Before you start, please join the `xaos-devel`__ discussion group and let us know
+what you want to work on. We would be happy to help you get started!
+
+__ http://groups.google.com/group/xaos-devel
+
diff --git a/help/rest/wait.txt b/help/rest/wait.txt
new file mode 100644
index 0000000..f111358
--- /dev/null
+++ b/help/rest/wait.txt
@@ -0,0 +1,20 @@
+.. _wait:
+
+.. index:
+ pair: command; wait
+
+Wait for complete image
+=======================
+
+**Syntax**:(wait)
+
+Wait until the image is complete. You should always use this function after
+zooming or unzooming when dynamic resolution is in use. This ensures that the
+image calculation will be complete so the user can see the result before the
+animation continues. It may also be useful in combination with filters like
+:ref:`motion blur <blur>`.
+
+This function deadlocks if used with :ref:`animation functions <animf>`; don't
+do that.
+
+**Available as**: command
diff --git a/help/rest/win32.txt b/help/rest/win32.txt
new file mode 100644
index 0000000..cc94f5b
--- /dev/null
+++ b/help/rest/win32.txt
@@ -0,0 +1,42 @@
+.. _win32:
+
+.. index::
+ pair: driver; Win32
+ pair: platform; Windows
+
+Win32 driver
+============
+
+This is a driver for Windows 9x and NT. It is new since version 3.1 and because
+of some oddities of Windows API it may be rather unstable. Please report all
+bugs. In case of problems you could use the DOS version of XaoS instead.
+
+The driver should work in all bit depths, but 16 color mode is not natively
+supported by the XaoS engine. XaoS internally works in 32k colors and the
+result is converted to 16 colors by Windows. Because Windows conversion
+routines are slow and ugly, the result is slow and ugly. Please configure your
+display to another bit depth to "solve" this problem.
+
+Use -size WIDTHxHEIGHT command line option to change the default window size.
+
+This driver also maps to native Windows look and feel. There is a small problem
+with combo boxes in dialogs. They are expected to give you a choice between a
+few strings. The keyboard controls (changing choice by arrow keys) work, but
+mouse selection is broken. If you know how to solve this bug, please let me
+know.
+
+XaoS is a UNIX application and has many command line options. Some features are
+not available from the GUI. Because Windows applications can't have normal
+output, most of the critical messages are displayed in message boxes, but some
+longer messages are omitted. The most significant omission is the help about
+command line options that you can find in doc/cmdopts.txt.
+
+One thing that might be confusing is that animation rendering mode doesn't
+display anything, but only renders images. Start the rendering, and a message
+box will inform you that XaoS is entering the calculation loop. Relax and wait
+for the message box signaling the end of the loop.
+
+Note that XaoS also supports the :ref:`DirectX <dX-window>` API.
+
+Win32 driver was written by Jan Hubicka, Jan Olderdissen and Pavel Tzekov,
+1999.
diff --git a/help/rest/writehelp.txt b/help/rest/writehelp.txt
new file mode 100644
index 0000000..9ea7ac6
--- /dev/null
+++ b/help/rest/writehelp.txt
@@ -0,0 +1,63 @@
+.. _documentation:
+
+.. index:: Documentation; Help; Sphinx; reStructuredText
+
+XaoS Documentation
+==================
+
+XaoS documentation is generated from reStructuredText__ using the Sphinx__
+document processor. This toolchain allows the documentation to be written
+using natural, unobtrusive markup and automatically converted to a number of
+formats including HTML, PDF, Microsoft HTML Help, and Apple Help.
+
+__ http://docutils.sourceforge.net/rst.html
+__ http://sphinx.pocoo.org/
+
+When viewing the HTML version of the documentaiton, you can click the "Show
+Source" link in the left sidebar to view the original reST source. The full
+source of the documentation is also available in the `subversion repository`__.
+
+__ http://xaos.svn.sf.net/viewvc/xaos/trunk/help/rest/
+
+If you want to contribute to the documentation, we encourage you to familarize
+yourself with the `reStructuredText Primer`__. Although reStructuredText looks
+very much like plain text, it follows certain conventions to enhance formatting.
+
+__ http://docutils.sourceforge.net/docs/user/rst/quickstart.html
+
+If you are only making a small change, feel free to submit it as plain text,
+and the maintainers will be happy to convert it to reST for you.
+
+All changes to the documentation should be submitted via the `issue tracker`__.
+
+__ http://code.google.com/p/gnuxaos/issues/list
+
+
+.. highlight:: rest
+
+Context-Sensitive Help
+----------------------
+
+XaoS provides context-sensitive help from many areas of the user interface.
+If you are writing documentation about some command in the user interface,
+you must provide a target in order to make context sensitive help work.
+Place an internal hyperlink target in front of the section describing the
+command using the name of the command in the XaoS function registry, like so::
+
+ .. _command-name:
+
+ About My Hypothetical Command
+ =============================
+
+ This command allows you to...
+
+
+Tutorials
+---------
+
+XaoS's documentation introduces an interpreted text role to reference
+tutorials. To reference a tutorial from the documentation, write
+``:tutor:`title <filename.xaf>```. This will refer to the tutorial
+*filename.xaf* using the text *title*. Depending on the format of the
+output, this may generate a link that will launch the referenced tutorial
+in XaoS, or it may just format the title in a different font.
diff --git a/help/rest/xaosspecific.py b/help/rest/xaosspecific.py
new file mode 100644
index 0000000..134777f
--- /dev/null
+++ b/help/rest/xaosspecific.py
@@ -0,0 +1,4 @@
+from docutils import nodes
+
+def setup(app):
+ app.add_generic_role('tutor', nodes.emphasis)
diff --git a/help/rest/xtextcenter.txt b/help/rest/xtextcenter.txt
new file mode 100644
index 0000000..c0f8652
--- /dev/null
+++ b/help/rest/xtextcenter.txt
@@ -0,0 +1,11 @@
+.. _xtextcenter:
+
+.. index::
+ pair: menu item; Center
+
+Center
+======
+
+Draw :ref:`text <text>` in the center of the screen.
+
+**Available as**: menu item
diff --git a/help/rest/xtexteight.txt b/help/rest/xtexteight.txt
new file mode 100644
index 0000000..951c872
--- /dev/null
+++ b/help/rest/xtexteight.txt
@@ -0,0 +1,11 @@
+.. _xtextright:
+
+.. index::
+ pair: menu item; Right
+
+Right
+=====
+
+Draw :ref:`text <text>` at the right side of the screen.
+
+**Available as**: menu item
diff --git a/help/rest/xtextleft.txt b/help/rest/xtextleft.txt
new file mode 100644
index 0000000..dd34715
--- /dev/null
+++ b/help/rest/xtextleft.txt
@@ -0,0 +1,11 @@
+.. _xtextleft:
+
+.. index::
+ pair: menu item; Left
+
+Left
+====
+
+Draw :ref:`text <text>` at the left side of the screen.
+
+**Available as**: menu item
diff --git a/help/rest/xtextpos.txt b/help/rest/xtextpos.txt
new file mode 100644
index 0000000..c48fadc
--- /dev/null
+++ b/help/rest/xtextpos.txt
@@ -0,0 +1,16 @@
+.. _xtextpos:
+
+.. index::
+ pair: menu; Horizontal text position
+
+Horizontal text position
+========================
+
+Select the horizontal position used to display :ref:`text <text>`. It can be
+placed at the left, in the center or at the right.
+
+.. toctree::
+
+ xtextleft
+ xtextcenter
+ xtexteight
diff --git a/help/rest/ytextbottom.txt b/help/rest/ytextbottom.txt
new file mode 100644
index 0000000..37cf58d
--- /dev/null
+++ b/help/rest/ytextbottom.txt
@@ -0,0 +1,11 @@
+.. _ytextbottom:
+
+.. index::
+ pair: menu item; Bottom
+
+Bottom
+======
+
+Draw :ref:`text <text>` at the bottom of the screen.
+
+**Available as**: menu item
diff --git a/help/rest/ytextmiddle.txt b/help/rest/ytextmiddle.txt
new file mode 100644
index 0000000..680b4ef
--- /dev/null
+++ b/help/rest/ytextmiddle.txt
@@ -0,0 +1,11 @@
+.. _ytextmiddle:
+
+.. index::
+ pair: menu item; Middle
+
+Middle
+======
+
+Draw :ref:`text <text>` in the middle of the screen.
+
+**Available as**: menu item
diff --git a/help/rest/ytextpos.txt b/help/rest/ytextpos.txt
new file mode 100644
index 0000000..6e1616a
--- /dev/null
+++ b/help/rest/ytextpos.txt
@@ -0,0 +1,16 @@
+.. _ytextpos:
+
+.. index::
+ pair: menu; Vertical text position
+
+Vertical text position
+======================
+
+Select the vertical position used to display :ref:`text <text>`. It can be
+placed at the top, in the middle or at the bottom of the screen.
+
+.. toctree::
+
+ ytextup
+ ytextmiddle
+ ytextbottom
diff --git a/help/rest/ytextup.txt b/help/rest/ytextup.txt
new file mode 100644
index 0000000..ade6b74
--- /dev/null
+++ b/help/rest/ytextup.txt
@@ -0,0 +1,11 @@
+.. _ytextup:
+
+.. index::
+ menu item; Up
+
+Up
+==
+
+Draw :ref:`text <text>` at the top of the screen.
+
+**Available as**: menu item
diff --git a/help/rest/zoom.txt b/help/rest/zoom.txt
new file mode 100644
index 0000000..a151a06
--- /dev/null
+++ b/help/rest/zoom.txt
@@ -0,0 +1,37 @@
+.. _zoom:
+.. _unzoom:
+.. _stop:
+
+.. index::
+ pair: functions; Zooming
+ pair: command; zoomcenter
+ pair: command; zoom
+ pair: command; unzoom
+ pair: command; stop
+
+Zooming functions
+=================
+
+The functions for zooming/unzooming were created mainly for recording
+animations. In manually created animation files, it is easier to use
+:ref:`morphview <morphview>`.
+
+**Syntax**:(zoomcenter complex) This function sets the center to zoom in on.
+The center is given as a position in fractal coordinates.
+
+**Available as**: command
+
+**Syntax**:(zoom) Start zooming to the area specified by zoomcenter.
+
+The speed of zooming should be controlled by the function :ref:`speed <speed>`
+or in a more exact way by maxstep and speedup.
+
+**Syntax**:(unzoom)
+
+Start unzooming from the area specified by zoomcenter.
+
+**Available as**: command
+
+**Syntax**:(stop) Stop zooming or unzooming.
+
+**Available as**: command
diff --git a/help/restconv b/help/restconv
new file mode 100755
index 0000000..fe5a55f
--- /dev/null
+++ b/help/restconv
@@ -0,0 +1,68 @@
+#!/bin/sh
+processline()
+{
+ echo "- $1 -"
+ echo "=============================================================================================="
+ name="$1"
+ anchors=""
+ echo "$1.txt $*" >> anchors
+ while [ "$1" != "" ] ; do
+ echo "s!\[help:$1\]!$name.html!g" >> htmllinks.sed
+ echo "s!\[help:$1\]!help:anchor=$name bookID=XaoS Help!g" >> applehelplinks.sed
+ shift
+ done
+ # I changed "0" to "$" because my sed
+ # doesn't want to understand "0".
+ # -- Zoltan
+ echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
+<HTML>
+<HEAD>
+ <TITLE>XaoS online help</TITLE>
+</HEAD>
+<BODY>' > $name.html
+ cat $mypath/xaos.hlp | sed '1,/%'"$name"'/d;/^%/,$ d' | sed \
+'1,2s_<head>\([^<]*\)</head>_<H1>\1</H1>_g
+s_<head>_<center><H2>_g
+s_</head>_</H2></center>_g
+s_<emph>_<strong>_g
+s_<submenu>__g
+s_<menuhead>__g
+s_</menuhead>__g
+s_<mainmenu>__g
+s_<menuitems>__g
+s_</menuitems>__g
+s_<main>__g
+s_</main>__g
+s_<math>__g
+s_</math>__g
+s_<notex>__g
+s_</notex>__g
+s_<node.*>__g
+s_</emph>_</strong>_g
+s_<tt>_<code>_g
+s_</tt>_</code>_g
+s_<tutor \([^>]*\)>_<A HREF="[tutor:\1]">_g
+s_</tutor>_</A>_g
+s_<a \([^>]*\)>_<A HREF="\1">_g
+s/'\'\''/"/g
+s/``/"/g' >> $name.html
+ if [ $2 ]; then
+ echo $* >> aliases.conf
+ fi
+ echo "</BODY></HTML>" >> $name.html
+ cat -n $name.html
+ tidy -utf8 -asxml -qm $name.html
+ $mypath/xhtml2rest.py $name.html > $name.txt
+ rm $name.html
+}
+process()
+{
+ while read line ; do
+ eval "processline $line"
+ done
+}
+mypath=`dirname $0`
+rm htmllinks.sed
+rm applehelplinks.sed
+rm anchors
+grep "^%" $mypath/xaos.hlp | sed '/%%/d;s/%//g' | process
diff --git a/help/rtfconv b/help/rtfconv
new file mode 100755
index 0000000..0e23bc0
--- /dev/null
+++ b/help/rtfconv
@@ -0,0 +1,2 @@
+#!/bin/sh
+cat xaos.hlp | sh hlp2rtf | sh multfix > xaoswin.rtf
diff --git a/help/rtfconv.bat b/help/rtfconv.bat
new file mode 100644
index 0000000..5fb8003
--- /dev/null
+++ b/help/rtfconv.bat
@@ -0,0 +1,2 @@
+bash -c "cat xaos.hlp | sh hlp2rtf | sh multfix >xaoswin.rtf"
+ \ No newline at end of file
diff --git a/help/tutorial.scpt b/help/tutorial.scpt
new file mode 100644
index 0000000..ef0283a
--- /dev/null
+++ b/help/tutorial.scpt
Binary files differ
diff --git a/help/winhelpconv b/help/winhelpconv
new file mode 100755
index 0000000..6248c7d
--- /dev/null
+++ b/help/winhelpconv
@@ -0,0 +1,71 @@
+#!/bin/sh
+processline()
+{
+ echo "- $1 -"
+ name="$1"
+ anchors="<object type=\"application/x-oleobject\" classid=\"clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e\"><param name=\"ALink Name\" value=\"$1\"></object>"
+ title=""
+ stylesheet="xaoshelp.css"
+ shift
+ while [ "$1" != "" ] ; do
+ if [ "$1" != "$name" ] ; then
+ anchors="$anchors <object type=\"application/x-oleobject\" classid=\"clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e\"><param name=\"ALink Name\" value=\"\$name\"></object>"
+ fi
+ shift
+ done
+ # I changed "0" to "$" because my sed
+ # doesn't want to understand "0".
+ # -- Zoltan
+ cat xaos.hlp | sed '/%'"$name"'/H' | sed '1,/%'"$name"'/d;/^%/,$ d' | sed \
+'1,3s_<head>\([^<]*\)</head>_\
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\
+<HTML>\
+<HEAD>\
+ <TITLE>\1</TITLE>\
+ '"$title"'\
+ <LINK HREF="'"$stylesheet"'" REL="stylesheet" TYPE="text/css">\
+</HEAD>\
+<BODY>\
+'"$anchors"'\
+<H1>\1</H1>\
+_g
+s_<head>_<H2>_g
+s_</head>_</H2>_g
+s_<center>__g
+s_</center>__g
+s_<emph>_<STRONG>_g
+s_<submenu>__g
+s_<menuhead>__g
+s_</menuhead>__g
+s_<mainmenu>__g
+s_<main>__g
+s_<math>__g
+s_<menuitems>__g
+s_<notex>__g
+s_</notex>__g
+s_<node.*>__g
+s_</emph>_</STRONG>_g
+s_<tt>_<CODE>_g
+s_</tt>_</CODE>_g
+s_<tutor \([^>]*\)>_<strong>_g
+s_</tutor>_</strong>_g
+s_<a \([^>]*\)>_<A HREF="\1.html">_g
+s/'\'\''/"/g
+s/``/"/g' > $name.html
+ echo "</BODY></HTML>" >> $name.html
+ tidy -qm $name.html
+ case $name in
+ main) mv $name.html xaoshelp/index.html;;
+ *) mv $name.html xaoshelp;;
+ esac
+}
+process()
+{
+ while read line ; do
+ eval "processline $line"
+ done
+}
+rm -rf xaoshelp
+mkdir -p xaoshelp
+cp xaoshelp.css xaoshelp
+grep "^%" xaos.hlp | sed '/%%/d;s/%//g' | process
diff --git a/help/xaos.hlp b/help/xaos.hlp
new file mode 100644
index 0000000..9953af3
--- /dev/null
+++ b/help/xaos.hlp
@@ -0,0 +1,3996 @@
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%main
+<head>XaoS</head>
+<center>
+Welcome to XaoS - a real-time fractal zoomer.
+</center>
+
+<dl>
+<dt><a about>About XaoS</a>
+<dd>Learn who's behind XaoS and how you can help.
+
+<dt><a start>Getting started</a>
+<dd>Start here to learn how to use XaoS's basic features.
+
+<dt><a support>Getting support</a>
+<dd>How to report problems and get help from the XaoS community.
+
+<dt><a sffe>User formulas</a>
+<dd>Learn how to render your own formulas in XaoS.
+
+<dt><a video>Encoding videos</a>
+<dd>Learn how to create videos from your XaoS animations.
+
+<dt><a drivers>Platform-specific documentation</a>
+<dd>XaoS runs on many platforms. Read instructions specific to yours.
+
+<dt><a format>XaoS's file format</a>
+<dd>Learn how to tweak your saved fractals and animations.
+
+<dt><a menus>Menus, commands and parameter index</a>
+<dd>An in-depth discussion of all of XaoS's commands.
+</dl>
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%about
+<head>About XaoS</head>
+<notex>
+XaoS is free software. You are welcome to redistribute it under the terms of
+the <a gpl>GNU General Public License</a>. This also means that you may get
+<emph>sources</emph> and help improve XaoS through an open
+<a devel>development process</a>.
+</notex>
+<head>Credits</head>
+(alphabetically)
+<dl>
+<dt>Lucio Henrique de Araujo (lucio.matema@gmail.com)
+<dd>Brazilian/Portuguese translation
+<dt>Eric Courteau (ecourteau@cplus.fr)
+<dd>francais.cat (translation of tutorials)
+<dt>Jean-Pierre Demailly (Jean-Pierre.Demailly@ujf-grenoble.fr)
+<dd>Updates for French translation
+<dt>Radek Doulik (rodo@atrey.karlin.mff.cuni.cz)
+<dd>TK interface, windowid patches
+<dt>Martin Dozsa (madsoft@centrum.cz)
+<dd>cs.po (Czech translation of menus)
+<dt>Arpad Fekete (Fekete.Arpad.2@stud.u-szeged.hu)
+<dd>some new fractals, and the 'More formulae' menu
+<dt>Zelia Maria Horta Garcia (zeliagarcia@seed.pr.gov.br)
+<dd>Brazilian/Portuguese translation
+<dt>Tim Goodwin (tgoodwin@cygnus.co.uk)
+<dd>english.cat corrections
+<dt>Ben Hines
+<dd>autoconf suggestions, Mac OS X port
+<dt>Jan Hubicka (jh@ucw.cz)
+<dd>Zooming routines, ugly interface, palettes, drivers, autopilot, filters, documentation, tutorials etc.
+<dt>Jens Kilian (jjk@acm.org)
+<dd>BeOS driver, deutsch.cat
+<dt>Thomas A. K. Kjaer (takjaer@imv.aau.dk)
+<dd>OS/2 ports (320x200 graphics and AA-lib)
+<dt>Zoltan Kovacs (kovzol@math.u-szeged.hu)
+<dd>Internationalization, Hungarian translations, finalizing version 3.1, bug fixes, web design, current maintainer
+<dt>Zsigmond Kovacs (kovzsi@gmail.com)
+<dd>Fractal examples
+<dt>J.B. Langston III (jb-langston@austin.rr.com)
+<dd>Native Mac OS X port (from version 3.2.2); web redesign; co-maintainer
+<dt>Andreas Madritsch (amadritsch@datacomm.ch)
+<dd>New fractal types, bailout, many fixes
+<dt>Mateusz Malczak (xaos@malczak.info)
+<dd>User formula evaluation library
+<dt>Giorgio Marazzi (gmarazzi@vtr.net)
+<dd>Improvements and fixes for espanhol.cat
+<dt>Thomas Marsh (thomas.marsh2@gmail.com)
+<dd>First zoomer, formulae, planes, X11 driver, inversions, many ideas
+<dt>Dominic Mazzoni (dmazzoni@cs.cmu.edu)
+<dd>Macintosh port (version 2.0)
+<dt>David Meleedy
+<dd>Grammatical and spelling fixed version of <tt>xaos.6</tt>
+<dt>Paul Nasca (zynaddsubfx@yahoo.com)
+<dd>Ministatus improvement
+<dt>Nix (nix@esperi.demon.co.uk)
+<dd>Grammatical and spelling fixed version of <tt>xaos.hlp</tt> and other files
+<dt>Terje Pedersen (terjepe@login.eunet.no)
+<dd>Amiga port
+<dt>Cesar Perez (oroz@users.sourceforge.net)
+<dd>Spanish translations
+<dt>Fabrice Premel (premelfa@etu.utc.fr)
+<dd>Periodicity checking
+<dt>Jan Olderdissen (jan@olderdissen.com)
+<dd>Win32 port
+<dt>Ilinca Sitaru (ilinca.sitaru@gmail.com)
+<dd>Romanian translation
+<dt>Daniel Skarda
+<dd>Fractal examples
+<dt>Andrew Stone (Stone Design - www.stone.com)
+<dd>Videator Support, Cocoa improvements, performance mode, bug fixes
+<dt>Marton Torok (marton.torok@gmail.com)
+<dd>Small fixes for pipes
+<dt>Pavel Tzekov (paveltz@csoft.bg)
+<dd>Win32 support
+<dt>Charles Vidal
+<dd>Tcl/Tk interface
+<dt>Tapio K. Vocaldo (taps@rmx.com)
+<dd>Macintosh port
+<dt>Tormod Volden
+<dd>Fixes for X11 driver to improve compatability with Xorg, XScreenSaver, Beryl and Compiz
+<dt>Philippe Wautelet (p.wautelet@fractalzone.be)
+<dd>Bug fixes for version 3.1.1, French translation, gcc 4.0 fixes
+<dt>Sergio Zanchetta
+<dd>Italian translation
+</dl>
+<head>Included Software</head>
+XaoS uses the following libraries. These libraries may be included
+with some binary distributions of XaoS.
+<p>
+<emph>gettext 0.17</emph><br>
+Website: <tt>http://www.gnu.org/software/gettext/</tt><br>
+Copyright (C) 1995-1997, 2000-2007 Free Software Foundation, Inc.<br>
+License GPLv3+: GNU GPL version 3 or later (http://gnu.org/licenses/gpl.html)<br>
+This is free software: you are free to change and redistribute it.<br>
+There is NO WARRANTY, to the extent permitted by law.
+<p>
+<emph>GNU Scientific Library 1.11</emph><br>
+Website: <tt>http://www.gnu.org/software/gsl/</tt><br>
+Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007 The GSL Team.<br>
+License GPLv3+: GNU GPL version 3 or later (http://gnu.org/licenses/gpl.html)<br>
+This is free software: you are free to change and redistribute it.<br>
+There is NO WARRANTY, to the extent permitted by law.
+<p>
+<emph>libpng 1.2.25</emph><br>
+Website: <tt>http://www.libpng.org/pub/png/libpng.html</tt><br>
+Copyright (c) 1998-2008 Glenn Randers-Pehrson<br>
+Copyright (c) 1996-1997 Andreas Dilger<br>
+Copyright (c) 1995-1996 Guy Eric Schalnat, Group 42, Inc.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%start
+<head>Getting Started</head>
+
+<a controls>Basic controls</a><br>
+Learn the basic commands to control XaoS.
+
+<p>
+<tutor fractal.xaf>An introduction to fractals</tutor><br>
+Try this animated tutorial if you don't know what a fractal is. If
+you are new to XaoS you should try it too, since it is quite a good example
+of XaoS's features.
+
+<p>
+<tutor features.xaf>XaoS features overview</tutor><br>
+Watch this tutorial to discover more of XaoS's features.
+
+<p>
+Both the tutorials are divided into chapters and available from help menu,
+so you don't need to watch them all at once (they are about half an hour long).
+
+<p>
+<a tutorial>XaoS Overview</a><br>
+A written introduction to all of XaoS's features.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%support
+<head>Support</head>
+XaoS is a community-supported free software project.
+
+<head>Home Page</head>
+Site: <tt>http://xaos.sourceforge.net</tt><p>
+
+Check the Xaos home page for the latest news and information about
+XaoS and to download the latest versions.
+
+<head>Users' Discussion Group</head>
+Site: <tt>http://groups.google.com/group/xaos-users</tt><p>
+
+The xaos-users discussion group on Google Groups provides a place for XaoS
+users to help each other get the most out of XaoS. XaoS developers also
+monitor this discussion and answer questions from time to time.<p>
+
+You can browse the archives freely but you must join the group in order to
+post. However, Google Groups provides a range of options for participation
+from a traditional mailing list to a completely web-based forum, so you
+don't have to get emails if you don't want to.<p>
+
+If you have a question or problem, please feel free to ask for help. We
+also encourage you to share examples (.xaf or .xpf files), hints and
+tips. If you have a gallery of images created using XaoS, feel free to
+post a link to the group.
+
+
+<head>Developers' Discussion Group</head>
+
+Site: <tt>http://groups.google.com/group/xaos-devel</tt><p>
+
+The xaos-devel discussion group on Google Groups is where XaoS developers
+discuss and coordinate the further development of XaoS. XaoS users are
+welcome to monitor this forum as well, but general discussion and requests
+for help should be posted to the Users' Discussion Group instead.
+
+
+<head>Issue Tracker</head>
+
+Site: <tt>http://code.google.com/p/gnuxaos/issues/list</tt><p>
+
+Issues are tracked on Google Code. If you think you have found a bug in
+XaoS or have an idea for a great new feature, please let us know about it.
+However, if you're not sure how to submit a useful issue report, please ask
+on the xaos-users discussion group first (see above).<p>
+
+Please don't submit duplicate issues. Search the existing ones first to make
+sure nobody has already reported it. You can add additional information about
+a bug by entering a comment on an existing bug. You can also express your
+interest in an issue by using the "Star" function on Google Code. This lets
+the developers know how many users are interested in an issue and also allows
+you receive status updates.<p>
+
+The developers will do their best to respond to issues in a timely manner.
+However, keep in mind that XaoS is developed on a volunteer basis and the
+developers work on it in their spare time. Therefore, we can't guarantee that
+issues will be addressed in a certain timeframe.<p>
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%devel
+<head>Development</head>
+XaoS is free software. One of the most significant rights its <a gpl>license</a>
+grants to you is the right to <emph>freely get, study and improve</emph> its
+source code, which is available from the XaoS homepage.
+<p>
+XaoS has an open development model. All development is coordinated via Google Code
+at <tt>http://gnuxaos.googlecode.com/</tt>. Development versions are
+available via Subversion at <tt>https://sourceforge.net/scm/?type=svn&group_id=5771</tt>,
+so if you are interested in the future of XaoS, give the latest source a try! We also
+have a several <a support>discussion groups</a>, which you can join if you want to
+discuss XaoS with others or participate in the development process.
+<p>
+If you want to do some development, you are encouraged to send your work back
+to the <a about>authors</a>; if it is well done, it will be added to the
+next release. All changes should be submitted to the Google Code issue tracker.
+<p>
+XaoS is quite easily extensible. You might want to
+read a bit about its internals in the file <emph>doc/xaosdev.info</emph>.
+XaoS is also portable, so if it doesn't work on your favorite platform (or
+there is just an old version available), you could quite easily port it.
+<p>
+<head>Volunteer Opportunities</head>
+XaoS needs volunteers to make it the best fractal program it can be!
+You don't have to be a programmer to help. The following
+tasks open to volunteers:
+
+<p>Improving the documentation via the Wiki (and improving the DokuWiki converter).
+<p>Compiling binaries for your favorite operating system.
+<p>Reviewing the source code, adding comments, and checking lines which generate warnings during compilation.
+<p>Creating additional tutorials and examples.
+<p>Translating XaoS into your language.
+<p>Implementing feature requests.
+<p>Fixing outstanding bugs.
+<p>If you would like to volunteer, join the discussion groups and let us know. We would be happy to help you get started!
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%sffe usrform usrformInit
+<head>Using user formulas</head>
+<p>
+XaoS supports entering your own custom formulas.
+Select <tt>User formula</tt> from the <tt>Fractal</tt> menu to define a
+custom fractal formula. Select <tt>User initialization</tt> to change
+the sequence starting point <emph>z0</emph>. By default <emph>z0</emph>
+is set to 0. User formulas should be interpreted as functions in the form<br>
+<emph>Z(n+1) = formula (Z(n), Z(n-1), C)</emph>.
+<p>
+In user formulas, as shown above, three variables are available:<br>
+<dl>
+<dt>z
+<dd>current sequance point Z(n)
+<dt>c
+<dd>current plane 'point'
+<dt>p
+<dd>previous sequence point Z(n-1)
+</dl>
+<p>
+Format for complex numbers is <emph>{re;im}</emph><br>
+eg. {3;2} is complex number 3+2i.
+<p>
+Available functions are listed below:
+<dl>
+<p>
+<dt>basic operations
+<dd>+, -, *, /
+<p>
+<dt>basic trigonometry
+<dd>sin, cos, tan, cot<br>
+asin, acos, atan, acot<br>
+sinh, cosh, tanh, coth
+<p>
+<dt>Exponential and logarithmic functions
+<dd>exp<br>
+log - natural logarithm<br>
+log2, log10<br>
+logN (base, z) - logarithm of base N (where N is integer)<br>
+logCN (base, z) - logarithm of base CN (where CN is complex)
+<p>
+<dt>power functions
+<dd>powi - power with integer exponent (fastest)<br>
+powd - power with real exponent<br>
+powdc - power with complex exponent<br>
+pow - same as powd<br>
+sqr - square
+<p>
+<dt>square functions
+<dd>sqrt - square root of a complex number<br>
+rtni (z, n, i) - i-th root of n-th orgder
+<p>
+<dt>other functions
+<dd>rand (max) - random real number in range [0, max)<br>
+inv - inverse<br>
+abs - absolute value<br>
+re - real part<br>
+im - imaginary part
+</dl>
+<p>
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%video
+
+<head>How to encode video files from XaoS</head>
+<p>
+To create a video, make and <tt>xaf</tt> file first (the easiest way to do this is
+to use the <emph>record</emph> function in the file menu). Then you need to render
+the animation. XaoS can output sequences of ordinary <tt>PNG</tt> images, that
+can later be used by a video encoder.
+<p>
+<head>Generating image sequences for video</head>
+<p>
+To generate an image sequence, choose <emph>Render Animation</emph> from the <emph>Misc</emph>
+menu. You can also use the following command on the command line:
+<p><tt>
+xaos -render [filename] -size 352x240 -antialiasing
+ -renderframerate 24 -basename [basename]
+</tt><p>
+<emph>File to render</emph> (<tt>[filename]</tt>) is the name of the <tt>xaf</tt> file,
+<emph>Basename</emph> (<tt>[basename]</tt>) is the name used as the base filename for rendered images. This should also include the path where you want to save the images.
+XaoS adds a four digit sequence number and <tt>.png</tt> extension to this name automatically.
+<p>
+You might also want to change the resolution. Make sure that the resolution
+you choose is supported by the video codec you wish to use.
+<p>
+The framerate can also be altered. Make sure you choose a framerate that is supported by
+the video codec you wish to use.
+<p>
+<emph>Antialiasing</emph> (<tt>-antialiasing</tt>) is used to produce anti-aliased images.
+It takes a much longer
+time and much more memory to calculate them, but resulting images are better
+for video compression and they result in a much smaller video file.
+(the same is true of <emph>JPEG images</emph>)
+<p>
+On the other hand, the other XaoS rendering option <emph>Always Recalculate</emph> (<tt>-alwaysrecalc</tt>) (which disables
+XaoS's zooming optimizations) is <emph>not recommended</emph>. If that's used, the
+sequence of animation then contains quite a lot of extra information, which
+increases size of video file, but because of the codec's lossy compression it is hard
+to see any difference, so it's not worth it.
+<head>Rendered files</head>
+Once you start it, XaoS will generate thousands of frames. They take quite
+a long time to calculate and save, and consume plenty of disk space.
+(e.g. to render part 1 of the tutorial you need about 60MB and half an hour of time).
+<p>
+All images are named <tt>[basename]framenum.png</tt>. For example <tt>intro0001.png</tt> is
+the first frame of the animation intro. If consecutive frames are the same, XaoS
+doesn't save them, so some frames may be missing. If your encoder can't handle
+that, you will need to write a simple script which will fill in the gaps by means
+of <tt>mv</tt> or symbolic linking.
+<p>
+A list of all filenames is saved into the file <tt>[basename].par</tt>, where each line is
+the name of one frame. The names repeat here if necessary, so you can use this
+file to supply filenames to the encoder.
+<head>Encoding videos</head>
+Once XaoS has generated the png files for each frame of the animation, you
+can use a third-party video encoder to convert the sequence of images into
+a video file. We currently recommend the following encoders, which support
+a wide variety of video codecs and file formats:
+<dl>
+<dt>ffmpeg
+<dd>Available from: <tt>http://ffmpeg.mplayerhq.hu/</tt><br>
+Instructions: <tt>http://ffmpeg.mplayerhq.hu/faq.html#SEC12</tt>
+<dt>mencoder
+<dd>Part of mplayer, available from: http://www.mplayerhq.hu/<br>
+Instructions: <tt>http://www.mplayerhq.hu/DOCS/HTML/en/menc-feat-enc-images.html</tt>
+</dl>
+These are both command line tools. If you prefer a graphical tool, you may
+prefer Quicktime Pro from Apple (http://www.apple.com/quicktime/pro/). However,
+this software costs approximately US$30, and the authors of XaoS have no
+experience with it. Although QuickTime may be easier to use, the two free
+encoders above are just as capable once you learn how to use them.
+
+<p>
+Note: we used to recommend <a berkeley>Berkeley parallel MPEG encoder</a> to
+encode the generated png files into MPEG videos. We have kept
+the instructions mainly for historic purposes.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%berkeley
+<head>Berkeley parallel MPEG encoder</head>
+
+This is the encoder we used to recommend. However, it has not been updated
+for a very long time and no longer appears to compile on modern systems.
+Also, there are much more modern codecs available that provide better video
+quality and compression rates. Still, we have kept the following
+instructions mainly for historic purposes.
+<p>
+It is available at Berkeley's FTP site <tt>mm-ftp.CS.Berkeley.EDU</tt> and called
+<tt>mpeg_encode1.5b</tt>
+<p>
+It has lots of options to tune, so you should spend quite a lot of time
+playing with this. The configuration I use is in file <tt>doc/mpeg.param</tt>.
+<p>
+I've also made some patches that makes possible to use the pattern and motion
+files generated from XaoS. The patch is in <tt>doc/mpeg_encode.patch</tt>. So if
+you want to use these features (they are <emph>EXPERIMENTAL</emph>) you might apply this
+patch and recompile the encoder.
+<p>
+Once you filled the <tt>mpeg.param</tt> file (see comments inside), you should render
+sequence using <tt>mpeg_encode [filename]</tt> and with luck you are done.
+
+<head>Pattern file</head>
+
+Some other files are generated as well. A <emph>pattern file</emph> is generated,
+which contains a <emph>recommended order of P, B and I frames</emph>.
+<p>
+MPEG sequence consist of these three frames. The <emph>I frames</emph> are just images
+saved in a format similar to JPEG files.
+<p>
+The <emph>P frames</emph> are images which are constructed as a delta from the
+previous one (the latest I or P frame). In case consecutive frames are similar
+(and in animations they often are), a P frame takes much less disk space
+than an I frame.
+<p>
+The <emph>B frames</emph> are constructed from the nearest previous P or I frame
+and the next P or I frame. They take even less disk space, but they are quite
+hard to encode. Also they are <emph>not used as previous frames</emph>,
+so their information is lost once they are displayed. They are usually
+rendered at lower quality than a P or I frame and used just to interpolate
+nearest frame and make animation smoother. It is generally not a good idea
+to make a whole sequence just from B frames.
+<p>
+Using just P frames is generally not a good idea. It makes the file shorter,
+but to jump into Nth frame of animation you need to <emph>recalculate all P and B frames
+since latest I frame</emph>. Decoders often want to jump to some frame (when
+the user asks, or when they can't decode a sequence in time and must skip
+some), so you need to have some I frames in the animation to make this possible.
+The latter reason means that you need to place them quite often. Usually
+they are used for every 15th frame or thereabouts. Because they cost quite a lot,
+in my animations I usually use every 27th frame. To set this distance
+use <tt>-iframedist</tt> option. It should be a multiple of 3.
+<p>
+XaoS generates a recommended order of frames based on its knowledge of
+fractal motion. Situations where the screen doesn't move at all are rendered
+just from P frames (since jumping is usually not required here); in situations
+where the screen changes completely (at least in XaoS's opinion) I frames are used
+and in other cases, a standard sequence <tt>IBBPBBPBBPBBP...</tt> is used.
+<p>
+If your encoder supports this, you should supply this pattern for encoding to
+squeeze out some bytes.
+
+<head>Motion vector files</head>
+
+XaoS also generates a motion vector recommendation for the encoder. This is
+useful for encoding of B and P frames.
+<p>
+If some objects on the screen are moving at a constant speed, motion vectors
+can store that speed, so no image needs to be saved to represent that change.
+<p>
+Calculating this motion vector is a very significant task. If you guess
+them well, you increase quality and reduce file size, which is always great.
+Calculation also takes lots of CPU and it is hard to get optimal vectors (it
+just takes too long).
+<p>
+XaoS knows how the fractals move, so it can calculate this vectors quite
+easily. XaoS saves this information into <tt>*.p</tt> and <tt>*.b</tt> files. (<tt>*.p</tt> are for P
+frames, <tt>*.b</tt> are for B frames). If your encoder supports this, you should
+provide this vector to increase quality. They are <tt>not exact</tt> (XaoS can make
+mistakes); the encoder should try to find its own vectors, then try XaoS's ones,
+and pick whichever is better.
+<p>
+This technique saves quite a lot of bytes in fast zooming/un-zooming
+animations (where images move more than 3 or 5 pixels per frame--since
+most programs look 10-20 pixels around each point for motion vectors).
+<p>
+To enable saving of motion vector files, add the option
+<tt>-rendervectors</tt>.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%controls
+<head>Basic controls</head>
+By default the mouse buttons work in the following way:
+<p>
+<dl>
+<dt>left<dd>zoom in
+<dt>right<dd>zoom out
+<dt>middle<dd>move fractal in a drag-and-drop fashion
+</dl>
+<p>
+<emph>Note:</emph> Since most Macs only have one button mice, these controls
+are emulated on Mac OS X using modifier keys. See the help section on
+<a cocoa>Mac OS X</a> for details.
+<p>
+This behavior can change. If you enable rotation, the first button is used for rotating
+fractals. Also, in fast Julia mode, the first button is used to change the seed.
+<p>
+If you don't have a middle button, press both buttons to enable
+emulation.
+<p>
+After few minutes of zooming you will probably exceed the precision and the
+fractals will get boring. If you are getting strange big rectangles on the screen,
+you probably reached the numeric limit: there is no way to avoid this except
+un-zoom back and choose a different area. It doesn't hurt so much, since you have
+zoomed approximately 64 051 194 700 380 384 times, so there are quite a lot of areas to
+explore. Algorithms with unlimited precision exist, but they are still too
+slow for real-time zooming.
+<p>
+The other possibility is that you have reached the iteration limit. The fractal is
+calculated approximately, and in this case you need to increase number of
+iterations used for approximation (and decrease the speed in the process).
+This is done from the menu or using the arrow keys <emph>Left</emph> and <emph>Right</emph>.
+<p>
+An <emph>Up</emph> and <emph>Down</emph> keys should be used to change zooming
+speed. Note that higher speed costs more and image will be blocky.
+<p>
+This behavior can also change. With palette cycling enabled, <emph>Left</emph>
+and <emph>Right</emph> keys change cycling speed; in continuous
+rotation they change rotation speed.
+<p>
+All other functions are available from the menu, which (in the default
+configuration) are displayed when you move the mouse to the top of the
+screen/window. It is useful to learn the shortcut keys, which are
+shown in gray next to the menu items they trigger.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%writehelp
+<head>How to write XaoS help files</head>
+XaoS help is stored in the file <tt>help/xaos.hlp</tt>. It is divided into parts,
+each part being started by a <emph>keyword</emph>. In the help file keywords are
+written as <tt>%keyword</tt>
+<p>
+If you are writing documentation about some command in the XaoS function
+registry, use the same keyword as the name of the command in order to make
+context sensitive help work.
+<p>
+<notex>
+The help file is written in a special format called <a xshl>xshl</a>.
+</notex>
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%xshl
+<head>xshl</head>
+<emph>Xshl</emph> stands for <emph>XaoS simple hypertext language</emph>. It
+uses similar tags to HTML. It is simpler and more restrictive in order to
+make it easy to parse using various scripts. In C code you can use the
+library present in <tt>src/util/xshl.c</tt> to parse it.
+<p>
+The following tags are supported:
+<p>
+<dl>
+<dt>head
+<dd>make headings (should be at the beginning of the page, at least)
+<dt>emph
+<dd>emphasize
+<dt>tt
+<dd>Use non proportional font
+<dt>br
+<dd>Break line
+<dt>p
+<dd>Next paragraph
+<dt>dl
+<dd>Definition list
+<dt>dt
+<dd>Definition tag (should be used only inside a definition list)
+<dt>dd
+<dd>Definition description (should be used only inside a definition list)
+<dt>center
+<dd>align to center
+<dt>right
+<dd>align to right
+<dt>red
+<dd>change color to red (should not be used in help files)
+<dt>black
+<dd>change color to black (should not be used in help files)
+<dt>white
+<dd>change color to white (should not be used in help files)
+<dt>a name
+<dd>link to other help page
+<dt>tutor name
+<dd>activate tutorial
+<dt>notex
+<dd>Ignore this in texinfo manuals
+</dl>
+
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%format
+<head>XaoS's file format</head>
+This section describes the format used by XaoS for animations, configuration
+files and saved positions. All these files have a common format, designed
+to be easily readable, to allow manual editing of files and easy conversion by
+other programs.
+<p>
+I also taken care to make it easily extensible for future versions of XaoS
+so I hope there will not be many incompatibilities between various XaoS
+versions.
+<p>
+The format is a simple set of commands executed sequentially. XaoS does not provide
+any variables/cycles as usual scripting languages do, but future extension to
+full-blown Scheme should be easy since the format uses Scheme-like syntax.
+The syntax of every command is:
+<p>
+<tt>(command_name </tt><emph>[param1] [param2]</emph><tt>)</tt>
+<p>
+where parameters are optional and separated by whitespace (an arbitrary number
+of spaces, tabs and newlines). The parameters can have the following types:
+<p>
+<dl>
+<dt>integer
+<dd>number w/o decimal point (<tt>123</tt>)
+<dt>float
+<dd>floating point number in decimal notation with optional exponent (<tt>1.23E2</tt>)
+<dt>keyword
+<dd>text started by quote <tt>'</tt>. It is used to pass various string constants
+like formula name (<tt>'mandel</tt>) Quote is required for scheme compatibility
+<dt>string
+<dd>Text inside double quotes. The only parameter that should contain whitespace
+<dt>boolean
+<dd><tt>#t</tt> for true or <tt>#f</tt> for false
+</dl>
+<p>
+There is a complete description of all XaoS functions (with some examples) and an
+index of functions in the <a menus>XaoS registry</a>. You may particularly want
+to read about the <a animf>animation functions</a>. Also, the following functions
+are significant:
+
+<dl>
+<dt>load
+<dd>
+This function loads and interprets a file. It works similarly to <tt>#include</tt>
+in C.
+<dt>initstate
+<dd>
+Available in version 3.0 and above, this function resets XaoS's state to default
+values. This command should be at the beginning of each animation file,
+since otherwise some stuff previously enabled by user could cause unexpected
+effects. State is not reset by default before playing animations since it would
+make it impossible to write macros. Current versions don't really need macros, but
+in future versions, when the Scheme programming language will be available, this
+should be a much more interesting subject.
+<dt>usleep
+<dd>
+This function waits for a selected amount of time(in usec) before processing the
+next command. The screen is recalculated and displayed at the beginning of
+the sleep if necessary. The remaining time is spent by waiting, calculating if
+necessary, or performing any animation you entered via animation commands.
+<dt>wait
+<dd>
+Waits until the animation or image rendering is complete. Do not call this
+function when zoom, or continuous rotation is active otherwise deadlock happens. It is
+a good idea to call it immediately before text subtitles are displayed, since it looks
+ugly when they are displayed over a blocky unfinished fractal. Because the
+degree of blockiness at a given instant is a function of your machine speed,
+it may look nice for you but ugly for others with slower machines. Also
+you should call this after an animation is performed, before the switch to another
+fractal happens; since the switch involves calculation, the screen is stopped
+for a while and an unfinished fractal there looks ugly.
+You should also call it, when you want to do something as soon as possible.
+</dl>
+<p>
+Example:
+<p><tt>
+;configure everything for the first frame<br>
+(inistate)<br>
+(palette 1 1163254293 0) ;custom palette<br>
+(cycling #t) ;enable cycling<br>
+(cyclingspeed 7)<br>
+(maxiter 276) ;higher number of iterations<br>
+(range 3) ;default range for solid guessing<br>
+(usleep 1000000) ;second frame starts here<br>
+(moveview -1.8101154154614007889 -8.2687205907162041209E-05)<br>
+ ;just move the image<br>
+(usleep 1000000) ;third frame<br>
+(morphview -1.8101154154614007889 -8.2687205907162041209E-05<br>
+ 6.277210971069452361E-10 6.2772109785334669875E-10)<br>
+ ;10 seconds of zooming into selected<br>
+ rectangle<br>
+(usleep 100000000)<br>
+</tt><p>
+The best way to learn XaoS command language is probably to read position files
+and modify them. For example, to create zooming animation from the original
+file:
+<p><tt>
+(initstate)<br>
+(defaultpalette 0)<br>
+(formula 'mandel)<br>
+(view -1.64128273713 -5.50393226816E-05 9.69332308848E-08<br>
+9.69332308834E-08)<br>
+</tt><p>
+Just change the <tt>view</tt> command to <tt>morphview</tt>, and add <tt>usleep</tt>:
+
+<p><tt>
+(initstate)<br>
+(defaultpalette 0)<br>
+(formula 'mandel)<br>
+(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08<br>
+9.69332308834E-08)<br>
+(usleep 10000000)<br>
+</tt><p>
+The following code produces Julia morphing in the real axis:
+<p><tt>
+(initstate)<br>
+(fastjulia #t)<br>
+(juliaseed -2 0)<br>
+(morphjulia 2 0)<br>
+(usleep 2000000)<br>
+</tt><p>
+
+And following is the ``rotozooming'' animation:
+
+<p><tt>
+(initstate)<br>
+(fastrotate #t)<br>
+(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08<br>
+9.69332308834E-08)<br>
+(morphangle 300)<br>
+(usleep 10000000)<br>
+(wait)<br>
+(fastrotate #f)<br>
+</tt><p>
+
+<head>XaoS gallery</head>
+
+I plan to make a gallery of animations and position files on the XaoS home-page,
+so please send any nice animations and images you created using XaoS
+to the <a support>mailing list</a> or upload them to our website.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%drivers
+
+<head>Platform-specific documentation</head>
+XaoS is portable and works on many different platforms. Since not all platforms are
+exactly the same, there are some differences between the behavior of XaoS on
+different platforms. Here is documentation about each specific port.
+<notex>
+<center>
+<p>
+<a X11>X11 driver</a>
+<p>
+<a cocoa>Mac OS X driver</a>
+<p>
+<a win32>Win32 driver</a>
+<p>
+<a dX-window>DirectX windowed driver</a>
+<p>
+<a dX-fullscreen>DirectX fullscreen driver</a>
+<p>
+<a aa>AA-lib driver</a>
+<p>
+<a dos>MS-DOS driver</a>
+<p>
+<a ggi>GGI driver</a>
+<p>
+<a plan9>plan9 driver</a>
+<p>
+<a SVGAlib>SVGAlib driver</a>
+<p>
+<a DGA>DGA driver</a>
+<p>
+<a BeOS>BeOS drivers (BeOS, DirectWindow, WindowScreen) </a>
+</center>
+</notex>
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%cocoa
+
+<head>Mac OS X port</head>
+XaoS has full support for Mac OS X including native menus, dialogs, help,
+Finder integration, drag and drop, and basic AppleScript support.
+<p>
+The Mac OS X port of XaoS strives to provide a Mac-like experience, while
+retaining compatibility with other platforms. Some Mac-specific details
+are outlined below.
+
+<head>Zooming</head>
+Since most Macs have one button mice, the middle and right buttons are emulated
+with modifier keys. This means there are multiple ways to perform basic zooming
+operations:
+
+<dl>
+<dt>Zoom in
+<dd>Hold down the main mouse button.
+<dt>Zoom out
+<dd>1. Hold down the Ctrl key while pressing the main mouse button.<br>
+ 2. Use the right mouse button if you have one.<br>
+ 3. On laptops with gestures enabled, place two fingers on your trackpad and press the main mouse button.
+<dt>Pan
+<dd>1. Hold down the Shift key while dragging with the main mouse button.<br>
+ 2. Drag with the center button if you have one.<br>
+ 3. Use the scroll wheel or ball if you have one to pan up/down and left/right.<br>
+ 4. On laptops with gestures enabled, swipe two fingers across the trackpad to pan horizontally or vertically.
+</dl>
+
+<head>Keyboard Shortcuts</head>
+XaoS menu functions have been mapped to commonly used Mac keyboard shortcuts. For example,
+Open is Cmd-O and Undo is Cmd-Z, just as you would expect.
+
+<p>However, XaoS also has its own
+long-standing tradition of cross-platform keyboard shortcuts. These keyboard shortcuts are
+also displayed in the menus inside parentheses. For example, the menu item "Autopilot (a)"
+means that you can press a (with no modifier keys) to activate Autopilot. All of these
+traditional XaoS shortcuts do not use modifier keys, so they do not conflict with any standard
+Mac OS X shortcuts.
+
+<p>In some cases, the same function may be performed with both a traditional
+XaoS shortcut and a Mac OS X-specific shortcut. You can choose whichever one is more
+comfortable for you.
+
+<head>Full Screen Mode</head>
+The Mac OS X port supports a full screen mode. To enter it, select <emph>Mac OS X Full Screen Driver</emph>
+from the <emph>UI -> Driver</emph> submenu. Once you enter full screen mode, the menu bar will
+automatically hide. To access the menu bar, move your mouse to the top of the screen and the menu
+bar will slide into view. When you move your mouse away, it will automatically disappear again.
+To return to windowed mode, select <emph>Mac OS X Windowed Driver</emph>
+from the <emph>UI -> Driver</emph> submenu.
+
+<head>Videator Support</head>
+XaoS for Mac OS X can send a live video stream to Stone Design's Videator (<tt>http://stone.com/Videator/</tt>),
+which can then do post-processing using Mac OS X's core video technology. This combination creates mind-blowing visuals
+that are great for VJing (live video performance art).
+<p>To turn on output to Videator, select <emph>Videator Output</emph> from the <emph>UI</emph> menu.
+See <tt>http://stone.com/Videator/VJ.html</tt> for more details on how using Videator with XaoS.
+
+<head>Known Issues</head>
+<dl>
+<dt>Catseye fractal does not render properly.
+<dd>Workaround: Set the bailout to just over 4 (e.g., 4.000000001). After changing this setting, the fractal renders as expected.
+</dl>
+<p>
+The Mac OS X driver was written by J.B. Langston, 2006-2008.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%aa
+
+<head>AA-lib driver</head>
+
+The AA driver is currently the most advanced and portable driver for XaoS.
+It is based on AAlib--a high quality ASCII-art library developed by the AA-project.
+(see <tt>http://aa-project.sf.net</tt>)
+<p>
+It is a fully featured XaoS driver for text mode displays. It supports 256 colors
+and the mouse where possible.
+<p>
+It also has some extended features available from the UI menu:
+<p>
+<dl>
+<dt>Attributes
+<dd>AA-lib may use character attributes to improve image quality.
+ By default it uses normal, dim and bold characters where possible,
+ but you can also enable different attributes like reversed or bold font
+ characters. You may also enable usage of non ansii/reversed characters if
+ your device supports it.
+<dt>Font
+<dd>AA-lib uses a bitmap image of the font to prepare the approximation table
+used for ASCII art rendering. This bitmap is expected to be same as the one used
+by your device. AAlib performs detection where possible however some devices
+(like UNIX text terminals or MDA) do not support this. AAlib has few font
+images compiled in, so in this case you should try to use one of them to
+achieve best results.
+<dt>Inversion
+<dd>Some devices use inverse video: use this to get correct results on such devices.
+<dt>Dithering mode
+<dd>Dithering is an way to get more exact color in approximations, by combining
+ more characters; but this method can produce ugly looking noise on certain images.
+ Use this menu to disable or tune it.
+<dt>Palette options
+<dd>By default AA driver uses the XaoS palette to render images, but it quite often
+looks ugly on text displays. Here you can choose a special text palette instead. Note that with
+filters enabled, the results may be rather ugly. This function is available from
+the <emph>palette menu</emph>.
+<dt>Save text screen
+<dd>The normal save function will generate a PNG image instead of nice
+ ASCII-art. To save ASCII art use this function instead. It supports many
+ text file formats like HTML, ANSI, more, etc... It will also ask you for
+font and attributes(see above). It is available from the <emph>file
+menu</emph>.
+</dl>
+<p>
+The AA-lib driver also provides the full set of standard AA-lib's command line
+options. You may use them to tune parameters like gamma correction, and so on.
+See <tt>xaos -help</tt> or the AA-lib documentation for details.
+<p>
+The AA driver was written by Jan Hubicka, 1997.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%dos
+
+<head>DOS driver</head>
+This is a fully featured driver for DJGPP and allegro.
+It supports many VGA modes, VESA 1.0--3.0, VBE/AF, S3 and some other cards.
+<p>
+The following problems may occur:
+<p>
+<dl>
+<dt>Some DPMI servers may cause problems
+<dd>Some DPMI servers like the one from Novell/Dr/Open DOS are buggy. Use clean DOS
+ instead and XaoS will automatically start <tt>cwsdpmi</tt>.
+ Under Open Dr DOS use <tt>dpmi off</tt> at command line to disable it.
+<dt>Higher resolutions don't work
+ <dd>If your videocard has enough memory for the selected resolution,
+ you most probably have an unsupported videocard.
+ Please use a VESA BIOS extension on this videocard. (See the note about VESA
+ at the end of this section.)
+<dt>XaoS needs a coprocessor
+ <dd>I don't distribute a coprocessor library linked into XaoS because it is too slow for
+ a real-time zoomer. Coprocessor emulation will not help, because xaos works in protected mode.
+<dt>XaoS needs mouse driver to be usable
+<dt>XaoS works slowly in higher resolution
+ <dd>This could also be caused by Allegro's slow driver or your videocard's VESA BIOS.
+ You could try some other VESA BIOS extension instead.
+ Look at the <tt>http://www.talula.demon.co.uk</tt> for the FreeBE
+ project or Scitech Display Doctor package.
+ (See the note about VESA at the end of this section.)
+</dl>
+<head>VESA</head>
+VESA is a standard for using higher resolutions in DOS. Many videocards have
+VESA support in the BIOS so you don't need any additional software, while others
+need support from a special program. Also some VESA BIOS implementations are
+buggy or suboptimal; there are 3 different versions, version 1.0 is many times
+slower than 2.0, which has support for protected mode and linear framebuffers.
+So if you have problems with higher resolutions, or some graphics modes are
+not available (like 320x200 truecolor), you might try some software package
+which emulates VESA.
+<p>
+The most famous VESA emulating program is Scitech Display Doctor. It has support
+for many videocards and is quite reliable. It's disadvantage is that it is
+shareware and works for only 30 days. You might also look on
+<tt>ftp.simtel.net</tt>, where there are many VESA emulation packages such as
+<tt>s3vbe</tt> or the new FreeBe project at
+<tt>http://www.talula.demon.co.uk</tt>
+<p>
+DOS driver was written by Jan Hubicka, 1997.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ggi
+
+<head>GGI driver</head>
+
+GGI stands for General Graphics Interface. Part of this project is to develop
+libggi, a portable graphics library, and XaoS's GGI driver uses that.
+It is experimental, since the API of libggi is not stabilized yet.
+There are some problems with keyboard handling--the shift key doesn't work
+yet.
+<p>
+Everything else might work well, but there are no guarantees. It is alpha quality
+software.
+<p>
+GGI driver was written by Jan Hubicka, 1998.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%plan9
+
+<head>Plan9 driver</head>
+
+Plan9 is a very nice small operating system by the authors of Unix at Bell Labs.
+It is very incompatible with other operating systems; even the C compiler and
+header files are different, but XaoS should work well there (even on the
+limited free demo installation without any POSIX compatibility stuff)
+<p>
+There are a few limitations: the file selector and image saving don't work.
+You can save position files and then later render them on the other OS, or save
+screenshots.
+<p>
+Plan9 terminals also don't provide any way to catch the arrow keys, so you
+can't use them. Use the mouse to navigate in the menus. Also, getting the screen
+resolution is impossible, so use <tt>-pixelwidth</tt> and <tt>-pixelheight</tt>
+instead of <tt>-screenwidth</tt> and <tt>-screenheight</tt>.
+<p>
+By default XaoS changes the colormap. This will collide with other colorful
+programs like Mortha. You can disable this behavior using
+<tt>-nopalette</tt> switch, but this will slow down XaoS.
+<p>
+Plan9 driver was written by Jan Hubicka, 1997.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%SVGAlib
+
+<head>SVGAlib driver</head>
+
+This is a driver for Linux SVGAlib. I really like this driver, because
+I much prefer full screen zooming instead of a small 320x320 window in X11.
+It was one of the first drivers for XaoS and is fully featured.
+The following problems can occur:
+<p>
+<dl>
+<dt>XaoS doesn't initialize graphics mode
+<dd>when started under users other than root SVGAlib requires root privileges
+ to directly access the hardware. When you really want to start XaoS as a
+ normal user, enable the suid bit (<tt>chmod +s</tt>) at XaoS executable.
+ note that I take care to disable all security holes caused by this
+ bit so I believe it is safe.
+<dt>Mouse doesn't work
+<dt>Screen is blank at higher resolutions
+<dd>Both this problems are probably caused by misconfiguration of
+SVGAlib. Please configure it in <tt>etc/vga/libvga.cong</tt> or
+<tt>/usr/local/lib/libvga.conf</tt>
+GPM can also cause problems. Try to kill it before starting XaoS.
+<dt>When I switch console I can't switch back
+<dd>This is another typical SVGAlib bug. Try to hold <tt>F</tt> key longer than <tt>alt</tt>.
+ It helps on my computer. On older SVGAlib there was a famous ``enter bug'' that caused
+ a crash after pressing enter. Try to update to a newer release.
+</dl>
+<p>
+SVGAlib driver was written by Jan Hubicka, 1997.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%win32
+
+<head>Win32 driver</head>
+
+This is a driver for Windows 9x and NT. It is new since version 3.1 and
+because of some oddities of Windows API it may be rather unstable.
+Please report all bugs. In case of problems you could use the DOS version
+of XaoS instead.
+<p>
+The driver should work in all bit depths, but 16 color mode is not natively
+supported by the XaoS engine. XaoS internally works in 32k colors and
+the result is converted to 16 colors by Windows. Because Windows
+conversion routines are slow and ugly, the result is slow and ugly.
+Please configure your display to another bit depth to ``solve''
+this problem.
+<p>
+Use <tt>-size WIDTHxHEIGHT</tt> command line option to change the default
+window size.
+<p>
+This driver also maps to native Windows look and feel. There is a small
+problem with combo boxes in dialogs. They are expected to give you a choice
+between a few strings. The keyboard controls (changing choice by arrow keys)
+work, but mouse selection is broken. If you know how to solve this bug,
+please let me know.
+<p>
+XaoS is a UNIX application and has many command line options.
+Some features are not available from the GUI.
+Because Windows applications can't have normal output,
+most of the critical messages are displayed in message boxes, but
+some longer messages are omitted. The most significant omission is the help
+about command line options that you can find in <tt>doc/cmdopts.txt</tt>.
+<p>
+One thing that might be confusing is that animation rendering mode doesn't
+display anything, but only renders images. Start the rendering,
+and a message box will inform you that XaoS is entering the calculation
+loop. Relax and wait for the message box signaling the end of the loop.
+<p>
+Note that XaoS also supports the <a dX-window>DirectX</a> API.
+<p>
+Win32 driver was written by Jan Hubicka, Jan Olderdissen and Pavel Tzekov, 1999.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%dX-window
+
+<head>DirectX windowed driver</head>
+
+This is a driver for Windows 9x and NT. It is new since version 3.1 and
+because of some oddities of Windows API and kludges in DirectX
+it may be rather unstable. Please report all bugs. In case
+of problems you could use the DOS version of XaoS instead.
+<p>
+The DirectX driver is an alternative to the windowed <a win32>win32 driver</a>.
+If you have DirectX installed, this driver is used by default. It has
+almost the same behaviour as the <a win32>win32 driver</a> so please read its
+documentation for more details. The only difference should be the display
+speed.
+<p>
+The driver supports only hicolor and truecolor modes. There is no support
+for 256 and 16 color modes because of palette collision problems. The win32
+driver will be used in these cases by default, so this should cause no
+problems.
+<p>
+If you are experiencing problems with this driver, you might want to
+use the <a win32>win32 driver</a> by default; to do this, use the <tt>-driver win32</tt>
+command line option.
+<p>
+DirectX driver was written by Jan Hubicka, Jan Olderdissen
+and Pavel Tzekov, 1999.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%dX-fullscreen
+
+<head>DirectX fullscreen driver</head>
+This is da river for Windows 9x and NT. It is new since version 3.1 and
+because of some oddities of Windows API and kludges in DirectX
+it may be rather unstable. Please report all bugs. In case
+of problems you could use the DOS version of XaoS instead.
+<p>
+This driver allows the Windows port of XaoS to run in full screen mode.
+The driver supports 256, 65536 and 16777216 color modes (24bpp and 32bpp)
+in all resolutions supported by DirectX.
+You can change graphics mode by pressing the <tt>=</tt> key
+(or by using the UI/Resize menu). If the selected mode is not supported,
+the driver will restore the previous setting.
+<p>
+Use the <tt>-mode WIDTHxHEIGHTxDEPTH</tt> (like <tt>-mode 640x480x16</tt>)
+command line option to change graphics mode.
+<p>
+If you want to start XaoS in DirectX, use the <tt>-driver dX-fullscreen</tt>
+option.
+<p>
+See the <a win32>Win32 driver</a> documentation for some more Windows
+releated information.
+<p>
+DirectX driver was written by Jan Hubicka, Jan Olderdissen
+and Pavel Tzekov, 1999.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%BeOS DirectWindow WindowScreen
+
+<head>BeOS support</head>
+
+XaoS has pretty advanced support for BeOS R4. It works on both PowerPC and
+Intel platforms, supports multithreading, the clipboard, file dragging,
+has native look and feel and can work as an image translator from XaoS files
+to images.
+<p>
+The first version of the BeOS driver was written by Jens Kilian and later
+extended by Jan Hubicka.
+<p>
+<head>Installation</head>
+<p>
+You can start the installation script to do everything for you. If you want
+something special, read this section.
+<p>
+In order for XaoS to work you need to keep the executable together with
+its data files (<tt>help</tt>, <tt>examples</tt>, <tt>catalogs</tt> and the <tt>tutorials</tt> directory)
+<p>
+When first started, XaoS registers two new mime types called
+<tt>image/x-xaos-position</tt> for XaoS Position Files and
+<tt>video/x-xaos-animation</tt> for XaoS Animation Files,
+registers icons for them and sets itself as default application.
+<p>
+<head>Available display drivers</head>
+<p>
+XaoS supports following drivers:
+<p>
+<dl>
+<dt>BeOS
+<dd>Standard windowed driver using application server
+<dt>DirectWindow
+<dd>Driver done using Game Kit's direct window class
+<dt>WindowScreen
+<dd>Fullscreen driver.
+</dl>
+<p>
+By default, XaoS starts in windowed mode and uses the application server for output.
+You could change the driver to DirectWindow to use direct access to video RAM.
+Note that this mode is slower in most cases, and not supported by some videocards.
+<p>
+The BeOS driver by default chooses the most similar bitmap supported by XaoS
+to achieve best and fastest results.
+In the UI menu you can change this default choice to another one if you wish.
+Also you can ask the BeOS and DirectWindow to resize to fullscreen mode.
+<p>
+XaoS also supports real fullscreen mode using the BWindowScreen API. To switch
+XaoS to this driver, use the UI menu. If you want to use this mode by default,
+use the <tt>-driver WindowScreen</tt> command line option.
+<p>
+This driver differs a lot from windowed ones. It use direct access to the video
+card, allowing you to change video mode. Also, the 256 color mode
+can access the palette, so it is not dithered like the windowed mode.
+Because BeOS can't do GUI in fullscreen mode, XaoS uses its own toolkit.
+I hope you will feel confortable in it.
+<p>
+<head>XaoS as translator</head>
+<p>
+You should be able to open XaoS files in graphics applications
+such as ShowImage or ArtPaing. In Preferences you can find the DataTranslations
+program, that can be used to set the size, type and DPI of the resulting image.
+Also antialiasing can be enabled.
+<p>
+Note that <emph>translation can take a while</emph>. So be patient and
+wait for the result.
+<p>
+If the translator doesn't work, ensure that you have a link to the XaoS executable
+in <tt>/boot/beos/system/add-ons/Translators/</tt>.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%X11
+
+<head>X11 driver</head>
+This was the first driver done for XaoS. It supports many visuals, shared
+colormaps and MitSHM extension.
+<p>
+Bugs/limitations:
+<p>
+<dl>
+<dt>XaoS makes some X servers too busy
+<dd>Sometimes XaoS generates images faster than X can display them.
+In this case XaoS responds poorly to the mouse, and other applications slow
+down too. This happens especially often on old R4 servers. Use <tt>-sync</tt>
+to avoid this problem. Note that <tt>-sync</tt> does <tt>not</tt> make all
+communication with X asynchronous; it just adds one additional XSync call.
+So the slowdown is not as large as you might expect.
+<dt>Does not work on all visuals
+<dd>This driver supports only 8bpp pseudocolor/grayscales, 15,16,24 and 32bpp truecolor, 1bpp and 8bpp staticolor visuals.
+<dt>Palette rotating does not work for 8bpp pseudocolor w/o private palette
+</dl>
+<p>
+X11 driver was written by Jan Hubicka and Thomas Marsh, 1997.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%DGA
+
+<head>DGA driver</head>
+This is the driver for DGA (Direct Graphics Architecture) extension used by
+XFree86 X servers. It is pretty new so it could be buggy.
+<p>
+Bugs/limitations:
+<p>
+<dl>
+<dt>In 8bpp mode, XaoS has problems with the palette with certain window managers
+<dd>I don't know why this happens. Just let me know what's wrong, or use another
+window manager.
+<dt>Banked modes are not supported.
+<dd>I don't have any card to test this with, so it doesn't work in the current version.
+</dl>
+<p>
+DGA driver was written by Jan Hubicka, 1999.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%tutorial
+
+<head>XaoS tutorial</head>
+
+This is a brief introduction to the basic XaoS features.
+
+<head>How to zoom</head>
+ The main advantage of XaoS is that after a few seconds' delay to calculate
+ the first image, you may choose any point with the mouse and press the <emph>left</emph> button.
+ The image will start to zoom smoothly into the point you choose. You may move
+ the mouse and zoom smoothly into interesting areas. By pressing the <emph>middle
+ button</emph> (or <emph>left+right</emph> buttons) you may also
+ <emph>move the image</emph> using ``drag & drop'' if you missed an interesting
+ place. <emph>Unzooming</emph> is also possible by using the <emph>right button</emph>,
+ but it is much slower because optimizations are not so effective as for zooming.
+<p>
+ In case you think that the default <emph>speed</emph> is boring (it is quite slow, to
+ make XaoS smooth on a slow computer) you may change it by pressing <emph>arrow
+ up/down</emph>. But faster zooming is more expensive, so if the speed is too high
+ you will see little but funny colorful blinking rectangles.
+
+<head>Autopilot</head>
+
+ To make XaoS yet more impressive we made a special autopilot that
+ automatically drives into interesting boundaries of the set. So you can
+ press <tt>A</tt>, play your favorite music, drink coffee and relax. I never
+ tried this but it should be really relaxing! Many pictures in the XaoS
+ gallery were discovered using the autopilot.
+<p>
+ The autopilot also has some additional features. It turns back when the
+ zoomed picture stops being interesting, and is able to spot when it's zoomed
+ into a really boring part (or has reached the limit of floating point
+ numbers) and restart zooming from the top.
+<p>
+<head>Various fractal formulae</head>
+
+ XaoS also supports formulae other than the Mandelbrot set. You may change
+ <emph>formula</emph> using the <emph>number keys</emph>
+ or <emph>SHIFT+letters</emph>.
+
+
+<p>
+ On keys <tt>1</tt> to <tt>5</tt> are <emph>Mandelbrot sets of various power</emph>. The ``normal''
+ Mandelbrot set is on key <tt>1</tt>.
+<p>
+ On key <tt>6</tt> is a fractal called <emph>Newton</emph>. It is Newton's famous formula for finding roots.
+<p>
+ On key <tt>7</tt> is the <emph>fourth ordered Newton</emph> fractal.
+<p>
+ On key <tt>8</tt> is a fractal called <emph>Barnsley</emph>.
+<p>
+ On key <tt>9</tt> is <emph>Barnsley's second</emph> fractal.
+<p>
+ On key <tt>0</tt> is <emph>Barnsley's third</emph> fractal.
+<p>
+ With keys <tt>SHIFT-A</tt> you can display a fractal called <emph>octo</emph>. It is a fractal that Thomas
+ discovered in fractint.
+<p>
+ With keys <tt>SHIFT-B</tt> you can display a fractal called <emph>Phoenix</emph>. It is a very nice and quite famous fractal.
+<p>
+ With keys <tt>SHIFT-C</tt> you can display a fractal called <emph>Magnet</emph>. This fractal has quite a complex formula so it is
+ a bit slow.
+<p>
+ With keys <tt>SHIFT-D</tt> you can display the <emph>Magnet2</emph> fractal.
+<p>
+ The rest of the built-in fractals are accessible through an other menu, but
+ you can still use the hotkeys.
+<p>
+ On <tt>SHIFT-E</tt> is a fractal called <emph>Triceratops</emph> found by Arpad.
+<p>
+ On <tt>SHIFT-F</tt> is a fractal called <emph>Catseye</emph> found by Arpad.
+ This is more interesting if you change the bailout value.
+<p>
+ On <tt>SHIFT-G</tt> is a fractal called <emph>Mandelbar</emph>. It was in
+ Gnofract4d, and they found it at:
+ http://mathworld.wolfram.com/MandelbarSet.html
+<p>
+ On <tt>SHIFT-H</tt> is the <emph>Lambda</emph> fractal.
+<p>
+ On <tt>SHIFT-I</tt> and <tt>SHIFT-J</tt> are the <emph>Manowar</emph>
+ and <emph>Spider</emph> fractals, they were found by users of fractint.
+ (Scott Taylor or Lee Skinner)
+ It was on http://spanky.triumf.ca/www/fractint/
+ taylor_skinner_type.html
+<p>
+ The next 3 fractals are famous classic fractals.
+<p>
+ On <tt>SHIFT-K</tt> is the <emph>Sierpinski</emph> Gasket.
+ You can change its shape by selecting another Julia seed.
+ (This is for technical reasons.)
+<p>
+ On <tt>SHIFT-L</tt> is the <emph>Sierpinski Carpet.</emph>
+ It's shape can also be changed by selecting another Julia seed.
+<p>
+ On <tt>SHIFT-M</tt> is the <emph>Koch Snowflake.</emph>
+<p>
+
+
+<head>Out-coloring modes</head>
+
+ To make fractals yet more interesting, more coloring modes for points
+ outside the set are provided. ``Classical coloring mode'' uses the number of
+ iterations that the orbit required to escape to (nearly) infinity. You can change this
+ mode from the <emph>Fractal menu</emph> or by pressing key <tt>C</tt>
+ To see more about coloring modes, try the tutorial on <tutor incolor.xaf>Incoloring modes</tutor> from the XaoS features overview.
+<p>
+ Those cryptic names for coloring modes are mathematical formulae, where <emph>iter</emph> means number
+ of iterations, <emph>real</emph> means real coordinate of last orbit, and <emph>imag</emph> means imaginary
+ coordinate of last orbit.
+<p>
+<head>In-coloring mode</head>
+
+ In-coloring mode is similar to out-coloring, except that it changes how
+ things inside the set are displayed. This can also be changed from the <emph>fractal
+ menu</emph> or by pressing <tt>F</tt>.
+ <p>
+ You might also want to see the tutorial on
+ <tutor outcolor.xaf>Out-coloring modes</tutor> from the XaoS features overview.
+
+<head>Planes</head>
+
+ All fractals displayed by XaoS are functions with a complex parameter. It
+ can be displayed in the normal complex plane, where x is the real part of
+ the number, and y is the imaginary part; but it can also be displayed in
+ a number of other planes. You can select the plane to use from the
+ <emph>Fractal menu</emph>, or by pressing <tt>I</tt>.
+<p>
+ Like the coloring modes, planes have cryptic names. You guessed it, they're
+ mathematical formulae. Here <tt>mu</tt> means coordinates in the normal
+ complex plane. If you have coordinates in <tt>1/mu</tt> plane, and you need
+ coordinates in the a complex plane (to calculate the Mandelbrot set) you
+ simply use the coordinates as mu. Lambda is another plane that can be
+ converted to mu using a similar formula.
+ <p>
+<dl>
+ <dt>mu
+ <dd>normal mode.
+
+ <dt>1/mu
+ <dd>Inversion: infinity goes to 0 and 0 goes to infinity.
+
+ <dt>1/(mu+0.25)
+ <dd>Similar to inversion, but moves the center outside of the
+ Mandelbrot set so that it looks parabolic.
+
+ <dt>lambda
+ <dd>Lambda plane.
+
+ <dt>1/lambda
+ <dd>Inversion of lambda plane.
+
+ <dt>1/lambda-1
+ <dd>Inversion with moved center.
+
+ <dt>1/(mu-1.40115)
+ <dd>A very interesting mode for the Mandelbrot set. It makes small things
+ big, so you can browse the set's details easily.
+</dl>
+<p>
+
+<head>Mandelbrot/Julia switching</head>
+
+ Most of the fractals displayed by XaoS (currently all of them) have two
+ forms: Mandelbrot and Julia. Every point in a Mandelbrot set has its
+ own Julia set. To see more about this correspondence, try the tutorial on
+ <tutor julia.xaf>Julia set</tutor> from the Introduction to fractals.
+<p>
+ In the Mandelbrot mode, you can get a corresponding Julia by moving the mouse
+ to an interesting point and pressing <tt>M</tt>. To get back press <tt>M</tt>
+ again. Some fractals (Barnsley and phoenix) are already in their Julia
+ versions, because the Mandelbrot ones are boring. But by pressing <tt>M</tt>
+ in such fractal you should get the Mandelbrot version, and by choosing another
+ point as the base point and pressing <tt>M</tt> again you should get a
+ completely different fractal. The most interesting points for Julia sets
+ are at the boundaries of the Mandelbrot set. Most of the Julias inside or
+ outside the set are boring.
+<p>
+
+<head>Fast Julia preview mode</head>
+
+ Fast Julia mode is a quick way to find a point to use as a base for the Julia
+ set.. Just press <tt>J</tt> and a small Julia set will be displayed in the top
+ left corner. Then move the mouse around with button 1 depressed, and the Julia
+ for the point the mouse is over will be automatically generated.
+
+<head>Palette</head>
+
+ If you think that the default XaoS colors are ugly or you are just
+ bored by them you can change it by pressing <tt>P</tt>. XaoS will
+ automatically generate random palettes. Many of them look ugly, so
+ press <tt>P</tt> again to get another one until you find one you like.
+<p>
+<head>Filters</head>
+
+ Many interesting effects are done by post-calculation <a filter>filters</a>.
+ XaoS has filters that do everything from embossing, through motion-blurring,
+ right through to turning the fractal into a stereogram. To enable them use
+ the <tt>filter menu</tt> or press <tt>E</tt>.
+<p>
+<head>Palette cycling</head>
+
+ This is a very old trick that makes the Mandelbrot set a little flashier. You
+ may enable or disable it using <tt>Y</tt>. In the truecolor modes you need
+ to enable the <a palettef>palette emulator filter</a> first. This is done
+ via the <tt>E</tt> key, or from the filter menu.
+<p>
+<head>Changing number of iterations</head>
+
+ To calculate fractals perfectly, you need an infinite number of
+ iterations. XaoS does just the first few of them, so after lots of zooming
+ you may get into a place that looks quite boring, and the boundaries of the
+ set are rounded, without any interesting details. This can be changed by
+ changing the number of iterations:
+ <p>
+ Press and hold <tt>arrow right</tt> and wait until iterations are high enough.
+ This may slow down calculation much. To reduce number of iterations
+ press <tt>arrow left</tt>.
+
+<head>Changing resolution</head>
+
+ XaoS usually starts in a low resolution (320x200 or thereabouts) to make
+ calculations faster. If you have a fast computer or you need to
+ save bigger <tt>.gif</tt> images, you may change the resolution. This
+ can be done by pressing <tt>=</tt> in the full screen drivers, or simply
+ by resizing the XaoS window.
+
+<head>Changing driver</head>
+
+ XaoS usually has more than one driver available. You may change it on
+ the fly in case you want a different one. For example, XaoS started in X11
+ can be switched at runtime to use the AA driver. This can be done from the
+ UI menu.
+ <p>
+ This action is bit dangerous, because XaoS can crash during initialization
+ if there is some problem with initialization; XaoS tries to initialize a new
+ driver, and if it fails it attempts to return back to the original. Sometimes
+ this is impossible, and all XaoS can do is terminate..
+
+<head>Other features</head>
+XaoS has many other features, but they don't fit into this tutorial. Most of
+them are available from the menu, so you can experiment with them. You might
+also want to see the <emph>animated tutorials</emph> from the <emph>help menu</emph>,
+to have an idea what XaoS can do.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%menus
+<main><head>Menus, functions and command line parameters</head></main>
+All XaoS functions are referenced by a central function registry. The
+scripting language, menus, dialogs and command line options are built
+from this database. This section contains information about all functions
+available in this registry.
+<menuitems><center>
+<p><submenu><a root>Root menu</a>
+<p><submenu><a animroot>Animation root menu</a>
+<p><submenu><a plc>Replay only commands</a>
+%end
+<p><submenu><a linemenu>Line drawing functions</a>
+<p><submenu><a animf>Animation functions</a>
+<p><submenu><a time>Timing functions</a>
+<p><submenu><a file>File</a>
+<p><submenu><a edit>Edit</a>
+<p><submenu><a fractal>Fractal</a>
+<p><submenu><a calc>Calculation</a>
+<p><submenu><a mfilter>Filters</a>
+<p><submenu><a ui>UI</a>
+<p><submenu><a misc>Misc</a>
+<p><submenu><a helpmenu>Help</a>
+<p><submenu><a xtextpos>Horizontal text position</a>
+<p><submenu><a ytextpos>Vertical text position</a>
+<p><submenu><a mformula>Formulae</a>
+<p><submenu><a palettemenu>Palette</a>
+</center></menuitems>
+<node root, , animroot, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%root
+
+<notex>
+<menuhead><head>Root menu</head></menuhead>
+This menu is usually displayed at the top of the screen or window. It contains all
+currently available submenus. During animation another menu is displayed--the
+<a animroot>Animation root menu</a>.
+<menuitems><center>
+<p><submenu><a file>File</a>
+<p><submenu><a fractal>Fractal</a>
+<p><submenu><a calc>Calculation</a>
+<p><submenu><a mfilter>Filters</a>
+<p><submenu><a ui>UI</a>
+<p><submenu><a misc>Misc</a>
+<p><submenu><a helpmenu>Help</a>
+</center></menuitems>
+</notex>
+<node animroot, root, plc, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%animroot
+
+<menuhead><head>Animation root menu</head></menuhead>
+This menu is displayed at the top of the screen when animation replay is active.
+<menuitems><center>
+<p><submenu><a file>File</a>
+<p><a stopreplay>Stop replay</a>
+<p><submenu><a helpmenu>Help</a>
+<p><submenu><a ui>UI</a>
+</center></menuitems>
+<node stopreplay, , , animroot>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%stopreplay
+<head>Stop replay</head>
+Terminate animation replay.
+<p>
+<emph>Available as</emph>: menu item
+
+
+
+<node plc, animroot, linemenu, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%plc
+<menuhead><head>Replay only commands</head></menuhead>
+Some commands, such as timing primitives or animation functions, are available
+only in animation files.
+<menuitems><center>
+<p><submenu><a linemenu>Line drawing functions</a>
+<p><submenu><a animf>Animation functions</a>
+<p><submenu><a time>Timing functions</a>
+<p><a load>Include file</a>
+</center></menuitems>
+<node load, , , plc>
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%load
+<head>Include file</head>
+<p><emph>Syntax</emph>:(load file)
+<p>
+This function lets you include another file in your script. It works similarly
+to <tt>#include</tt> in C or <tt>load</tt> in Scheme.
+The file is searched for in the same directory as the current source file.
+<p>
+<emph>Available as</emph>: command
+
+<node linemenu, plc, animf, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%linemenu
+
+<menuhead><head>Line drawing functions</head></menuhead>
+XaoS has support for drawing lines. These functions are available only in
+animations and could be used to show some parts of fractals or draw simple
+diagrams. See the tutorial ``<tutor intro.xaf>Introduction to fractals</tutor>''
+for examples of this feature.
+<p>
+Lines can be drawn in <emph>screen</emph> coordinates, where 0,0
+is the top left corner and 1,1 is bottom right, <emph>scaled</emph>
+coordinates, which are similar, but scaled to keep 0,0--1,1 rectangular,
+or <emph>Fractal</emph> coordinates, to draw a line at an exact position
+on the screen.
+<p>
+The color of the line should be specified by the <a color><tt>color</tt></a> command.
+You might draw an arbitrary number of lines and, later, morph them. Each line is
+identified by a unique numeric key; the current key can be set using <tt>linekey</tt>.
+Commands for changing lines operate on the line with the current key.
+(Lines drawn in sequence have consecutive numbers.)
+<p>
+For example:
+<p><tt>
+(color 'red)<br>
+(line 'scaled 0.3 0.5 0.7 0.5)<br>
+(line 'scaled 0.3 0.5 0.7 0.5)<br>
+(line 'scaled 0.3 0.5 0.3 0.5)<br>
+(line 'scaled 0.7 0.5 0.7 0.5)<br>
+(linekey 0)<br>
+(morphline 'scaled 0.3 0.3 0.7 0.3)<br>
+(morphline 'scaled 0.3 0.7 0.7 0.7)<br>
+(morphline 'scaled 0.3 0.3 0.3 0.7)<br>
+(morphline 'scaled 0.7 0.3 0.7 0.7)<br>
+(usleep 1000000)<br>
+</tt><p>
+Creates line morphing to rectangle.
+<notex>
+<menuitems><center>
+<p><a line>Draw line</a>
+<p><a morphline>Morph line</a>
+<p><a morphlastline>Morph last line</a>
+<p><a linekey>Set line key</a>
+<p><a clearline>Clear line</a>
+<p><a clearlines>Clear all lines</a>
+</center></menuitems>
+</notex>
+<notex>
+<node line, , morphline, linemenu>
+</notex>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%line
+
+
+<notex>
+<head>Draw line</head>
+</notex>
+<p><emph>Syntax</emph>:(line keyword complex complex)
+<p>
+Draw line between two points.
+<tt>keyword</tt> specifies type of coordinates and should be one of the
+following: <tt>`fractal</tt>, <tt>`screen</tt> or <tt>`scaled</tt>.
+This function also increases the line key.
+<p>
+<emph>Available as</emph>: command
+
+<notex>
+<node morphline, line, morphlastline, linemenu>
+</notex>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%morphline
+
+
+<notex>
+<head>Morph line</head>
+</notex>
+<p><emph>Syntax</emph>:(morphline keyword complex complex)
+<p>
+Morph current line to given coordinates.
+<tt>keyword</tt> specifies type of coordinates and should be one of the
+following: <tt>`fractal</tt>, <tt>`screen</tt> or <tt>`scaled</tt>.
+The line will start moving at the next <a time>timing command</a>, and reach the
+final position before the end of it.
+This function also increases the line key.
+<p>
+<emph>Available as</emph>: command
+
+<notex>
+<node morphlastline, morphline, linekey, linemenu>
+</notex>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%morphlastline
+
+
+<notex>
+<head>Morph last line</head>
+</notex>
+<p><emph>Syntax</emph>:(morphlastline keyword complex complex)
+<p>
+This function has the same functionality as <a morphline>morphline</a>, but it doesn't
+increase the line key, and touches the line with the previous key. This is useful when
+you want to move a just-drawn line--you don't need to set <a linekey>linekey</a> back.
+<p>
+<emph>Available as</emph>: command
+
+<notex>
+<node linekey, morphlastline, clearline, linemenu>
+</notex>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%linekey
+<notex>
+<head>Set line key</head>
+</notex>
+<p><emph>Syntax</emph>:(linekey integer)
+<p>
+Set current line key.
+<p>
+<emph>Available as</emph>: command
+
+<notex>
+<node clearline, linekey, clearlines, linemenu>
+</notex>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%clearline
+<notex>
+<head>Clear line</head>
+</notex>
+<p><emph>Syntax</emph>:(clearline)
+<p>
+Clear current line. This function also increases the line key.
+<p>
+<emph>Available as</emph>: command
+
+<notex>
+<node clearlines, clearline, , linemenu>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%clearlines
+<head>Clear all lines</head>
+</notex>
+<p><emph>Syntax</emph>:(clearlines)
+<p>
+Clear all displayed lines. Lines can also be cleared using the
+<tt>clearscreen</tt> or <tt>display</tt> commands available from the <a misc>Misc menu</a>.
+<p>
+<emph>Available as</emph>: command
+
+<node animf, linemenu, time, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%animf
+
+<menuhead><head>Animation functions</head></menuhead>
+These functions are used to animate fractal state--to zoom, unzoom and morph
+various parameters. They should be used only in animation files.
+Animations are usually performed for a time selected by an immediately following
+<a time>timing function</a>.
+For example:
+<p><tt>
+(view 0 0 1 1)<br>
+(morphview 0 0 2 2)<br>
+(usleep 5000000)
+</tt><p>
+Will do a 5 second long unzooming animation.
+<menuitems><center>
+<p><a animateview>Animate view</a>
+<p><a smoothmorph>Smooth morphing</a>
+<p><a morphview>Morph view</a>
+<p><a morphjulia>Morph julia</a>
+<p><a moveview>Move view</a>
+<p><a morphangle>Morph angle</a>
+<p><a zoom>Zooming functions</a>
+</center></menuitems>
+<node animateview, , smoothmorph, animf>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%animateview
+<head>Animate view</head>
+<p><emph>Syntax</emph>:(animateview float float float float)
+<p>
+This function is almost identical to function <a uiview><tt>view</tt></a>.
+It expects that the view will be changed only slightly, so recalculation is done
+with <tt>ANIMATE</tt> priority. This means that dynamic resolution is used by
+default.
+<p>
+Viewport is selected by the center and two radiuses (real and imaginary). See
+<a uiview><tt>view</tt></a> for more information.
+<p>
+<emph>Available as</emph>: command
+
+<node smoothmorph, animateview, morphview, animf>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%smoothmorph
+<head>Smooth Morphing</head>
+<p><emph>Syntax</emph>:(morphview keystring starttime endtime)
+This function lets you smoothly start and stop morphing. Specify
+starttime and stoptime as nonzero, and morphing will speed up and slow down for
+that number of usecs.
+<p>
+The keystring is used to select what morphing you want to control. It is one of
+the following:
+<dl>
+<dt>'view
+<dd>control <a morphview>morphview</a>
+<dt>'angle
+<dd>control <a morphangle>morphangle</a>
+<dt>'julia
+<dd>control <a morphjulia>morphjulia</a>
+<dt>'line
+<dd>control <a morphline>morphline</a>
+</dl>
+<node morphview, smoothmorph, morphjulia, animf>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%morphview
+<head>Morph view</head>
+<p><emph>Syntax</emph>:(morphview float float float float)
+For the time selected by the next <a usleep><tt>usleep</tt></a> or other timing function, the viewpoint is smoothly morphed from
+the current one to that selected by <tt>morphview</tt>.
+<p>
+Viewport is selected by the center and two radiuses (real and imaginary). See
+<a uiview><tt>view</tt></a> for more information.
+<p>
+This function can easily be used for creating zooming/unzooming animations using position files.
+This is an example position file generated by XaoS:
+<p><tt>
+(initstate)<br>
+(defaultpalette 0)<br>
+(formula 'mandel)<br>
+(view -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+ 9.69332308834E-08)<br>
+</tt><p>
+By replacing the <tt>view</tt> command with <tt>morphview</tt> and
+adding <tt>usleep</tt> you can create a zooming animation:
+<p><tt>
+(initstate)<br>
+(defaultpalette 0)<br>
+(formula 'mandel)<br>
+(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08
+ 9.69332308834E-08)<br>
+(usleep 10000000)
+</tt><p>
+
+
+<emph>Available as</emph>: command
+
+<node morphjulia, morphview, moveview, animf>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%morphjulia
+<head>Morph Julia</head>
+<p><emph>Syntax</emph>:(morphjulia complex)
+For the time selected by the next <a usleep><tt>usleep</tt></a> or other timing function, the Julia seed
+is smoothly interpolated from the current one to that selected by <tt>morphjulia</tt>. By default this will
+cause recalculation of the whole screen.
+To avoid this, use <a fastjulia>fast Julia mode</a>.
+<p>
+A simple animation morphing Julia seed in the X axis:
+<p><tt>
+(initstate)<br>
+(fastjulia #t)<br>
+(juliaseed -2 0)<br>
+(morphjulia 2 0)<br>
+(usleep 2000000)<br>
+</tt><p>
+<p>
+<emph>Available as</emph>: command
+
+<node moveview, morphjulia, morphangle, animf>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%moveview
+<head>Move view</head>
+<p><emph>Syntax</emph>:(moveview complex)
+Smoothly move the image center to another position.
+<p>
+<emph>Available as</emph>: command
+
+<node morphangle, moveview, zoom, animf>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%morphangle
+<head>Morph angle</head>
+<p><emph>Syntax</emph>:(morphangle float)
+Smoothly rotate the image to another angle. By default rotation causes
+recalculation of the whole screen. To avoid this you need to enable
+<a rotate>fast rotate mode</a>. Don't forget to disable it later, since
+it slows down other animations.
+<p>A simple ``rotozooming'' animation:
+<p><tt>
+(initstate)<br>
+(fastrotate #t)<br>
+(morphview -1.64128273713 -5.50393226816E-05 9.69332308848E-08<br>
+9.69332308834E-08)<br>
+(morphangle 300)<br>
+(usleep 10000000)<br>
+(wait)<br>
+(fastrotate #f)<br>
+</tt><p>
+<emph>Available as</emph>: command
+
+<node zoom, morphangle, , animf>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%zoom zoom unzoom stop
+<head>Zooming functions</head>
+<p>
+The functions for zooming/unzooming were created mainly for recording
+animations. In manually created animation files, it is easier to use
+<a morphview><tt>morphview</tt></a>.
+<p>
+<p><emph>Syntax</emph>:(zoomcenter complex)
+This function sets the center to zoom in on. The center is given as a position
+in fractal coordinates.
+<p>
+<emph>Available as</emph>: command
+<p><emph>Syntax</emph>:(zoom)
+Start zooming to the area specified by <tt>zoomcenter</tt>.
+<p>
+The speed of zooming should be controlled by the function <a speed><tt>speed</tt></a>
+or in a more exact way by <tt>maxstep</tt> and <tt>speedup</tt>.
+<p>
+<p><emph>Syntax</emph>:(unzoom)
+<p>
+Start unzooming from the area specified by <tt>zoomcenter</tt>.
+<p>
+<emph>Available as</emph>: command
+<p><emph>Syntax</emph>:(stop)
+Stop zooming or unzooming.
+<p>
+<emph>Available as</emph>: command
+
+<node time, animf, file, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%time
+
+<menuhead><head>Timing functions</head></menuhead>
+Timing functions are used to control the animation replay daemon. It can wait
+for a given time, or wait until calculation is complete. The animation functions
+are controlled by such waiting; animations that are running while delays start
+keep running through the delay.
+<menuitems><center>
+<p><a usleep>Usleep</a>
+<p><a textsleep>Wait for text</a>
+<p><a wait>Wait for complete image</a>
+</center></menuitems>
+<node usleep, , textsleep, time>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%usleep
+<head>Usleep</head>
+<p><emph>Syntax</emph>:(usleep integer)
+<p>
+This function waits for a given amount of time (in usec) before processing
+the next command. The screen is recalculated and displayed at the beginning of
+usleep if necessary necessary. The remaining time is spent in waiting or
+performing animation.
+<p>
+<emph>Available as</emph>: command
+
+<node textsleep, usleep, wait, time>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%textsleep
+<head>Wait for text</head>
+<p><emph>Syntax</emph>:(textsleep)
+<p>This function's behavior is very similar to <a usleep><tt>usleep</tt></a>,
+but the time is calculated from the number of letters currently displayed
+onscreen. If you want to wait just long enough for the user to read the subtitle,
+use this function. The user can alter the replay speed as desired using
+<a letterspersec><tt>letterspersec</tt></a>. This value can be changed during
+replay with the arrow keys.
+<p>
+<emph>Available as</emph>: command
+
+<node wait, textsleep, , time>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%wait
+<head>Wait for complete image</head>
+<p><emph>Syntax</emph>:(wait)
+<p>
+Wait until the image is complete. You should always use this function after
+zooming or unzooming when dynamic resolution is in use. This ensures that
+the image calculation will be complete so the user can see the result before
+the animation continues. It may also be useful in combination with filters like
+<a blur>motion blur</a>.
+<p>
+This function deadlocks if used with <a animf>animation functions</a>; don't
+do that.
+<p>
+<emph>Available as</emph>: command
+
+<node file, time, edit, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%file
+
+<menuhead><head>File</head></menuhead>
+<menuitems><center>
+<p><a loadpos>Load</a>
+<p><a savepos>Save</a>
+<p><a record>Record</a>
+<p><a play>Replay</a>
+<p><a saveimg>Save image</a>
+<p><a loadexample>Load random example</a>
+<p><a savecfg>Save configuration</a>
+<p><submenu><a quit>Quit</a>
+</center></menuitems>
+<node loadpos, , savepos, file>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%loadpos
+<head>Load XaoS position file</head>
+<p>
+Load a XaoS position file (<tt>*.xpf</tt>).
+See the <a format>format description</a> for more information.
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node savepos, loadpos, record, file>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%savepos
+<head>Save XaoS position file</head>
+<p><emph>Syntax</emph>:(savepos file)
+<p>
+Save current state to a XaoS position file (<tt>*.xpf</tt>). This file is
+human-readable, and can easily be improved by hand after saving, or used as
+a base for animations.
+See the <a format>format description</a> for more information.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node record, savepos, play, file>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%record
+<head>Record animation</head>
+<p><emph>Syntax</emph>:(record bool [ file ])
+<p>e
+Toggle recording to a XaoS animation file (<tt>*.xaf</tt>). This file is
+human-readable, and can easily be improved by hand after recording.
+See the <a format>format description</a> for more information.
+<p>
+From the scripting language, <tt>(record #t)</tt> enables recording, and
+<tt>(record #f)</tt> disables it.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node play, record, saveimg, file>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%play
+<head>Replay animation</head>
+<p>
+Replay a XaoS animation file (<tt>.xaf</tt>).
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node saveimg, play, loadexample, file>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%saveimg
+<head>Save image</head>
+<p><emph>Syntax</emph>:(saveimg file)
+<p>
+Save current state to an image file. This file is in <tt>.png</tt> (portable
+network graphics) format, which can be read by many applications varying from
+graphics programs all the way to Web browsers.
+<p>
+This function needs an external library called <tt>libpng</tt>. If the library
+wasn't available during compilation, this function is unavailable too.
+Please see <tt>INSTALL</tt> for more information about obtaining libpng
+and recompiling XaoS.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node loadexample, saveimg, savecfg, file>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%loadexample
+<head>Load random example</head>
+<p><emph>Syntax</emph>:(loadexample)
+<p>
+Choose random <tt>.xpf</tt> file from the <tt>examples</tt> directory and
+load it.
+You might use it as the starting point for next exploration.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node savecfg, loadexample, quit, file>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%savecfg
+<head>Save configuration</head>
+<p><emph>Syntax</emph>:(savecfg)
+<p>
+Save current configuration to <tt>~/.xaosrc</tt> (under Unix) or <tt>xaos.cfg</tt>
+(under DOS and Windows). XaoS automatically reloads the configuration from this
+file when it starts.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node quit, savecfg, ,file>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%quit quitmenu noquit
+<head>Quit</head>
+<p><emph>Syntax</emph>:(quit)
+<p>
+Quit XaoS.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node edit, file, fractal, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%edit
+<menuhead><head>Edit</head></menuhead>
+A fairly ordinary Edit menu.
+<menuitems><center>
+<p><a undo>Undo</a>
+<p><a redo>Redo</a>
+<p><a copy>Copy</a>
+<p><a paste>Paste</a>
+</center></menuitems>
+<node undo, , redo, edit>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%undo
+<head>Undo</head>
+Undo last operation. `Last operation' is quite hard to define in
+XaoS (where changes are continuous), so it might be surprising.
+I hope it will do what you want.
+<p>
+<emph>Available as</emph>: menu item
+<node redo, undo, copy, edit>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%redo
+<head>Redo</head>
+Redo last undone operation. See <a undo>undo</a>.
+<p>
+<emph>Available as</emph>: menu item
+<node copy, redo, paste, edit>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%copy
+<head>Copy</head>
+Copy fractal to clipboard. This is a platform-dependent operation that may
+not have an analogue on your platform (e.g. there is no concept of a clipboard
+under aalib).
+<p>
+<emph>Available as</emph>: menu item
+<node paste, copy, , edit>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%paste
+<head>Paste</head>
+Paste fractal from clipboard. This is a platform-dependent operation that may
+not have an analogue on your platform (e.g. there is no concept of a clipboard
+under aalib).
+<p>
+<emph>Available as</emph>: menu item
+
+<node fractal, edit, calc, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%fractal
+<menuhead><head>Fractal</head></menuhead>
+This menu contains all functions related to fractal parameters and display;
+you can change things like the formula used, coloring modes, seeds and much
+else.
+
+<menuitems><center>
+<p><a formula>Formula</a>
+<p><submenu><a mformula>formulae</a>
+<p><a incoloring>Incoloring mode</a>
+<p><a outcoloring>Outcoloring mode</a>
+<p><a plane>Plane</a>
+<p><submenu><a palettemenu>Palette</a>
+<p><a uimandelbrot>Mandelbrot mode</a>
+<p><a uiperturbation>Perturbation</a>
+<p><a uiview>View</a>
+<p><a initstate>Reset to defaults</a>
+<p><a tcolor>True-color coloring modes</a>
+</center></menuitems>
+<node formula, , uimandelbrot, fractal>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%formula
+<head>Formula</head>
+<p><emph>Syntax</emph>:(formula keyword)
+<p>
+Set the current fractal formula. <tt>keyword</tt> should be one of the
+following:
+<dl>
+<dt>'mandel
+<dd>Standard <a mandel>Mandelbrot set</a>.
+<dt>'mandel3
+<dd><a mandel3>Mandelbrot set, power 3</a>.
+<dt>'mandel4
+<dd>Mandelbrot set, power 4.
+<dt>'mandel5
+<dd>Mandelbrot set, power 5.
+<dt>'mandel6
+<dd>Mandelbrot set, power 6.
+<dt>'newton
+<dd><a newton>Newton's approximation method</a>.
+<dt>'barnsley
+<dd><a barnsley>First Barnsley's formula</a>.
+<dt>'octo
+<dd><a octal>Fractint's octo</a>.
+<dt>'phoenix
+<dd><a phoenix>Phoenix</a>.
+<dt>'magnet
+<dd><a magnet>Magnet</a>.
+</dl>
+<p>
+<emph>Available as</emph>: command
+
+<node uimandelbrot, formula, uiperturbation, fractal>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%uimandelbrot julia juliaseed
+<head>Mandelbrot/Julia mode</head>
+<p>
+Most fractals rendered by XaoS can be represented as Mandelbrot sets or Julias.
+Each point in the Mandelbrot set has its own Julia set. To learn more about
+this correspondence, see the tutorial on the <tutor julia.xaf>Julia set</tutor>.
+<p>
+This function switches between Mandelbrot and Julia representations. When
+switching to Julia, you need to set the seed--a point selected from the
+Mandelbrot set.
+<p>
+If you run this function from the menu, you are prompted for the Julia seed
+as a number. Often, this can be clumsy, and it would be easier to specify a
+point with the mouse pointer. If you hit the <tt>M</tt> key instead of
+using the menu, the current mouse position is used.
+<p>
+Good seedpoints lie at the boundaries of the Mandelbrot set; other seeds
+usually generate quite a boring fractal. You can also explore various seeds
+at high speed using the <a fastjulia>Fast Julia mode</a>.
+<p>
+Not all fractals have Julias, but XaoS can generate fake Julia sets for
+those that do not, which use some Julia-like modification of the formula;
+so this function is currently usable for all fractal types.
+<p>
+<emph>Available as</emph>: menu item
+<p><emph>Syntax</emph>:(julia bool)
+<p>
+This function is used to enable/disable julia mode in animation files.
+<p>
+<emph>Available as</emph>: command line option, command
+<p><emph>Syntax</emph>:(juliaseed complex)
+<p>
+Select the current julia seed.
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node uiperturbation, uimandelbrot, uiview, fractal>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%uiperturbation perturbation
+<head>Perturbation</head>
+<p>
+Perturbation is a simple trick which changes the point at which orbits start.
+Traditionally zero is used, but other values can generate interesting
+results too.
+<p>
+On enabling this function from the menu, you will be asked for a complex
+number specifying the perturbation. It is a toggle; selecting it again
+resets the perturbation to zero without prompting.
+<p>
+It can be used to specify a complex number representing a point on the screen.
+If you hit the <tt>B</tt> key instead of using the menu, the current mouse
+position is used. This too is a toggle, so <tt>B</tt> again will disable
+perturbation by setting it to zero.
+<p>
+This function only has an effect for certain formulae (like the
+<a mandel>Mandelbrot set</a>) and only then in <a uimandelbrot>Mandelbrot mode</a>.
+<p>
+<emph>Available as</emph>: menu item
+<p><emph>Syntax</emph>:(perturbation complex)
+<p>
+This is the scripting-language variation of the perturbation function. Instead
+of toggling, you always specify the perturbation to use. Use 0 0 to disable
+perturbation.
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node bailout, maxiter, fastjulia, calc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%bailout bailout
+<head>Bailout</head>
+<p>
+Bailout is the value which is checked for each point of
+the orbit if the point is far enough
+from the complex zero point in the current iteration.
+If the point is far enough, then the iteration immediately
+stops and the starting point on the screen will be
+painted with a given colour, depending on the fractal
+type and many other settings.
+<p>
+For the <a mandel>Mandelbrot set</a>
+this value is 4. Other fractal types usually
+have the same bailout value. For most fractals many bailout values
+give more or less similar output. E.g., for the second order
+Mandelbrot set one can prove that the sequence |z| (z:=z^2+c) tends to
+infinity if and only if |z|>2 for some element z of this sequence.
+In XaoS program, Bailout value is the square of this 2, i.e. you can change this
+to any value greater than 2 for similar results.
+<p>
+Other fractal types may use other bailout values. The default
+is 4 for each types.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+<p><emph>Syntax</emph>:(bailout float)
+<p>
+
+<node uiview, uiperturbation, initstate, fractal>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%uiview view angle
+<head>View</head>
+<p>
+Set your current viewpoint in the fractal. This function is useful when you have
+found some interesting coordinates somewhere (on a web page, perhaps) and you
+want to see that position in XaoS.
+<p>
+In the dialog you will be asked for the <emph>center</emph>, <emph>radius</emph>
+and <emph>angle</emph> of the image.
+<p>
+The center specifies the point which is displayed at the center of the screen.
+The radius is the radius of a circle around this point; XaoS will size the image
+so that this circle only just fits on the screen. The angle gives the rotation of
+the image in degrees.
+<p>
+People specify fractal coordinates in many ways. Some people use the coordinates
+of the upper-left and lower-right visible points, specifying the coordinates as four
+numbers <math>x1</math>, <math>y1</math>, <math>x2</math>, <math>y2</math>.
+To set the same viewpoint in XaoS, set the real portion of the center to
+<math>(x1+x2)/2</math>, the imaginary part of center to <math>(y1+y2)/2</math>, and
+the radius to the greater of <math>x2-x1</math> and <math>y2-y1</math>.
+<p>
+Other programs use a zoom factor instead of a radius. For these, you can set the
+radius to <math>2/zoom</math>.
+<p>
+<emph>Available as</emph>: menu item
+<p><emph>Syntax</emph>:(view float float float float)
+<p>
+This function is used to set the visible area of fractal in animation files.
+It doesn't let let you specify the angle, (for that, see the separate function
+<tt>angle</tt>), but lets you specify an ellipse instead of a circle. You can
+specify both a real and an imaginary radius, so you have better control over the
+area that will be visible. XaoS will size the image so that the ellipse only just
+fits on the screen.
+<p>
+<emph>Available as</emph>: command line option, command
+<p><emph>Syntax</emph>:(angle float)
+<p>
+Set the rotation angle in degrees. By default this causes recalculation of the
+screen. You can enable the <a rotate>fast rotation mode</a>, which lets you
+rotate the screen without recalculation; but it slows down other things, so
+don't forget to disable it later.
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node initstate, uiview, plane, fractal>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%initstate
+<head>Reset to defaults</head>
+<p><emph>Syntax</emph>:(initstate)
+<p>
+This function resets most of XaoS's values to their defaults. It is useful when
+you get lost and want to start from the beginning. It should also be used
+as the first command of every animation file, to ensure that the file is always
+played with the same settings in effect.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node plane, initstate, incoloring, fractal>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%plane mplane plane0 plane1 plane2 plane3 plane4 plane5 plane6 plane7 plane8 plane9 plane10
+<head>Plane</head>
+<p><emph>Syntax</emph>:(plane integer)
+<p>
+All fractals displayed by XaoS are functions with a complex parameter.
+They can be be displayed in the normal complex plane where the <tt>x</tt>
+coordinate is the real part of the number and the <tt>y</tt> is imaginary;
+but they can also be displayed differently:
+<dl>
+<dt><math>mu</math>
+<dd>Normal complex plane (default)
+<dt><math>1/mu</math>
+ <dd>Inversion--infinity is at 0 and
+ 0 is at infinity.
+<dt><math>1/(mu+0.25)</math>
+ <dd>Similar to inversion, but moves
+ the center outside the Mandelbrot set,
+ so it looks parabolic.
+<dt><math>lambda plane</math>, <math>1/lambda</math>, <math>1/lambda-1</math>
+<dd>Lambda plane and its inversion, and with a different center.
+<dt><math>1/(mu-1.40115)</math>
+ <dd>A very interesting mode for the
+ Mandelbrot set, this makes small
+ things large, for easier browsing
+ of the set's details.
+</dl>
+The <tutor plane.xaf>tutorial about planes</tutor> has some examples.
+<p>
+
+<p>
+In the scripting language, the planes are numbered as follows:
+<p>
+<dl>
+<dt>0
+<dd><math>mu</math>
+<dt>1
+<dd><math>1/mu</math>
+<dt>2
+<dd><math>1/(mu+0.25)</math>
+<dt>3
+<dd><math>lambda</math>
+<dt>4
+<dd><math>1/lambda</math>
+<dt>5
+<dd><math>1/(lambda-1)</math>
+<dt>6
+<dd><math>1/(mu-1.40115)</math>
+</dl>
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node incoloring, plane, outcoloring, fractal>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%incoloring mincoloring in1 in2 in3 in4 in5 in6 in7 in8 in9 in10 in0
+<head>Inside coloring mode</head>
+<p><emph>Syntax</emph>:(incoloring integer)
+<p>
+Areas inside the set are usually filled in black, but this is only a convention;
+you could color them in differently to make the fractal look more interesting.
+The only method available to make areas inside the set visible is to display
+the value of the latest orbit as the value of each pixel.
+<p>
+The <tutor incolor.xaf>tutorial on incoloring</tutor> has more information and
+examples.
+<p>
+XaoS has many different ways to show that value. The cryptic names of the modes
+are mathematical formulae, where <emph>real</emph> means the real part of the
+latest orbit, and <emph>imag</emph> means the imaginary part. <emph>zmag</emph>
+uses the magnitude of the value. The <emph>Decomposition-like</emph> method uses
+the angle of the orbit. Also, <a tcolor>truecolor</a> incoloring modes are available, that
+display one value in each of the red, blue and green color planes (or, for some
+modes, in each of the hue, saturation and value planes).
+
+In the scripting language, the incoloring mode is specified by one of the
+following integers:
+<p>
+<dl>
+<dt>0
+<dd><math>0</math> (default)
+<dt>1
+<dd><math>zmag</math>
+<dt>2
+<dd>Decomposition-like
+<dt>3
+<dd><math>real/imag</math>
+<dt>4
+<dd><math>abs(abs(c)-abs(r))</math>
+<dt>5
+<dd><math>cos(mag)</math>
+<dt>6
+<dd><math>mag*cos(real^2)</math>
+<dt>7
+<dd><math>sin(real^2-imag^2)</math>
+<dt>8
+<dd><math>atan(real*imag*creal*cimag)</math>
+<dt>9
+<dd>squares
+<dt>10
+<dd>Truecolor. To set exact parameters for truecolor coloring use the
+<a tcolor><tt>tcolor</tt></a> command.
+</dl>
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node outcoloring, incoloring, tcolor, fractal>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%outcoloring moutcoloring out1 out2 out3 out4 out5 out6 out7 out8 out9 out10 out0
+<head>Outside coloring mode</head>
+<p><emph>Syntax</emph>:(outcoloring integer)
+<p>
+Outcoloring modes are similar to <a incoloring>incoloring modes</a>, but indicate
+how to display the areas outside the set instead. As with incoloring modes, the
+value of the latest orbit can be used to determine the color of each pixel, but the
+default is to use the number of iterations needed for the value at that point to become
+recognisably divergent as the color.
+<p>
+The <tutor outcolor.xaf>tutorial on outcoloring</tutor> has more information and
+examples.
+<p>
+The cryptic names of the modes are mathematical formulae, where <emph>iter</emph>
+means the number of iterations required for the value to become recognisably divergent,
+<emph>real</emph> means the real part of the latest orbit, and <emph>imag</emph>
+means the imaginary part. <emph>binary decomposition</emph> uses a different color
+when the imaginary part of the orbit is lower than zero, and <emph>smooth</emph>
+attempts to remove stripes and discontinuities. Also, <a tcolor>truecolor</a> outcoloring
+modes are available, that display one value in each of the red, blue and green color planes
+(or, for some modes, in each of the hue, saturation and value planes).
+<p>
+In the scripting language, the outcoloring mode is specified by one of the following
+integers:
+<p>
+<dl>
+<dt>0
+<dd><math>iter</math> (default)
+<dt>1
+<dd><math>iter+real</math>
+<dt>2
+<dd><math>iter+imag</math>
+<dt>3
+<dd><math>iter+real/imag</math>
+<dt>4
+<dd><math>iter+real+imag+real/imag</math>
+<dt>5
+<dd>binary decomposition
+<dt>6
+<dd>biomorphs
+<dt>7
+<dd>potential
+<dt>8
+<dd>color decomposition
+<dt>9
+<dd>smooth
+<dt>10
+<dd>True-color outcoloring mode. To set exact parameters for truecolor coloring use <a tcolor><tt>outtcoloring</tt></a>.
+</dl>
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node tcolor, outcoloring, , fractal>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%tcolor intcoloring outtcoloring tincoloring toucoloring int0 int1 int2 int3 int4 int5 int6 int7 int8 int9 int10 int11 outt0 outt1 outt2 outt3 outt4 outt5 outt6 outt7 outt8 outt9 outt10 outt11
+<head>Truecolor coloring mode</head>
+<p><emph>Syntax</emph>:(intcoloring integer)
+<p><emph>Syntax</emph>:(outtcoloring integer)
+<p>
+Truecolor coloring modes are similar to <a incoloring>incolor</a> and
+<a outcoloring>outcolor</a> coloring modes; but instead of using a palette,
+they directly calculate the red, green and blue components of the color.
+This lets you display more parameters at once, and produces interesting
+and often attractive results. On 8bpp displays you need to enable the
+<a palettef>palette emulator filter</a> first to see anything, amd the quality
+won't be so good, as far fewer colors are available per parameter.
+<p>
+The <tutor truecol.xaf>tutorial on truecolor coloring modes</tutor> has more
+information and examples.
+<p>
+The cryptic names of the modes are always three mathematical formulae (one for
+each color component), where <emph>real</emph> means the real part of the latest
+orbit, and <emph>imag</emph> means the imaginary part.
+<p>
+To enable inside/outside truecolor coloring mode in the scripting language,
+set <tt>incoloring</tt>/<tt>outcoloring</tt> value to 10 (truecolor coloring
+mode) before (or after) calling <tt>intcoloring</tt> or <tt>outtcoloring</tt>.
+<p>
+In the scripting language, the coloring mode is specified by one of the following
+integers:
+<p>
+<dl>
+<dt>0
+<dd>black
+<dt>1
+<dd><math>re*im</math> <math>sin(re^2)</math> angle
+<dt>2
+<dd><math>sin(re)</math> <math>sin(im)</math> <math>sin(square)</math>
+<dt>3
+<dd>hsv
+<dt>4
+<dd>hsv2
+<dt>5
+<dd><math>cos(re^c)</math> <math>cos(im^2)</math> <math>cos(square)</math>
+<dt>6
+<dd><math>abs(re^2)</math> <math>abs(im^2)</math> <math>abs(square)</math>
+<dt>7
+<dd><math>re*im</math> <math>re*re</math> <math>im*im</math>
+<dt>8
+<dd><math>abs(im*cim)</math> <math>abs(re*cre)</math> <math>abs(re*cim)</math>
+<dt>9
+<dd><math>abs(re*im-csqr)</math> <math>abs(re^2-csqr)</math> <math>abs(im^2-csqr)</math>
+</dl>
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node calc, fractal, mfilter, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%calc
+
+<menuhead><head>Calculation</head></menuhead>
+This menu contains functions that control calculation parameters such as
+the maximum iteration count and periodicity checking.
+<menuitems><center>
+<p><a range>Solid guessing</a>
+<p><submenu><a dynamic>Dynamic resolution</a>
+<p><a periodicity>Periodicity checking</a>
+<p><a maxiter>Iterations</a>
+<p><a bailout>Bailout</a>
+<p><a fastjulia>Fast Julia mode</a>
+<p><a dynamic>Dynamic resolution</a>
+<p><a rotate>Rotation</a>
+</center></menuitems>
+<node range, , periodicity, calc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%range mguess guess0 guess1 guess2 guess3 guess4 guess5 guess6 guess7 guess8 guess9 guessall
+<head>Solid guessing range</head>
+<p><emph>Syntax</emph>:(range integer)
+<p>
+XaoS has a solid guessing optimization: if all corners of a rectangle have
+the same color, it assumes that the whole rectangle is a solid colored block,
+and doesn't calculate points inside the rectangle. This optimization saves
+lots of calculation, but sometimes introduces errors. This value alters the
+maximum size of the rectangle that can be guessed at one time. The default
+value is 3; use 0 to disable the optimization.
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node periodicity, range, maxiter, calc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%periodicity
+<head>Periodicity checking</head>
+<p><emph>Syntax</emph>:(periodicity bool)
+<p>
+Periodicity checking is one way to speed up the calculation. Areas inside the
+set always need <a maxiter><tt>maxiter</tt></a> iterations to determine that
+the point is probably inside the set (while it is rare for areas outside to
+need anywhere near that much). Often the orbital trajectory falls into a
+periodic, repeating cycle; if that can be detected, the calculation can be
+stopped early, as there's no way that the orbit can ever leave the cycle
+again (hence it cannot diverge, hence the point must be inside the set).
+<p>
+Implementating this method efficiently is quite problematic. It slows down
+the cases where cycles are not found, because cycle-checking is quite hard work
+and has to take place for all points, even those that don't become cyclic.
+Because of the inexactness of floating-point calculations, the cycles are
+never exact, so you need to use an error value. Higher error values mean that
+cycles will be detected sooner, while lower error values increase the
+exactness of the calculation. Higher values can introduce serious errors,
+especially at the front of the Mandelbrot set. XaoS detects this automatically
+and corrects for it in most cases, but sometimes it might be wrong. Also,
+other optimizations in XaoS (such as boundary tracing) don't give this method
+much of a chance to run, since areas inside the set are usually not
+calculated at all.
+<p>
+That's why the advantages of this optimization are questionable. You should
+probably experiment with enabling and disabling it. Sometimes XaoS is faster
+with this enabled, sometimes when disabled. Also, this method works only
+when <a incoloring>incoloring</a> methods are disabled, and only for some
+fractal types (some fractal types, e.g. newton, don't have any concept of
+an area `inside the set' at all.)
+<p>
+The tutorial chapter ``<tutor escape.xaf>Escape time fractals</tutor>'' has
+more information on fractal calculation in XaoS, and there is a lengthy
+section in the hacker's manual (<tt>xaosdev.texinfo</tt>) devoted to the
+subject.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node maxiter, periodicity, bailout, calc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%maxiter
+<head>Iterations</head>
+<p><emph>Syntax</emph>:(maxiter integer)
+<p>
+When the fractal set is calculated, a orbital trajectory is examined for each
+point. If the orbit diverges to infinity, the point is outside the set.
+Otherwise, the point is inside the set. For exact calculations, you need to
+know the entire orbital trajectory, which is infinitely long for areas inside
+the set, so fractals cannot be calculated exactly. By default, XaoS calculates
+at most 170 positions (iterations) and then gives up; if the point is still
+inside the bail-out value, it guesses that the point is inside the set.
+<p>
+When zoomed into a detailed area, especially one close to the set boundary,
+this value could become too low, and the fractal will become boring.
+You might try increasing this value if you want to get the image interesting
+again; but this necessarily slows down the calculation at the same time.
+<p>
+The tutorial chapter ``<tutor escape.xaf>Escape time fractals</tutor>'' has
+more information on fractal calculation in XaoS, and there is a lengthy
+section in the hacker's manual (<tt>xaosdev.texinfo</tt>) devoted to the
+subject.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node fastjulia, bailout, dynamic, calc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%fastjulia
+<head>Fast Julia mode</head>
+<p><emph>Syntax</emph>:(fastjulia bool)
+<p>
+By default, changing the seed for the Julia set requires recalculation of the
+image (which is quite slow). It's a nice effect to change the seed smoothly and
+show the Julia set morphing as the seed changes. XaoS has a special algorithm
+which can calculate such morphings in realtime. It is very inexact, but it is
+good enough for a fast preview.
+<p>
+If you want to select a good seedpoint, enable fast Julia mode and find a
+nice place by dragging with the first mouse button depressed; then change to
+the <a uimandelbrot>Julia mode</a> to see the exact image.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node dynamic, fastjulia, rotate, calc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%dynamic nodynamic dynamicanimation dynamicnew fastmode
+
+<menuhead><head>Dynamic resolution</head></menuhead>
+<p><emph>Syntax</emph>:(fastmode keyword)
+<p>
+XaoS performs many optimizations, but fairly often this is not enough. In order
+to keep a high framerate, XaoS automatically lowers the resolution of the image,
+increasing it when there is time for more calculation. This feature is enabled by
+default when animating, but you might also like to enable it for new images
+(which makes the image `come into focus' when it is recalculated from scratch for
+whatever reason), or disable it completely if you don't like it.
+<p>
+In the scripting languge, the keyword should be one of the following:
+<dl>
+<dt><tt>'never</tt>
+<dd>Disable dynamic resolution
+<dt><tt>'animate</tt>
+<dd>Use only for animations (default)
+<dt><tt>'new</tt>
+<dd>Use also for new images
+</dl>
+<node rotate, dynamic, , calc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%rotate norotate controtate mouserotate rotationspeed autorotate fastrotate
+
+<menuhead><head>Image rotation</head></menuhead>
+
+XaoS has support for rotation of the image to any angle. By default, changing
+the angle requires recalculation of the whole screen, but when
+<emph>fast rotation mode</emph> is enabled, the angle can be changed smoothly.
+In this mode XaoS calculates a larger non-rotated image and rotates it when
+needed, so it increases memory requirements and slows XaoS down; hence, it
+should be disabled when rotation is not being used.
+<p>
+The user interface provides two rotation modes--<emph>rotate by
+mouse</emph> which allows the angle to be changed by dragging with the first
+mouse button depressed, and <emph>continuous rotation mode</emph>, where the image
+is rotated clockwise continuously, and the arrow keys can be used to change
+the rotiation speed.
+<p><emph>Syntax</emph>:(fastrotate bool)
+<p>
+This function is used to enable and disable fast rotation mode.
+<emph>Available as</emph>: command line option, command
+<head>Automatic rotation</head>
+<p><emph>Syntax</emph>:(autorotate bool)
+<p>
+Use this function to enable continuous rotation. In the scripting language you
+can also use <a morphangle><tt>morphangle</tt></a> to get an outwardly similar
+but more controllable effect.
+<p><emph>Syntax</emph>:(rotationspeed float)
+<p>
+Specify the speed of continuous rotation, in degrees per second.
+Negative values are allowed and rotate anticlockwise.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+
+
+<node mfilter, calc, ui, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%mfilter
+
+<menuhead><head>Filters</head></menuhead>
+Filters are a post-calculation effect applied to the resulting image. They
+can do things like motion blurring, edge detection, emulation of palettes
+or truecolor on displays that can't handle them, and such things. There is
+a <tutor filter.xaf>tutorial chapter</tutor> about them.
+<p>
+<menuitems><center>
+<p><a filter>Filter command</a>
+<p><a edge>Edge detection</a>
+<p><a edge2>Edge detection2</a>
+<p><a starfield>Starfield</a>
+<p><a stereogram>Random dot stereogram</a>
+<p><a interlace>Interlace filter</a>
+<p><a blur>Motion blur</a>
+<p><a emboss>Emboss</a>
+<p><a palettef>Palette emulator</a>
+<p><a anti>Antialiasing</a>
+<p><a truecolor>Truecolor emulator</a>
+</center></menuitems>
+<node filter, , edge, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%filter
+<head>Filter command</head>
+<p><emph>Syntax</emph>:(filter keyword bool)
+<p>
+This command is used to enable or disable <a mfilter>filters</a>.
+The <emph>keyword</emph> specifies the filter to change, and should be one of
+the following:
+<p>
+<dl>
+<dt><tt>'edge</tt>
+<dd><a edge>Edge detection</a>
+<dt><tt>'edge2</tt>
+<dd><a edge2>Edge detection2</a>
+<dt><tt>'starfield</tt>
+<dd><a starfield>Starfield</a>
+<dt><tt>'stereogram</tt>
+<dd><a stereogram>Random dot stereogram</a>
+<dt><tt>'interlace</tt>
+<dd><a interlace>Interlace filter</a>
+<dt><tt>'blur</tt>
+<dd><a blur>Motion blur</a>
+<dt><tt>'emboss</tt>
+<dd><a emboss>Emboss</a>
+<dt><tt>'palette</tt>
+<dd><a palette>Palette emulator</a>
+<dt><tt>'anti</tt>
+<dd><a anti>Antialiasing</a>
+<dt><tt>'truecolor</tt>
+<dd><a truecolor>Truecolor</a>
+</dl>
+<p>
+<emph>Available as</emph>: command
+<node edge, filter, edge2, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%edge
+<head>Edge detection</head>
+<p>
+This filter is a standard edge detection algorithm; solid areas are filled
+in black. Some fractals look very interesting with this filter (and some
+areas of some fractals just look like noise). This version of the filter produces
+relatively wide lines, so is useful at higher resolutions. The filter
+<a edge2>edge detection2</a> makes thinner lines, for the low resolution modes.
+<notex>
+<p>
+<a filter>More information about filters</a>
+</notex>
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node edge2, edge, starfield, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%edge2
+<head>Edge detection2</head>
+<p>
+This filter is a standard edge detection algorithm; solid areas are filled
+in black. Some fractals look very interesting with this filter (and some
+areas of some fractals just look like noise). This version of the filter produces
+relatively tight lines, so is useful at lower resolutions. The filter
+<a edge>edge detection</a> makes thinner lines, for the high resolution modes.
+<notex>
+<p>
+<a filter>More information about filters</a>
+</notex>
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node starfield, edge2, stereogram, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%starfield
+<head>Starfield</head>
+<p>
+The starfield filter generates random stars whose density depends on the
+iteration count. Choose your favorite spiral fractal and enable this filter
+to get a Grand Design spiral galaxy :)
+<notex>
+<p>
+<a filter>More information about filters</a>
+</notex>
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node stereogram, starfield, interlace, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%stereogram
+<head>Random dot stereogram</head>
+<p>
+ Fractal images are good as a base for random dot stereograms. In
+ case you don't know what these are, please point your browser to
+ Google or another search engine and find some articles about such
+ images, because learning to read such images takes some effort. They
+ make it possible to generate three dimensional images on a normal monitor
+ without any additional hardware, by exploiting bugs in the human brain
+ (although you need two working eyes, and some people never learn to
+ see them; they can simply ignore this feature).
+<p>
+ XaoS is able to generate these images in animations, so you may use
+ all normal XaoS functions (except palette changing and palette rotation,
+ which makes no sense applied to a stereogram). To make the animation yet
+ more exciting, XaoS emulates ``falling'' into the set; while you zoom in,
+ your distance from the set drops and drops--but you never hit it; when the
+ set reaches the level of your monitor, the distance is changed again so
+ you are far away.
+<p>
+ To make this work right, XaoS needs to know the <emph>exact size of your
+ monitor</emph>. Because most platforms have no way to determine this, you need to
+ use <emph>command line options</emph> to tune it. If it's not set or is wrong,
+ the stereograms will probably be impossible to see (if your monitor is too
+ big or resolution too low), or the images will seem to be shallow (if your
+ monitor is too small or resolution too high).
+<p>
+ By default XaoS expects my 15" monitor (29.0cm x 21.5 cm). Another
+ cause of problems is the virtual screen supported by some windowed
+ environments (like some X servers) that makes a program think that the
+ resolution is higher than it actually is, and you see only part of
+ this extra-large screen.
+<p>
+ The worst thing you could possibly do is to run full-screen XaoS in some
+ graphical windowing system (OS/2 on top of Windows or Wine on top of Linux,
+ perhaps) where XaoS can't tell the real size of its window at all. In such
+ cases, it's normally better (not to mention faster) to run XaoS natively,
+ rather than under such an emulation layer.
+<p>
+ The following command line options are provided to specify sizes:
+<p>
+<dl>
+<dt><tt>-screenwidth</tt>, <tt>-screenheight</tt>
+ <dd>Lets you specify the size of your screen in centimeters. Note that
+ you need to specify the size of the visible image on the monitor, not
+ the size with edge borders, or the size of the tube. The simplistic
+ `my monitor is 17", just turn 17" into centimeters' doesn't work;
+ that 17" is a marketing figure and has only a vague connection to
+ reality. Get out a ruler and measure it.
+
+ <dt><tt>-pixelwidth</tt>, <tt>-pixelheight</tt>
+ <dd>Lets you specify the exact size of a single pixel, if XaoS cannot
+ determine this for itself from your screen size.
+</dl>
+<p>
+ These options are used by some other parts of XaoS as well, so you should
+ use them even when you don't want to see stereograms. You should probably
+ write a small starting script (or alias, or shortcut; whatever your environment
+ uses) that passes the correct parameters to XaoS.
+<p>
+ If the window is <emph>smaller than 8cm in any direction</emph>, you will probably be
+ unable to see anything; make the window bigger.
+
+ The correct way to see XaoS stereograms is:
+<dl>
+ <dt>1
+ <dd>Start XaoS with options specifying the exact size of your screen or one pixel on it
+ <dt>2
+ <dd>Sit 60cm away from monitor
+ <dt>3
+ <dd>If you use a windowed environment, resize XaoS's window to make it wider than, say, 15 cm.
+ <dt>4
+ <dd>Enable the filter (by pressing <tt>E</tt>)
+ <dt>5
+ <dd>focus on a point far away from the monitor (try to use your
+ own reflection, if your monitor's not antireflective); the random blurring should
+ eventually fall into the pattern of a Mandelbrot set.
+ <dt>6
+ <dd>Carefully use your mouse to zoom into interesting areas
+ (it is easy to lose concentration when you are not trained; but you can use
+ the autopilot...)
+ <dt>7
+ <dd>Enjoy animation :)
+</dl>
+<p>
+ If you still can't see the stereograms, it could be that the fractal, or your eye,
+ is deformed. A deformed fractal can be caused by your specifying your monitor size
+ wrongly. Visual problems that damage depth perception, as well as problems like
+ astigmatism, can make it impossible to see stereograms at all.
+<notex>
+<p>
+<a filter>More information about filters</a>
+</notex>
+
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node interlace, stereogram, blur, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%interlace
+<head>Interlace filter</head>
+<p>
+The interlace filter halves the horizontal resolution, and in each frame alternates
+between drawing only the even and only the odd lines. This speeds up the
+calculation, and in higher resolutions produces a motion-blur-like effect.
+<notex>
+<p>
+<a filter>More information about filters</a>
+</notex>
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node blur, interlace, emboss, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%blur
+<head>Motion blur</head>
+<p>
+Motion blur mixes the current frame with previous ones to produce a
+motion-blur effect. It might be rather slow in 16bpp truecolor modes. The best
+results can probably be seen in 8bpp modes, so you might want to enable the
+<a palettef>palette filter</a> first.
+<notex>
+<p>
+<a filter>More information about filters</a>
+</notex>
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node emboss, blur, palettef, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%emboss
+<head>Emboss</head>
+<p>
+This is a standard emboss filter, as seen in programs such as the GIMP or
+Photoshop. It produces especially nice results with the smooth
+<a outcoloring>outcoloring mode</a>.
+<notex>
+<p>
+<a filter>More information about filters</a>
+</notex>
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node palettef, emboss, anti, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%palettef
+<head>Palette emulator</head>
+<p>
+XaoS can work in either palette or <a truecolor>truecolor</a> mode. Both modes
+have advantages and disadvantages. Palette mode allows effects such as palette
+rotation, while truecolor mode allows smoother <a incoloring>incoloring</a>
+and <a outcoloring>outcoloring</a> modes and the
+<a tcolor>truecolor coloring</a> modes. If your display is truecolor, you
+can enable this filter to get palette emulation (albeit not as cheaply as in
+a real paletted mode).
+<notex>
+<p>
+<a filter>More information about filters</a>
+</notex>
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node anti, palettef, truecolor, mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%anti
+<head>Antialiasing</head>
+<p>
+Antialiasing is a technique to increase image quality by eliminating jagged
+edges. XaoS calculates four values for each pixel (on the subpixel boundaries)
+and uses the average of them for the pixel value.
+<p>
+This filter slows XaoS down a <emph>lot</emph> and greatly increases memory
+requirements. It is useful mainly when you want to save images and want to make
+them look as nice as possible. Antialiasing also helps a lot when you want to
+encode JPEG or MPEG files; they are much shorter if antialiased (MPEG and JPEG
+hate jagged edges).
+<notex>
+<p>
+<a filter>More information about filters</a>
+</notex>
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node truecolor, anti, , mfilter>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%truecolor
+<head>Truecolor emulator</head>
+<p>
+XaoS can work in either <a palettef>palette</a> or truecolor mode. Both modes
+have advantages and disadvantages. Palette mode allows effects such as palette
+rotation, while truecolor mode allows smoother <a incoloring>incoloring</a>
+and <a outcoloring>outcoloring</a> modes and the
+<a tcolor>truecolor coloring</a> modes. If your display is 8bpp, you can enable
+this filter to get truecolor emulation (but, obviously, not with as many colors
+as a real truecolor display).
+<p>
+<a filter>More information about filters</a>
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node ui, mfilter, misc, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ui uia
+
+<menuhead><head>UI</head></menuhead>
+
+This menu contains functions to control the user interface layer of XaoS:
+zooming speed, the autopilot, realtime status information, and so on.
+
+<menuitems><center>
+<p><a speed>Zooming speed</a>
+<p><a letterspersec>Letters per second</a>
+<p><a autopilot>Autopilot</a>
+<p><a recalculate>Recalculate</a>
+<p><a interrupt>Interrupt</a>
+<p><a nogui>Disable XaoS's builtin GUI</a>
+<p><a status>Status</a>
+<p><a ministatus>Ministatus</a>
+</center></menuitems>
+<node speed, , letterspersec, ui>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%speed speedup maxstep
+<head>Zooming speed</head>
+<p><emph>Syntax</emph>:(speed float)
+<p>
+Change zooming speed, where 1 is the default, 2 means twice as fast, and so on.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+<p>
+In the scripting language you can use the following functions for better
+control:
+<p><emph>Syntax</emph>:(maxstep float)
+<p>
+Selects the zooming/unzooming speed. The parameter specifies how much of the
+range will be removed each twentieth of a second; 0 means nothing, 1 means
+everything (the parameter obviously has to be less than 1).
+Higher values mean faster zooming.
+<p>
+<emph>Available as</emph>: command
+<p><emph>Syntax</emph>:(speedup float)
+When zooming/unzooming, every twentieth of a second the <tt>speedup</tt>
+value is added to the current step until <tt>maxstep</tt> is reached.
+So this value selects the rate at which zooming stops and starts.
+Both these functions are more for internal use of XaoS then for manually
+written scripts, but they could come in useful nonetheless.
+<p>
+<emph>Available as</emph>: command
+
+<node letterspersec, speed, autopilot, ui>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%letterspersec animletterspersec
+<head>Letters per second</head>
+<p><emph>Syntax</emph>:(letterspersec integer)
+<p>
+Speed of subtitles for the <a textsleep><tt>textsleep</tt></a> function.
+The user can set this value to suit; it can also be changed with the left and
+right arrow keys during animation replay.
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node autopilot, letterspersec, recalculate, ui>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%autopilot
+<head>Autopilot</head>
+<p><emph>Syntax</emph>:(autopilot bool)
+<p>
+ To make XaoS yet more impressive, we made a special autopilot mode that
+ automatically drives into interesting boundaries of the set; you should
+ press <tt>A</tt>, play your favorite music, drink coffee and relax. I never
+ tried this but it should be really relaxing! Many pictures in the XaoS
+ gallery were discovered using the autopilot.
+<p>
+ The autopilot also has some additional features. It backtracks if the
+ zoomed picture is not interesting anymore, and can detect when it's zoomed
+ into really a boring part of the fractal or reached the limit of floating
+ point arithmetic on the platform, and restart zooming from the top.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node recalculate, autopilot, interrupt, ui>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%recalculate
+<head>Recalculate</head>
+<p><emph>Syntax</emph>:(recalculate)
+<p>
+Recalculate current fractal. This should be used when the fractal on the
+screen is strange because of error propagation caused by
+<a range>solid guessing</a>.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node interrupt, recalculate, nogui, ui>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%interrupt animinterrupt
+<head>Interrupt</head>
+<p><emph>Syntax</emph>:(interrupt)
+<p>
+Interrupt current calculation.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+
+<node nogui, interrupt, status, ui>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%nogui
+<head>Disable XaoS's builtin GUI</head>
+<p><emph>Syntax</emph>:(nogui bool)
+<p>
+Disable XaoS menus and dialogs. This function should be used by external GUI
+programs; these manipulate XaoS via a pipe, so the internal GUI should be
+disabled at the same time. See the hacker's manual (<tt>xaosdev.texinfo</tt>)
+for more details.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node status, nogui, ministatus, ui>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%status animstatus
+<head>Status</head>
+<p><emph>Syntax</emph>:(status bool)
+<p>
+Enable/disable status information. This displays some useful information
+about the current fractal, such as viewpoint etc. (In low-resolution modes it
+also almost completely obscures the current fractal...)
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node ministatus, status, , ui>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ministatus animministatus
+<head>Ministatus</head>
+<p><emph>Syntax</emph>:(ministatus bool)
+<p>
+Enable/disable status line. This contains basic information such as how
+much you are zoomed and the framerate.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node misc, ui, helpmenu, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%misc
+
+<menuhead><head>Misc</head></menuhead>
+Miscellaneous functions.
+<menuitems><center>
+<p><a command>Command</a>
+<p><a renderanim>Render animation</a>
+<p><a clearscreen>Clear screen</a>
+<p><a display>Display fractal</a>
+<p><a text>Display text</a>
+<p><a color>Color</a>
+<p><submenu><a xtextpos>Horizontal text position</a>
+<p><submenu><a ytextpos>Vertical text position</a>
+<p><a textposition>Text position</a>
+<p><a message>Message</a>
+</center></menuitems>
+<node command, , renderanim, misc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%command
+<head>Command</head>
+<p>
+You can invoke all XaoS functions using a simple command language reminiscent
+of Scheme. This option lets you run a single command. If you want to run more
+than one, you might want to use an <a format>XaoS animation file</a> instead;
+they are written in the same language.
+<p>
+<emph>Available as</emph>: menu item
+
+<node renderanim, command, clearscreen, misc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%renderanim
+<head>Render animation</head>
+<p>
+Render an animation to image files. See <a video>How to encode video files</a>
+for more information.
+<p>
+<emph>Available as</emph>: menu item,
+<node clearscreen, renderanim, display, misc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%clearscreen
+<head>Clear screen</head>
+<p><emph>Syntax</emph>:(clearscreen)
+<p>
+Clear the screen. To display the fractal again, use <a display><tt>display</tt></a>.
+This function is mainly useful in tutorials and similar animations.
+<p>
+<emph>Available as</emph>: menu item, command
+
+<node display, clearscreen, text, misc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%display
+<head>Display fractal</head>
+<p><emph>Syntax</emph>:(display)
+<p>
+Display fractal. This functions reverses the effect of the <tt>clearscreen</tt>,
+line drawing and text output functions.
+<p>
+<emph>Available as</emph>: menu item, command
+
+<node text, display, color, misc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%text
+<head>Display text</head>
+<p><emph>Syntax</emph>:(text string)
+<p>
+Display the given text on the screen. This function is mainly useful in tutorials.
+Text should be cleared by printing lots of spaces, or using the
+<a clearscreen><tt>clearscreen</tt></a> or <a display><tt>display</tt></a>
+functions. You might also want to use the <a textposition><tt>textposition</tt></a>
+function to select the part of the screen to display the text on.
+<p>
+To wait for the user to read the text, you can use the <a textsleep><tt>textsleep</tt></a>
+function.
+<p>
+Example:
+<p><tt>
+(clearscreen)<br>
+(textposition 'center 'middle)<br>
+(text "Welcome into my animation")<br>
+(textsleep)<br>
+(display)<br>
+</tt><p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node color, text, textposition, misc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%color
+<head>Color</head>
+<p><emph>Syntax</emph>:(color keyword)
+<p>
+Change text and line color. <emph>keyword</emph> should be one of <tt>'white</tt>,
+<tt>'black</tt> and <tt>'red</tt>.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node textposition, color, message, misc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%textposition
+<head>Text position</head>
+<p><emph>Syntax</emph>:(textposition keyword keyword)
+<p>
+Select <a text>text</a> position. The first keyword specifies the horizontal
+position, the second the vertical position. The horizontal position should be
+one of <tt>'left</tt>, <tt>'center</tt>, and <tt>'right</tt>.
+The vertical should be one of <tt>'top</tt>, <tt>'middle</tt>, and <tt>'bottom</tt>.
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node message, textposition, , misc>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%message
+<head>Message</head>
+<p><emph>Syntax</emph>:(message string)
+<p>
+This function is almost identical to the <a text><tt>text</tt></a> function,
+except that it uses message catalogs in the <tt>catalog</tt> directory to
+translate messages into other languages. It should be used only in the multi-lingual
+XaoS tutorials.
+<p>
+<emph>Available as</emph>: command line option, command
+
+<node helpmenu, misc, xtextpos, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%helpmenu
+
+<menuhead><head>Help</head></menuhead>
+This menu contains help and tutorials.
+<notex>
+<menuitems><center>
+<p><a help>Help</a>
+</center></menuitems>
+<node help, , , helpmenu>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%help
+<head>Help</head>
+<p><emph>Syntax</emph>:(help)
+<p>
+Display the main help page.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+</notex>
+
+<node xtextpos, helpmenu, ytextpos, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%xtextpos
+
+<menuhead><head>Horizontal text position</head></menuhead>
+Select the horizontal position used to display <a text>text</a>.
+It can be placed at the left, in the center or at the right.
+<notex>
+<menuitems><center>
+<p><a xtextleft>Left</a>
+<p><a xtextcenter>Center</a>
+<p><a xtexteight>Right</a>
+</center></menuitems>
+<node xtextleft, , xtextcenter, xtextpos>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%xtextleft
+<head>Left</head>
+<p>
+Draw <a text>text</a> at the left side of the screen.
+<p>
+<emph>Available as</emph>: menu item
+
+<node xtextcenter, xtextleft, xtexteight, xtextpos>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%xtextcenter
+<head>Center</head>
+<p>
+Draw <a text>text</a> in the center of the screen.
+<p>
+<emph>Available as</emph>: menu item
+
+<node xtexteight, xtextcenter, , xtextpos>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%xtexteight
+<head>Right</head>
+<p>
+Draw <a text>text</a> at the right side of the screen.
+<p>
+<emph>Available as</emph>: menu item
+</notex>
+
+<node ytextpos, xtextpos, mformula, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ytextpos
+
+<menuhead><head>Vertical text position</head></menuhead>
+Select the vertical position used to display <a text>text</a>. It can be
+placed at the top, in the middle or at the bottom of the screen.
+<notex>
+<menuitems><center>
+<p><a ytextup>Up</a>
+<p><a ytextmiddle>Middle</a>
+<p><a ytextbottom>Bottom</a>
+</center></menuitems>
+<node ytextup, , ytextmiddle, ytextpos>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ytextup
+<head>Up</head>
+<p>
+Draw <a text>text</a> at the top of the screen.
+<p>
+<emph>Available as</emph>: menu item
+
+<node ytextmiddle, ytextup, ytextbottom, ytextpos>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ytextmiddle
+<head>Middle</head>
+<p>
+Draw <a text>text</a> in the middle of the screen.
+<p>
+<emph>Available as</emph>: menu item
+
+<node ytextbottom, ytextmiddle, , ytextpos>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%ytextbottom
+<head>Bottom</head>
+<p>
+Draw <a text>text</a> at the bottom of the screen.
+<p>
+<emph>Available as</emph>: menu item
+</notex>
+
+<node mformula, ytextpos, palettemenu, menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%mformula
+
+<menuhead><head>formulae</head></menuhead>
+<p>
+Each escape time fractal has its own formula. XaoS supports the following
+formulae:
+<p>
+<menuitems><center>
+<p><a mandel>Mandelbrot</a>
+<p><a mandel3>Mandelbrot^3</a>
+<notex>
+<p><a mandel4>Mandelbrot^4</a>
+<p><a mandel5>Mandelbrot^5</a>
+<p><a mandel6>Mandelbrot^6</a>
+</notex>
+<p><a octal>Octal</a>
+<p><a newton>Newton</a>
+<p><a barnsley>Barnsley1</a>
+<p><a phoenix>Phoenix</a>
+<p><a magnet>Magnet</a>
+</center></menuitems>
+<node mandel, , mandel3, mformula>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%mandel
+<head>Mandelbrot</head>
+<p>
+The Mandelbrot set is the most famous escape time fractal ever. It has the
+simple formula <math>z=z^2+c</math>. See the <tutor mset.xaf>tutorial chapter</tutor>.
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node mandel3, mandel, octal, mformula>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%mandel3 mandel4 mandel5 mandel6
+<head>Mandelbrot^3--Mandelbrot^6</head>
+<p>
+This fractal is a simple modification of the standard
+<a mandel>Mandelbrot set</a> formula, using <math>z=z^3+c</math> instead of
+<math>z=z^2+c</math>.
+<p>
+Other derivations of the Mandelbrot set (Mandelbrot^4 and so on) use even
+higher powers. See the <tutor power.xaf>tutorial chapter</tutor>.
+<p>
+<emph>Available as</emph>: menu item, command line option
+<node octal, mandel3, newton, mformula>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%octal
+<head>Octal</head>
+<p>
+This is a less well-known fractal that Thomas discovered in Fractint.
+It has an interesting shape when displayed in the alternative
+<a mplane>planes</a>. See the <tutor octo.xaf>tutorial chapter</tutor>.
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node newton, octal, barnsley, mformula>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%newton
+<head>Newton</head>
+<p>
+This is Newton's approximation method for finding the roots of a polynomial. It
+uses the polynomial <math>x^3=1</math> and counts the number of iterations needed
+to reach the approximate value of the root. See the <tutor newton.xaf>tutorial chapter</tutor>.
+<p>
+This fractal doesn't have Julia sets, but XaoS is able to generate Julia-like
+sets which are also very interesting (they are sometimes called ``Nova
+formulae'').
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node barnsley, newton, phoenix, mformula>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%barnsley
+<head>Barnsley1</head>
+<p>
+This is a formula by Michael Barnsley. It produces very nice crystalline Julia
+sets. See the <tutor barnsley.xaf>tutorial chapter</tutor>.
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node phoenix, barnsley, magnet, mformula>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%phoenix
+<head>Phoenix</head>
+<p>
+This formula produces very nice Julia sets.
+See the <tutor phoenix.xaf>tutorial chapter</tutor>.
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node magnet, phoenix, , mformula>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%magnet
+<head>Magnet</head>
+<p>
+This is a formula that comes from theoretical physics.
+It is derived from the study of theoretical lattices in the context of magnetic
+renormalization transformations.
+See the <tutor phoenix.xaf>tutorial chapter</tutor>.
+<p>
+<emph>Available as</emph>: menu item, command line option
+
+<node palettemenu, mformula, , menus>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%palettemenu
+
+<menuhead><head>Palette</head></menuhead>
+This menu contains functions to change the palette the fractal is displayed with.
+<menuitems><center>
+<p><a defpalette>Default palette</a>
+<p><a randompalette>Random palette</a>
+<p><a palette>Custom palette</a>
+<p><a cycling>Color cycling</a>
+<p><a shiftpalette>Shift palette</a>
+</center></menuitems>
+<node defpalette, , randompalette, palettemenu>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%defpalette
+<head>Default palette</head>
+<p><emph>Syntax</emph>:(defaultpalette number)
+<p>
+Create a default palette. In the scripting language, <tt>number</tt> specifies
+how much the palette is shifted by.
+<p>
+Note that changing the palette in truecolor modes forces recalculation of
+the whole screen. To avoid this, you can enable the
+<a palettef>palette emulation filter</a> first.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node randompalette, defpalette, palette, palettemenu>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%randompalette
+<head>Random palette</head>
+<p><emph>Syntax</emph>:(randompalette)
+<p>
+Create a random palette. XaoS will automatically pick one of its
+palette-generation algorithms and create one.
+<p>
+Note that changing the palette in truecolor modes forces recalculation of
+the whole screen. To avoid this, you can enable the
+<a palettef>palette emulation filter</a> first.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node palette, randompalette, cycling, palettemenu>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%palette
+<head>Custom palette</head>
+<p><emph>Syntax</emph>:(palette integer integer integer)
+<p>
+A custom palette lets you re-create some of the random palettes. The first value
+specifies the algorithm, which should currently be one of the following:
+<dl>
+<dt>0
+<dd>Default palette
+<dt>1
+<dd>Black to color gradient
+<dt>2
+<dd>Black to color to white gradient
+<dt>3
+<dd>Cubistic-like algorithm.
+</dl>
+The seed specifies a random seed for the palette; different seeds generate
+different palettes. The last value is the amount by which the palette is shifted.
+<p>
+Note that changing the palette in the truecolor modes forces recalculation of
+the whole screen. To avoid this, you can enable the
+<a palettef>palette emulation filter</a> first.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node cycling, palette, shiftpalette, palettemenu>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%cycling rcycling cyclingspeed
+<head>Color cycling</head>
+<p><emph>Syntax</emph>:(cycling bool)
+<p>
+Color cycling is an old and simple effect to animate fractals. The Mandelbrot
+set looks particularly nice when color-cycled. On truecolor displays, color
+cycling fails to initialize (since those displays don't have a palette).
+You can enable <a palettef>palette emulation filter</a> to make it possible.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+<p>
+In the user interface, colors can also be cycled in the opposite direction
+with the ``<emph>Reversed color cycling</emph>'' function.
+<p>
+To control the cycling speed, you coan use arrow keys or the
+``<emph>Color cycling speed</emph>'' function.
+<p>
+<emph>Available as</emph>: menu item
+<p><emph>Syntax</emph>:(cyclingspeed integer)
+<p>
+The parameter specifies the number of skips per second. It can be negative to
+cycle in the opposite direction.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+<node shiftpalette, cycling, , palettemenu>
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%shiftpalette fshift bshift
+<head>Shift palette</head>
+<p><emph>Syntax</emph>:(shiftpalette integer)
+<p>
+Shift palette by the specified number of cells. This can be used to tune the
+palette's position on the fractal. You can also use the
+<emph>Shift one forward</emph> and <emph>Shift one backward</emph> functions
+for fine-tuning. Note that shifted and rotated palettes could look different on
+different displays (because they may have different palette sizes).
+<p>
+Shifting the palette on truecolor displays causes a recalculation of the screen.
+To avoid this, you could use <a palettef>palette emulation filter</a>.
+<p>
+<emph>Available as</emph>: menu item, command line option, command
+
+
+%endmenus
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%gpl
+
+<head>GNU GENERAL PUBLIC LICENSE</head>
+<center>Version 2, June 1991<p>
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.<br>
+ 675 Mass Ave, Cambridge, MA 02139, USA<br>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+</center>
+<head>Preamble</head>
+
+ The licenses for most software are designed to take away your
+freedom to share and change it. By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users. This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it. (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.) You can apply it to
+your programs, too.
+<p>
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+<p>
+ To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+<p>
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have. You must make sure that they, too, receive or can get the
+source code. And you must show them these terms so they know their
+rights.
+<p>
+ We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+<p>
+ Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software. If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+<p>
+ Finally, any free program is threatened constantly by software
+patents. We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary. To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+<p>
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+<head>GNU GENERAL PUBLIC LICENSE<p>TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION</head>
+
+ 0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License. The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language. (Hereinafter, translation is included without limitation in
+the term "modification".) Each licensee is addressed as "you".
+<p>
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope. The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+<p>
+ 1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+<p>
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+<p>
+ 2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+<dl>
+<dt>
+<dd>
+<p>
+a)
+ You must cause the modified files to carry prominent notices
+ stating that you changed the files and the date of any change.
+<p>
+b)
+ You must cause any work that you distribute or publish, that in
+ whole or in part contains or is derived from the Program or any
+ part thereof, to be licensed as a whole at no charge to all third
+ parties under the terms of this License.
+<p>
+c)
+ If the modified program normally reads commands interactively
+ when run, you must cause it, when started running for such
+ interactive use in the most ordinary way, to print or display an
+ announcement including an appropriate copyright notice and a
+ notice that there is no warranty (or else, saying that you provide
+ a warranty) and that users may redistribute the program under
+ these conditions, and telling the user how to view a copy of this
+ License. (Exception: if the Program itself is interactive but
+ does not normally print such an announcement, your work based on
+ the Program is not required to print an announcement.)
+</dl>
+<p>
+These requirements apply to the modified work as a whole. If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works. But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+<p>
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+<p>
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+<p>
+ 3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+<dl>
+<dt>
+<dd>
+<p>
+a)
+ Accompany it with the complete corresponding machine-readable
+ source code, which must be distributed under the terms of Sections
+ 1 and 2 above on a medium customarily used for software interchange; or,
+<p>
+b)
+ Accompany it with a written offer, valid for at least three
+ years, to give any third party, for a charge no more than your
+ cost of physically performing source distribution, a complete
+ machine-readable copy of the corresponding source code, to be
+ distributed under the terms of Sections 1 and 2 above on a medium
+ customarily used for software interchange; or,
+<p>
+b)
+ Accompany it with the information you received as to the offer
+ to distribute corresponding source code. (This alternative is
+ allowed only for noncommercial distribution and only if you
+ received the program in object code or executable form with such
+ an offer, in accord with Subsection b above.)
+<p>
+</dl>
+The source code for a work means the preferred form of the work for
+making modifications to it. For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable. However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+<p>
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+<p>
+ 4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License. Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+<p>
+ 5. You are not required to accept this License, since you have not
+signed it. However, nothing else grants you permission to modify or
+distribute the Program or its derivative works. These actions are
+prohibited by law if you do not accept this License. Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+<p>
+ 6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions. You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+<p>
+ 7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all. For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+<p>
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+<p>
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices. Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+<p>
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+<p>
+ 8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded. In such case, this License incorporates
+the limitation as if written in the body of this License.
+<p>
+ 9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+<p>
+Each version is given a distinguishing version number. If the Program
+specifies a version number of this License which applies to it and "any
+later version", you have the option of following the terms and conditions
+either of that version or of any later version published by the Free
+Software Foundation. If the Program does not specify a version number of
+this License, you may choose any version ever published by the Free Software
+Foundation.
+<p>
+ 10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission. For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this. Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+<head>NO WARRANTY</head>
+
+ 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
+OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
+TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
+PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
+REPAIR OR CORRECTION.
+<p>
+ 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
+INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
+OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
+TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
+YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
+PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
+POSSIBILITY OF SUCH DAMAGES.
+<p>
+<center>END OF TERMS AND CONDITIONS</center>
+<head>How to Apply These Terms to Your New Programs</head>
+<p>
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+<p>
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+<p>
+<emph>
+<tt>
+ (one line to give the program's name and a brief idea of what it
+ does.)<br>
+ Copyright (C) 19yy (name of author)
+<p>
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
+<p>
+ 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.
+<p>
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+</tt>
+</emph>
+<p>
+Also add information on how to contact you by electronic and paper mail.
+<p>
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+<p>
+<emph>
+<tt>
+ Gnomovision version 69, Copyright (C) 19yy name of author
+ Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+</tt>
+</emph>
+<p>
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+<p>
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary. Here is a sample; alter the names:
+<p>
+<emph>
+<tt>
+ Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+ `Gnomovision' (which makes passes at compilers) written by James Hacker.
+<p>
+ (signature of Ty Coon), 1 April 1989
+ Ty Coon, President of Vice
+</tt>
+</emph>
+<p>
+This General Public License does not permit incorporating your program into
+proprietary programs. If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library. If this is what you want to do, use the GNU Library General
+Public License instead of this License.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%end
diff --git a/help/xaoshelp.css b/help/xaoshelp.css
new file mode 100644
index 0000000..b7f8857
--- /dev/null
+++ b/help/xaoshelp.css
@@ -0,0 +1,18 @@
+body {
+ font-size: 9pt;
+ font-family: "Lucida Grande", "Segoe UI", Arial, sans-serif;
+}
+
+a {
+ color: #778fbd;
+ font-weight: bold;
+ text-decoration: none;
+}
+
+a:hover {
+ text-decoration: underline;
+}
+
+dt {
+ font-weight: bold;
+}
diff --git a/help/xaoshelp.hhp b/help/xaoshelp.hhp
new file mode 100755
index 0000000..e2f6ec9
--- /dev/null
+++ b/help/xaoshelp.hhp
@@ -0,0 +1,159 @@
+[OPTIONS]
+Auto Index=Yes
+Auto TOC=1
+Compatibility=1.1 or later
+Compiled file=xaoshelp.chm
+Default Window=main
+Default topic=xaoshelp\index.html
+Display compile progress=No
+Language=0x409 English (United States)
+Title=XaoS Help
+
+[WINDOWS]
+main="XaoS Help","toc.hhc",,"xaoshelp\index.html","xaoshelp\index.html",,,,,0x2120,,0x304e,,,,,,,,0
+
+
+[FILES]
+xaoshelp\aa.html
+xaoshelp\about.html
+xaoshelp\animateview.html
+xaoshelp\animf.html
+xaoshelp\animroot.html
+xaoshelp\anti.html
+xaoshelp\autopilot.html
+xaoshelp\bailout.html
+xaoshelp\barnsley.html
+xaoshelp\BeOS.html
+xaoshelp\berkeley.html
+xaoshelp\blur.html
+xaoshelp\calc.html
+xaoshelp\clearline.html
+xaoshelp\clearlines.html
+xaoshelp\clearscreen.html
+xaoshelp\cocoa.html
+xaoshelp\color.html
+xaoshelp\command.html
+xaoshelp\controls.html
+xaoshelp\copy.html
+xaoshelp\cycling.html
+xaoshelp\defpalette.html
+xaoshelp\devel.html
+xaoshelp\DGA.html
+xaoshelp\display.html
+xaoshelp\dos.html
+xaoshelp\drivers.html
+xaoshelp\dX-fullscreen.html
+xaoshelp\dX-window.html
+xaoshelp\dynamic.html
+xaoshelp\edge.html
+xaoshelp\edge2.html
+xaoshelp\edit.html
+xaoshelp\emboss.html
+xaoshelp\end.html
+xaoshelp\endmenus.html
+xaoshelp\fastjulia.html
+xaoshelp\file.html
+xaoshelp\filter.html
+xaoshelp\format.html
+xaoshelp\formula.html
+xaoshelp\fractal.html
+xaoshelp\ggi.html
+xaoshelp\gpl.html
+xaoshelp\help.html
+xaoshelp\helpmenu.html
+xaoshelp\incoloring.html
+xaoshelp\index.html
+xaoshelp\initstate.html
+xaoshelp\interlace.html
+xaoshelp\interrupt.html
+xaoshelp\letterspersec.html
+xaoshelp\line.html
+xaoshelp\linekey.html
+xaoshelp\linemenu.html
+xaoshelp\load.html
+xaoshelp\loadexample.html
+xaoshelp\loadpos.html
+xaoshelp\magnet.html
+xaoshelp\mandel.html
+xaoshelp\mandel3.html
+xaoshelp\maxiter.html
+xaoshelp\menus.html
+xaoshelp\message.html
+xaoshelp\mfilter.html
+xaoshelp\mformula.html
+xaoshelp\ministatus.html
+xaoshelp\misc.html
+xaoshelp\morphangle.html
+xaoshelp\morphjulia.html
+xaoshelp\morphlastline.html
+xaoshelp\morphline.html
+xaoshelp\morphview.html
+xaoshelp\moveview.html
+xaoshelp\newton.html
+xaoshelp\nogui.html
+xaoshelp\octal.html
+xaoshelp\outcoloring.html
+xaoshelp\palette.html
+xaoshelp\palettef.html
+xaoshelp\palettemenu.html
+xaoshelp\paste.html
+xaoshelp\periodicity.html
+xaoshelp\phoenix.html
+xaoshelp\plan9.html
+xaoshelp\plane.html
+xaoshelp\play.html
+xaoshelp\plc.html
+xaoshelp\quit.html
+xaoshelp\randompalette.html
+xaoshelp\range.html
+xaoshelp\recalculate.html
+xaoshelp\record.html
+xaoshelp\redo.html
+xaoshelp\renderanim.html
+xaoshelp\root.html
+xaoshelp\rotate.html
+xaoshelp\savecfg.html
+xaoshelp\saveimg.html
+xaoshelp\savepos.html
+xaoshelp\sffe.html
+xaoshelp\shiftpalette.html
+xaoshelp\smoothmorph.html
+xaoshelp\speed.html
+xaoshelp\starfield.html
+xaoshelp\start.html
+xaoshelp\status.html
+xaoshelp\stereogram.html
+xaoshelp\stopreplay.html
+xaoshelp\support.html
+xaoshelp\SVGAlib.html
+xaoshelp\tcolor.html
+xaoshelp\text.html
+xaoshelp\textposition.html
+xaoshelp\textsleep.html
+xaoshelp\time.html
+xaoshelp\truecolor.html
+xaoshelp\tutorial.html
+xaoshelp\ui.html
+xaoshelp\uimandelbrot.html
+xaoshelp\uiperturbation.html
+xaoshelp\uiview.html
+xaoshelp\undo.html
+xaoshelp\usleep.html
+xaoshelp\video.html
+xaoshelp\wait.html
+xaoshelp\win32.html
+xaoshelp\writehelp.html
+xaoshelp\X11.html
+xaoshelp\xshl.html
+xaoshelp\xtextcenter.html
+xaoshelp\xtexteight.html
+xaoshelp\xtextleft.html
+xaoshelp\xtextpos.html
+xaoshelp\ytextbottom.html
+xaoshelp\ytextmiddle.html
+xaoshelp\ytextpos.html
+xaoshelp\ytextup.html
+xaoshelp\zoom.html
+
+[INFOTYPES]
+
diff --git a/help/xaoswin.Hpj b/help/xaoswin.Hpj
new file mode 100644
index 0000000..b08fa79
--- /dev/null
+++ b/help/xaoswin.Hpj
@@ -0,0 +1,23 @@
+; This file is maintained by HCW. Do not modify this file directly.
+
+; This help project requires hc 3.1
+[OPTIONS]
+;HCW=0
+;HLP=winxaos.HLP
+COMPRESS=12 Hall Zeck
+ERRORLOG=xaoswin.ERR
+LCID=0x409 0x0 0x0 ; anglicky (Spojené státy)
+REPORT=Yes
+TITLE=XaoS Help
+BUILD=RELEASE
+HLP=xaoswin.hlp
+
+[FILES]
+xaoswin.RTF
+
+[BUILDTAGS]
+DEBUG
+RELEASE
+
+[CONFIG]
+BrowseButtons()
diff --git a/help/xhtml2rest.py b/help/xhtml2rest.py
new file mode 100755
index 0000000..d05f10d
--- /dev/null
+++ b/help/xhtml2rest.py
@@ -0,0 +1,537 @@
+#!/usr/bin/python
+"""
+NAME
+====
+
+xhtml2rest - Convert xhtml to reStructuredText
+
+SYNOPSIS
+========
+
+xhtml2rest *xhtmlfile* > *restfile*
+
+DESCRIPTION
+===========
+
+``xhtml2rest``, which, far from being a decent and complete program, is
+only something to begin with, hopefully processes the given UTF-8
+xhtml file and produces reStructuredText "source code" in the standard
+output. If your input is html and/or not in UTF-8, you can convert it
+to UTF-8 xhtml using ``iconv`` and ``tidy``:
+
+ iconv -f *source_encoding* -t utf-8 *source_html* > *html_utf8*
+
+ tidy -utf8 -asxml -o *xhtmlfile* *html_utf8*
+
+ xhtml2rest *xhtmlfile* > *restfile*
+
+Interestingly, since reStructuredText is not simple markup, but has
+very strict rules with the intention that the source is perfectly
+readable, it turns out that converting html to reStructuredText is
+actually *rendering*. ``xhtml2rest`` is a small rendering engine. Since
+I had no time to study how existing rendering engines work, I had to
+reinvent the wheel. So although the code is clean (I actually wrote it
+twice), I doubt that the core logic is adequate for future extensions.
+But it's better than nothing. There is some documentation in the code,
+but feel free to email me if you need more explanations.
+
+LIMITATIONS
+===========
+
+I created ``xhtml2rest`` for a very specific job. It does that job
+correctly, but for your web page it might not work. It should not be
+very hard, however, either to improve the code, or to determine what
+it is in your web page that confuses ``xhtml2rest`` and remove it.
+
+Other than that, there are the following limitations:
+
+* No indented tables
+
+* No multi-col or -row spans in tables
+
+* No support for \<br>
+
+* Not tested in nested tables (check http://www.w3m.org/story.html)
+
+* \<th> support is quick and dirty
+
+* If the same anchor text is met twice, the anchor is ignored
+
+* No indented \<pre> elements (but I'm not sure the HTML standard
+ allows them)
+
+* Images are ignored
+
+* The word HARDWIRED in the code indicates a hardwired hack which is
+ specific to the job I wanted ``xhtml2rest`` to do.
+
+META
+====
+
+``xhtml2rest`` was created by Antonios Christofides,
+anthony@itia.ntua.gr, May-June 2005.
+
+Revision: $Revision: 3753 $
+
+The code and this text is hereby placed in the public domain.
+"""
+
+import xml.dom.minidom
+import re
+import sys
+import textwrap
+import math
+import UserList
+import warnings
+import codecs
+
+###############################################################################
+# Global variables. I know. I'm terribly sorry. Please get rid of them.
+
+# 'unindent' is used by list items. A li list item is always indented, but its
+# first line is "unindented" and contains the number or bullet. However, it was
+# difficult for the li node to tell its #text contents (which may be deeply
+# nested) to use that. So it just places the number or bullet, which must be 4
+# characters, like " 1. ", in "unindent". The first text to be rendered uses
+# the unindent and then sets it to empty again.
+
+unindent = ''
+hyperlinks = {} # text-target pairs found in "a href" elements
+###############################################################################
+
+class Ditem:
+ """A document item; usually a node, but can be a block of text
+ resulting from processing adjacent inline items. If it is a node,
+ it is usually the BlockDitem subclass; if it is text, it is
+ normally a plain Ditem."""
+ def __init__(self, text):
+ self.text = text # Contained text (empty for BlockDitem)
+ self.type = '' # tag for block node, empty for inline
+ self.indentlevel = 0 # 0 - unindented; 1 - indented; etc.
+ def __repr__(self):
+ return self.__class__.__name__+'("""'+self.text+'""")'
+ def propagate_indents(self):
+ "Propagates indent level recursively to children"
+ pass
+ def maxwidth(self):
+ "Width it will occupy if allowed to render on infinite width"
+ self.remove_white_space()
+ return len(self.text) + 4*self.indentlevel
+ def minwidth(self):
+ "Width it will occupy if wrapped as much as possible"
+ wordlens = [len(x) for x in self.text.split()]
+ if wordlens: return max(wordlens) + 4*self.indentlevel
+ else: return 0
+ def format(self, width):
+ """Returns contents formatted so as not to exceed specified
+ width, if possible"""
+ global unindent
+ if(self.type=='pre'): raise Exception, "What are we doing here?"
+ self.remove_white_space()
+ # Quick hack to fix a problem. Do we begin with '* '?
+ while len(self.text)>=2 and self.text[1]==' ' and self.text[0] in '*-':
+ # It may be mistaken for a bullet list. Strip it.
+ self.text = self.text[2:]
+ if width < self.minwidth(): width = self.minwidth()
+ # The textwrap module has the nasty habit of breaking at hyphens. So
+ # we'll do a nasty hack: find a character that does not exist in the
+ # text, replace all hyphens with that character, ok, you get the point.
+ hyphensurrogate = ''
+ for c in '!@#$%^&*~':
+ if self.text.find(c)<0:
+ hyphensurrogate = c
+ break
+ if not hyphensurrogate: raise Exception, "Houston we have a problem"
+ text = self.text.replace('-', hyphensurrogate)
+ wrapper = textwrap.TextWrapper(
+ initial_indent=((4*self.indentlevel)-len(unindent))*' '+unindent,
+ subsequent_indent=4*self.indentlevel*' ',
+ width=width, break_long_words = False)
+ unindent = ''
+ text = wrapper.fill(text)
+ text = text.replace(hyphensurrogate, '-')
+ return text
+ def empty(self):
+ "Returns true if contains nothing"
+ return not self.text
+ def remove_white_space(self):
+ "Removes extra white space"
+ self.text = re.sub('\s+', ' ', self.text).strip()
+ def canmerge(self):
+ "Tells whether it's possible to merge this Ditem with adjacent ones"
+ return True
+ def merge(self, aditem):
+ """If possible, merges aditem, which should be an adjacent Ditem that
+ comes after this one."""
+ if not self.canmerge() or not aditem.canmerge(): return False
+ if len(self.text)>0 and self.text[-1] == '_' and len(aditem.text)>0 \
+ and aditem.text[0] not in """ \n\t:.,!=/|;"'?<>[]{}()""":
+ # Leave space after link if not followed by punctuation
+ self.text = self.text + ' ' + aditem.text
+ else:
+ self.text = self.text + aditem.text
+ return True
+
+class BlockDitem(Ditem):
+ "A Ditem which contains other Ditems"
+ def __init__(self, type):
+ Ditem.__init__(self, '')
+ self.type = type
+ self.children = [] # Contained Ditems
+ def __repr__(self):
+ return self.__class__.__name__+'("'+self.type+'"); children = '+repr(self.children)
+ def maxwidth(self):
+ childmaxwidths = [x.maxwidth() for x in self.children]
+ return childmaxwidths and max(childmaxwidths) or 0
+ def minwidth(self):
+ childminwidths = [x.minwidth() for x in self.children]
+ return childminwidths and max(childminwidths) or 0
+ def propagate_indents(self):
+ for x in self.children:
+ x.indentlevel = self.indentlevel
+ x.propagate_indents()
+ def format(self, width):
+ if width < self.minwidth(): width = self.minwidth()
+ results = [x.format(width) for x in self.children]
+ results = [x for x in results if x]
+ return "\n\n".join(results)
+ def empty(self):
+ return not (self.children)
+ def canmerge(self):
+ return False
+
+class PreDitem(Ditem):
+ "A Ditem representing a literal block"
+ def maxwidth(self):
+ return max([len(x) for x in self.text.split('\n')])
+ def minwidth(self):
+ return self.maxwidth() # Literal block; width's given
+ def remove_white_space(self):
+ pass
+ def format(self, width):
+ result = '::\n\n'
+ for x in self.text.split('\n'):
+ result = result + ' ' + x + '\n'
+ result = result + '..\n\n'
+ return result
+ def canmerge(self):
+ return False
+
+class HeadingDitem(BlockDitem):
+ "A Ditem representing an h1, h2, ..., h9"
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def minwidth(self):
+ return self.maxwidth() # Headings don't wrap
+ def format(self, width):
+ assert(len(self.children)==1)
+ text = self.children[0].format(32767)
+ level = eval(self.type[1])
+ underliner = "=-`'.~*+^"[level-1]
+ return text + '\n' + len(text)*underliner
+
+class BlockQuoteDitem(BlockDitem):
+ "A Ditem representing a blockquote"
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def propagate_indents(self):
+ self.indentlevel = self.indentlevel + 1
+ BlockDitem.propagate_indents(self)
+
+class ListDitem(BlockDitem):
+ "A Ditem representing an ol, ul, or dl"
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def format(self, width):
+ # First pass the list type and order to the children
+ order = 1
+ for x in self.children:
+ if isinstance(x, ListItemDitem):
+ x.listtype = self.type
+ x.order = order
+ order = order+1
+ # And then process normally
+ return BlockDitem.format(self, width)
+
+class ListItemDitem(BlockDitem):
+ "A Ditem representing a li, dt, or dd"
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ self.listtype = None
+ self.order = 0
+ def minwidth(self):
+ if self.type == 'dt': return self.maxwidth() # Don't wrap dt
+ else: return BlockDitem.minwidth(self)
+ def propagate_indents(self):
+ if self.type in ('li', 'ol', 'dd'):
+ self.indentlevel = self.indentlevel + 1
+ BlockDitem.propagate_indents(self)
+ def format(self, width):
+ global unindent
+ if self.type == 'li' and self.listtype == 'ol':
+ unindent = ('%d. ' % (self.order)).ljust(4)
+ elif self.type == 'li' and self.listtype == 'ul':
+ unindent = '* '
+ return BlockDitem.format(self, width)
+
+class RenderedColumn:
+ "Width information about a column being rendered"
+ def __init__(self, minwidth, maxwidth):
+ self.minwidth = minwidth
+ self.maxwidth = maxwidth
+ self.curwidth = maxwidth
+ self.fixedwidth = 0
+ def logwidth(self):
+ if self.maxwidth==0: return 0
+ else: return math.log(self.maxwidth)
+ def update(self, minwidth, maxwidth):
+ "Replaces minwidth/maxwidth if greater"
+ self.minwidth = minwidth>self.minwidth and minwidth or self.minwidth
+ self.maxwidth = maxwidth>self.maxwidth and maxwidth or self.maxwidth
+ self.curwidth = self.maxwidth
+
+class RenderedColumns(UserList.UserList):
+ "A list of RenderedColumn"
+ def __init__(self, alist):
+ self.data = alist
+ def totalWidth(self):
+ "Returns total table width"
+ return reduce(lambda x,y: x+y, [z.curwidth for z in self.data]) \
+ + len(self.data) + 1
+ def sumLogWidth(self):
+ "Returns sum of logwidth for nonfixed columns"
+ return reduce(lambda x,y: x+y,
+ [x.logwidth()*(1-x.fixedwidth) for x in self.data])
+ def distributeWidthDifference(self, width):
+ "Step 4 of w3m table rendering algorithm"
+ # Note: The use of math.ceil below is because I'd rather have a
+ # suboptimal width (a few characters less than requested width) rather
+ # than go find what to do with rounding.
+ w = self.totalWidth() - width
+ assert(w>0)
+ repeat_distribution = 1
+ while repeat_distribution:
+ repeat_distribution = 0
+ for x in self.data:
+ if x.fixedwidth: continue
+ if x.curwidth - math.ceil(w*x.logwidth()/self.sumLogWidth()) < \
+ x.minwidth:
+ x.curwidth = x.minwidth
+ x.fixedwidth = 1
+ w = self.totalWidth() - width
+ repeat_distribution=1
+ break
+ # Now that the we finished finding which columns need to be fixed to
+ # their minimum width, perform the distribution once again, without
+ # checking, and actually change remaining column widths
+ for x in self.data:
+ if x.fixedwidth: continue
+ x.curwidth = x.curwidth - math.ceil(w*x.logwidth()/self.sumLogWidth())
+
+def tablehrule(colwidths, rule='-'):
+ "Returns a horizontal table separator for given column widths"
+ result = '+'
+ for x in colwidths:
+ result = result + rule * x + '+'
+ return result
+
+class TableDitem(BlockDitem):
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def format(self, width):
+ # Uses table rendering algorithm of w3m
+ # (http://www.w3m.org/story.html), but ignoring width attribute
+ # Step 1
+ columns = RenderedColumns([RenderedColumn(x.minwidth(),
+ max(x.maxwidth(), 1) # A column can't be smaller than 1 character
+ ) for x in self.children[0].children])
+ for x in self.children:
+ for i in range(len(columns)):
+ if (len(x.children)<=i): continue # Skip empty columns
+ columns[i].update(x.children[i].minwidth(), x.children[i].maxwidth())
+ # Step 2 (width attribute) ignored
+ # Step 3 (already done - list was created with maxwidth)
+ # Step 4
+ if columns.totalWidth() > width: columns.distributeWidthDifference(width)
+ # OK, column widths are now calculated
+ colwidths = [int(x.curwidth) for x in columns]
+ result = tablehrule(colwidths) + '\n'
+ usedheadbodysep = False
+ for tr in self.children:
+ result = result + tr.format(colwidths)
+ rule = '-'
+ if not usedheadbodysep and tr.children[0].type == 'th' \
+ and tr!=self.children[-1]:
+ rule = '='
+ usedheadbodysep = True
+ result = result + tablehrule(colwidths, rule) + '\n'
+ return result
+
+class TrDitem(BlockDitem):
+ def __init__(self, type):
+ BlockDitem.__init__(self, type)
+ def maxwidth(self):
+ return reduce(lambda x,y: x+y,
+ [x.maxwidth() for x in self.children]) + len(self.children) + 1
+ def minwidth(self):
+ return reduce(lambda x,y: x+y,
+ [x.minwidth() for x in self.children]) + len(self.children) + 1
+ def format(self, colwidths):
+ columns = [] # List of lists of lines
+ maxlinecount = 0 # Num of lines in vertically largest column
+ for i in range(len(colwidths)):
+ if len(self.children)<=i: lines = [ '' ]
+ else: lines = self.children[i].format(colwidths[i]).split('\n')
+ lines = [x + ' ' * (colwidths[i]-len(x)) for x in lines] # Pad to col len
+ maxlinecount = max(maxlinecount, len(lines))
+ columns.append(lines)
+ # Pad vertically
+ for i in range(len(columns)):
+ for j in range(maxlinecount-len(columns[i])):
+ columns[i].append(' ' * colwidths[i])
+ result = ''
+ # Add vertical separators
+ for i in range(maxlinecount):
+ result = result + '|'
+ for j in range(len(columns)):
+ result = result + columns[j][i] + '|'
+ result = result + '\n'
+ return result
+
+def handleNodeList(nodelist):
+ "Processes given nodes; merges them if possible; returns ditem list"
+ ditems = []
+ curditem = Ditem('')
+ for node in nodelist:
+ aditem = handleNode(node)
+ if curditem.merge(aditem): continue
+ ditems.append(curditem)
+ curditem = aditem
+ if not curditem.empty(): ditems.append(curditem)
+ return ditems
+
+def handleNode(node):
+ if node.nodeType == node.TEXT_NODE:
+ return handleText(node)
+ elif node.nodeName=='a':
+ return handleAnchor(node)
+ elif re.match('h\d', node.nodeName):
+ return handleHeading(node)
+ elif node.nodeName=='div' and node.getAttribute('class')=='cit': # HARDWIRED
+ return handleBlockQuote(node)
+ elif node.nodeName in ('body', 'div', 'p', 'td', 'th'):
+ return handleGenericBlock(node)
+ elif node.nodeName in ('em', 'i'):
+ return handleEmphasis(node)
+ elif node.nodeName in ('strong', 'b'):
+ return handleStrong(node)
+ elif node.nodeName in ('ol', 'ul', 'dl'):
+ return handleList(node)
+ elif node.nodeName in ('li', 'dd', 'dt'):
+ return handleListItem(node)
+ elif node.nodeName in ('table'):
+ return handleTable(node)
+ elif node.nodeName in ('tr'):
+ return handleTr(node)
+ elif node.nodeName in ('pre'):
+ return handlePre(node)
+ elif node.hasChildNodes():
+ contents = handleNodeList(node.childNodes)
+ if len(contents) == 1: return contents[0]
+ if len(contents) == 0: return Ditem('')
+ result = BlockDitem(node.nodeName)
+ result.children = contents
+ return result
+ return Ditem('')
+
+def processChildren(node):
+ if node.hasChildNodes():
+ return handleNodeList(node.childNodes)
+ else:
+ return ()
+
+def mergeChildren(node):
+ contents = processChildren(node)
+ if len(contents)>1: raise Exception('Unexpected block elements')
+ if contents: return contents[0]
+ else: return Ditem('')
+
+def handleText(node):
+ return Ditem(node.data)
+
+def handleAnchor(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ result.text = result.text.strip()
+ if result.text == '': return result
+ target = node.getAttribute('href').strip()
+ result.text = re.sub('\s+', ' ', result.text)
+ result.text = ':ref:`'+result.text+' <'+target+'>`'
+ return result
+
+def handleHeading(node):
+ contents = mergeChildren(node)
+ if contents.empty(): return contents
+ result = HeadingDitem(node.nodeName)
+ result.children.append(contents)
+ return result
+
+def handleEmphasis(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ if result.text:
+ result.text = '*' + result.text + '*'
+ return result
+
+def handleStrong(node):
+ result = mergeChildren(node)
+ result.type = node.nodeName
+ if result.text:
+ result.text = '**' + result.text + '**'
+ return result
+
+def handleGenericBlock(node):
+ result = BlockDitem(node.nodeName)
+ result.children = processChildren(node)
+ return result
+
+def handleBlockQuote(node):
+ result = BlockQuoteDitem(node.nodeName)
+ result.children = processChildren(node)
+ return result
+
+def handleList(node):
+ result = ListDitem(node.nodeName)
+ result.children = processChildren(node)
+ return result
+
+def handleListItem(node):
+ result = ListItemDitem(node.nodeName)
+ result.children = processChildren(node)
+ return result
+
+def handleTable(node):
+ result = TableDitem(node.nodeName)
+ # Ignore table contents that are not tr
+ result.children = [x
+ for x in processChildren(node) if x.type=='tr']
+ return result
+
+def handleTr(node):
+ result = TrDitem(node.nodeName)
+ # Ignore tr contents that are not th or td
+ result.children = [x
+ for x in processChildren(node) if x.type in ('th', 'td')]
+ return result
+
+def handlePre(node):
+ return PreDitem(mergeChildren(node).text)
+
+dom1 = xml.dom.minidom.parse(sys.argv[1])
+ditem = handleNode(dom1.getElementsByTagName("body")[0])
+ditem.propagate_indents()
+(utf8_encode, utf8_decode, utf8_reader, utf8_writer) = codecs.lookup('utf-8')
+outf = utf8_writer(sys.stdout)
+outf.write(ditem.format(79) + '\n')
+for h in hyperlinks.keys():
+ outf.write('\n.. _`' + h + '`:\n ' + hyperlinks[h] + '\n')
diff --git a/install-sh b/install-sh
new file mode 100644
index 0000000..89fc9b0
--- /dev/null
+++ b/install-sh
@@ -0,0 +1,238 @@
+#! /bin/sh
+#
+# install - install a program, script, or datafile
+# This comes from X11R5.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.
+#
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+tranformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+ case $1 in
+ -c) instcmd="$cpprog"
+ shift
+ continue;;
+
+ -d) dir_arg=true
+ shift
+ continue;;
+
+ -m) chmodcmd="$chmodprog $2"
+ shift
+ shift
+ continue;;
+
+ -o) chowncmd="$chownprog $2"
+ shift
+ shift
+ continue;;
+
+ -g) chgrpcmd="$chgrpprog $2"
+ shift
+ shift
+ continue;;
+
+ -s) stripcmd="$stripprog"
+ shift
+ continue;;
+
+ -t=*) transformarg=`echo $1 | sed 's/-t=//'`
+ shift
+ continue;;
+
+ -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+ shift
+ continue;;
+
+ *) if [ x"$src" = x ]
+ then
+ src=$1
+ else
+ # this colon is to work around a 386BSD /bin/sh bug
+ :
+ dst=$1
+ fi
+ shift
+ continue;;
+ esac
+done
+
+if [ x"$src" = x ]
+then
+ echo "install: no input file specified"
+ exit 1
+else
+ true
+fi
+
+if [ x"$dir_arg" != x ]; then
+ dst=$src
+ src=""
+
+ if [ -d $dst ]; then
+ instcmd=:
+ else
+ instcmd=mkdir
+ fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+ if [ -f $src -o -d $src ]
+ then
+ true
+ else
+ echo "install: $src does not exist"
+ exit 1
+ fi
+
+ if [ x"$dst" = x ]
+ then
+ echo "install: no destination specified"
+ exit 1
+ else
+ true
+ fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+ if [ -d $dst ]
+ then
+ dst="$dst"/`basename $src`
+ else
+ true
+ fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+# this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+'
+IFS="${IFS-${defaultIFS}}"
+
+oIFS="${IFS}"
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS="${oIFS}"
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+ pathcomp="${pathcomp}${1}"
+ shift
+
+ if [ ! -d "${pathcomp}" ] ;
+ then
+ $mkdirprog "${pathcomp}"
+ else
+ true
+ fi
+
+ pathcomp="${pathcomp}/"
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+ $doit $instcmd $dst &&
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+ if [ x"$transformarg" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ dstfile=`basename $dst $transformbasename |
+ sed $transformarg`$transformbasename
+ fi
+
+# don't allow the sed command to completely eliminate the filename
+
+ if [ x"$dstfile" = x ]
+ then
+ dstfile=`basename $dst`
+ else
+ true
+ fi
+
+# Make a temp file name in the proper directory.
+
+ dsttmp=$dstdir/#inst.$$#
+
+# Move or copy the file name to the temp name
+
+ $doit $instcmd $src $dsttmp &&
+
+ trap "rm -f ${dsttmp}" 0 &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing. If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+ if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
+ if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
+ if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
+ if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
+
+# Now rename the file to the real destination.
+
+ $doit $rmcmd -f $dstdir/$dstfile &&
+ $doit $mvcmd $dsttmp $dstdir/$dstfile
+
+fi &&
+
+
+exit 0
diff --git a/ltmain.sh b/ltmain.sh
new file mode 100644
index 0000000..47f816f
--- /dev/null
+++ b/ltmain.sh
@@ -0,0 +1,4982 @@
+# ltmain.sh - Provide generalized library-building support services.
+# NOTE: Changing this file will not affect anything until you rerun configure.
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001
+# Free Software Foundation, Inc.
+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 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 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.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Check that we have a working $echo.
+if test "X$1" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+elif test "X$1" = X--fallback-echo; then
+ # Avoid inline document here, it may be left over
+ :
+elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then
+ # Yippee, $echo works!
+ :
+else
+ # Restart under the correct shell, and then maybe $echo will work.
+ exec $SHELL "$0" --no-reexec ${1+"$@"}
+fi
+
+if test "X$1" = X--fallback-echo; then
+ # used as fallback echo
+ shift
+ cat <<EOF
+$*
+EOF
+ exit 0
+fi
+
+# The name of this program.
+progname=`$echo "$0" | sed 's%^.*/%%'`
+modename="$progname"
+
+# Constants.
+PROGRAM=ltmain.sh
+PACKAGE=libtool
+VERSION=1.4.1
+TIMESTAMP=" (1.922.2.34 2001/09/03 01:22:13)"
+
+default_mode=
+help="Try \`$progname --help' for more information."
+magic="%%%MAGIC variable%%%"
+mkdir="mkdir"
+mv="mv -f"
+rm="rm -f"
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='s/\([\\`\\"$\\\\]\)/\\\1/g'
+SP2NL='tr \040 \012'
+NL2SP='tr \015\012 \040\040'
+
+# NLS nuisances.
+# Only set LANG and LC_ALL to C if already set.
+# These must not be set unconditionally because not all systems understand
+# e.g. LANG=C (notably SCO).
+# We save the old values to restore during execute mode.
+if test "${LC_ALL+set}" = set; then
+ save_LC_ALL="$LC_ALL"; LC_ALL=C; export LC_ALL
+fi
+if test "${LANG+set}" = set; then
+ save_LANG="$LANG"; LANG=C; export LANG
+fi
+
+if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then
+ echo "$modename: not configured to build any kind of library" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+fi
+
+# Global variables.
+mode=$default_mode
+nonopt=
+prev=
+prevopt=
+run=
+show="$echo"
+show_help=
+execute_dlfiles=
+lo2o="s/\\.lo\$/.${objext}/"
+o2lo="s/\\.${objext}\$/.lo/"
+
+# Parse our command line options once, thoroughly.
+while test $# -gt 0
+do
+ arg="$1"
+ shift
+
+ case $arg in
+ -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ execute_dlfiles)
+ execute_dlfiles="$execute_dlfiles $arg"
+ ;;
+ *)
+ eval "$prev=\$arg"
+ ;;
+ esac
+
+ prev=
+ prevopt=
+ continue
+ fi
+
+ # Have we seen a non-optional argument yet?
+ case $arg in
+ --help)
+ show_help=yes
+ ;;
+
+ --version)
+ echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP"
+ exit 0
+ ;;
+
+ --config)
+ sed -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $0
+ exit 0
+ ;;
+
+ --debug)
+ echo "$progname: enabling shell trace mode"
+ set -x
+ ;;
+
+ --dry-run | -n)
+ run=:
+ ;;
+
+ --features)
+ echo "host: $host"
+ if test "$build_libtool_libs" = yes; then
+ echo "enable shared libraries"
+ else
+ echo "disable shared libraries"
+ fi
+ if test "$build_old_libs" = yes; then
+ echo "enable static libraries"
+ else
+ echo "disable static libraries"
+ fi
+ exit 0
+ ;;
+
+ --finish) mode="finish" ;;
+
+ --mode) prevopt="--mode" prev=mode ;;
+ --mode=*) mode="$optarg" ;;
+
+ --quiet | --silent)
+ show=:
+ ;;
+
+ -dlopen)
+ prevopt="-dlopen"
+ prev=execute_dlfiles
+ ;;
+
+ -*)
+ $echo "$modename: unrecognized option \`$arg'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+
+ *)
+ nonopt="$arg"
+ break
+ ;;
+ esac
+done
+
+if test -n "$prevopt"; then
+ $echo "$modename: option \`$prevopt' requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+fi
+
+# If this variable is set in any of the actions, the command in it
+# will be execed at the end. This prevents here-documents from being
+# left over by shells.
+exec_cmd=
+
+if test -z "$show_help"; then
+
+ # Infer the operation mode.
+ if test -z "$mode"; then
+ case $nonopt in
+ *cc | *++ | gcc* | *-gcc*)
+ mode=link
+ for arg
+ do
+ case $arg in
+ -c)
+ mode=compile
+ break
+ ;;
+ esac
+ done
+ ;;
+ *db | *dbx | *strace | *truss)
+ mode=execute
+ ;;
+ *install*|cp|mv)
+ mode=install
+ ;;
+ *rm)
+ mode=uninstall
+ ;;
+ *)
+ # If we have no mode, but dlfiles were specified, then do execute mode.
+ test -n "$execute_dlfiles" && mode=execute
+
+ # Just use the default operation mode.
+ if test -z "$mode"; then
+ if test -n "$nonopt"; then
+ $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2
+ else
+ $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2
+ fi
+ fi
+ ;;
+ esac
+ fi
+
+ # Only execute mode is allowed to have -dlopen flags.
+ if test -n "$execute_dlfiles" && test "$mode" != execute; then
+ $echo "$modename: unrecognized option \`-dlopen'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Change the help message to a mode-specific one.
+ generic_help="$help"
+ help="Try \`$modename --help --mode=$mode' for more information."
+
+ # These modes are in order of execution frequency so that they run quickly.
+ case $mode in
+ # libtool compile mode
+ compile)
+ modename="$modename: compile"
+ # Get the compilation command and the source file.
+ base_compile=
+ prev=
+ lastarg=
+ srcfile="$nonopt"
+ suppress_output=
+
+ user_target=no
+ for arg
+ do
+ case $prev in
+ "") ;;
+ xcompiler)
+ # Aesthetically quote the previous argument.
+ prev=
+ lastarg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+
+ case $arg in
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+
+ # Add the previous argument to base_compile.
+ if test -z "$base_compile"; then
+ base_compile="$lastarg"
+ else
+ base_compile="$base_compile $lastarg"
+ fi
+ continue
+ ;;
+ esac
+
+ # Accept any command-line options.
+ case $arg in
+ -o)
+ if test "$user_target" != "no"; then
+ $echo "$modename: you cannot specify \`-o' more than once" 1>&2
+ exit 1
+ fi
+ user_target=next
+ ;;
+
+ -static)
+ build_old_libs=yes
+ continue
+ ;;
+
+ -prefer-pic)
+ pic_mode=yes
+ continue
+ ;;
+
+ -prefer-non-pic)
+ pic_mode=no
+ continue
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Wc,*)
+ args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"`
+ lastarg=
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
+ for arg in $args; do
+ IFS="$save_ifs"
+
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ lastarg="$lastarg $arg"
+ done
+ IFS="$save_ifs"
+ lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"`
+
+ # Add the arguments to base_compile.
+ if test -z "$base_compile"; then
+ base_compile="$lastarg"
+ else
+ base_compile="$base_compile $lastarg"
+ fi
+ continue
+ ;;
+ esac
+
+ case $user_target in
+ next)
+ # The next one is the -o target name
+ user_target=yes
+ continue
+ ;;
+ yes)
+ # We got the output file
+ user_target=set
+ libobj="$arg"
+ continue
+ ;;
+ esac
+
+ # Accept the current argument as the source file.
+ lastarg="$srcfile"
+ srcfile="$arg"
+
+ # Aesthetically quote the previous argument.
+
+ # Backslashify any backslashes, double quotes, and dollar signs.
+ # These are the only characters that are still specially
+ # interpreted inside of double-quoted scrings.
+ lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"`
+
+ # Double-quote args containing other shell metacharacters.
+ # Many Bourne shells cannot handle close brackets correctly
+ # in scan sets, so we specify it separately.
+ case $lastarg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ lastarg="\"$lastarg\""
+ ;;
+ esac
+
+ # Add the previous argument to base_compile.
+ if test -z "$base_compile"; then
+ base_compile="$lastarg"
+ else
+ base_compile="$base_compile $lastarg"
+ fi
+ done
+
+ case $user_target in
+ set)
+ ;;
+ no)
+ # Get the name of the library object.
+ libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'`
+ ;;
+ *)
+ $echo "$modename: you must specify a target with \`-o'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Recognize several different file suffixes.
+ # If the user specifies -o file.o, it is replaced with file.lo
+ xform='[cCFSfmso]'
+ case $libobj in
+ *.ada) xform=ada ;;
+ *.adb) xform=adb ;;
+ *.ads) xform=ads ;;
+ *.asm) xform=asm ;;
+ *.c++) xform=c++ ;;
+ *.cc) xform=cc ;;
+ *.cpp) xform=cpp ;;
+ *.cxx) xform=cxx ;;
+ *.f90) xform=f90 ;;
+ *.for) xform=for ;;
+ esac
+
+ libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"`
+
+ case $libobj in
+ *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;;
+ *)
+ $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test -z "$base_compile"; then
+ $echo "$modename: you must specify a compilation command" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Delete any leftover library objects.
+ if test "$build_old_libs" = yes; then
+ removelist="$obj $libobj"
+ else
+ removelist="$libobj"
+ fi
+
+ $run $rm $removelist
+ trap "$run $rm $removelist; exit 1" 1 2 15
+
+ # On Cygwin there's no "real" PIC flag so we must build both object types
+ case $host_os in
+ cygwin* | mingw* | pw32* | os2*)
+ pic_mode=default
+ ;;
+ esac
+ if test $pic_mode = no && test "$deplibs_check_method" != pass_all; then
+ # non-PIC code in shared libraries is not supported
+ pic_mode=default
+ fi
+
+ # Calculate the filename of the output object if compiler does
+ # not support -o with -c
+ if test "$compiler_c_o" = no; then
+ output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext}
+ lockfile="$output_obj.lock"
+ removelist="$removelist $output_obj $lockfile"
+ trap "$run $rm $removelist; exit 1" 1 2 15
+ else
+ need_locks=no
+ lockfile=
+ fi
+
+ # Lock this critical section if it is needed
+ # We use this script file to make the link, it avoids creating a new file
+ if test "$need_locks" = yes; then
+ until $run ln "$0" "$lockfile" 2>/dev/null; do
+ $show "Waiting for $lockfile to be removed"
+ sleep 2
+ done
+ elif test "$need_locks" = warn; then
+ if test -f "$lockfile"; then
+ echo "\
+*** ERROR, $lockfile exists and contains:
+`cat $lockfile 2>/dev/null`
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+ echo $srcfile > "$lockfile"
+ fi
+
+ if test -n "$fix_srcfile_path"; then
+ eval srcfile=\"$fix_srcfile_path\"
+ fi
+
+ # Only build a PIC object if we are building libtool libraries.
+ if test "$build_libtool_libs" = yes; then
+ # Without this assignment, base_compile gets emptied.
+ fbsd_hideous_sh_bug=$base_compile
+
+ if test "$pic_mode" != no; then
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ command="$base_compile $srcfile $pic_flag -DPIC"
+ else
+ # Don't build PIC code
+ command="$base_compile $srcfile"
+ fi
+ if test "$build_old_libs" = yes; then
+ lo_libobj="$libobj"
+ dir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$libobj"; then
+ dir="$objdir"
+ else
+ dir="$dir/$objdir"
+ fi
+ libobj="$dir/"`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+
+ if test -d "$dir"; then
+ $show "$rm $libobj"
+ $run $rm $libobj
+ else
+ $show "$mkdir $dir"
+ $run $mkdir $dir
+ status=$?
+ if test $status -ne 0 && test ! -d $dir; then
+ exit $status
+ fi
+ fi
+ fi
+ if test "$compiler_o_lo" = yes; then
+ output_obj="$libobj"
+ command="$command -o $output_obj"
+ elif test "$compiler_c_o" = yes; then
+ output_obj="$obj"
+ command="$command -o $output_obj"
+ fi
+
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ test -n "$output_obj" && $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed, then go on to compile the next one
+ if test x"$output_obj" != x"$libobj"; then
+ $show "$mv $output_obj $libobj"
+ if $run $mv $output_obj $libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # If we have no pic_flag, then copy the object into place and finish.
+ if (test -z "$pic_flag" || test "$pic_mode" != default) &&
+ test "$build_old_libs" = yes; then
+ # Rename the .lo from within objdir to obj
+ if test -f $obj; then
+ $show $rm $obj
+ $run $rm $obj
+ fi
+
+ $show "$mv $libobj $obj"
+ if $run $mv $libobj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$obj" | $Xsed -e "s%.*/%%"`
+ libobj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ # Now arrange that obj and lo_libobj become the same file
+ $show "(cd $xdir && $LN_S $baseobj $libobj)"
+ if $run eval '(cd $xdir && $LN_S $baseobj $libobj)'; then
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $run $rm "$lockfile"
+ fi
+ exit 0
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Allow error messages only from the first compilation.
+ suppress_output=' >/dev/null 2>&1'
+ fi
+
+ # Only build a position-dependent object if we build old libraries.
+ if test "$build_old_libs" = yes; then
+ if test "$pic_mode" != yes; then
+ # Don't build PIC code
+ command="$base_compile $srcfile"
+ else
+ # All platforms use -DPIC, to notify preprocessed assembler code.
+ command="$base_compile $srcfile $pic_flag -DPIC"
+ fi
+ if test "$compiler_c_o" = yes; then
+ command="$command -o $obj"
+ output_obj="$obj"
+ fi
+
+ # Suppress compiler output if we already did a PIC compilation.
+ command="$command$suppress_output"
+ $run $rm "$output_obj"
+ $show "$command"
+ if $run eval "$command"; then :
+ else
+ $run $rm $removelist
+ exit 1
+ fi
+
+ if test "$need_locks" = warn &&
+ test x"`cat $lockfile 2>/dev/null`" != x"$srcfile"; then
+ echo "\
+*** ERROR, $lockfile contains:
+`cat $lockfile 2>/dev/null`
+
+but it should contain:
+$srcfile
+
+This indicates that another process is trying to use the same
+temporary object file, and libtool could not work around it because
+your compiler does not support \`-c' and \`-o' together. If you
+repeat this compilation, it may succeed, by chance, but you had better
+avoid parallel builds (make -j) in this platform, or get a better
+compiler."
+
+ $run $rm $removelist
+ exit 1
+ fi
+
+ # Just move the object if needed
+ if test x"$output_obj" != x"$obj"; then
+ $show "$mv $output_obj $obj"
+ if $run $mv $output_obj $obj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we do not
+ # accidentally link it into a program.
+ if test "$build_libtool_libs" != yes; then
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > \$libobj" || exit $?
+ else
+ # Move the .lo from within objdir
+ $show "$mv $libobj $lo_libobj"
+ if $run $mv $libobj $lo_libobj; then :
+ else
+ error=$?
+ $run $rm $removelist
+ exit $error
+ fi
+ fi
+ fi
+
+ # Unlock the critical section if it was locked
+ if test "$need_locks" != no; then
+ $run $rm "$lockfile"
+ fi
+
+ exit 0
+ ;;
+
+ # libtool link mode
+ link | relink)
+ modename="$modename: link"
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # It is impossible to link a dll without this setting, and
+ # we shouldn't force the makefile maintainer to figure out
+ # which system we are compiling for in order to pass an extra
+ # flag for every libtool invokation.
+ # allow_undefined=no
+
+ # FIXME: Unfortunately, there are problems with the above when trying
+ # to make a dll which has undefined symbols, in which case not
+ # even a static library is built. For now, we need to specify
+ # -no-undefined on the libtool link line when we can be certain
+ # that all symbols are satisfied, otherwise we get a static library.
+ allow_undefined=yes
+ ;;
+ *)
+ allow_undefined=yes
+ ;;
+ esac
+ libtool_args="$nonopt"
+ compile_command="$nonopt"
+ finalize_command="$nonopt"
+
+ compile_rpath=
+ finalize_rpath=
+ compile_shlibpath=
+ finalize_shlibpath=
+ convenience=
+ old_convenience=
+ deplibs=
+ old_deplibs=
+ compiler_flags=
+ linker_flags=
+ dllsearchpath=
+ lib_search_path=`pwd`
+
+ avoid_version=no
+ dlfiles=
+ dlprefiles=
+ dlself=no
+ export_dynamic=no
+ export_symbols=
+ export_symbols_regex=
+ generated=
+ libobjs=
+ ltlibs=
+ module=no
+ no_install=no
+ objs=
+ prefer_static_libs=no
+ preload=no
+ prev=
+ prevarg=
+ release=
+ rpath=
+ xrpath=
+ perm_rpath=
+ temp_rpath=
+ thread_safe=no
+ vinfo=
+
+ # We need to know -static, to get the right output filenames.
+ for arg
+ do
+ case $arg in
+ -all-static | -static)
+ if test "X$arg" = "X-all-static"; then
+ if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then
+ $echo "$modename: warning: complete static linking is impossible in this configuration" 1>&2
+ fi
+ if test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ else
+ if test -z "$pic_flag" && test -n "$link_static_flag"; then
+ dlopen_self=$dlopen_self_static
+ fi
+ fi
+ build_libtool_libs=no
+ build_old_libs=yes
+ prefer_static_libs=yes
+ break
+ ;;
+ esac
+ done
+
+ # See if our shared archives depend on static archives.
+ test -n "$old_archive_from_new_cmds" && build_old_libs=yes
+
+ # Go through the arguments, transforming them on the way.
+ while test $# -gt 0; do
+ arg="$1"
+ shift
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test
+ ;;
+ *) qarg=$arg ;;
+ esac
+ libtool_args="$libtool_args $qarg"
+
+ # If the previous option needs an argument, assign it.
+ if test -n "$prev"; then
+ case $prev in
+ output)
+ compile_command="$compile_command @OUTPUT@"
+ finalize_command="$finalize_command @OUTPUT@"
+ ;;
+ esac
+
+ case $prev in
+ dlfiles|dlprefiles)
+ if test "$preload" = no; then
+ # Add the symbol object into the linking commands.
+ compile_command="$compile_command @SYMFILE@"
+ finalize_command="$finalize_command @SYMFILE@"
+ preload=yes
+ fi
+ case $arg in
+ *.la | *.lo) ;; # We handle these cases below.
+ force)
+ if test "$dlself" = no; then
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ self)
+ if test "$prev" = dlprefiles; then
+ dlself=yes
+ elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then
+ dlself=yes
+ else
+ dlself=needless
+ export_dynamic=yes
+ fi
+ prev=
+ continue
+ ;;
+ *)
+ if test "$prev" = dlfiles; then
+ dlfiles="$dlfiles $arg"
+ else
+ dlprefiles="$dlprefiles $arg"
+ fi
+ prev=
+ continue
+ ;;
+ esac
+ ;;
+ expsyms)
+ export_symbols="$arg"
+ if test ! -f "$arg"; then
+ $echo "$modename: symbol file \`$arg' does not exist"
+ exit 1
+ fi
+ prev=
+ continue
+ ;;
+ expsyms_regex)
+ export_symbols_regex="$arg"
+ prev=
+ continue
+ ;;
+ release)
+ release="-$arg"
+ prev=
+ continue
+ ;;
+ rpath | xrpath)
+ # We need an absolute path.
+ case $arg in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
+ ;;
+ esac
+ if test "$prev" = rpath; then
+ case "$rpath " in
+ *" $arg "*) ;;
+ *) rpath="$rpath $arg" ;;
+ esac
+ else
+ case "$xrpath " in
+ *" $arg "*) ;;
+ *) xrpath="$xrpath $arg" ;;
+ esac
+ fi
+ prev=
+ continue
+ ;;
+ xcompiler)
+ compiler_flags="$compiler_flags $qarg"
+ prev=
+ compile_command="$compile_command $qarg"
+ finalize_command="$finalize_command $qarg"
+ continue
+ ;;
+ xlinker)
+ linker_flags="$linker_flags $qarg"
+ compiler_flags="$compiler_flags $wl$qarg"
+ prev=
+ compile_command="$compile_command $wl$qarg"
+ finalize_command="$finalize_command $wl$qarg"
+ continue
+ ;;
+ *)
+ eval "$prev=\"\$arg\""
+ prev=
+ continue
+ ;;
+ esac
+ fi # test -n $prev
+
+ prevarg="$arg"
+
+ case $arg in
+ -all-static)
+ if test -n "$link_static_flag"; then
+ compile_command="$compile_command $link_static_flag"
+ finalize_command="$finalize_command $link_static_flag"
+ fi
+ continue
+ ;;
+
+ -allow-undefined)
+ # FIXME: remove this flag sometime in the future.
+ $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2
+ continue
+ ;;
+
+ -avoid-version)
+ avoid_version=yes
+ continue
+ ;;
+
+ -dlopen)
+ prev=dlfiles
+ continue
+ ;;
+
+ -dlpreopen)
+ prev=dlprefiles
+ continue
+ ;;
+
+ -export-dynamic)
+ export_dynamic=yes
+ continue
+ ;;
+
+ -export-symbols | -export-symbols-regex)
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: more than one -exported-symbols argument is not allowed"
+ exit 1
+ fi
+ if test "X$arg" = "X-export-symbols"; then
+ prev=expsyms
+ else
+ prev=expsyms_regex
+ fi
+ continue
+ ;;
+
+ # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:*
+ # so, if we see these flags be careful not to treat them like -L
+ -L[A-Z][A-Z]*:*)
+ case $with_gcc/$host in
+ no/*-*-irix*)
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ ;;
+ esac
+ continue
+ ;;
+
+ -L*)
+ dir=`$echo "X$arg" | $Xsed -e 's/^-L//'`
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2
+ exit 1
+ fi
+ dir="$absdir"
+ ;;
+ esac
+ case "$deplibs " in
+ *" -L$dir "*) ;;
+ *)
+ deplibs="$deplibs -L$dir"
+ lib_search_path="$lib_search_path $dir"
+ ;;
+ esac
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ case :$dllsearchpath: in
+ *":$dir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$dir";;
+ esac
+ ;;
+ esac
+ continue
+ ;;
+
+ -l*)
+ if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then
+ case $host in
+ *-*-cygwin* | *-*-pw32* | *-*-beos*)
+ # These systems don't actually have a C or math library (as such)
+ continue
+ ;;
+ *-*-mingw* | *-*-os2*)
+ # These systems don't actually have a C library (as such)
+ test "X$arg" = "X-lc" && continue
+ ;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ test "X$arg" = "X-lc" && continue
+ ;;
+ esac
+ fi
+ if test "X$arg" = "X-lc_r"; then
+ case $host in
+ *-*-openbsd*)
+ # Do not include libc_r directly, use -pthread flag.
+ continue
+ ;;
+ esac
+ fi
+ deplibs="$deplibs $arg"
+ continue
+ ;;
+
+ -module)
+ module=yes
+ continue
+ ;;
+
+ -no-fast-install)
+ fast_install=no
+ continue
+ ;;
+
+ -no-install)
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ # The PATH hackery in wrapper scripts is required on Windows
+ # in order for the loader to find any dlls it needs.
+ $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2
+ $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2
+ fast_install=no
+ ;;
+ *) no_install=yes ;;
+ esac
+ continue
+ ;;
+
+ -no-undefined)
+ allow_undefined=no
+ continue
+ ;;
+
+ -o) prev=output ;;
+
+ -release)
+ prev=release
+ continue
+ ;;
+
+ -rpath)
+ prev=rpath
+ continue
+ ;;
+
+ -R)
+ prev=xrpath
+ continue
+ ;;
+
+ -R*)
+ dir=`$echo "X$arg" | $Xsed -e 's/^-R//'`
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ $echo "$modename: only absolute run-paths are allowed" 1>&2
+ exit 1
+ ;;
+ esac
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ continue
+ ;;
+
+ -static)
+ # The effects of -static are defined in a previous loop.
+ # We used to do the same as -all-static on platforms that
+ # didn't have a PIC flag, but the assumption that the effects
+ # would be equivalent was wrong. It would break on at least
+ # Digital Unix and AIX.
+ continue
+ ;;
+
+ -thread-safe)
+ thread_safe=yes
+ continue
+ ;;
+
+ -version-info)
+ prev=vinfo
+ continue
+ ;;
+
+ -Wc,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'`
+ arg=
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ case $flag in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ flag="\"$flag\""
+ ;;
+ esac
+ arg="$arg $wl$flag"
+ compiler_flags="$compiler_flags $flag"
+ done
+ IFS="$save_ifs"
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
+ -Wl,*)
+ args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'`
+ arg=
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=','
+ for flag in $args; do
+ IFS="$save_ifs"
+ case $flag in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ flag="\"$flag\""
+ ;;
+ esac
+ arg="$arg $wl$flag"
+ compiler_flags="$compiler_flags $wl$flag"
+ linker_flags="$linker_flags $flag"
+ done
+ IFS="$save_ifs"
+ arg=`$echo "X$arg" | $Xsed -e "s/^ //"`
+ ;;
+
+ -Xcompiler)
+ prev=xcompiler
+ continue
+ ;;
+
+ -Xlinker)
+ prev=xlinker
+ continue
+ ;;
+
+ # Some other compiler flag.
+ -* | +*)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+
+ *.lo | *.$objext)
+ # A library or standard object.
+ if test "$prev" = dlfiles; then
+ # This file was specified with -dlopen.
+ if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then
+ dlfiles="$dlfiles $arg"
+ prev=
+ continue
+ else
+ # If libtool objects are unsupported, then we need to preload.
+ prev=dlprefiles
+ fi
+ fi
+
+ if test "$prev" = dlprefiles; then
+ # Preload the old-style object.
+ dlprefiles="$dlprefiles "`$echo "X$arg" | $Xsed -e "$lo2o"`
+ prev=
+ else
+ case $arg in
+ *.lo) libobjs="$libobjs $arg" ;;
+ *) objs="$objs $arg" ;;
+ esac
+ fi
+ ;;
+
+ *.$libext)
+ # An archive.
+ deplibs="$deplibs $arg"
+ old_deplibs="$old_deplibs $arg"
+ continue
+ ;;
+
+ *.la)
+ # A libtool-controlled library.
+
+ if test "$prev" = dlfiles; then
+ # This library was specified with -dlopen.
+ dlfiles="$dlfiles $arg"
+ prev=
+ elif test "$prev" = dlprefiles; then
+ # The library was specified with -dlpreopen.
+ dlprefiles="$dlprefiles $arg"
+ prev=
+ else
+ deplibs="$deplibs $arg"
+ fi
+ continue
+ ;;
+
+ # Some other compiler argument.
+ *)
+ # Unknown arguments in both finalize_command and compile_command need
+ # to be aesthetically quoted because they are evaled later.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"")
+ arg="\"$arg\""
+ ;;
+ esac
+ ;;
+ esac # arg
+
+ # Now actually substitute the argument into the commands.
+ if test -n "$arg"; then
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+ done # argument parsing loop
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prevarg' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then
+ eval arg=\"$export_dynamic_flag_spec\"
+ compile_command="$compile_command $arg"
+ finalize_command="$finalize_command $arg"
+ fi
+
+ # calculate the name of the file, without its directory
+ outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'`
+ libobjs_save="$libobjs"
+
+ if test -n "$shlibpath_var"; then
+ # get the directories listed in $shlibpath_var
+ eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\`
+ else
+ shlib_search_path=
+ fi
+ eval sys_lib_search_path=\"$sys_lib_search_path_spec\"
+ eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\"
+
+ output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$output_objdir" = "X$output"; then
+ output_objdir="$objdir"
+ else
+ output_objdir="$output_objdir/$objdir"
+ fi
+ # Create the object directory.
+ if test ! -d $output_objdir; then
+ $show "$mkdir $output_objdir"
+ $run $mkdir $output_objdir
+ status=$?
+ if test $status -ne 0 && test ! -d $output_objdir; then
+ exit $status
+ fi
+ fi
+
+ # Determine the type of output
+ case $output in
+ "")
+ $echo "$modename: you must specify an output file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ *.$libext) linkmode=oldlib ;;
+ *.lo | *.$objext) linkmode=obj ;;
+ *.la) linkmode=lib ;;
+ *) linkmode=prog ;; # Anything else should be a program.
+ esac
+
+ specialdeplibs=
+ libs=
+ # Find all interdependent deplibs by searching for libraries
+ # that are linked more than once (e.g. -la -lb -la)
+ for deplib in $deplibs; do
+ case "$libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ libs="$libs $deplib"
+ done
+ deplibs=
+ newdependency_libs=
+ newlib_search_path=
+ need_relink=no # whether we're linking any uninstalled libtool libraries
+ notinst_deplibs= # not-installed libtool libraries
+ notinst_path= # paths that contain not-installed libtool libraries
+ case $linkmode in
+ lib)
+ passes="conv link"
+ for file in $dlfiles $dlprefiles; do
+ case $file in
+ *.la) ;;
+ *)
+ $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+ ;;
+ prog)
+ compile_deplibs=
+ finalize_deplibs=
+ alldeplibs=no
+ newdlfiles=
+ newdlprefiles=
+ passes="conv scan dlopen dlpreopen link"
+ ;;
+ *) passes="conv"
+ ;;
+ esac
+ for pass in $passes; do
+ if test $linkmode = prog; then
+ # Determine which files to process
+ case $pass in
+ dlopen)
+ libs="$dlfiles"
+ save_deplibs="$deplibs" # Collect dlpreopened libraries
+ deplibs=
+ ;;
+ dlpreopen) libs="$dlprefiles" ;;
+ link) libs="$deplibs %DEPLIBS% $dependency_libs" ;;
+ esac
+ fi
+ for deplib in $libs; do
+ lib=
+ found=no
+ case $deplib in
+ -l*)
+ if test $linkmode = oldlib && test $linkmode = obj; then
+ $echo "$modename: warning: \`-l' is ignored for archives/objects: $deplib" 1>&2
+ continue
+ fi
+ if test $pass = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ name=`$echo "X$deplib" | $Xsed -e 's/^-l//'`
+ for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ # Search the libtool library
+ lib="$searchdir/lib${name}.la"
+ if test -f "$lib"; then
+ found=yes
+ break
+ fi
+ done
+ if test "$found" != yes; then
+ # deplib doesn't seem to be a libtool library
+ if test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ deplibs="$deplib $deplibs"
+ test $linkmode = lib && newdependency_libs="$deplib $newdependency_libs"
+ fi
+ continue
+ fi
+ ;; # -l
+ -L*)
+ case $linkmode in
+ lib)
+ deplibs="$deplib $deplibs"
+ test $pass = conv && continue
+ newdependency_libs="$deplib $newdependency_libs"
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ ;;
+ prog)
+ if test $pass = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ if test $pass = scan; then
+ deplibs="$deplib $deplibs"
+ newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ ;;
+ *)
+ $echo "$modename: warning: \`-L' is ignored for archives/objects: $deplib" 1>&2
+ ;;
+ esac # linkmode
+ continue
+ ;; # -L
+ -R*)
+ if test $pass = link; then
+ dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'`
+ # Make sure the xrpath contains only unique directories.
+ case "$xrpath " in
+ *" $dir "*) ;;
+ *) xrpath="$xrpath $dir" ;;
+ esac
+ fi
+ deplibs="$deplib $deplibs"
+ continue
+ ;;
+ *.la) lib="$deplib" ;;
+ *.$libext)
+ if test $pass = conv; then
+ deplibs="$deplib $deplibs"
+ continue
+ fi
+ case $linkmode in
+ lib)
+ if test "$deplibs_check_method" != pass_all; then
+ echo
+ echo "*** Warning: This library needs some functionality provided by $deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ else
+ echo
+ echo "*** Warning: Linking the shared library $output against the"
+ echo "*** static library $deplib is not portable!"
+ deplibs="$deplib $deplibs"
+ fi
+ continue
+ ;;
+ prog)
+ if test $pass != link; then
+ deplibs="$deplib $deplibs"
+ else
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ fi
+ continue
+ ;;
+ esac # linkmode
+ ;; # *.$libext
+ *.lo | *.$objext)
+ if test $pass = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlopen support or we're linking statically,
+ # we need to preload.
+ newdlprefiles="$newdlprefiles $deplib"
+ compile_deplibs="$deplib $compile_deplibs"
+ finalize_deplibs="$deplib $finalize_deplibs"
+ else
+ newdlfiles="$newdlfiles $deplib"
+ fi
+ continue
+ ;;
+ %DEPLIBS%)
+ alldeplibs=yes
+ continue
+ ;;
+ esac # case $deplib
+ if test $found = yes || test -f "$lib"; then :
+ else
+ $echo "$modename: cannot find the library \`$lib'" 1>&2
+ exit 1
+ fi
+
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $lib | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+
+ ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$ladir" = "X$lib" && ladir="."
+
+ dlname=
+ dlopen=
+ dlpreopen=
+ libdir=
+ library_names=
+ old_library=
+ # If the library was installed with an old release of libtool,
+ # it will not redefine variable installed.
+ installed=yes
+
+ # Read the .la file
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+
+ if test "$linkmode,$pass" = "lib,link" ||
+ test "$linkmode,$pass" = "prog,scan" ||
+ { test $linkmode = oldlib && test $linkmode = obj; }; then
+ # Add dl[pre]opened files of deplib
+ test -n "$dlopen" && dlfiles="$dlfiles $dlopen"
+ test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen"
+ fi
+
+ if test $pass = conv; then
+ # Only check for convenience libraries
+ deplibs="$lib $deplibs"
+ if test -z "$libdir"; then
+ if test -z "$old_library"; then
+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+ exit 1
+ fi
+ # It is a libtool convenience library, so add in its objects.
+ convenience="$convenience $ladir/$objdir/$old_library"
+ old_convenience="$old_convenience $ladir/$objdir/$old_library"
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ deplibs="$deplib $deplibs"
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ tmp_libs="$tmp_libs $deplib"
+ done
+ elif test $linkmode != prog && test $linkmode != lib; then
+ $echo "$modename: \`$lib' is not a convenience library" 1>&2
+ exit 1
+ fi
+ continue
+ fi # $pass = conv
+
+ # Get the name of the library we link against.
+ linklib=
+ for l in $old_library $library_names; do
+ linklib="$l"
+ done
+ if test -z "$linklib"; then
+ $echo "$modename: cannot find name of link library for \`$lib'" 1>&2
+ exit 1
+ fi
+
+ # This library was specified with -dlopen.
+ if test $pass = dlopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2
+ exit 1
+ fi
+ if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then
+ # If there is no dlname, no dlopen support or we're linking
+ # statically, we need to preload.
+ dlprefiles="$dlprefiles $lib"
+ else
+ newdlfiles="$newdlfiles $lib"
+ fi
+ continue
+ fi # $pass = dlopen
+
+ # We need an absolute path.
+ case $ladir in
+ [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;;
+ *)
+ abs_ladir=`cd "$ladir" && pwd`
+ if test -z "$abs_ladir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2
+ $echo "$modename: passing it literally to the linker, although it might fail" 1>&2
+ abs_ladir="$ladir"
+ fi
+ ;;
+ esac
+ laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+
+ # Find the relevant object directory and library name.
+ if test "X$installed" = Xyes; then
+ if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then
+ $echo "$modename: warning: library \`$lib' was moved." 1>&2
+ dir="$ladir"
+ absdir="$abs_ladir"
+ libdir="$abs_ladir"
+ else
+ dir="$libdir"
+ absdir="$libdir"
+ fi
+ else
+ dir="$ladir/$objdir"
+ absdir="$abs_ladir/$objdir"
+ # Remove this search path later
+ notinst_path="$notinst_path $abs_ladir"
+ fi # $installed = yes
+ name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+
+ # This library was specified with -dlpreopen.
+ if test $pass = dlpreopen; then
+ if test -z "$libdir"; then
+ $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2
+ exit 1
+ fi
+ # Prefer using a static library (so that no silly _DYNAMIC symbols
+ # are required to link).
+ if test -n "$old_library"; then
+ newdlprefiles="$newdlprefiles $dir/$old_library"
+ # Otherwise, use the dlname, so that lt_dlopen finds it.
+ elif test -n "$dlname"; then
+ newdlprefiles="$newdlprefiles $dir/$dlname"
+ else
+ newdlprefiles="$newdlprefiles $dir/$linklib"
+ fi
+ fi # $pass = dlpreopen
+
+ if test -z "$libdir"; then
+ # Link the convenience library
+ if test $linkmode = lib; then
+ deplibs="$dir/$old_library $deplibs"
+ elif test "$linkmode,$pass" = "prog,link"; then
+ compile_deplibs="$dir/$old_library $compile_deplibs"
+ finalize_deplibs="$dir/$old_library $finalize_deplibs"
+ else
+ deplibs="$lib $deplibs"
+ fi
+ continue
+ fi
+
+ if test $linkmode = prog && test $pass != link; then
+ newlib_search_path="$newlib_search_path $ladir"
+ deplibs="$lib $deplibs"
+
+ linkalldeplibs=no
+ if test "$link_all_deplibs" != no || test -z "$library_names" ||
+ test "$build_libtool_libs" = no; then
+ linkalldeplibs=yes
+ fi
+
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test
+ esac
+ # Need to link against all dependency_libs?
+ if test $linkalldeplibs = yes; then
+ deplibs="$deplib $deplibs"
+ else
+ # Need to hardcode shared library paths
+ # or/and link against static libraries
+ newdependency_libs="$deplib $newdependency_libs"
+ fi
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ tmp_libs="$tmp_libs $deplib"
+ done # for deplib
+ continue
+ fi # $linkmode = prog...
+
+ link_static=no # Whether the deplib will be linked statically
+ if test -n "$library_names" &&
+ { test "$prefer_static_libs" = no || test -z "$old_library"; }; then
+ # Link against this shared library
+
+ if test "$linkmode,$pass" = "prog,link" ||
+ { test $linkmode = lib && test $hardcode_into_libs = yes; }; then
+ # Hardcode the library path.
+ # Skip directories that are in the system default run-time
+ # search path.
+ case " $sys_lib_dlsearch_path " in
+ *" $absdir "*) ;;
+ *)
+ case "$compile_rpath " in
+ *" $absdir "*) ;;
+ *) compile_rpath="$compile_rpath $absdir"
+ esac
+ ;;
+ esac
+ case " $sys_lib_dlsearch_path " in
+ *" $libdir "*) ;;
+ *)
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir"
+ esac
+ ;;
+ esac
+ if test $linkmode = prog; then
+ # We need to hardcode the library path
+ if test -n "$shlibpath_var"; then
+ # Make sure the rpath contains only unique directories.
+ case "$temp_rpath " in
+ *" $dir "*) ;;
+ *" $absdir "*) ;;
+ *) temp_rpath="$temp_rpath $dir" ;;
+ esac
+ fi
+ fi
+ fi # $linkmode,$pass = prog,link...
+
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+
+ if test "$installed" = no; then
+ notinst_deplibs="$notinst_deplibs $lib"
+ need_relink=yes
+ fi
+
+ if test -n "$old_archive_from_expsyms_cmds"; then
+ # figure out the soname
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+ libname=`eval \\$echo \"$libname_spec\"`
+ # use dlname if we got it. it's perfectly good, no?
+ if test -n "$dlname"; then
+ soname="$dlname"
+ elif test -n "$soname_spec"; then
+ # bleh windows
+ case $host in
+ *cygwin*)
+ major=`expr $current - $age`
+ versuffix="-$major"
+ ;;
+ esac
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+
+ # Make a new name for the extract_expsyms_cmds to use
+ soroot="$soname"
+ soname=`echo $soroot | sed -e 's/^.*\///'`
+ newlib="libimp-`echo $soname | sed 's/^lib//;s/\.dll$//'`.a"
+
+ # If the library has no export list, then create one now
+ if test -f "$output_objdir/$soname-def"; then :
+ else
+ $show "extracting exported symbol list from \`$soname'"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ eval cmds=\"$extract_expsyms_cmds\"
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Create $newlib
+ if test -f "$output_objdir/$newlib"; then :; else
+ $show "generating import library for \`$soname'"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ eval cmds=\"$old_archive_from_expsyms_cmds\"
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+ # make sure the library variables are pointing to the new library
+ dir=$output_objdir
+ linklib=$newlib
+ fi # test -n $old_archive_from_expsyms_cmds
+
+ if test $linkmode = prog || test "$mode" != relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ lib_linked=yes
+ case $hardcode_action in
+ immediate | unsupported)
+ if test "$hardcode_direct" = no; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = no; then
+ case $host in
+ *-*-sunos*) add_shlibpath="$dir" ;;
+ esac
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = no; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ relink)
+ if test "$hardcode_direct" = yes; then
+ add="$dir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$dir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ add_shlibpath="$dir"
+ add="-l$name"
+ else
+ lib_linked=no
+ fi
+ ;;
+ *) lib_linked=no ;;
+ esac
+
+ if test "$lib_linked" != yes; then
+ $echo "$modename: configuration error: unsupported hardcode properties"
+ exit 1
+ fi
+
+ if test -n "$add_shlibpath"; then
+ case :$compile_shlibpath: in
+ *":$add_shlibpath:"*) ;;
+ *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;;
+ esac
+ fi
+ if test $linkmode = prog; then
+ test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs"
+ test -n "$add" && compile_deplibs="$add $compile_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ if test "$hardcode_direct" != yes && \
+ test "$hardcode_minus_L" != yes && \
+ test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ fi
+ fi
+ fi
+
+ if test $linkmode = prog || test "$mode" = relink; then
+ add_shlibpath=
+ add_dir=
+ add=
+ # Finalize command for both is simple: just hardcode it.
+ if test "$hardcode_direct" = yes; then
+ add="$libdir/$linklib"
+ elif test "$hardcode_minus_L" = yes; then
+ add_dir="-L$libdir"
+ add="-l$name"
+ elif test "$hardcode_shlibpath_var" = yes; then
+ case :$finalize_shlibpath: in
+ *":$libdir:"*) ;;
+ *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;;
+ esac
+ add="-l$name"
+ else
+ # We cannot seem to hardcode it, guess we'll fake it.
+ add_dir="-L$libdir"
+ add="-l$name"
+ fi
+
+ if test $linkmode = prog; then
+ test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs"
+ test -n "$add" && finalize_deplibs="$add $finalize_deplibs"
+ else
+ test -n "$add_dir" && deplibs="$add_dir $deplibs"
+ test -n "$add" && deplibs="$add $deplibs"
+ fi
+ fi
+ elif test $linkmode = prog; then
+ if test "$alldeplibs" = yes &&
+ { test "$deplibs_check_method" = pass_all ||
+ { test "$build_libtool_libs" = yes &&
+ test -n "$library_names"; }; }; then
+ # We only need to search for static libraries
+ continue
+ fi
+
+ # Try to link the static library
+ # Here we assume that one of hardcode_direct or hardcode_minus_L
+ # is not unsupported. This is valid on all known static and
+ # shared platforms.
+ if test "$hardcode_direct" != unsupported; then
+ test -n "$old_library" && linklib="$old_library"
+ compile_deplibs="$dir/$linklib $compile_deplibs"
+ finalize_deplibs="$dir/$linklib $finalize_deplibs"
+ else
+ compile_deplibs="-l$name -L$dir $compile_deplibs"
+ finalize_deplibs="-l$name -L$dir $finalize_deplibs"
+ fi
+ elif test "$build_libtool_libs" = yes; then
+ # Not a shared library
+ if test "$deplibs_check_method" != pass_all; then
+ # We're trying link a shared library against a static one
+ # but the system doesn't support it.
+
+ # Just print a warning and add the library to dependency_libs so
+ # that the program can be linked against the static library.
+ echo
+ echo "*** Warning: This library needs some functionality provided by $lib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ if test "$module" = yes; then
+ echo "*** Therefore, libtool will create a static module, that should work "
+ echo "*** as long as the dlopening application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ else
+ convenience="$convenience $dir/$old_library"
+ old_convenience="$old_convenience $dir/$old_library"
+ deplibs="$dir/$old_library $deplibs"
+ link_static=yes
+ fi
+ fi # link shared/static library?
+
+ if test $linkmode = lib; then
+ if test -n "$dependency_libs" &&
+ { test $hardcode_into_libs != yes || test $build_old_libs = yes ||
+ test $link_static = yes; }; then
+ # Extract -R from dependency_libs
+ temp_deplibs=
+ for libdir in $dependency_libs; do
+ case $libdir in
+ -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'`
+ case " $xrpath " in
+ *" $temp_xrpath "*) ;;
+ *) xrpath="$xrpath $temp_xrpath";;
+ esac;;
+ *) temp_deplibs="$temp_deplibs $libdir";;
+ esac
+ done
+ dependency_libs="$temp_deplibs"
+ fi
+
+ newlib_search_path="$newlib_search_path $absdir"
+ # Link against this library
+ test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs"
+ # ... and its dependency_libs
+ tmp_libs=
+ for deplib in $dependency_libs; do
+ newdependency_libs="$deplib $newdependency_libs"
+ case "$tmp_libs " in
+ *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;;
+ esac
+ tmp_libs="$tmp_libs $deplib"
+ done
+
+ if test $link_all_deplibs != no; then
+ # Add the search paths of all dependency libraries
+ for deplib in $dependency_libs; do
+ case $deplib in
+ -L*) path="$deplib" ;;
+ *.la)
+ dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$deplib" && dir="."
+ # We need an absolute path.
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;;
+ *)
+ absdir=`cd "$dir" && pwd`
+ if test -z "$absdir"; then
+ $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2
+ absdir="$dir"
+ fi
+ ;;
+ esac
+ if grep "^installed=no" $deplib > /dev/null; then
+ path="-L$absdir/$objdir"
+ else
+ eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ if test "$absdir" != "$libdir"; then
+ $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2
+ fi
+ path="-L$absdir"
+ fi
+ ;;
+ *) continue ;;
+ esac
+ case " $deplibs " in
+ *" $path "*) ;;
+ *) deplibs="$deplibs $path" ;;
+ esac
+ done
+ fi # link_all_deplibs != no
+ fi # linkmode = lib
+ done # for deplib in $libs
+ if test $pass = dlpreopen; then
+ # Link the dlpreopened libraries before other libraries
+ for deplib in $save_deplibs; do
+ deplibs="$deplib $deplibs"
+ done
+ fi
+ if test $pass != dlopen; then
+ test $pass != scan && dependency_libs="$newdependency_libs"
+ if test $pass != conv; then
+ # Make sure lib_search_path contains only unique directories.
+ lib_search_path=
+ for dir in $newlib_search_path; do
+ case "$lib_search_path " in
+ *" $dir "*) ;;
+ *) lib_search_path="$lib_search_path $dir" ;;
+ esac
+ done
+ newlib_search_path=
+ fi
+
+ if test "$linkmode,$pass" != "prog,link"; then
+ vars="deplibs"
+ else
+ vars="compile_deplibs finalize_deplibs"
+ fi
+ for var in $vars dependency_libs; do
+ # Add libraries to $var in reverse order
+ eval tmp_libs=\"\$$var\"
+ new_libs=
+ for deplib in $tmp_libs; do
+ case $deplib in
+ -L*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $specialdeplibs " in
+ *" $deplib "*) new_libs="$deplib $new_libs" ;;
+ *)
+ case " $new_libs " in
+ *" $deplib "*) ;;
+ *) new_libs="$deplib $new_libs" ;;
+ esac
+ ;;
+ esac
+ ;;
+ esac
+ done
+ tmp_libs=
+ for deplib in $new_libs; do
+ case $deplib in
+ -L*)
+ case " $tmp_libs " in
+ *" $deplib "*) ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ ;;
+ *) tmp_libs="$tmp_libs $deplib" ;;
+ esac
+ done
+ eval $var=\"$tmp_libs\"
+ done # for var
+ fi
+ if test "$pass" = "conv" &&
+ { test "$linkmode" = "lib" || test "$linkmode" = "prog"; }; then
+ libs="$deplibs" # reset libs
+ deplibs=
+ fi
+ done # for pass
+ if test $linkmode = prog; then
+ dlfiles="$newdlfiles"
+ dlprefiles="$newdlprefiles"
+ fi
+
+ case $linkmode in
+ oldlib)
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for archives" 1>&2
+ fi
+
+ if test -n "$export_symbols" || test -n "$export_symbols_regex"; then
+ $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2
+ fi
+
+ # Now set the variables for building old libraries.
+ build_libtool_libs=no
+ oldlibs="$output"
+ objs="$objs$old_deplibs"
+ ;;
+
+ lib)
+ # Make sure we only generate libraries of the form `libNAME.la'.
+ case $outputname in
+ lib*)
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'`
+ eval libname=\"$libname_spec\"
+ ;;
+ *)
+ if test "$module" = no; then
+ $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ if test "$need_lib_prefix" != no; then
+ # Add the "lib" prefix for modules if required
+ name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ eval libname=\"$libname_spec\"
+ else
+ libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'`
+ fi
+ ;;
+ esac
+
+ if test -n "$objs"; then
+ if test "$deplibs_check_method" != pass_all; then
+ $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1
+ exit 1
+ else
+ echo
+ echo "*** Warning: Linking the shared library $output against the non-libtool"
+ echo "*** objects $objs is not portable!"
+ libobjs="$libobjs $objs"
+ fi
+ fi
+
+ if test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2
+ fi
+
+ set dummy $rpath
+ if test $# -gt 2; then
+ $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2
+ fi
+ install_libdir="$2"
+
+ oldlibs=
+ if test -z "$rpath"; then
+ if test "$build_libtool_libs" = yes; then
+ # Building a libtool convenience library.
+ libext=al
+ oldlibs="$output_objdir/$libname.$libext $oldlibs"
+ build_libtool_libs=convenience
+ build_old_libs=yes
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for convenience libraries" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2
+ fi
+ else
+
+ # Parse the version information argument.
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS=':'
+ set dummy $vinfo 0 0 0
+ IFS="$save_ifs"
+
+ if test -n "$8"; then
+ $echo "$modename: too many parameters to \`-version-info'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ current="$2"
+ revision="$3"
+ age="$4"
+
+ # Check that each of the things are valid numbers.
+ case $current in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ *)
+ $echo "$modename: CURRENT \`$current' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case $revision in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ *)
+ $echo "$modename: REVISION \`$revision' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ case $age in
+ 0 | [1-9] | [1-9][0-9] | [1-9][0-9][0-9]) ;;
+ *)
+ $echo "$modename: AGE \`$age' is not a nonnegative integer" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test $age -gt $current; then
+ $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2
+ $echo "$modename: \`$vinfo' is not valid version information" 1>&2
+ exit 1
+ fi
+
+ # Calculate the version variables.
+ major=
+ versuffix=
+ verstring=
+ case $version_type in
+ none) ;;
+
+ darwin)
+ # Like Linux, but with the current version available in
+ # verstring for coding it into the library header
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ # Darwin ld doesn't like 0 for these options...
+ minor_current=`expr $current + 1`
+ verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ ;;
+
+ freebsd-aout)
+ major=".$current"
+ versuffix=".$current.$revision";
+ ;;
+
+ freebsd-elf)
+ major=".$current"
+ versuffix=".$current";
+ ;;
+
+ irix)
+ major=`expr $current - $age + 1`
+ verstring="sgi$major.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$revision
+ while test $loop != 0; do
+ iface=`expr $revision - $loop`
+ loop=`expr $loop - 1`
+ verstring="sgi$major.$iface:$verstring"
+ done
+
+ # Before this point, $major must not contain `.'.
+ major=.$major
+ versuffix="$major.$revision"
+ ;;
+
+ linux)
+ major=.`expr $current - $age`
+ versuffix="$major.$age.$revision"
+ ;;
+
+ osf)
+ major=`expr $current - $age`
+ versuffix=".$current.$age.$revision"
+ verstring="$current.$age.$revision"
+
+ # Add in all the interfaces that we are compatible with.
+ loop=$age
+ while test $loop != 0; do
+ iface=`expr $current - $loop`
+ loop=`expr $loop - 1`
+ verstring="$verstring:${iface}.0"
+ done
+
+ # Make executables depend on our current version.
+ verstring="$verstring:${current}.0"
+ ;;
+
+ sunos)
+ major=".$current"
+ versuffix=".$current.$revision"
+ ;;
+
+ windows)
+ # Use '-' rather than '.', since we only want one
+ # extension on DOS 8.3 filesystems.
+ major=`expr $current - $age`
+ versuffix="-$major"
+ ;;
+
+ *)
+ $echo "$modename: unknown library version type \`$version_type'" 1>&2
+ echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Clear the version info if we defaulted, and they specified a release.
+ if test -z "$vinfo" && test -n "$release"; then
+ major=
+ verstring="0.0"
+ case $version_type in
+ darwin)
+ # we can't check for "0.0" in archive_cmds due to quoting
+ # problems, so we reset it completely
+ verstring=""
+ ;;
+ *)
+ verstring="0.0"
+ ;;
+ esac
+ if test "$need_version" = no; then
+ versuffix=
+ else
+ versuffix=".0.0"
+ fi
+ fi
+
+ # Remove version info from name if versioning should be avoided
+ if test "$avoid_version" = yes && test "$need_version" = no; then
+ major=
+ versuffix=
+ verstring=""
+ fi
+
+ # Check to see if the archive will have undefined symbols.
+ if test "$allow_undefined" = yes; then
+ if test "$allow_undefined_flag" = unsupported; then
+ $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2
+ build_libtool_libs=no
+ build_old_libs=yes
+ fi
+ else
+ # Don't allow undefined symbols.
+ allow_undefined_flag="$no_undefined_flag"
+ fi
+ fi
+
+ if test "$mode" != relink; then
+ # Remove our outputs.
+ $show "${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*"
+ $run ${rm}r $output_objdir/$outputname $output_objdir/$libname.* $output_objdir/${libname}${release}.*
+ fi
+
+ # Now set the variables for building old libraries.
+ if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then
+ oldlibs="$oldlibs $output_objdir/$libname.$libext"
+
+ # Transform .lo files to .o files.
+ oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP`
+ fi
+
+ # Eliminate all temporary directories.
+ for path in $notinst_path; do
+ lib_search_path=`echo "$lib_search_path " | sed -e 's% $path % %g'`
+ deplibs=`echo "$deplibs " | sed -e 's% -L$path % %g'`
+ dependency_libs=`echo "$dependency_libs " | sed -e 's% -L$path % %g'`
+ done
+
+ if test -n "$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ temp_xrpath=
+ for libdir in $xrpath; do
+ temp_xrpath="$temp_xrpath -R$libdir"
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ if test $hardcode_into_libs != yes || test $build_old_libs = yes; then
+ dependency_libs="$temp_xrpath $dependency_libs"
+ fi
+ fi
+
+ # Make sure dlfiles contains only unique files that won't be dlpreopened
+ old_dlfiles="$dlfiles"
+ dlfiles=
+ for lib in $old_dlfiles; do
+ case " $dlprefiles $dlfiles " in
+ *" $lib "*) ;;
+ *) dlfiles="$dlfiles $lib" ;;
+ esac
+ done
+
+ # Make sure dlprefiles contains only unique files
+ old_dlprefiles="$dlprefiles"
+ dlprefiles=
+ for lib in $old_dlprefiles; do
+ case "$dlprefiles " in
+ *" $lib "*) ;;
+ *) dlprefiles="$dlprefiles $lib" ;;
+ esac
+ done
+
+ if test "$build_libtool_libs" = yes; then
+ if test -n "$rpath"; then
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*)
+ # these systems don't actually have a c library (as such)!
+ ;;
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # Rhapsody C library is in the System framework
+ deplibs="$deplibs -framework System"
+ ;;
+ *-*-netbsd*)
+ # Don't link with libc until the a.out ld.so is fixed.
+ ;;
+ *-*-openbsd*)
+ # Do not include libc due to us having libc/libc_r.
+ ;;
+ *)
+ # Add libc to deplibs on all other systems if necessary.
+ if test $build_libtool_need_lc = "yes"; then
+ deplibs="$deplibs -lc"
+ fi
+ ;;
+ esac
+ fi
+
+ # Transform deplibs into only deplibs that can be linked in shared.
+ name_save=$name
+ libname_save=$libname
+ release_save=$release
+ versuffix_save=$versuffix
+ major_save=$major
+ # I'm not sure if I'm treating the release correctly. I think
+ # release should show up in the -l (ie -lgmp5) so we don't want to
+ # add it in twice. Is that correct?
+ release=""
+ versuffix=""
+ major=""
+ newdeplibs=
+ droppeddeps=no
+ case $deplibs_check_method in
+ pass_all)
+ # Don't check for shared/static. Everything works.
+ # This might be a little naive. We might want to check
+ # whether the library exists or not. But this is on
+ # osf3 & osf4 and I'm not really sure... Just
+ # implementing what was already the behaviour.
+ newdeplibs=$deplibs
+ ;;
+ test_compile)
+ # This code stresses the "libraries are programs" paradigm to its
+ # limits. Maybe even breaks it. We compile a program, linking it
+ # against the deplibs as a proxy for the library. Then we can check
+ # whether they linked in statically or dynamically with ldd.
+ $rm conftest.c
+ cat > conftest.c <<EOF
+ int main() { return 0; }
+EOF
+ $rm conftest
+ $CC -o conftest conftest.c $deplibs
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" != "0"; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ else
+ # Error occured in the first compile. Let's try to salvage the situation:
+ # Compile a seperate program for each library.
+ for i in $deplibs; do
+ name="`expr $i : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" != "0"; then
+ $rm conftest
+ $CC -o conftest conftest.c $i
+ # Did it work?
+ if test $? -eq 0 ; then
+ ldd_output=`ldd conftest`
+ libname=`eval \\$echo \"$libname_spec\"`
+ deplib_matches=`eval \\$echo \"$library_names_spec\"`
+ set dummy $deplib_matches
+ deplib_match=$2
+ if test `expr "$ldd_output" : ".*$deplib_match"` -ne 0 ; then
+ newdeplibs="$newdeplibs $i"
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $i."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ droppeddeps=yes
+ echo
+ echo "*** Warning! Library $i is needed by this library but I was not able to"
+ echo "*** make it link in! You will probably need to install it or some"
+ echo "*** library that it depends on before this library will be fully"
+ echo "*** functional. Installing it before continuing would be even better."
+ fi
+ else
+ newdeplibs="$newdeplibs $i"
+ fi
+ done
+ fi
+ ;;
+ file_magic*)
+ set dummy $deplibs_check_method
+ file_magic_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" != "0"; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ # Follow soft links.
+ if ls -lLd "$potent_lib" 2>/dev/null \
+ | grep " -> " >/dev/null; then
+ continue
+ fi
+ # The statement above tries to avoid entering an
+ # endless loop below, in case of cyclic links.
+ # We might still enter an endless loop, since a link
+ # loop can be closed while we follow links,
+ # but so what?
+ potlib="$potent_lib"
+ while test -h "$potlib" 2>/dev/null; do
+ potliblink=`ls -ld $potlib | sed 's/.* -> //'`
+ case $potliblink in
+ [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";;
+ *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";;
+ esac
+ done
+ if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \
+ | sed 10q \
+ | egrep "$file_magic_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ match_pattern*)
+ set dummy $deplibs_check_method
+ match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"`
+ for a_deplib in $deplibs; do
+ name="`expr $a_deplib : '-l\(.*\)'`"
+ # If $name is empty we are operating on a -L argument.
+ if test -n "$name" && test "$name" != "0"; then
+ libname=`eval \\$echo \"$libname_spec\"`
+ for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do
+ potential_libs=`ls $i/$libname[.-]* 2>/dev/null`
+ for potent_lib in $potential_libs; do
+ if eval echo \"$potent_lib\" 2>/dev/null \
+ | sed 10q \
+ | egrep "$match_pattern_regex" > /dev/null; then
+ newdeplibs="$newdeplibs $a_deplib"
+ a_deplib=""
+ break 2
+ fi
+ done
+ done
+ if test -n "$a_deplib" ; then
+ droppeddeps=yes
+ echo
+ echo "*** Warning: This library needs some functionality provided by $a_deplib."
+ echo "*** I have the capability to make that library automatically link in when"
+ echo "*** you link to this library. But I can only do this if you have a"
+ echo "*** shared version of the library, which you do not appear to have."
+ fi
+ else
+ # Add a -L argument.
+ newdeplibs="$newdeplibs $a_deplib"
+ fi
+ done # Gone through all deplibs.
+ ;;
+ none | unknown | *)
+ newdeplibs=""
+ if $echo "X $deplibs" | $Xsed -e 's/ -lc$//' \
+ -e 's/ -[LR][^ ]*//g' -e 's/[ ]//g' |
+ grep . >/dev/null; then
+ echo
+ if test "X$deplibs_check_method" = "Xnone"; then
+ echo "*** Warning: inter-library dependencies are not supported in this platform."
+ else
+ echo "*** Warning: inter-library dependencies are not known to be supported."
+ fi
+ echo "*** All declared inter-library dependencies are being dropped."
+ droppeddeps=yes
+ fi
+ ;;
+ esac
+ versuffix=$versuffix_save
+ major=$major_save
+ release=$release_save
+ libname=$libname_save
+ name=$name_save
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ ;;
+ esac
+
+ if test "$droppeddeps" = yes; then
+ if test "$module" = yes; then
+ echo
+ echo "*** Warning: libtool could not satisfy all declared inter-library"
+ echo "*** dependencies of module $libname. Therefore, libtool will create"
+ echo "*** a static module, that should work as long as the dlopening"
+ echo "*** application is linked with the -dlopen flag."
+ if test -z "$global_symbol_pipe"; then
+ echo
+ echo "*** However, this would only work if libtool was able to extract symbol"
+ echo "*** lists from a program, using \`nm' or equivalent, but libtool could"
+ echo "*** not find such a program. So, this module is probably useless."
+ echo "*** \`nm' from GNU binutils and a full rebuild may help."
+ fi
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ else
+ echo "*** The inter-library dependencies that have been dropped here will be"
+ echo "*** automatically added whenever a program is linked with this library"
+ echo "*** or is declared to -dlopen it."
+
+ if test $allow_undefined = no; then
+ echo
+ echo "*** Since this library must not contain undefined symbols,"
+ echo "*** because either the platform does not support them or"
+ echo "*** it was explicitly requested with -no-undefined,"
+ echo "*** libtool will only create a static version of it."
+ if test "$build_old_libs" = no; then
+ oldlibs="$output_objdir/$libname.$libext"
+ build_libtool_libs=module
+ build_old_libs=yes
+ else
+ build_libtool_libs=no
+ fi
+ fi
+ fi
+ fi
+ # Done checking deplibs!
+ deplibs=$newdeplibs
+ fi
+
+ # All the library-specific variables (install_libdir is set above).
+ library_names=
+ old_library=
+ dlname=
+
+ # Test again, we may have decided not to build it any more
+ if test "$build_libtool_libs" = yes; then
+ if test $hardcode_into_libs = yes; then
+ # Hardcode the library paths
+ hardcode_libdirs=
+ dep_rpath=
+ rpath="$finalize_rpath"
+ test "$mode" != relink && rpath="$compile_rpath$rpath"
+ for libdir in $rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ dep_rpath="$dep_rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval dep_rpath=\"$hardcode_libdir_flag_spec\"
+ fi
+ if test -n "$runpath_var" && test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var"
+ fi
+ test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs"
+ fi
+
+ shlibpath="$finalize_shlibpath"
+ test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath"
+ if test -n "$shlibpath"; then
+ eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var"
+ fi
+
+ # Get the real and link names of the library.
+ eval library_names=\"$library_names_spec\"
+ set dummy $library_names
+ realname="$2"
+ shift; shift
+
+ if test -n "$soname_spec"; then
+ eval soname=\"$soname_spec\"
+ else
+ soname="$realname"
+ fi
+ test -z "$dlname" && dlname=$soname
+
+ lib="$output_objdir/$realname"
+ for link
+ do
+ linknames="$linknames $link"
+ done
+
+ # Ensure that we have .o objects for linkers which dislike .lo
+ # (e.g. aix) in case we are running --disable-static
+ for obj in $libobjs; do
+ xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$obj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$obj" | $Xsed -e 's%^.*/%%'`
+ oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ if test ! -f $xdir/$oldobj; then
+ $show "(cd $xdir && ${LN_S} $baseobj $oldobj)"
+ $run eval '(cd $xdir && ${LN_S} $baseobj $oldobj)' || exit $?
+ fi
+ done
+
+ # Use standard objects if they are pic
+ test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then
+ $show "generating symbol list for \`$libname.la'"
+ export_symbols="$output_objdir/$libname.exp"
+ $run $rm $export_symbols
+ eval cmds=\"$export_symbols_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ if test -n "$export_symbols_regex"; then
+ $show "egrep -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\""
+ $run eval 'egrep -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"'
+ $show "$mv \"${export_symbols}T\" \"$export_symbols\""
+ $run eval '$mv "${export_symbols}T" "$export_symbols"'
+ fi
+ fi
+ fi
+
+ if test -n "$export_symbols" && test -n "$include_expsyms"; then
+ $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"'
+ fi
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval libobjs=\"\$libobjs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ libobjs="$libobjs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
+ if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then
+ eval flag=\"$thread_safe_flag_spec\"
+ linker_flags="$linker_flags $flag"
+ fi
+
+ # Make a backup of the uninstalled library when relinking
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $?
+ fi
+
+ # Do each of the archive commands.
+ if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then
+ eval cmds=\"$archive_expsym_cmds\"
+ else
+ eval cmds=\"$archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Restore the uninstalled library and exit
+ if test "$mode" = relink; then
+ $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $?
+ exit 0
+ fi
+
+ # Create links to the real library.
+ for linkname in $linknames; do
+ if test "$realname" != "$linkname"; then
+ $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $?
+ fi
+ done
+
+ # If -module or -export-dynamic was specified, set the dlname.
+ if test "$module" = yes || test "$export_dynamic" = yes; then
+ # On all known operating systems, these are identical.
+ dlname="$soname"
+ fi
+ fi
+ ;;
+
+ obj)
+ if test -n "$deplibs"; then
+ $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2
+ fi
+
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$rpath"; then
+ $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$xrpath"; then
+ $echo "$modename: warning: \`-R' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for objects" 1>&2
+ fi
+
+ case $output in
+ *.lo)
+ if test -n "$objs$old_deplibs"; then
+ $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2
+ exit 1
+ fi
+ libobj="$output"
+ obj=`$echo "X$output" | $Xsed -e "$lo2o"`
+ ;;
+ *)
+ libobj=
+ obj="$output"
+ ;;
+ esac
+
+ # Delete the old objects.
+ $run $rm $obj $libobj
+
+ # Objects from convenience libraries. This assumes
+ # single-version convenience libraries. Whenever we create
+ # different ones for PIC/non-PIC, this we'll have to duplicate
+ # the extraction.
+ reload_conv_objs=
+ gentop=
+ # reload_cmds runs $LD directly, so let us get rid of
+ # -Wl from whole_archive_flag_spec
+ wl=
+
+ if test -n "$convenience"; then
+ if test -n "$whole_archive_flag_spec"; then
+ eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\"
+ else
+ gentop="$output_objdir/${obj}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ for xlib in $convenience; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ reload_conv_objs="$reload_objs "`find $xdir -name \*.o -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+ fi
+
+ # Create the old-style object.
+ reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test
+
+ output="$obj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+
+ # Exit if we aren't doing a library object file.
+ if test -z "$libobj"; then
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit 0
+ fi
+
+ if test "$build_libtool_libs" != yes; then
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ # Create an invalid libtool object if no PIC, so that we don't
+ # accidentally link it into a program.
+ $show "echo timestamp > $libobj"
+ $run eval "echo timestamp > $libobj" || exit $?
+ exit 0
+ fi
+
+ if test -n "$pic_flag" || test "$pic_mode" != default; then
+ # Only do commands if we really have different PIC objects.
+ reload_objs="$libobjs $reload_conv_objs"
+ output="$libobj"
+ eval cmds=\"$reload_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ else
+ # Just create a symlink.
+ $show $rm $libobj
+ $run $rm $libobj
+ xdir=`$echo "X$libobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$libobj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$libobj" | $Xsed -e 's%^.*/%%'`
+ oldobj=`$echo "X$baseobj" | $Xsed -e "$lo2o"`
+ $show "(cd $xdir && $LN_S $oldobj $baseobj)"
+ $run eval '(cd $xdir && $LN_S $oldobj $baseobj)' || exit $?
+ fi
+
+ if test -n "$gentop"; then
+ $show "${rm}r $gentop"
+ $run ${rm}r $gentop
+ fi
+
+ exit 0
+ ;;
+
+ prog)
+ case $host in
+ *cygwin*) output=`echo $output | sed -e 's,.exe$,,;s,$,.exe,'` ;;
+ esac
+ if test -n "$vinfo"; then
+ $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2
+ fi
+
+ if test -n "$release"; then
+ $echo "$modename: warning: \`-release' is ignored for programs" 1>&2
+ fi
+
+ if test "$preload" = yes; then
+ if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown &&
+ test "$dlopen_self_static" = unknown; then
+ $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support."
+ fi
+ fi
+
+ case $host in
+ *-*-rhapsody* | *-*-darwin1.[012])
+ # On Rhapsody replace the C library is the System framework
+ compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'`
+ ;;
+ esac
+
+ compile_command="$compile_command $compile_deplibs"
+ finalize_command="$finalize_command $finalize_deplibs"
+
+ if test -n "$rpath$xrpath"; then
+ # If the user specified any rpath flags, then add them.
+ for libdir in $rpath $xrpath; do
+ # This is the magic to use -rpath.
+ case "$finalize_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_rpath="$finalize_rpath $libdir" ;;
+ esac
+ done
+ fi
+
+ # Now hardcode the library paths
+ rpath=
+ hardcode_libdirs=
+ for libdir in $compile_rpath $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$perm_rpath " in
+ *" $libdir "*) ;;
+ *) perm_rpath="$perm_rpath $libdir" ;;
+ esac
+ fi
+ case $host in
+ *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
+ case :$dllsearchpath: in
+ *":$libdir:"*) ;;
+ *) dllsearchpath="$dllsearchpath:$libdir";;
+ esac
+ ;;
+ esac
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ compile_rpath="$rpath"
+
+ rpath=
+ hardcode_libdirs=
+ for libdir in $finalize_rpath; do
+ if test -n "$hardcode_libdir_flag_spec"; then
+ if test -n "$hardcode_libdir_separator"; then
+ if test -z "$hardcode_libdirs"; then
+ hardcode_libdirs="$libdir"
+ else
+ # Just accumulate the unique libdirs.
+ case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in
+ *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*)
+ ;;
+ *)
+ hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir"
+ ;;
+ esac
+ fi
+ else
+ eval flag=\"$hardcode_libdir_flag_spec\"
+ rpath="$rpath $flag"
+ fi
+ elif test -n "$runpath_var"; then
+ case "$finalize_perm_rpath " in
+ *" $libdir "*) ;;
+ *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;;
+ esac
+ fi
+ done
+ # Substitute the hardcoded libdirs into the rpath.
+ if test -n "$hardcode_libdir_separator" &&
+ test -n "$hardcode_libdirs"; then
+ libdir="$hardcode_libdirs"
+ eval rpath=\" $hardcode_libdir_flag_spec\"
+ fi
+ finalize_rpath="$rpath"
+
+ if test -n "$libobjs" && test "$build_old_libs" = yes; then
+ # Transform all the library objects into standard objects.
+ compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ fi
+
+ dlsyms=
+ if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then
+ if test -n "$NM" && test -n "$global_symbol_pipe"; then
+ dlsyms="${outputname}S.c"
+ else
+ $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2
+ fi
+ fi
+
+ if test -n "$dlsyms"; then
+ case $dlsyms in
+ "") ;;
+ *.c)
+ # Discover the nlist of each of the dlfiles.
+ nlist="$output_objdir/${outputname}.nm"
+
+ $show "$rm $nlist ${nlist}S ${nlist}T"
+ $run $rm "$nlist" "${nlist}S" "${nlist}T"
+
+ # Parse the name list into a source file.
+ $show "creating $output_objdir/$dlsyms"
+
+ test -z "$run" && $echo > "$output_objdir/$dlsyms" "\
+/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */
+/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */
+
+#ifdef __cplusplus
+extern \"C\" {
+#endif
+
+/* Prevent the only kind of declaration conflicts we can make. */
+#define lt_preloaded_symbols some_other_symbol
+
+/* External symbol declarations for the compiler. */\
+"
+
+ if test "$dlself" = yes; then
+ $show "generating symbol list for \`$output'"
+
+ test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist"
+
+ # Add our own program objects to the symbol list.
+ progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP`
+ for arg in $progfiles; do
+ $show "extracting global C symbols from \`$arg'"
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -n "$exclude_expsyms"; then
+ $run eval 'egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ if test -n "$export_symbols_regex"; then
+ $run eval 'egrep -e "$export_symbols_regex" "$nlist" > "$nlist"T'
+ $run eval '$mv "$nlist"T "$nlist"'
+ fi
+
+ # Prepare the list of exported symbols
+ if test -z "$export_symbols"; then
+ export_symbols="$output_objdir/$output.exp"
+ $run $rm $export_symbols
+ $run eval "sed -n -e '/^: @PROGRAM@$/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"'
+ else
+ $run eval "sed -e 's/\([][.*^$]\)/\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$output.exp"'
+ $run eval 'grep -f "$output_objdir/$output.exp" < "$nlist" > "$nlist"T'
+ $run eval 'mv "$nlist"T "$nlist"'
+ fi
+ fi
+
+ for arg in $dlprefiles; do
+ $show "extracting global C symbols from \`$arg'"
+ name=`echo "$arg" | sed -e 's%^.*/%%'`
+ $run eval 'echo ": $name " >> "$nlist"'
+ $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'"
+ done
+
+ if test -z "$run"; then
+ # Make sure we have at least an empty file.
+ test -f "$nlist" || : > "$nlist"
+
+ if test -n "$exclude_expsyms"; then
+ egrep -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T
+ $mv "$nlist"T "$nlist"
+ fi
+
+ # Try sorting and uniquifying the output.
+ if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+ :
+ else
+ grep -v "^: " < "$nlist" > "$nlist"S
+ fi
+
+ if test -f "$nlist"S; then
+ eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"'
+ else
+ echo '/* NONE */' >> "$output_objdir/$dlsyms"
+ fi
+
+ $echo >> "$output_objdir/$dlsyms" "\
+
+#undef lt_preloaded_symbols
+
+#if defined (__STDC__) && __STDC__
+# define lt_ptr void *
+#else
+# define lt_ptr char *
+# define const
+#endif
+
+/* The mapping between symbol names and symbols. */
+const struct {
+ const char *name;
+ lt_ptr address;
+}
+lt_preloaded_symbols[] =
+{\
+"
+
+ eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms"
+
+ $echo >> "$output_objdir/$dlsyms" "\
+ {0, (lt_ptr) 0}
+};
+
+/* This works around a problem in FreeBSD linker */
+#ifdef FREEBSD_WORKAROUND
+static const void *lt_preloaded_setup() {
+ return lt_preloaded_symbols;
+}
+#endif
+
+#ifdef __cplusplus
+}
+#endif\
+"
+ fi
+
+ pic_flag_for_symtable=
+ case $host in
+ # compiling the symbol table file with pic_flag works around
+ # a FreeBSD bug that causes programs to crash when -lm is
+ # linked before any other PIC object. But we must not use
+ # pic_flag when linking with -static. The problem exists in
+ # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1.
+ *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC -DFREEBSD_WORKAROUND";;
+ esac;;
+ *-*-hpux*)
+ case "$compile_command " in
+ *" -static "*) ;;
+ *) pic_flag_for_symtable=" $pic_flag -DPIC";;
+ esac
+ esac
+
+ # Now compile the dynamic symbol file.
+ $show "(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")"
+ $run eval '(cd $output_objdir && $CC -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $?
+
+ # Clean up the generated files.
+ $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T"
+ $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T"
+
+ # Transform the symbol file into the correct name.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"`
+ ;;
+ *)
+ $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2
+ exit 1
+ ;;
+ esac
+ else
+ # We keep going just in case the user didn't refer to
+ # lt_preloaded_symbols. The linker will fail if global_symbol_pipe
+ # really was required.
+
+ # Nullify the symbol file.
+ compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"`
+ finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"`
+ fi
+
+ if test $need_relink = no || test "$build_libtool_libs" != yes; then
+ # Replace the output file specification.
+ compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ link_command="$compile_command$compile_rpath"
+
+ # We have no uninstalled library dependencies, so finalize right now.
+ $show "$link_command"
+ $run eval "$link_command"
+ status=$?
+
+ # Delete the generated files.
+ if test -n "$dlsyms"; then
+ $show "$rm $output_objdir/${outputname}S.${objext}"
+ $run $rm "$output_objdir/${outputname}S.${objext}"
+ fi
+
+ exit $status
+ fi
+
+ if test -n "$shlibpath_var"; then
+ # We should set the shlibpath_var
+ rpath=
+ for dir in $temp_rpath; do
+ case $dir in
+ [\\/]* | [A-Za-z]:[\\/]*)
+ # Absolute path.
+ rpath="$rpath$dir:"
+ ;;
+ *)
+ # Relative path: add a thisdir entry.
+ rpath="$rpath\$thisdir/$dir:"
+ ;;
+ esac
+ done
+ temp_rpath="$rpath"
+ fi
+
+ if test -n "$compile_shlibpath$finalize_shlibpath"; then
+ compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command"
+ fi
+ if test -n "$finalize_shlibpath"; then
+ finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command"
+ fi
+
+ compile_var=
+ finalize_var=
+ if test -n "$runpath_var"; then
+ if test -n "$perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ compile_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ if test -n "$finalize_perm_rpath"; then
+ # We should set the runpath_var.
+ rpath=
+ for dir in $finalize_perm_rpath; do
+ rpath="$rpath$dir:"
+ done
+ finalize_var="$runpath_var=\"$rpath\$$runpath_var\" "
+ fi
+ fi
+
+ if test "$no_install" = yes; then
+ # We don't need to create a wrapper script.
+ link_command="$compile_var$compile_command$compile_rpath"
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'`
+ # Delete the old output file.
+ $run $rm $output
+ # Link the executable and exit
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
+ exit 0
+ fi
+
+ if test "$hardcode_action" = relink; then
+ # Fast installation is not supported
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+
+ $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2
+ $echo "$modename: \`$output' will be relinked during installation" 1>&2
+ else
+ if test "$fast_install" != no; then
+ link_command="$finalize_var$compile_command$finalize_rpath"
+ if test "$fast_install" = yes; then
+ relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'`
+ else
+ # fast_install is set to needless
+ relink_command=
+ fi
+ else
+ link_command="$compile_var$compile_command$compile_rpath"
+ relink_command="$finalize_var$finalize_command$finalize_rpath"
+ fi
+ fi
+
+ # Replace the output file specification.
+ link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'`
+
+ # Delete the old output files.
+ $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname
+
+ $show "$link_command"
+ $run eval "$link_command" || exit $?
+
+ # Now create the wrapper script.
+ $show "creating $output"
+
+ # Quote the relink command for shipping.
+ if test -n "$relink_command"; then
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ fi
+ done
+ relink_command="cd `pwd`; $relink_command"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Quote $echo for shipping.
+ if test "X$echo" = "X$SHELL $0 --fallback-echo"; then
+ case $0 in
+ [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $0 --fallback-echo";;
+ *) qecho="$SHELL `pwd`/$0 --fallback-echo";;
+ esac
+ qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"`
+ else
+ qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"`
+ fi
+
+ # Only actually do things if our run command is non-null.
+ if test -z "$run"; then
+ # win32 will think the script is a binary if it has
+ # a .exe suffix, so we strip it off here.
+ case $output in
+ *.exe) output=`echo $output|sed 's,.exe$,,'` ;;
+ esac
+ # test for cygwin because mv fails w/o .exe extensions
+ case $host in
+ *cygwin*) exeext=.exe ;;
+ *) exeext= ;;
+ esac
+ $rm $output
+ trap "$rm $output; exit 1" 1 2 15
+
+ $echo > $output "\
+#! $SHELL
+
+# $output - temporary wrapper script for $objdir/$outputname
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# The $output program cannot be directly executed until all the libtool
+# libraries that it depends on are installed.
+#
+# This wrapper script should never be moved out of the build directory.
+# If it is, it will not operate correctly.
+
+# Sed substitution that helps us do robust quoting. It backslashifies
+# metacharacters that are still active within double-quoted strings.
+Xsed='sed -e 1s/^X//'
+sed_quote_subst='$sed_quote_subst'
+
+# The HP-UX ksh and POSIX shell print the target directory to stdout
+# if CDPATH is set.
+if test \"\${CDPATH+set}\" = set; then CDPATH=:; export CDPATH; fi
+
+relink_command=\"$relink_command\"
+
+# This environment variable determines our operation mode.
+if test \"\$libtool_install_magic\" = \"$magic\"; then
+ # install mode needs the following variable:
+ notinst_deplibs='$notinst_deplibs'
+else
+ # When we are sourced in execute mode, \$file and \$echo are already set.
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ echo=\"$qecho\"
+ file=\"\$0\"
+ # Make sure echo works.
+ if test \"X\$1\" = X--no-reexec; then
+ # Discard the --no-reexec flag, and continue.
+ shift
+ elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then
+ # Yippee, \$echo works!
+ :
+ else
+ # Restart under the correct shell, and then maybe \$echo will work.
+ exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"}
+ fi
+ fi\
+"
+ $echo >> $output "\
+
+ # Find the directory that this script lives in.
+ thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\`
+ test \"x\$thisdir\" = \"x\$file\" && thisdir=.
+
+ # Follow symbolic links until we get to the real thisdir.
+ file=\`ls -ld \"\$file\" | sed -n 's/.*-> //p'\`
+ while test -n \"\$file\"; do
+ destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\`
+
+ # If there was a directory component, then change thisdir.
+ if test \"x\$destdir\" != \"x\$file\"; then
+ case \"\$destdir\" in
+ [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;;
+ *) thisdir=\"\$thisdir/\$destdir\" ;;
+ esac
+ fi
+
+ file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\`
+ file=\`ls -ld \"\$thisdir/\$file\" | sed -n 's/.*-> //p'\`
+ done
+
+ # Try to get the absolute directory name.
+ absdir=\`cd \"\$thisdir\" && pwd\`
+ test -n \"\$absdir\" && thisdir=\"\$absdir\"
+"
+
+ if test "$fast_install" = yes; then
+ echo >> $output "\
+ program=lt-'$outputname'$exeext
+ progdir=\"\$thisdir/$objdir\"
+
+ if test ! -f \"\$progdir/\$program\" || \\
+ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | sed 1q\`; \\
+ test \"X\$file\" != \"X\$progdir/\$program\"; }; then
+
+ file=\"\$\$-\$program\"
+
+ if test ! -d \"\$progdir\"; then
+ $mkdir \"\$progdir\"
+ else
+ $rm \"\$progdir/\$file\"
+ fi"
+
+ echo >> $output "\
+
+ # relink executable if necessary
+ if test -n \"\$relink_command\"; then
+ if relink_command_output=\`eval \$relink_command 2>&1\`; then :
+ else
+ $echo \"\$relink_command_output\" >&2
+ $rm \"\$progdir/\$file\"
+ exit 1
+ fi
+ fi
+
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null ||
+ { $rm \"\$progdir/\$program\";
+ $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; }
+ $rm \"\$progdir/\$file\"
+ fi"
+ else
+ echo >> $output "\
+ program='$outputname'
+ progdir=\"\$thisdir/$objdir\"
+"
+ fi
+
+ echo >> $output "\
+
+ if test -f \"\$progdir/\$program\"; then"
+
+ # Export our shlibpath_var if we have one.
+ if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then
+ $echo >> $output "\
+ # Add our own library path to $shlibpath_var
+ $shlibpath_var=\"$temp_rpath\$$shlibpath_var\"
+
+ # Some systems cannot cope with colon-terminated $shlibpath_var
+ # The second colon is a workaround for a bug in BeOS R4 sed
+ $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\`
+
+ export $shlibpath_var
+"
+ fi
+
+ # fixup the dll searchpath if we need to.
+ if test -n "$dllsearchpath"; then
+ $echo >> $output "\
+ # Add the dll search path components to the executable PATH
+ PATH=$dllsearchpath:\$PATH
+"
+ fi
+
+ $echo >> $output "\
+ if test \"\$libtool_execute_magic\" != \"$magic\"; then
+ # Run the actual program with our arguments.
+"
+ case $host in
+ # win32 systems need to use the prog path for dll
+ # lookup to work
+ *-*-cygwin* | *-*-pw32*)
+ $echo >> $output "\
+ exec \$progdir/\$program \${1+\"\$@\"}
+"
+ ;;
+
+ # Backslashes separate directories on plain windows
+ *-*-mingw | *-*-os2*)
+ $echo >> $output "\
+ exec \$progdir\\\\\$program \${1+\"\$@\"}
+"
+ ;;
+
+ *)
+ $echo >> $output "\
+ # Export the path to the program.
+ PATH=\"\$progdir:\$PATH\"
+ export PATH
+
+ exec \$program \${1+\"\$@\"}
+"
+ ;;
+ esac
+ $echo >> $output "\
+ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\"
+ exit 1
+ fi
+ else
+ # The program doesn't exist.
+ \$echo \"\$0: error: \$progdir/\$program does not exist\" 1>&2
+ \$echo \"This script is just a wrapper for \$program.\" 1>&2
+ echo \"See the $PACKAGE documentation for more information.\" 1>&2
+ exit 1
+ fi
+fi\
+"
+ chmod +x $output
+ fi
+ exit 0
+ ;;
+ esac
+
+ # See if we need to build an old-fashioned archive.
+ for oldlib in $oldlibs; do
+
+ if test "$build_libtool_libs" = convenience; then
+ oldobjs="$libobjs_save"
+ addlibs="$convenience"
+ build_libtool_libs=no
+ else
+ if test "$build_libtool_libs" = module; then
+ oldobjs="$libobjs_save"
+ build_libtool_libs=no
+ else
+ oldobjs="$objs$old_deplibs "`$echo "X$libobjs_save" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`
+ fi
+ addlibs="$old_convenience"
+ fi
+
+ if test -n "$addlibs"; then
+ gentop="$output_objdir/${outputname}x"
+ $show "${rm}r $gentop"
+ $run ${rm}r "$gentop"
+ $show "mkdir $gentop"
+ $run mkdir "$gentop"
+ status=$?
+ if test $status -ne 0 && test ! -d "$gentop"; then
+ exit $status
+ fi
+ generated="$generated $gentop"
+
+ # Add in members from convenience archives.
+ for xlib in $addlibs; do
+ # Extract the objects.
+ case $xlib in
+ [\\/]* | [A-Za-z]:[\\/]*) xabs="$xlib" ;;
+ *) xabs=`pwd`"/$xlib" ;;
+ esac
+ xlib=`$echo "X$xlib" | $Xsed -e 's%^.*/%%'`
+ xdir="$gentop/$xlib"
+
+ $show "${rm}r $xdir"
+ $run ${rm}r "$xdir"
+ $show "mkdir $xdir"
+ $run mkdir "$xdir"
+ status=$?
+ if test $status -ne 0 && test ! -d "$xdir"; then
+ exit $status
+ fi
+ $show "(cd $xdir && $AR x $xabs)"
+ $run eval "(cd \$xdir && $AR x \$xabs)" || exit $?
+
+ oldobjs="$oldobjs "`find $xdir -name \*.${objext} -print -o -name \*.lo -print | $NL2SP`
+ done
+ fi
+
+ # Do each command in the archive commands.
+ if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then
+ eval cmds=\"$old_archive_from_new_cmds\"
+ else
+ # Ensure that we have .o objects in place in case we decided
+ # not to build a shared library, and have fallen back to building
+ # static libs even though --disable-static was passed!
+ for oldobj in $oldobjs; do
+ if test ! -f $oldobj; then
+ xdir=`$echo "X$oldobj" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$xdir" = "X$oldobj"; then
+ xdir="."
+ else
+ xdir="$xdir"
+ fi
+ baseobj=`$echo "X$oldobj" | $Xsed -e 's%^.*/%%'`
+ obj=`$echo "X$baseobj" | $Xsed -e "$o2lo"`
+ $show "(cd $xdir && ${LN_S} $obj $baseobj)"
+ $run eval '(cd $xdir && ${LN_S} $obj $baseobj)' || exit $?
+ fi
+ done
+
+ eval cmds=\"$old_archive_cmds\"
+ fi
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$generated"; then
+ $show "${rm}r$generated"
+ $run ${rm}r$generated
+ fi
+
+ # Now create the libtool archive.
+ case $output in
+ *.la)
+ old_library=
+ test "$build_old_libs" = yes && old_library="$libname.$libext"
+ $show "creating $output"
+
+ # Preserve any variables that may affect compiler behavior
+ for var in $variables_saved_for_relink; do
+ if eval test -z \"\${$var+set}\"; then
+ relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command"
+ elif eval var_value=\$$var; test -z "$var_value"; then
+ relink_command="$var=; export $var; $relink_command"
+ else
+ var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"`
+ relink_command="$var=\"$var_value\"; export $var; $relink_command"
+ fi
+ done
+ # Quote the link command for shipping.
+ relink_command="cd `pwd`; $SHELL $0 --mode=relink $libtool_args"
+ relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"`
+
+ # Only create the output if not a dry run.
+ if test -z "$run"; then
+ for installed in no yes; do
+ if test "$installed" = yes; then
+ if test -z "$install_libdir"; then
+ break
+ fi
+ output="$output_objdir/$outputname"i
+ # Replace all uninstalled libtool libraries with the installed ones
+ newdependency_libs=
+ for deplib in $dependency_libs; do
+ case $deplib in
+ *.la)
+ name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $deplib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdependency_libs="$newdependency_libs $libdir/$name"
+ ;;
+ *) newdependency_libs="$newdependency_libs $deplib" ;;
+ esac
+ done
+ dependency_libs="$newdependency_libs"
+ newdlfiles=
+ for lib in $dlfiles; do
+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdlfiles="$newdlfiles $libdir/$name"
+ done
+ dlfiles="$newdlfiles"
+ newdlprefiles=
+ for lib in $dlprefiles; do
+ name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'`
+ eval libdir=`sed -n -e 's/^libdir=\(.*\)$/\1/p' $lib`
+ if test -z "$libdir"; then
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ exit 1
+ fi
+ newdlprefiles="$newdlprefiles $libdir/$name"
+ done
+ dlprefiles="$newdlprefiles"
+ fi
+ $rm $output
+ # place dlname in correct position for cygwin
+ tdlname=$dlname
+ case $host,$output,$installed,$module,$dlname in
+ *cygwin*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;;
+ esac
+ $echo > $output "\
+# $outputname - a libtool library file
+# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP
+#
+# Please DO NOT delete this file!
+# It is necessary for linking the library.
+
+# The name that we can dlopen(3).
+dlname='$tdlname'
+
+# Names of this library.
+library_names='$library_names'
+
+# The name of the static archive.
+old_library='$old_library'
+
+# Libraries that this one depends upon.
+dependency_libs='$dependency_libs'
+
+# Version information for $libname.
+current=$current
+age=$age
+revision=$revision
+
+# Is this an already installed library?
+installed=$installed
+
+# Files to dlopen/dlpreopen
+dlopen='$dlfiles'
+dlpreopen='$dlprefiles'
+
+# Directory that this library needs to be installed in:
+libdir='$install_libdir'"
+ if test "$installed" = no && test $need_relink = yes; then
+ $echo >> $output "\
+relink_command=\"$relink_command\""
+ fi
+ done
+ fi
+
+ # Do a symbolic link so that the libtool archive can be found in
+ # LD_LIBRARY_PATH before the program is installed.
+ $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)"
+ $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
+ ;;
+ esac
+ exit 0
+ ;;
+
+ # libtool install mode
+ install)
+ modename="$modename: install"
+
+ # There may be an optional sh(1) argument at the beginning of
+ # install_prog (especially on Windows NT).
+ if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
+ # Allow the use of GNU shtool's install command.
+ $echo "X$nonopt" | $Xsed | grep shtool > /dev/null; then
+ # Aesthetically quote it.
+ arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$arg "
+ arg="$1"
+ shift
+ else
+ install_prog=
+ arg="$nonopt"
+ fi
+
+ # The real first argument should be the name of the installation program.
+ # Aesthetically quote it.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog$arg"
+
+ # We need to accept at least all the BSD install flags.
+ dest=
+ files=
+ opts=
+ prev=
+ install_type=
+ isdir=no
+ stripme=
+ for arg
+ do
+ if test -n "$dest"; then
+ files="$files $dest"
+ dest="$arg"
+ continue
+ fi
+
+ case $arg in
+ -d) isdir=yes ;;
+ -f) prev="-f" ;;
+ -g) prev="-g" ;;
+ -m) prev="-m" ;;
+ -o) prev="-o" ;;
+ -s)
+ stripme=" -s"
+ continue
+ ;;
+ -*) ;;
+
+ *)
+ # If the previous option needed an argument, then skip it.
+ if test -n "$prev"; then
+ prev=
+ else
+ dest="$arg"
+ continue
+ fi
+ ;;
+ esac
+
+ # Aesthetically quote the argument.
+ arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`
+ case $arg in
+ *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*)
+ arg="\"$arg\""
+ ;;
+ esac
+ install_prog="$install_prog $arg"
+ done
+
+ if test -z "$install_prog"; then
+ $echo "$modename: you must specify an install program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -n "$prev"; then
+ $echo "$modename: the \`$prev' option requires an argument" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ if test -z "$files"; then
+ if test -z "$dest"; then
+ $echo "$modename: no file or destination specified" 1>&2
+ else
+ $echo "$modename: you must specify a destination" 1>&2
+ fi
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Strip any trailing slash from the destination.
+ dest=`$echo "X$dest" | $Xsed -e 's%/$%%'`
+
+ # Check to see that the destination is a directory.
+ test -d "$dest" && isdir=yes
+ if test "$isdir" = yes; then
+ destdir="$dest"
+ destname=
+ else
+ destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$destdir" = "X$dest" && destdir=.
+ destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'`
+
+ # Not a directory, so check to see that there is only one file specified.
+ set dummy $files
+ if test $# -gt 2; then
+ $echo "$modename: \`$dest' is not a directory" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+ fi
+ case $destdir in
+ [\\/]* | [A-Za-z]:[\\/]*) ;;
+ *)
+ for file in $files; do
+ case $file in
+ *.lo) ;;
+ *)
+ $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+ done
+ ;;
+ esac
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ staticlibs=
+ future_libdirs=
+ current_libdirs=
+ for file in $files; do
+
+ # Do each installation.
+ case $file in
+ *.$libext)
+ # Do the static libraries later.
+ staticlibs="$staticlibs $file"
+ ;;
+
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$file' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ library_names=
+ old_library=
+ relink_command=
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Add the libdir to current_libdirs if it is the destination.
+ if test "X$destdir" = "X$libdir"; then
+ case "$current_libdirs " in
+ *" $libdir "*) ;;
+ *) current_libdirs="$current_libdirs $libdir" ;;
+ esac
+ else
+ # Note the libdir as a future libdir.
+ case "$future_libdirs " in
+ *" $libdir "*) ;;
+ *) future_libdirs="$future_libdirs $libdir" ;;
+ esac
+ fi
+
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/
+ test "X$dir" = "X$file/" && dir=
+ dir="$dir$objdir"
+
+ if test -n "$relink_command"; then
+ $echo "$modename: warning: relinking \`$file'" 1>&2
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ continue
+ fi
+ fi
+
+ # See the names of the shared library.
+ set dummy $library_names
+ if test -n "$2"; then
+ realname="$2"
+ shift
+ shift
+
+ srcname="$realname"
+ test -n "$relink_command" && srcname="$realname"T
+
+ # Install the shared library and build the symlinks.
+ $show "$install_prog $dir/$srcname $destdir/$realname"
+ $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $?
+ if test -n "$stripme" && test -n "$striplib"; then
+ $show "$striplib $destdir/$realname"
+ $run eval "$striplib $destdir/$realname" || exit $?
+ fi
+
+ if test $# -gt 0; then
+ # Delete the old symlinks, and create new ones.
+ for linkname
+ do
+ if test "$linkname" != "$realname"; then
+ $show "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ $run eval "(cd $destdir && $rm $linkname && $LN_S $realname $linkname)"
+ fi
+ done
+ fi
+
+ # Do each command in the postinstall commands.
+ lib="$destdir/$realname"
+ eval cmds=\"$postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ fi
+
+ # Install the pseudo-library for information purposes.
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ instname="$dir/$name"i
+ $show "$install_prog $instname $destdir/$name"
+ $run eval "$install_prog $instname $destdir/$name" || exit $?
+
+ # Maybe install the static library, too.
+ test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library"
+ ;;
+
+ *.lo)
+ # Install (i.e. copy) a libtool object.
+
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Deduce the name of the destination old-style object file.
+ case $destfile in
+ *.lo)
+ staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"`
+ ;;
+ *.$objext)
+ staticdest="$destfile"
+ destfile=
+ ;;
+ *)
+ $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ # Install the libtool object if requested.
+ if test -n "$destfile"; then
+ $show "$install_prog $file $destfile"
+ $run eval "$install_prog $file $destfile" || exit $?
+ fi
+
+ # Install the old object if enabled.
+ if test "$build_old_libs" = yes; then
+ # Deduce the name of the old-style object file.
+ staticobj=`$echo "X$file" | $Xsed -e "$lo2o"`
+
+ $show "$install_prog $staticobj $staticdest"
+ $run eval "$install_prog \$staticobj \$staticdest" || exit $?
+ fi
+ exit 0
+ ;;
+
+ *)
+ # Figure out destination file name, if it wasn't already specified.
+ if test -n "$destname"; then
+ destfile="$destdir/$destname"
+ else
+ destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ destfile="$destdir/$destfile"
+ fi
+
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ notinst_deplibs=
+ relink_command=
+
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Check the variables that should have been set.
+ if test -z "$notinst_deplibs"; then
+ $echo "$modename: invalid libtool wrapper script \`$file'" 1>&2
+ exit 1
+ fi
+
+ finalize=yes
+ for lib in $notinst_deplibs; do
+ # Check to see that each library is installed.
+ libdir=
+ if test -f "$lib"; then
+ # If there is no directory component, then add one.
+ case $lib in
+ */* | *\\*) . $lib ;;
+ *) . ./$lib ;;
+ esac
+ fi
+ libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test
+ if test -n "$libdir" && test ! -f "$libfile"; then
+ $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2
+ finalize=no
+ fi
+ done
+
+ relink_command=
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ outputname=
+ if test "$fast_install" = no && test -n "$relink_command"; then
+ if test "$finalize" = yes && test -z "$run"; then
+ tmpdir="/tmp"
+ test -n "$TMPDIR" && tmpdir="$TMPDIR"
+ tmpdir="$tmpdir/libtool-$$"
+ if $mkdir -p "$tmpdir" && chmod 700 "$tmpdir"; then :
+ else
+ $echo "$modename: error: cannot create temporary directory \`$tmpdir'" 1>&2
+ continue
+ fi
+ file=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ outputname="$tmpdir/$file"
+ # Replace the output file specification.
+ relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'`
+
+ $show "$relink_command"
+ if $run eval "$relink_command"; then :
+ else
+ $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2
+ ${rm}r "$tmpdir"
+ continue
+ fi
+ file="$outputname"
+ else
+ $echo "$modename: warning: cannot relink \`$file'" 1>&2
+ fi
+ else
+ # Install the binary that we compiled earlier.
+ file=`$echo "X$file" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"`
+ fi
+ fi
+
+ # remove .exe since cygwin /usr/bin/install will append another
+ # one anyways
+ case $install_prog,$host in
+ /usr/bin/install*,*cygwin*)
+ case $file:$destfile in
+ *.exe:*.exe)
+ # this is ok
+ ;;
+ *.exe:*)
+ destfile=$destfile.exe
+ ;;
+ *:*.exe)
+ destfile=`echo $destfile | sed -e 's,.exe$,,'`
+ ;;
+ esac
+ ;;
+ esac
+ $show "$install_prog$stripme $file $destfile"
+ $run eval "$install_prog\$stripme \$file \$destfile" || exit $?
+ test -n "$outputname" && ${rm}r "$tmpdir"
+ ;;
+ esac
+ done
+
+ for file in $staticlibs; do
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+
+ # Set up the ranlib parameters.
+ oldlib="$destdir/$name"
+
+ $show "$install_prog $file $oldlib"
+ $run eval "$install_prog \$file \$oldlib" || exit $?
+
+ if test -n "$stripme" && test -n "$striplib"; then
+ $show "$old_striplib $oldlib"
+ $run eval "$old_striplib $oldlib" || exit $?
+ fi
+
+ # Do each command in the postinstall commands.
+ eval cmds=\"$old_postinstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || exit $?
+ done
+ IFS="$save_ifs"
+ done
+
+ if test -n "$future_libdirs"; then
+ $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2
+ fi
+
+ if test -n "$current_libdirs"; then
+ # Maybe just do a dry run.
+ test -n "$run" && current_libdirs=" -n$current_libdirs"
+ exec_cmd='$SHELL $0 --finish$current_libdirs'
+ else
+ exit 0
+ fi
+ ;;
+
+ # libtool finish mode
+ finish)
+ modename="$modename: finish"
+ libdirs="$nonopt"
+ admincmds=
+
+ if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then
+ for dir
+ do
+ libdirs="$libdirs $dir"
+ done
+
+ for libdir in $libdirs; do
+ if test -n "$finish_cmds"; then
+ # Do each command in the finish commands.
+ eval cmds=\"$finish_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd" || admincmds="$admincmds
+ $cmd"
+ done
+ IFS="$save_ifs"
+ fi
+ if test -n "$finish_eval"; then
+ # Do the single finish_eval.
+ eval cmds=\"$finish_eval\"
+ $run eval "$cmds" || admincmds="$admincmds
+ $cmds"
+ fi
+ done
+ fi
+
+ # Exit here if they wanted silent mode.
+ test "$show" = ":" && exit 0
+
+ echo "----------------------------------------------------------------------"
+ echo "Libraries have been installed in:"
+ for libdir in $libdirs; do
+ echo " $libdir"
+ done
+ echo
+ echo "If you ever happen to want to link against installed libraries"
+ echo "in a given directory, LIBDIR, you must either use libtool, and"
+ echo "specify the full pathname of the library, or use the \`-LLIBDIR'"
+ echo "flag during linking and do at least one of the following:"
+ if test -n "$shlibpath_var"; then
+ echo " - add LIBDIR to the \`$shlibpath_var' environment variable"
+ echo " during execution"
+ fi
+ if test -n "$runpath_var"; then
+ echo " - add LIBDIR to the \`$runpath_var' environment variable"
+ echo " during linking"
+ fi
+ if test -n "$hardcode_libdir_flag_spec"; then
+ libdir=LIBDIR
+ eval flag=\"$hardcode_libdir_flag_spec\"
+
+ echo " - use the \`$flag' linker flag"
+ fi
+ if test -n "$admincmds"; then
+ echo " - have your system administrator run these commands:$admincmds"
+ fi
+ if test -f /etc/ld.so.conf; then
+ echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'"
+ fi
+ echo
+ echo "See any operating system documentation about shared libraries for"
+ echo "more information, such as the ld(1) and ld.so(8) manual pages."
+ echo "----------------------------------------------------------------------"
+ exit 0
+ ;;
+
+ # libtool execute mode
+ execute)
+ modename="$modename: execute"
+
+ # The first argument is the command name.
+ cmd="$nonopt"
+ if test -z "$cmd"; then
+ $echo "$modename: you must specify a COMMAND" 1>&2
+ $echo "$help"
+ exit 1
+ fi
+
+ # Handle -dlopen flags immediately.
+ for file in $execute_dlfiles; do
+ if test ! -f "$file"; then
+ $echo "$modename: \`$file' is not a file" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ dir=
+ case $file in
+ *.la)
+ # Check to see that this really is a libtool archive.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then :
+ else
+ $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ # Read the libtool library.
+ dlname=
+ library_names=
+
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Skip this library if it cannot be dlopened.
+ if test -z "$dlname"; then
+ # Warn if it was a shared library.
+ test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'"
+ continue
+ fi
+
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+
+ if test -f "$dir/$objdir/$dlname"; then
+ dir="$dir/$objdir"
+ else
+ $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2
+ exit 1
+ fi
+ ;;
+
+ *.lo)
+ # Just add the directory containing the .lo file.
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ test "X$dir" = "X$file" && dir=.
+ ;;
+
+ *)
+ $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2
+ continue
+ ;;
+ esac
+
+ # Get the absolute pathname.
+ absdir=`cd "$dir" && pwd`
+ test -n "$absdir" && dir="$absdir"
+
+ # Now add the directory to shlibpath_var.
+ if eval "test -z \"\$$shlibpath_var\""; then
+ eval "$shlibpath_var=\"\$dir\""
+ else
+ eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\""
+ fi
+ done
+
+ # This variable tells wrapper scripts just to set shlibpath_var
+ # rather than running their programs.
+ libtool_execute_magic="$magic"
+
+ # Check if any of the arguments is a wrapper script.
+ args=
+ for file
+ do
+ case $file in
+ -*) ;;
+ *)
+ # Do a test to see if this is really a libtool program.
+ if (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ # If there is no directory component, then add one.
+ case $file in
+ */* | *\\*) . $file ;;
+ *) . ./$file ;;
+ esac
+
+ # Transform arg to wrapped name.
+ file="$progdir/$program"
+ fi
+ ;;
+ esac
+ # Quote arguments (to preserve shell metacharacters).
+ file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"`
+ args="$args \"$file\""
+ done
+
+ if test -z "$run"; then
+ if test -n "$shlibpath_var"; then
+ # Export the shlibpath_var.
+ eval "export $shlibpath_var"
+ fi
+
+ # Restore saved enviroment variables
+ if test "${save_LC_ALL+set}" = set; then
+ LC_ALL="$save_LC_ALL"; export LC_ALL
+ fi
+ if test "${save_LANG+set}" = set; then
+ LANG="$save_LANG"; export LANG
+ fi
+
+ # Now prepare to actually exec the command.
+ exec_cmd='"$cmd"$args'
+ else
+ # Display what would be done.
+ if test -n "$shlibpath_var"; then
+ eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\""
+ $echo "export $shlibpath_var"
+ fi
+ $echo "$cmd$args"
+ exit 0
+ fi
+ ;;
+
+ # libtool clean and uninstall mode
+ clean | uninstall)
+ modename="$modename: $mode"
+ rm="$nonopt"
+ files=
+ rmforce=
+ exit_status=0
+
+ # This variable tells wrapper scripts just to set variables rather
+ # than running their programs.
+ libtool_install_magic="$magic"
+
+ for arg
+ do
+ case $arg in
+ -f) rm="$rm $arg"; rmforce=yes ;;
+ -*) rm="$rm $arg" ;;
+ *) files="$files $arg" ;;
+ esac
+ done
+
+ if test -z "$rm"; then
+ $echo "$modename: you must specify an RM program" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ fi
+
+ rmdirs=
+
+ for file in $files; do
+ dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
+ if test "X$dir" = "X$file"; then
+ dir=.
+ objdir="$objdir"
+ else
+ objdir="$dir/$objdir"
+ fi
+ name=`$echo "X$file" | $Xsed -e 's%^.*/%%'`
+ test $mode = uninstall && objdir="$dir"
+
+ # Remember objdir for removal later, being careful to avoid duplicates
+ if test $mode = clean; then
+ case " $rmdirs " in
+ *" $objdir "*) ;;
+ *) rmdirs="$rmdirs $objdir" ;;
+ esac
+ fi
+
+ # Don't error if the file doesn't exist and rm -f was used.
+ if (test -L "$file") >/dev/null 2>&1 \
+ || (test -h "$file") >/dev/null 2>&1 \
+ || test -f "$file"; then
+ :
+ elif test -d "$file"; then
+ exit_status=1
+ continue
+ elif test "$rmforce" = yes; then
+ continue
+ fi
+
+ rmfiles="$file"
+
+ case $name in
+ *.la)
+ # Possibly a libtool archive, so verify it.
+ if (sed -e '2q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ . $dir/$name
+
+ # Delete the libtool libraries and symlinks.
+ for n in $library_names; do
+ rmfiles="$rmfiles $objdir/$n"
+ done
+ test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library"
+ test $mode = clean && rmfiles="$rmfiles $objdir/$name $objdir/${name}i"
+
+ if test $mode = uninstall; then
+ if test -n "$library_names"; then
+ # Do each command in the postuninstall commands.
+ eval cmds=\"$postuninstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ if test $? != 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
+ done
+ IFS="$save_ifs"
+ fi
+
+ if test -n "$old_library"; then
+ # Do each command in the old_postuninstall commands.
+ eval cmds=\"$old_postuninstall_cmds\"
+ IFS="${IFS= }"; save_ifs="$IFS"; IFS='~'
+ for cmd in $cmds; do
+ IFS="$save_ifs"
+ $show "$cmd"
+ $run eval "$cmd"
+ if test $? != 0 && test "$rmforce" != yes; then
+ exit_status=1
+ fi
+ done
+ IFS="$save_ifs"
+ fi
+ # FIXME: should reinstall the best remaining shared library.
+ fi
+ fi
+ ;;
+
+ *.lo)
+ if test "$build_old_libs" = yes; then
+ oldobj=`$echo "X$name" | $Xsed -e "$lo2o"`
+ rmfiles="$rmfiles $dir/$oldobj"
+ fi
+ ;;
+
+ *)
+ # Do a test to see if this is a libtool program.
+ if test $mode = clean &&
+ (sed -e '4q' $file | egrep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then
+ relink_command=
+ . $dir/$file
+
+ rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}"
+ if test "$fast_install" = yes && test -n "$relink_command"; then
+ rmfiles="$rmfiles $objdir/lt-$name"
+ fi
+ fi
+ ;;
+ esac
+ $show "$rm $rmfiles"
+ $run $rm $rmfiles || exit_status=1
+ done
+
+ # Try to remove the ${objdir}s in the directories where we deleted files
+ for dir in $rmdirs; do
+ if test -d "$dir"; then
+ $show "rmdir $dir"
+ $run rmdir $dir >/dev/null 2>&1
+ fi
+ done
+
+ exit $exit_status
+ ;;
+
+ "")
+ $echo "$modename: you must specify a MODE" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ ;;
+ esac
+
+ if test -z "$exec_cmd"; then
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$generic_help" 1>&2
+ exit 1
+ fi
+fi # test -z "$show_help"
+
+if test -n "$exec_cmd"; then
+ eval exec $exec_cmd
+ exit 1
+fi
+
+# We need to display help for each of the modes.
+case $mode in
+"") $echo \
+"Usage: $modename [OPTION]... [MODE-ARG]...
+
+Provide generalized library-building support services.
+
+ --config show all configuration variables
+ --debug enable verbose shell tracing
+-n, --dry-run display commands without modifying any files
+ --features display basic configuration information and exit
+ --finish same as \`--mode=finish'
+ --help display this help message and exit
+ --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS]
+ --quiet same as \`--silent'
+ --silent don't print informational messages
+ --version print version information
+
+MODE must be one of the following:
+
+ clean remove files from the build directory
+ compile compile a source file into a libtool object
+ execute automatically set library path, then run a program
+ finish complete the installation of libtool libraries
+ install install libraries or executables
+ link create a library or an executable
+ uninstall remove libraries from an installed directory
+
+MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for
+a more detailed description of MODE."
+ exit 0
+ ;;
+
+clean)
+ $echo \
+"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE...
+
+Remove files from the build directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, object or program, all the files associated
+with it are deleted. Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+compile)
+ $echo \
+"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE
+
+Compile a source file into a libtool library object.
+
+This mode accepts the following additional options:
+
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -static always build a \`.o' file suitable for static linking
+
+COMPILE-COMMAND is a command to be used in creating a \`standard' object file
+from the given SOURCEFILE.
+
+The output file name is determined by removing the directory component from
+SOURCEFILE, then substituting the C source code suffix \`.c' with the
+library object suffix, \`.lo'."
+ ;;
+
+execute)
+ $echo \
+"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]...
+
+Automatically set library path, then run a program.
+
+This mode accepts the following additional options:
+
+ -dlopen FILE add the directory containing FILE to the library path
+
+This mode sets the library path environment variable according to \`-dlopen'
+flags.
+
+If any of the ARGS are libtool executable wrappers, then they are translated
+into their corresponding uninstalled binary, and any of their required library
+directories are added to the library path.
+
+Then, COMMAND is executed, with ARGS as arguments."
+ ;;
+
+finish)
+ $echo \
+"Usage: $modename [OPTION]... --mode=finish [LIBDIR]...
+
+Complete the installation of libtool libraries.
+
+Each LIBDIR is a directory that contains libtool libraries.
+
+The commands that this mode executes may require superuser privileges. Use
+the \`--dry-run' option if you just want to see what would be executed."
+ ;;
+
+install)
+ $echo \
+"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND...
+
+Install executables or libraries.
+
+INSTALL-COMMAND is the installation command. The first component should be
+either the \`install' or \`cp' program.
+
+The rest of the components are interpreted as arguments to that command (only
+BSD-compatible install options are recognized)."
+ ;;
+
+link)
+ $echo \
+"Usage: $modename [OPTION]... --mode=link LINK-COMMAND...
+
+Link object files or libraries together to form another library, or to
+create an executable program.
+
+LINK-COMMAND is a command using the C compiler that you would use to create
+a program from several object files.
+
+The following components of LINK-COMMAND are treated specially:
+
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -static do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]
+
+All other options (arguments beginning with \`-') are ignored.
+
+Every other argument is treated as a filename. Files ending in \`.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.
+
+If the OUTPUT-FILE ends in \`.la', then a libtool library is created,
+only library objects (\`.lo' files) may be specified, and \`-rpath' is
+required, except when creating a convenience library.
+
+If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created
+using \`ar' and \`ranlib', or on Windows using \`lib'.
+
+If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file
+is created, otherwise an executable program is created."
+ ;;
+
+uninstall)
+ $echo \
+"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE...
+
+Remove libraries from an installation directory.
+
+RM is the name of the program to use to delete files associated with each FILE
+(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed
+to RM.
+
+If FILE is a libtool library, all the files associated with it are deleted.
+Otherwise, only FILE itself is deleted using RM."
+ ;;
+
+*)
+ $echo "$modename: invalid operation mode \`$mode'" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+ ;;
+esac
+
+echo
+$echo "Try \`$modename --help' for more information about other modes."
+
+exit 0
+
+# Local Variables:
+# mode:shell-script
+# sh-indentation:2
+# End:
diff --git a/m4/ax_cc_maxopt.m4 b/m4/ax_cc_maxopt.m4
new file mode 100644
index 0000000..7c80bff
--- /dev/null
+++ b/m4/ax_cc_maxopt.m4
@@ -0,0 +1,180 @@
+# ===========================================================================
+# http://autoconf-archive.cryp.to/ax_cc_maxopt.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CC_MAXOPT
+#
+# DESCRIPTION
+#
+# Try to turn on "good" C optimization flags for various compilers and
+# architectures, for some definition of "good". (In our case, good for
+# FFTW and hopefully for other scientific codes. Modify as needed.)
+#
+# The user can override the flags by setting the CFLAGS environment
+# variable. The user can also specify --enable-portable-binary in order to
+# disable any optimization flags that might result in a binary that only
+# runs on the host architecture.
+#
+# Note also that the flags assume that ANSI C aliasing rules are followed
+# by the code (e.g. for gcc's -fstrict-aliasing), and that floating-point
+# computations can be re-ordered as needed.
+#
+# Requires macros: AX_CHECK_COMPILER_FLAGS, AX_COMPILER_VENDOR,
+# AX_GCC_ARCHFLAG, AX_GCC_X86_CPUID.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2008 Matteo Frigo
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU 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 General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_CC_MAXOPT],
+[
+AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AX_COMPILER_VENDOR])
+AC_REQUIRE([AC_CANONICAL_HOST])
+
+AC_ARG_ENABLE(portable-binary, [AC_HELP_STRING([--enable-portable-binary], [disable compiler optimizations that would produce unportable binaries])],
+ acx_maxopt_portable=$withval, acx_maxopt_portable=no)
+
+# Try to determine "good" native compiler flags if none specified via CFLAGS
+if test "$ac_test_CFLAGS" != "set"; then
+ CFLAGS=""
+ case $ax_cv_c_compiler_vendor in
+ dec) CFLAGS="-newc -w0 -O5 -ansi_alias -ansi_args -fp_reorder -tune host"
+ if test "x$acx_maxopt_portable" = xno; then
+ CFLAGS="$CFLAGS -arch host"
+ fi;;
+
+ sun) CFLAGS="-native -fast -xO5 -dalign"
+ if test "x$acx_maxopt_portable" = xyes; then
+ CFLAGS="$CFLAGS -xarch=generic"
+ fi;;
+
+ hp) CFLAGS="+Oall +Optrs_ansi +DSnative"
+ if test "x$acx_maxopt_portable" = xyes; then
+ CFLAGS="$CFLAGS +DAportable"
+ fi;;
+
+ ibm) if test "x$acx_maxopt_portable" = xno; then
+ xlc_opt="-qarch=auto -qtune=auto"
+ else
+ xlc_opt="-qtune=auto"
+ fi
+ AX_CHECK_COMPILER_FLAGS($xlc_opt,
+ CFLAGS="-O3 -qansialias -w $xlc_opt",
+ [CFLAGS="-O3 -qansialias -w"
+ echo "******************************************************"
+ echo "* You seem to have the IBM C compiler. It is *"
+ echo "* recommended for best performance that you use: *"
+ echo "* *"
+ echo "* CFLAGS=-O3 -qarch=xxx -qtune=xxx -qansialias -w *"
+ echo "* ^^^ ^^^ *"
+ echo "* where xxx is pwr2, pwr3, 604, or whatever kind of *"
+ echo "* CPU you have. (Set the CFLAGS environment var. *"
+ echo "* and re-run configure.) For more info, man cc. *"
+ echo "******************************************************"])
+ ;;
+
+ intel) CFLAGS="-O3 -ansi_alias"
+ if test "x$acx_maxopt_portable" = xno; then
+ icc_archflag=unknown
+ icc_flags=""
+ case $host_cpu in
+ i686*|x86_64*)
+ # icc accepts gcc assembly syntax, so these should work:
+ AX_GCC_X86_CPUID(0)
+ AX_GCC_X86_CPUID(1)
+ case $ax_cv_gcc_x86_cpuid_0 in # see AX_GCC_ARCHFLAG
+ *:756e6547:*:*) # Intel
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *6a?:*[[234]]:*:*|*6[[789b]]?:*:*:*) icc_flags="-xK";;
+ *f3[[347]]:*:*:*|*f4[1347]:*:*:*) icc_flags="-xP -xN -xW -xK";;
+ *f??:*:*:*) icc_flags="-xN -xW -xK";;
+ esac ;;
+ esac ;;
+ esac
+ if test "x$icc_flags" != x; then
+ for flag in $icc_flags; do
+ AX_CHECK_COMPILER_FLAGS($flag, [icc_archflag=$flag; break])
+ done
+ fi
+ AC_MSG_CHECKING([for icc architecture flag])
+ AC_MSG_RESULT($icc_archflag)
+ if test "x$icc_archflag" != xunknown; then
+ CFLAGS="$CFLAGS $icc_archflag"
+ fi
+ fi
+ ;;
+
+ gnu)
+ # default optimization flags for gcc on all systems
+ # 2009-07-30 JB Langston
+ # removed -fomit-frame-pointer due to incompatibility with SFFE
+ CFLAGS="-O3"
+
+ # -malign-double for x86 systems
+ AX_CHECK_COMPILER_FLAGS(-malign-double, CFLAGS="$CFLAGS -malign-double")
+
+ # -fstrict-aliasing for gcc-2.95+
+ AX_CHECK_COMPILER_FLAGS(-fstrict-aliasing,
+ CFLAGS="$CFLAGS -fstrict-aliasing")
+
+ # note that we enable "unsafe" fp optimization with other compilers, too
+ AX_CHECK_COMPILER_FLAGS(-ffast-math, CFLAGS="$CFLAGS -ffast-math")
+
+ AX_GCC_ARCHFLAG($acx_maxopt_portable)
+ ;;
+ esac
+
+ if test -z "$CFLAGS"; then
+ echo ""
+ echo "********************************************************"
+ echo "* WARNING: Don't know the best CFLAGS for this system *"
+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
+ echo "* (otherwise, a default of CFLAGS=-O3 will be used) *"
+ echo "********************************************************"
+ echo ""
+ CFLAGS="-O3"
+ fi
+
+ AX_CHECK_COMPILER_FLAGS($CFLAGS, [], [
+ echo ""
+ echo "********************************************************"
+ echo "* WARNING: The guessed CFLAGS don't seem to work with *"
+ echo "* your compiler. *"
+ echo "* Use ./configure CFLAGS=... to specify your own flags *"
+ echo "********************************************************"
+ echo ""
+ CFLAGS=""
+ ])
+
+fi
+])
diff --git a/m4/ax_check_compiler_flags.m4 b/m4/ax_check_compiler_flags.m4
new file mode 100644
index 0000000..21f9e6f
--- /dev/null
+++ b/m4/ax_check_compiler_flags.m4
@@ -0,0 +1,74 @@
+# ===========================================================================
+# http://autoconf-archive.cryp.to/ax_check_compiler_flags.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_CHECK_COMPILER_FLAGS(FLAGS, [ACTION-SUCCESS], [ACTION-FAILURE])
+#
+# DESCRIPTION
+#
+# Check whether the given compiler FLAGS work with the current language's
+# compiler, or whether they give an error. (Warnings, however, are
+# ignored.)
+#
+# ACTION-SUCCESS/ACTION-FAILURE are shell commands to execute on
+# success/failure.
+#
+# LICENSE
+#
+# Copyright (c) 2009 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2009 Matteo Frigo
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU 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 General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_CHECK_COMPILER_FLAGS],
+[AC_PREREQ(2.59) dnl for _AC_LANG_PREFIX
+AC_MSG_CHECKING([whether _AC_LANG compiler accepts $1])
+dnl Some hackery here since AC_CACHE_VAL can't handle a non-literal varname:
+AS_LITERAL_IF([$1],
+ [AC_CACHE_VAL(AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1]), [
+ ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
+ AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])],
+ [ax_save_FLAGS=$[]_AC_LANG_PREFIX[]FLAGS
+ _AC_LANG_PREFIX[]FLAGS="$1"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM()],
+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=yes,
+ eval AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])=no)
+ _AC_LANG_PREFIX[]FLAGS=$ax_save_FLAGS])
+eval ax_check_compiler_flags=$AS_TR_SH(ax_cv_[]_AC_LANG_ABBREV[]_flags_[$1])
+AC_MSG_RESULT($ax_check_compiler_flags)
+if test "x$ax_check_compiler_flags" = xyes; then
+ m4_default([$2], :)
+else
+ m4_default([$3], :)
+fi
+])dnl AX_CHECK_COMPILER_FLAGS
diff --git a/m4/ax_compiler_vendor.m4 b/m4/ax_compiler_vendor.m4
new file mode 100644
index 0000000..2519a5f
--- /dev/null
+++ b/m4/ax_compiler_vendor.m4
@@ -0,0 +1,61 @@
+# ===========================================================================
+# http://autoconf-archive.cryp.to/ax_compiler_vendor.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_COMPILER_VENDOR
+#
+# DESCRIPTION
+#
+# Determine the vendor of the C/C++ compiler, e.g., gnu, intel, ibm, sun,
+# hp, borland, comeau, dec, cray, kai, lcc, metrowerks, sgi, microsoft,
+# watcom, etc. The vendor is returned in the cache variable
+# $ax_cv_c_compiler_vendor for C and $ax_cv_cxx_compiler_vendor for C++.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2008 Matteo Frigo
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU 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 General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_COMPILER_VENDOR],
+[
+AC_CACHE_CHECK([for _AC_LANG compiler vendor], ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor,
+ [ax_cv_[]_AC_LANG_ABBREV[]_compiler_vendor=unknown
+ # note: don't check for gcc first since some other compilers define __GNUC__
+ for ventest in intel:__ICC,__ECC,__INTEL_COMPILER ibm:__xlc__,__xlC__,__IBMC__,__IBMCPP__ pathscale:__PATHCC__,__PATHSCALE__ gnu:__GNUC__ sun:__SUNPRO_C,__SUNPRO_CC hp:__HP_cc,__HP_aCC dec:__DECC,__DECCXX,__DECC_VER,__DECCXX_VER borland:__BORLANDC__,__TURBOC__ comeau:__COMO__ cray:_CRAYC kai:__KCC lcc:__LCC__ metrowerks:__MWERKS__ sgi:__sgi,sgi microsoft:_MSC_VER watcom:__WATCOMC__ portland:__PGI; do
+ vencpp="defined("`echo $ventest | cut -d: -f2 | sed 's/,/) || defined(/g'`")"
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM(,[
+#if !($vencpp)
+ thisisanerror;
+#endif
+])], [ax_cv_]_AC_LANG_ABBREV[_compiler_vendor=`echo $ventest | cut -d: -f1`; break])
+ done
+ ])
+])
diff --git a/m4/ax_gcc_archflag.m4 b/m4/ax_gcc_archflag.m4
new file mode 100644
index 0000000..590015b
--- /dev/null
+++ b/m4/ax_gcc_archflag.m4
@@ -0,0 +1,213 @@
+# ===========================================================================
+# http://autoconf-archive.cryp.to/ax_gcc_archflag.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_GCC_ARCHFLAG([PORTABLE?], [ACTION-SUCCESS], [ACTION-FAILURE])
+#
+# DESCRIPTION
+#
+# This macro tries to guess the "native" arch corresponding to the target
+# architecture for use with gcc's -march=arch or -mtune=arch flags. If
+# found, the cache variable $ax_cv_gcc_archflag is set to this flag and
+# ACTION-SUCCESS is executed; otherwise $ax_cv_gcc_archflag is is set to
+# "unknown" and ACTION-FAILURE is executed. The default ACTION-SUCCESS is
+# to add $ax_cv_gcc_archflag to the end of $CFLAGS.
+#
+# PORTABLE? should be either [yes] (default) or [no]. In the former case,
+# the flag is set to -mtune (or equivalent) so that the architecture is
+# only used for tuning, but the instruction set used is still portable. In
+# the latter case, the flag is set to -march (or equivalent) so that
+# architecture-specific instructions are enabled.
+#
+# The user can specify --with-gcc-arch=<arch> in order to override the
+# macro's choice of architecture, or --without-gcc-arch to disable this.
+#
+# When cross-compiling, or if $CC is not gcc, then ACTION-FAILURE is
+# called unless the user specified --with-gcc-arch manually.
+#
+# Requires macros: AX_CHECK_COMPILER_FLAGS, AX_GCC_X86_CPUID
+#
+# (The main emphasis here is on recent CPUs, on the principle that doing
+# high-performance computing on old hardware is uncommon.)
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2008 Matteo Frigo
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU 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 General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_GCC_ARCHFLAG],
+[AC_REQUIRE([AC_PROG_CC])
+AC_REQUIRE([AC_CANONICAL_HOST])
+
+AC_ARG_WITH(gcc-arch, [AC_HELP_STRING([--with-gcc-arch=<arch>], [use architecture <arch> for gcc -march/-mtune, instead of guessing])],
+ ax_gcc_arch=$withval, ax_gcc_arch=yes)
+
+AC_MSG_CHECKING([for gcc architecture flag])
+AC_MSG_RESULT([])
+AC_CACHE_VAL(ax_cv_gcc_archflag,
+[
+ax_cv_gcc_archflag="unknown"
+
+if test "$GCC" = yes; then
+
+if test "x$ax_gcc_arch" = xyes; then
+ax_gcc_arch=""
+if test "$cross_compiling" = no; then
+case $host_cpu in
+ i[[3456]]86*|x86_64*) # use cpuid codes, in part from x86info-1.7 by D. Jones
+ AX_GCC_X86_CPUID(0)
+ AX_GCC_X86_CPUID(1)
+ case $ax_cv_gcc_x86_cpuid_0 in
+ *:756e6547:*:*) # Intel
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *5[[48]]?:*:*:*) ax_gcc_arch="pentium-mmx pentium" ;;
+ *5??:*:*:*) ax_gcc_arch=pentium ;;
+ *6[[3456]]?:*:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+ *6a?:*[[01]]:*:*) ax_gcc_arch="pentium2 pentiumpro" ;;
+ *6a?:*[[234]]:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+ *6[[9d]]?:*:*:*) ax_gcc_arch="pentium-m pentium3 pentiumpro" ;;
+ *6[[78b]]?:*:*:*) ax_gcc_arch="pentium3 pentiumpro" ;;
+ *6??:*:*:*) ax_gcc_arch=pentiumpro ;;
+ *f3[[347]]:*:*:*|*f4[1347]:*:*:*)
+ case $host_cpu in
+ x86_64*) ax_gcc_arch="nocona pentium4 pentiumpro" ;;
+ *) ax_gcc_arch="prescott pentium4 pentiumpro" ;;
+ esac ;;
+ *f??:*:*:*) ax_gcc_arch="pentium4 pentiumpro";;
+ esac ;;
+ *:68747541:*:*) # AMD
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *5[[67]]?:*:*:*) ax_gcc_arch=k6 ;;
+ *5[[8d]]?:*:*:*) ax_gcc_arch="k6-2 k6" ;;
+ *5[[9]]?:*:*:*) ax_gcc_arch="k6-3 k6" ;;
+ *60?:*:*:*) ax_gcc_arch=k7 ;;
+ *6[[12]]?:*:*:*) ax_gcc_arch="athlon k7" ;;
+ *6[[34]]?:*:*:*) ax_gcc_arch="athlon-tbird k7" ;;
+ *67?:*:*:*) ax_gcc_arch="athlon-4 athlon k7" ;;
+ *6[[68a]]?:*:*:*)
+ AX_GCC_X86_CPUID(0x80000006) # L2 cache size
+ case $ax_cv_gcc_x86_cpuid_0x80000006 in
+ *:*:*[[1-9a-f]]??????:*) # (L2 = ecx >> 16) >= 256
+ ax_gcc_arch="athlon-xp athlon-4 athlon k7" ;;
+ *) ax_gcc_arch="athlon-4 athlon k7" ;;
+ esac ;;
+ *f[[4cef8b]]?:*:*:*) ax_gcc_arch="athlon64 k8" ;;
+ *f5?:*:*:*) ax_gcc_arch="opteron k8" ;;
+ *f7?:*:*:*) ax_gcc_arch="athlon-fx opteron k8" ;;
+ *f??:*:*:*) ax_gcc_arch="k8" ;;
+ esac ;;
+ *:746e6543:*:*) # IDT
+ case $ax_cv_gcc_x86_cpuid_1 in
+ *54?:*:*:*) ax_gcc_arch=winchip-c6 ;;
+ *58?:*:*:*) ax_gcc_arch=winchip2 ;;
+ *6[[78]]?:*:*:*) ax_gcc_arch=c3 ;;
+ *69?:*:*:*) ax_gcc_arch="c3-2 c3" ;;
+ esac ;;
+ esac
+ if test x"$ax_gcc_arch" = x; then # fallback
+ case $host_cpu in
+ i586*) ax_gcc_arch=pentium ;;
+ i686*) ax_gcc_arch=pentiumpro ;;
+ esac
+ fi
+ ;;
+
+ sparc*)
+ AC_PATH_PROG([PRTDIAG], [prtdiag], [prtdiag], [$PATH:/usr/platform/`uname -i`/sbin/:/usr/platform/`uname -m`/sbin/])
+ cputype=`(((grep cpu /proc/cpuinfo | cut -d: -f2) ; ($PRTDIAG -v |grep -i sparc) ; grep -i cpu /var/run/dmesg.boot ) | head -n 1) 2> /dev/null`
+ cputype=`echo "$cputype" | tr -d ' -' |tr $as_cr_LETTERS $as_cr_letters`
+ case $cputype in
+ *ultrasparciv*) ax_gcc_arch="ultrasparc4 ultrasparc3 ultrasparc v9" ;;
+ *ultrasparciii*) ax_gcc_arch="ultrasparc3 ultrasparc v9" ;;
+ *ultrasparc*) ax_gcc_arch="ultrasparc v9" ;;
+ *supersparc*|*tms390z5[[05]]*) ax_gcc_arch="supersparc v8" ;;
+ *hypersparc*|*rt62[[056]]*) ax_gcc_arch="hypersparc v8" ;;
+ *cypress*) ax_gcc_arch=cypress ;;
+ esac ;;
+
+ alphaev5) ax_gcc_arch=ev5 ;;
+ alphaev56) ax_gcc_arch=ev56 ;;
+ alphapca56) ax_gcc_arch="pca56 ev56" ;;
+ alphapca57) ax_gcc_arch="pca57 pca56 ev56" ;;
+ alphaev6) ax_gcc_arch=ev6 ;;
+ alphaev67) ax_gcc_arch=ev67 ;;
+ alphaev68) ax_gcc_arch="ev68 ev67" ;;
+ alphaev69) ax_gcc_arch="ev69 ev68 ev67" ;;
+ alphaev7) ax_gcc_arch="ev7 ev69 ev68 ev67" ;;
+ alphaev79) ax_gcc_arch="ev79 ev7 ev69 ev68 ev67" ;;
+
+ powerpc*)
+ cputype=`((grep cpu /proc/cpuinfo | head -n 1 | cut -d: -f2 | cut -d, -f1 | sed 's/ //g') ; /usr/bin/machine ; /bin/machine; grep CPU /var/run/dmesg.boot | head -n 1 | cut -d" " -f2) 2> /dev/null`
+ cputype=`echo $cputype | sed -e 's/ppc//g;s/ *//g'`
+ case $cputype in
+ *750*) ax_gcc_arch="750 G3" ;;
+ *740[[0-9]]*) ax_gcc_arch="$cputype 7400 G4" ;;
+ *74[[4-5]][[0-9]]*) ax_gcc_arch="$cputype 7450 G4" ;;
+ *74[[0-9]][[0-9]]*) ax_gcc_arch="$cputype G4" ;;
+ *970*) ax_gcc_arch="970 G5 power4";;
+ *POWER4*|*power4*|*gq*) ax_gcc_arch="power4 970";;
+ *POWER5*|*power5*|*gr*|*gs*) ax_gcc_arch="power5 power4 970";;
+ 603ev|8240) ax_gcc_arch="$cputype 603e 603";;
+ *) ax_gcc_arch=$cputype ;;
+ esac
+ ax_gcc_arch="$ax_gcc_arch powerpc"
+ ;;
+esac
+fi # not cross-compiling
+fi # guess arch
+
+if test "x$ax_gcc_arch" != x -a "x$ax_gcc_arch" != xno; then
+for arch in $ax_gcc_arch; do
+ if test "x[]m4_default([$1],yes)" = xyes; then # if we require portable code
+ flags="-mtune=$arch"
+ # -mcpu=$arch and m$arch generate nonportable code on every arch except
+ # x86. And some other arches (e.g. Alpha) don't accept -mtune. Grrr.
+ case $host_cpu in i*86|x86_64*) flags="$flags -mcpu=$arch -m$arch";; esac
+ else
+ flags="-march=$arch -mcpu=$arch -m$arch"
+ fi
+ for flag in $flags; do
+ AX_CHECK_COMPILER_FLAGS($flag, [ax_cv_gcc_archflag=$flag; break])
+ done
+ test "x$ax_cv_gcc_archflag" = xunknown || break
+done
+fi
+
+fi # $GCC=yes
+])
+AC_MSG_CHECKING([for gcc architecture flag])
+AC_MSG_RESULT($ax_cv_gcc_archflag)
+if test "x$ax_cv_gcc_archflag" = xunknown; then
+ m4_default([$3],:)
+else
+ m4_default([$2], [CFLAGS="$CFLAGS $ax_cv_gcc_archflag"])
+fi
+])
diff --git a/m4/ax_gcc_x86_cpuid.m4 b/m4/ax_gcc_x86_cpuid.m4
new file mode 100644
index 0000000..321dce7
--- /dev/null
+++ b/m4/ax_gcc_x86_cpuid.m4
@@ -0,0 +1,77 @@
+# ===========================================================================
+# http://autoconf-archive.cryp.to/ax_gcc_x86_cpuid.html
+# ===========================================================================
+#
+# SYNOPSIS
+#
+# AX_GCC_X86_CPUID(OP)
+#
+# DESCRIPTION
+#
+# On Pentium and later x86 processors, with gcc or a compiler that has a
+# compatible syntax for inline assembly instructions, run a small program
+# that executes the cpuid instruction with input OP. This can be used to
+# detect the CPU type.
+#
+# On output, the values of the eax, ebx, ecx, and edx registers are stored
+# as hexadecimal strings as "eax:ebx:ecx:edx" in the cache variable
+# ax_cv_gcc_x86_cpuid_OP.
+#
+# If the cpuid instruction fails (because you are running a
+# cross-compiler, or because you are not using gcc, or because you are on
+# a processor that doesn't have this instruction), ax_cv_gcc_x86_cpuid_OP
+# is set to the string "unknown".
+#
+# This macro mainly exists to be used in AX_GCC_ARCHFLAG.
+#
+# LICENSE
+#
+# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu>
+# Copyright (c) 2008 Matteo Frigo
+#
+# This program is free software: you can redistribute it and/or modify it
+# under the terms of the GNU 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 General Public License along
+# with this program. If not, see <http://www.gnu.org/licenses/>.
+#
+# As a special exception, the respective Autoconf Macro's copyright owner
+# gives unlimited permission to copy, distribute and modify the configure
+# scripts that are the output of Autoconf when processing the Macro. You
+# need not follow the terms of the GNU General Public License when using
+# or distributing such scripts, even though portions of the text of the
+# Macro appear in them. The GNU General Public License (GPL) does govern
+# all other use of the material that constitutes the Autoconf Macro.
+#
+# This special exception to the GPL applies to versions of the Autoconf
+# Macro released by the Autoconf Archive. When you make and distribute a
+# modified version of the Autoconf Macro, you may extend this special
+# exception to the GPL to apply to your modified version as well.
+
+AC_DEFUN([AX_GCC_X86_CPUID],
+[AC_REQUIRE([AC_PROG_CC])
+AC_LANG_PUSH([C])
+AC_CACHE_CHECK(for x86 cpuid $1 output, ax_cv_gcc_x86_cpuid_$1,
+ [AC_RUN_IFELSE([AC_LANG_PROGRAM([#include <stdio.h>], [
+ int op = $1, eax, ebx, ecx, edx;
+ FILE *f;
+ __asm__("cpuid"
+ : "=a" (eax), "=b" (ebx), "=c" (ecx), "=d" (edx)
+ : "a" (op));
+ f = fopen("conftest_cpuid", "w"); if (!f) return 1;
+ fprintf(f, "%x:%x:%x:%x\n", eax, ebx, ecx, edx);
+ fclose(f);
+ return 0;
+])],
+ [ax_cv_gcc_x86_cpuid_$1=`cat conftest_cpuid`; rm -f conftest_cpuid],
+ [ax_cv_gcc_x86_cpuid_$1=unknown; rm -f conftest_cpuid],
+ [ax_cv_gcc_x86_cpuid_$1=unknown])])
+AC_LANG_POP([C])
+])
diff --git a/src/Makefile.in b/src/Makefile.in
new file mode 100644
index 0000000..a5e1010
--- /dev/null
+++ b/src/Makefile.in
@@ -0,0 +1,62 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBICONV@ @LIBINTL@ @LIBS@
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+@SET_MAKE@
+
+TLIBS = @DRIVERLIBS@
+
+DIRS = \
+ sffe \
+ filter \
+ engine \
+ ui-hlp \
+ ui \
+ util \
+ @DRIVERDIRS@
+
+PROG = @BINPATH@/xaos
+OBJS = $(SRCS:.c=.o)
+
+TLIB =
+
+
+all default: $(PROG) internationalization
+
+@BINPATH@:
+ mkdir $@
+
+@LIBPATH@:
+ mkdir $@
+
+libs:
+ @for name in $(DIRS) ; do sh -c "cd $$name ; $(MAKE) all"; done
+
+$(PROG): @BINPATH@ @LIBPATH@ include/config.h libs
+ $(CC) $(CFLAGS) $(LFLAGS) -o $@ $(TLIBS) $(LIBS)
+
+include/config.h:
+ cp include/config/config.autoconf include/config.h
+
+internationalization:
+ if [ "@USE_NLS@" = "yes" ]; then $(MAKE) -C i18n/ all; fi
+
+clean:
+ @for name in $(DIRS) i18n ; do sh -c "cd $$name ; $(MAKE) $@"; done
+ rm -f include/config.h
+ rm -f $(PROG) lib/lib*.a
+
+distclean: clean
+ rm -f Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/engine/3d.c b/src/engine/3d.c
new file mode 100644
index 0000000..517d3db
--- /dev/null
+++ b/src/engine/3d.c
@@ -0,0 +1,240 @@
+#ifndef _plan9_
+#include <config.h>
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <stdio.h> /*for NULL */
+#include <math.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#define SLARGEITER
+#include <xthread.h>
+#include <filter.h>
+
+struct threeddata {
+ struct palette *pal;
+ struct palette *savedpalette;
+ unsigned int *pixels;
+ unsigned int maxiter;
+ unsigned int height;
+ unsigned int colheight;
+ unsigned int midcolor;
+ unsigned int darkcolor;
+ unsigned int stereogrammode;
+};
+
+#define spixel_t pixel16_t
+#include <c256.h>
+#define do_3d do_3d8
+#define convert_3d convert_3d8
+#define convertup_3d convertup_3d8
+#include "3dd.c"
+
+#include <truecolor.h>
+#define do_3d do_3d32
+#define convert_3d convert_3d32
+#define convertup_3d convertup_3d32
+#include "3dd.c"
+
+#include <true24.h>
+#define do_3d do_3d24
+#define convert_3d convert_3d24
+#define convertup_3d convertup_3d24
+#include "3dd.c"
+
+#include <hicolor.h>
+#define do_3d do_3d16
+#define convert_3d convert_3d16
+#define convertup_3d convertup_3d16
+#include "3dd.c"
+
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~IMAGEDATA;
+ r->supportedmask = MASK1BPP | MASK3BPP | MASK2BPP | MASK4BPP;
+ return (f->next->action->requirement(f->next, r));
+}
+
+extern CONST struct filteraction stereogram_filter;
+static int initialize(struct filter *f, struct initdata *i)
+{
+ struct threeddata *d = (struct threeddata *) f->data;
+ struct filter *f1 = f;
+ inhermisc(f, i);
+ d->stereogrammode = 0;
+ while (f1) {
+ if (f1->action == &stereogram_filter)
+ d->stereogrammode = 1;
+ f1 = f1->next;
+ }
+ d->maxiter = -1;
+ d->height = i->image->height / 3;
+ if (d->pal != NULL)
+ destroypalette(d->pal);
+ d->pal =
+ createpalette(0, 65536, LARGEITER, 0, 65536, NULL, NULL, NULL,
+ NULL, NULL);
+ /*in/out coloring modes looks better in iter modes. This also saves some
+ memory in truecolor. */
+ if (i->image->palette->type == LARGEITER
+ || i->image->palette->type == SMALLITER) {
+ } else {
+ if (d->savedpalette == NULL)
+ d->savedpalette = clonepalette(i->image->palette);
+
+ mkgraypalette(i->image->palette);
+ }
+ if (d->pixels != NULL) {
+ free(d->pixels);
+ d->pixels = NULL;
+ }
+ if (!inherimage
+ (f, i, TOUCHIMAGE | NEWIMAGE,
+ i->image->width + 6 + (i->image->height + d->height + 6) / 2,
+ i->image->height + d->height + 6, d->pal, i->image->pixelwidth,
+ i->image->pixelheight * 2))
+ return 0;
+ setfractalpalette(f, d->savedpalette);
+ fractalc_resize_to(f->fractalc,
+ f->childimage->pixelwidth * f->childimage->width,
+ f->childimage->pixelheight * f->childimage->height);
+ f->fractalc->version++;
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct threeddata *d = calloc(sizeof(*d), 1);
+ f->data = d;
+ f->name = "3d";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ struct threeddata *d = (struct threeddata *) f->data;
+ if (d->pal != NULL)
+ destroypalette((struct palette *) d->pal);
+ if (d->savedpalette != NULL)
+ destroypalette(d->savedpalette);
+ if (d->pixels) {
+ d->pixels = 0;
+ free(d->pixels);
+ }
+ free(d);
+ destroyinheredimage(f);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ int val;
+ int size = f->childimage->palette->type == SMALLITER ? 240 : 65520;
+ struct threeddata *d = (struct threeddata *) f->data;
+ if (f->image->palette->size < size)
+ size = f->image->palette->size;
+
+ /* Update logarithmic scale palette. */
+ if (f->fractalc->maxiter != d->maxiter) {
+ unsigned int i;
+ int palsize = f->fractalc->maxiter;
+ if (palsize >= 65536)
+ palsize = 65535;
+ d->colheight = d->height * (64 + 32) / 64;
+ d->midcolor = d->height * 60 / 100;
+ d->darkcolor = d->height * 30 / 100;
+ d->pal->size = palsize;
+ for (i = 0; i < (unsigned int) palsize; i++) {
+ unsigned int y;
+ y = (log10(1 + 10.0 * (i ? i : palsize) / palsize)) *
+ d->colheight / 9.0 * 16.0 / 2.0;
+ /*y = (i ? i : palsize) * d->colheight / 9.0 / 2.0 * 16.0 / palsize; */
+ if (y != d->pal->pixels[i])
+ f->fractalc->version++;
+ d->pal->pixels[i] = y;
+ }
+ d->maxiter = f->fractalc->maxiter;
+ if (d->pixels)
+ free(d->pixels);
+ i = 0;
+ if (d->stereogrammode) {
+ d->pixels =
+ malloc((f->childimage->height) * sizeof(*d->pixels));
+ for (i = 0; i < (unsigned int) f->childimage->height; i++) {
+ d->pixels[i] =
+ (f->childimage->height -
+ i) * 255 / f->childimage->height;
+ }
+ } else {
+ d->pixels = malloc((d->colheight + 5) * sizeof(*d->pixels));
+ for (; i < d->colheight; i++) {
+ int c = i * (f->image->palette->size) / d->colheight;
+ if (c > f->image->palette->size - 1)
+ c = f->image->palette->size - 1;
+ d->pixels[i] = f->image->palette->pixels[c];
+ }
+ d->pixels[i] = f->image->palette->pixels[0];
+ }
+ }
+ updateinheredimage(f);
+ val = f->previous->action->doit(f->previous, flags, time);
+ drivercall(*f->image,
+ xth_function(do_3d8, f, f->image->width),
+ xth_function(do_3d16, f, f->image->width),
+ xth_function(do_3d24, f, f->image->width),
+ xth_function(do_3d32, f, f->image->width));
+ xth_sync();
+ return val;
+}
+
+static void myremove(struct filter *f)
+{
+ struct threeddata *d = (struct threeddata *) f->data;
+ fractalc_resize_to(f->fractalc, f->image->width * f->image->pixelwidth,
+ f->image->height * f->image->pixelheight);
+ if (d->savedpalette != NULL) {
+ restorepalette(f->image->palette, d->savedpalette);
+ destroypalette(d->savedpalette);
+ d->savedpalette = NULL;
+ }
+
+}
+
+static void convertup(struct filter *f, int *x, int *y)
+{
+ drivercall(*f->image,
+ convertup_3d8(f, x, y),
+ convertup_3d16(f, x, y),
+ convertup_3d24(f, x, y), convertup_3d32(f, x, y));
+ f->next->action->convertup(f->next, x, y);
+}
+
+static void convertdown(struct filter *f, int *x, int *y)
+{
+ drivercall(*f->image,
+ convert_3d8(f, x, y),
+ convert_3d16(f, x, y),
+ convert_3d24(f, x, y), convert_3d32(f, x, y));
+ if (f->previous != NULL)
+ f->previous->action->convertdown(f->previous, x, y);
+}
+
+CONST struct filteraction threed_filter = {
+ "Pseudo 3d",
+ "threed",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertup,
+ convertdown,
+ myremove
+};
diff --git a/src/engine/3dd.c b/src/engine/3dd.c
new file mode 100644
index 0000000..f6a92fb
--- /dev/null
+++ b/src/engine/3dd.c
@@ -0,0 +1,200 @@
+#ifndef UNSUPPORTED
+static void convert_3d(struct filter *f, int *x1, int *y1)
+{
+ struct threeddata *data = (struct threeddata *) f->data;
+ int y;
+ int x = *x1;
+ unsigned int inp;
+ unsigned int height = data->height;
+ register CONST spixel_t *input;
+ if (x >= f->childimage->width - 5 || x < 0
+ || *y1 > f->childimage->height) {
+ *x1 += *y1 / 2;
+ return;
+ }
+ if (x < 0)
+ x = 0;
+ for (y = f->childimage->height - 3; y >= 0; y--) {
+ int d;
+ input = ((spixel_t *) f->childimage->currlines[y] + y / 2);
+ inp = (input[x] + input[x + 1] + input[x + 2] +
+ input[x + 3] + input[x + 4] + input[x + 5]);
+ input = ((spixel_t *) f->childimage->currlines[y + 1] + y / 2);
+ inp += (input[x] + input[x + 1] + input[x + 2] +
+ input[x + 3] + input[x + 4] + input[x + 5]);
+ input = ((spixel_t *) f->childimage->currlines[y + 2] + y / 2);
+ inp += (input[x] + input[x + 1] + input[x + 2] +
+ input[x + 3] + input[x + 4] + input[x + 5]);
+ d = y - (inp / 16 > height ? height : inp / 16);
+ if (d <= *y1) {
+ *y1 = y;
+ *x1 = x + y / 2;
+ return;
+ }
+ }
+ *x1 += *y1 / 2;
+ return;
+}
+
+static void convertup_3d(struct filter *f, int *x1, int *y1)
+{
+ struct threeddata *data = (struct threeddata *) f->data;
+ int y = *y1;
+ int x = *x1;
+ unsigned int inp;
+ unsigned int height = data->height;
+ register CONST spixel_t *input;
+ if (x >= f->childimage->width - 5)
+ x = f->childimage->width - 6;
+ if (y >= f->childimage->height - 3)
+ y = f->childimage->height - 3;
+ if (x < 0)
+ x = 0;
+ if (y < 0)
+ y = 0;
+ input = ((spixel_t *) f->childimage->currlines[y] + y / 2);
+ inp = (input[x] + input[x + 1] + input[x + 2] +
+ input[x + 3] + input[x + 4] + input[x + 5]);
+ input = ((spixel_t *) f->childimage->currlines[y + 1] + y / 2);
+ inp += (input[x] + input[x + 1] + input[x + 2] +
+ input[x + 3] + input[x + 4] + input[x + 5]);
+ input = ((spixel_t *) f->childimage->currlines[y + 2] + y / 2);
+ inp += (input[x] + input[x + 1] + input[x + 2] +
+ input[x + 3] + input[x + 4] + input[x + 5]);
+ *x1 -= *y1 / 2;
+ *y1 = y - (inp / 16 > height ? height : inp / 16);
+}
+
+static void do_3d(void *dataptr, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *RESTRICT f = (struct filter *) dataptr;
+ unsigned int y;
+ int maxinp = 0;
+ unsigned int x;
+ unsigned int end;
+ unsigned int sum;
+ spixel_t CONST *RESTRICT input;
+ unsigned int *RESTRICT lengths;
+ unsigned int *RESTRICT sums;
+ unsigned int *RESTRICT relsums;
+ struct threeddata *data = (struct threeddata *) f->data;
+
+
+ /* Copy to local variables to improve cse and memory references. */
+ unsigned int height = data->height;
+ unsigned int stereogrammode = data->stereogrammode;
+ unsigned int colheight = data->colheight;
+ unsigned int midcolor = data->midcolor;
+ unsigned int darkcolor = data->darkcolor;
+ CONST unsigned int *RESTRICT pixels = data->pixels;
+ cpixel_t *RESTRICT * RESTRICT currlines =
+ (cpixel_t * RESTRICT * RESTRICT) f->image->currlines;
+ struct inp {
+ int max;
+ unsigned int down;
+ } *inpdata;
+
+#ifdef HAVE_ALLOCA1
+ lengths =
+ (unsigned int *) alloca(sizeof(unsigned int) * f->image->width);
+ inpdata =
+ (struct inp *) alloca(sizeof(struct inp) * (f->image->width + 2));
+ sums =
+ (unsigned int *) alloca(sizeof(unsigned int) *
+ (f->image->width + 2) * 2);
+#else
+ lengths =
+ (unsigned int *) malloc(sizeof(unsigned int) * f->image->width);
+ inpdata =
+ (struct inp *) malloc(sizeof(struct inp) * (f->image->width + 2));
+ sums =
+ (unsigned int *) malloc(sizeof(unsigned int) *
+ (f->image->width + 2) * 2);
+#endif
+ for (x = 0; x < (unsigned int) f->image->width; x++)
+ lengths[x] = f->image->height - 1,
+ sums[x * 2 + 0] = 0, sums[x * 2 + 1] = 0, inpdata[x].max = 0;
+ sums[x * 2 + 0] = 0, sums[x * 2 + 1] = 0, inpdata[x].max = 0;
+ inpdata[x + 1].max = 0;
+ end = r2;
+ for (y = f->childimage->height - 2; y > 0;) {
+ y--;
+ input = ((spixel_t *) f->childimage->currlines[y] + y / 2);
+ x = r1;
+ relsums = sums + (y & 1);
+
+ /* Fix boundary cases. */
+ /*relsums[0] = relsums[1];
+ relsums[end*2-1] = relsums[end*2-2]; */
+ inpdata[end + 1] = inpdata[end] = inpdata[end - 1];
+ sum =
+ input[x] + input[x + 1] + input[x + 2] + input[x + 3] +
+ input[x + 4] + input[x + 5];
+
+ while (x < end) {
+ unsigned int inp;
+ unsigned int d;
+
+ /* Average pixel values of 5*3 square to get nicer shapes. */
+ sum += input[x + 6] - input[x];
+ inp = sum + sums[x * 2 + 1] + sums[x * 2];
+ relsums[x * 2] = sum;
+ inpdata[x].down = inp;
+
+ /* Calculate shades. */
+ maxinp = inpdata[x + 2].max;
+ if ((int) inp > maxinp)
+ inpdata[x].max = inp - 32;
+ else
+ inpdata[x].max = maxinp - 32;
+
+ /* caluclate top of mountain. */
+ d = inp / 16;
+ d = y - (d > height ? height : d);
+
+ /* Underflow */
+ if (d > 65535U)
+ d = 0;
+ if (d < lengths[x]) {
+ int y1;
+ unsigned int color;
+ if (stereogrammode)
+ color = pixels[y];
+ else if (inp / 16 > height)
+ /*Red thinks on the top. */
+ color =
+ pixels[inp / 16 >=
+ colheight ? colheight : inp / 16];
+ else {
+ int c;
+ /* Simple shading model.
+ Depends only on the preceding voxel. */
+
+ c = ((int) inpdata[x + 2].down - (int) inp) / 8;
+
+ /* Get shades. */
+ color =
+ ((int) inp > maxinp ? midcolor : darkcolor) - c;
+ color =
+ pixels[color <
+ 65535 ? (color <
+ height ? color : height) : 0];
+ }
+ for (y1 = lengths[x]; y1 >= (int) d; y1--) {
+ p_setp(currlines[y1], x, color);
+ }
+ lengths[x] = d;
+ }
+ x++;
+ }
+ }
+#ifndef HAVE_ALLOCA1
+ free(lengths);
+ free(inpdata);
+ free(sums);
+#endif
+}
+#endif
+#undef do_3d
+#undef convert_3d
+#undef convertup_3d
diff --git a/src/engine/Makefile.in b/src/engine/Makefile.in
new file mode 100644
index 0000000..5615ae6
--- /dev/null
+++ b/src/engine/Makefile.in
@@ -0,0 +1,70 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = formulas.c \
+ fractal.c \
+ btrace.c \
+ palettef.c \
+ emboss.c \
+ star.c \
+ anti.c \
+ dither.c \
+ edge.c \
+ edge2.c \
+ rotate.c \
+ zoom.c \
+ blur.c \
+ interlace.c \
+ itersmall.c \
+ stereogram.c \
+ 3d.c \
+ subwindow.c \
+ plane.c \
+ julia.c \
+ i386.c
+
+
+OBJS = $(SRCS:.c=.o)
+
+TLIB = ../lib/libengine.a
+
+
+all: $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $(OBJS)
+ $(RANLIB) $@
+
+formulas.o: docalc.c
+3d.o: 3dd.c
+btrace.o: btraced.c
+edge2.o: edge2d.c
+palette.o: paletted.c
+rotate.o: rotated.c
+stereogram.o: stereod.c
+star.o: stard.c
+zoom.o: zoomd.c
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/engine/anti.c b/src/engine/anti.c
new file mode 100644
index 0000000..819d33e
--- /dev/null
+++ b/src/engine/anti.c
@@ -0,0 +1,358 @@
+#include <config.h>
+#ifndef _plan9_
+#ifndef __cplusplus
+#include <math.h>
+#endif
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <string.h>
+#include <config.h>
+#include <stdio.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#include <stdlib.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <xerror.h>
+#include <filter.h>
+#include <fractal.h>
+#include <xthread.h>
+struct antidata {
+ int shift;
+};
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->supportedmask = TRUECOLOR24 | TRUECOLOR | TRUECOLOR16 | GRAYSCALE;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ struct antidata *s = (struct antidata *) f->data;
+ if (i->image->width * i->image->height * i->image->bytesperpixel * 2 *
+ 16 > 15 * 1024 * 1024) {
+ s->shift = 1;
+ } else {
+ s->shift = 2;
+ }
+ inhermisc(f, i);
+ if (!inherimage
+ (f, i, TOUCHIMAGE | IMAGEDATA,
+ (int) (((unsigned int) i->image->width) << s->shift),
+ (int) (((unsigned int) i->image->height) << s->shift), NULL, 0,
+ 0))
+ return 0;
+ if (i->image == NULL) {
+ return 0;
+ }
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct antidata *i = (struct antidata *) calloc(1, sizeof(*i));
+ f->childimage = NULL;
+ f->data = i;
+ f->name = "Antialiasing";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ destroyinheredimage(f);
+ free(f->data);
+ free(f);
+}
+
+static void antigray(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *srci = f->childimage, *desti = f->image;
+ struct antidata *s = (struct antidata *) f->data;
+ register unsigned char *src;
+ unsigned char *destend, *dest;
+ unsigned int ystart, y;
+ unsigned int xstart;
+ register unsigned int sum;
+ unsigned int xstep = (1U << (s->shift));
+ int i;
+ for (i = r1; i < r2; i++) {
+ dest = (unsigned char *) desti->currlines[i];
+ destend = dest + desti->width;
+ ystart = ((unsigned int) i) << s->shift;
+ xstart = 0;
+ for (; dest < destend; dest++) {
+ if (xstep > 2) {
+ sum = 0;
+ for (y = 0; y < 4; y++) {
+ src =
+ (unsigned char *) srci->currlines[y + ystart] +
+ xstart;
+ sum += (unsigned int) src[0];
+ sum += (unsigned int) src[1];
+ sum += (unsigned int) src[2];
+ sum += (unsigned int) src[3];
+ }
+ sum >>= 4;
+ } else {
+ src = (unsigned char *) srci->currlines[ystart] + xstart;
+ sum = (unsigned int) src[0];
+ sum += (unsigned int) src[1];
+ src =
+ (unsigned char *) srci->currlines[ystart + 1] + xstart;
+ sum += (unsigned int) src[0];
+ sum += (unsigned int) src[1];
+ sum >>= 2;
+ }
+ *dest = (pixel8_t) sum;
+ xstart += xstep;
+ }
+ }
+}
+
+#ifdef STRUECOLOR24
+static void anti24(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *srci = f->childimage, *desti = f->image;
+ struct antidata *s = (struct antidata *) f->data;
+ register unsigned char *src;
+ unsigned char *destend, *dest;
+ unsigned int ystart, y;
+ unsigned int xstart;
+ register unsigned int sum;
+ unsigned int xstep = ((1U << s->shift) - 1) * 3;
+ int c = 0;
+ int i;
+ if (!srci->palette->info.truec.byteexact) {
+ x_fatalerror
+ ("Antialiasing filter:Unsupported colormask! Ask authors to add support for this :)");
+ }
+ for (i = r1; i < r2; i++) {
+ dest = (unsigned char *) desti->currlines[i];
+ destend = dest + desti->width * 3;
+ ystart = ((unsigned int) i) << s->shift;
+ xstart = 0;
+ c = 1;
+ for (; dest < destend; dest++) {
+ if (s->shift > 1) {
+ sum = 0;
+ for (y = 0; y < 4; y++) {
+ src =
+ (unsigned char *) srci->currlines[y + ystart] +
+ xstart;
+ sum += (unsigned int) src[0];
+ sum += (unsigned int) src[3];
+ sum += (unsigned int) src[6];
+ sum += (unsigned int) src[9];
+ }
+ sum >>= 4;
+ } else {
+ src = (unsigned char *) srci->currlines[ystart] + xstart;
+ sum = (unsigned int) src[0];
+ sum += (unsigned int) src[3];
+ src =
+ (unsigned char *) srci->currlines[ystart + 1] + xstart;
+ sum += (unsigned int) src[0];
+ sum += (unsigned int) src[3];
+ sum >>= 2;
+ }
+ *dest = (unsigned char) sum;
+ if (c == 3)
+ c = 0, xstart += xstep;
+ c++;
+ xstart++;
+ }
+ }
+}
+#endif
+#ifdef SUPPORT16
+#define MASKR1 ((unsigned int)((31+31744)+(31*65536*32)))
+#define MASKR2 ((unsigned int)((31+31744)*(65536/32)+31))
+
+#define MASKRH1 (31+31744)
+#define MASKRH2 (31*32)
+static void anti16(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *srci = f->childimage, *desti = f->image;
+ struct antidata *s = (struct antidata *) f->data;
+ register unsigned int *src;
+ unsigned short *destend, *dest;
+ int ystart, y;
+ int xstart;
+ register unsigned int sum1 = 0, sum2 = 0, sum;
+ unsigned int xstep = 1U << (s->shift - 1);
+ int i;
+ unsigned int mask1 =
+ (srci->palette->info.truec.
+ mask2 | (srci->palette->info.truec.mask1 << 16)) >> 4;
+ unsigned int mask2 =
+ srci->palette->info.truec.mask1 | (srci->palette->info.truec.
+ mask2 << 16);
+ for (i = r1; i < r2; i++) {
+ dest = (unsigned short *) desti->currlines[i];
+ destend = dest + desti->width;
+ ystart = ((unsigned int) i) << s->shift;
+ xstart = 0;
+ for (; dest < destend; dest++) {
+ if (xstep > 2) {
+ sum1 = sum2 = 0;
+ for (y = 0; y < 4; y++) {
+ src =
+ (unsigned int *) srci->currlines[y + ystart] +
+ xstart;
+ sum1 += ((unsigned int) src[0] >> 4) & mask1;
+ sum2 += ((unsigned int) src[0] >> 4) & mask2;
+ sum1 += (unsigned int) src[1] & mask1;
+ sum2 += (unsigned int) src[1] & mask2;
+ }
+ sum = ((sum1 >> 4) + (sum2 >> 16)) >> 4;
+ sum1 = (sum2 + (sum1 >> 12)) >> 4;
+ } else {
+ src = (unsigned int *) srci->currlines[ystart] + xstart;
+ sum1 = ((unsigned int) src[0] >> 4) & mask1;
+ sum2 = (unsigned int) src[0] & mask2;
+ src =
+ (unsigned int *) srci->currlines[ystart + 1] + xstart;
+ sum1 += ((unsigned int) src[0] >> 4) & mask1;
+ sum2 += (unsigned int) src[0] & mask2;
+ sum = ((sum1 << 4) + (sum2 >> 16)) >> 2;
+ sum1 = (sum2 + (sum1 >> 12)) >> 2;
+ }
+ *dest =
+ (sum & srci->palette->info.truec.
+ mask2) | (sum1 & srci->palette->info.truec.mask1);
+ xstart += xstep;
+ }
+ }
+}
+#endif
+
+
+#define MASK1 0x00ff00ff
+static void anti32(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *srci = f->childimage, *desti = f->image;
+ struct antidata *s = (struct antidata *) f->data;
+ register unsigned int *src;
+ unsigned int *destend, *dest;
+ unsigned int ystart, y;
+ unsigned int xstart;
+ register unsigned int sum1 = 0, sum2 = 0;
+ unsigned int xstep = 1U << s->shift;
+ int i;
+ if (!srci->palette->info.truec.byteexact) {
+ x_fatalerror
+ ("Antialiasing filter:Unsupported colormask2! ask authors to add support for this :)");
+ }
+ for (i = r1; i < r2; i++) {
+ dest = (unsigned int *) desti->currlines[i];
+ destend = dest + desti->width;
+ ystart = ((unsigned int) i) << s->shift;
+ xstart = 0;
+ for (; dest < destend; dest++) {
+ if (xstep > 2) {
+ sum1 = sum2 = 0;
+ for (y = 0; y < 4; y++) {
+ src =
+ (unsigned int *) srci->currlines[y + ystart] +
+ xstart;
+ sum1 += (unsigned int) src[0] & MASK1;
+ sum2 += ((unsigned int) src[0] >> 8) & MASK1;
+ sum1 += (unsigned int) src[1] & MASK1;
+ sum2 += ((unsigned int) src[1] >> 8) & MASK1;
+ sum1 += (unsigned int) src[2] & MASK1;
+ sum2 += ((unsigned int) src[2] >> 8) & MASK1;
+ sum1 += (unsigned int) src[3] & MASK1;
+ sum2 += ((unsigned int) src[3] >> 8) & MASK1;
+ }
+ sum1 >>= 4;
+ sum2 >>= 4;
+ } else {
+ src = (unsigned int *) srci->currlines[ystart] + xstart;
+ sum1 = (unsigned int) src[0] & MASK1;
+ sum2 = ((unsigned int) src[0] >> 8) & MASK1;
+ sum1 += (unsigned int) src[1] & MASK1;
+ sum2 += ((unsigned int) src[1] >> 8) & MASK1;
+ src =
+ (unsigned int *) srci->currlines[ystart + 1] + xstart;
+ sum1 += (unsigned int) src[0] & MASK1;
+ sum2 += ((unsigned int) src[0] >> 8) & MASK1;
+ sum1 += (unsigned int) src[1] & MASK1;
+ sum2 += ((unsigned int) src[1] >> 8) & MASK1;
+ sum1 >>= 2;
+ sum2 >>= 2;
+ }
+ *dest = (sum1 & MASK1) | ((sum2 & MASK1) << 8);
+ xstart += xstep;
+ }
+ }
+}
+
+static int doit(struct filter *f, int flags, int time1)
+{
+ int val;
+ updateinheredimage(f);
+ val = f->previous->action->doit(f->previous, flags, time1);
+ switch (f->image->palette->type) {
+ case GRAYSCALE:
+ xth_function(antigray, f, f->image->height);
+ break;
+#ifdef STRUECOLOR24
+ case TRUECOLOR24:
+ xth_function(anti24, f, f->image->height);
+ break;
+#endif
+#ifdef SUPPORT16
+ case TRUECOLOR16:
+ xth_function(anti16, f, f->image->height);
+ break;
+#endif
+ case TRUECOLOR:
+ xth_function(anti32, f, f->image->height);
+ break;
+ }
+ xth_sync();
+ return val;
+}
+
+static void convertup(struct filter *f, int *x, int *y)
+{
+ struct antidata *s = (struct antidata *) f->data;
+ *x >>= s->shift;
+ *y >>= s->shift;
+ f->next->action->convertup(f->next, x, y);
+}
+
+static void convertdown(struct filter *f, int *x, int *y)
+{
+ struct antidata *s = (struct antidata *) f->data;
+ *x <<= s->shift;
+ *y <<= s->shift;
+ f->previous->action->convertdown(f->previous, x, y);
+}
+
+
+CONST struct filteraction antialias_filter = {
+ "Antialiasing",
+ "anti",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertup,
+ convertdown,
+ NULL,
+};
diff --git a/src/engine/blur.c b/src/engine/blur.c
new file mode 100644
index 0000000..bfef8f3
--- /dev/null
+++ b/src/engine/blur.c
@@ -0,0 +1,393 @@
+#include <config.h>
+#ifndef _plan9_
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <string.h>
+#include <math.h>
+#include <stdio.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#include <stdlib.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <filter.h>
+#include <fractal.h>
+#include <xthread.h>
+#include <xerror.h>
+#include <archaccel.h>
+#define SIZE 64
+#define SIZE2 8
+#define AMOUNT 0.005
+#define DIV 1000.0
+#define MAXFRAMES 800*1000 /*after 800 frames should be OK */
+struct blurdata {
+ int bckuptime;
+ int counter;
+ struct palette *savedpalette, *palette;
+ unsigned char (*table)[256]; /*Used by blur routines */
+ int n;
+};
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags |= IMAGEDATA;
+ r->supportedmask =
+ C256 | TRUECOLOR24 | TRUECOLOR | TRUECOLOR16 | GRAYSCALE;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static void blur8(struct filter *f)
+{
+ struct image *desti = f->image;
+ struct blurdata *s = (struct blurdata *) f->data;
+ unsigned char (*table)[256] = s->table;
+ unsigned int i, i1, im, im1, ipl, ii;
+ if (f->image->palette->type == C256)
+ for (i = im = 0; i < SIZE; i++, im += 256 - s->n) {
+ for (i1 = im1 = 0; i1 < SIZE2;
+ i1++, im1 += s->n * (SIZE / SIZE2)) {
+ ipl = (im + im1 + 128) >> 8;
+ ii = i1 * (SIZE / SIZE2);
+ if (ipl == i && i != ii) {
+ if (i < ii)
+ ipl++;
+ else
+ ipl--;
+ }
+ ii = desti->palette->pixels[i];
+ table[i1][ii] =
+ (unsigned char) desti->palette->pixels[ipl];
+ }
+ } else
+ for (i = im = desti->palette->start, im *= 256 - s->n;
+ i < (unsigned int) desti->palette->end; i++, im += 256 - s->n)
+ {
+ for (i1 = im1 = desti->palette->start, im1 *= s->n;
+ i1 < (unsigned int) desti->palette->end;
+ i1++, im1 += s->n) {
+ ipl = (im + im1 + 128) >> 8;
+ if (ipl == i && i != i1) {
+ if (i < i1)
+ ipl++;
+ else
+ ipl--;
+ }
+ table[i1][i] = (unsigned char) ipl;
+ }
+ }
+}
+
+static void blurtruecolor(struct filter *f)
+{
+ struct blurdata *s = (struct blurdata *) f->data;
+ unsigned int i, i1, im, im1;
+ unsigned char (*table)[256] = s->table;
+ for (i = im = 0; i < 256; i++, im += 256 - s->n) {
+ for (i1 = im1 = 0; i1 < 256; i1++, im1 += s->n)
+ table[i1][i] = (unsigned char) ((im + im1) >> 8);
+ }
+}
+
+static void clear_image2(struct image *img)
+{
+ int i;
+ int color = img->palette->pixels[0];
+ int width = img->width * img->bytesperpixel;
+ if (!width)
+ width = (img->width + 7) / 8;
+ for (i = 0; i < img->height; i++)
+ memset_long(img->currlines[i], color, (size_t) width);
+}
+
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ struct blurdata *s = (struct blurdata *) f->data;
+ unsigned int x;
+ inhermisc(f, i);
+ s->counter = 0;
+ s->palette->size = SIZE2;
+ for (x = 0; x < SIZE2; x++)
+ s->palette->pixels[x] = x;
+ if (datalost(f, i) || i->image->version != f->imageversion) {
+ s->bckuptime = MAXFRAMES;
+ s->counter = MAXFRAMES;
+ if (i->image->palette->type == C256) {
+ if (s->savedpalette == NULL)
+ s->savedpalette = clonepalette(i->image->palette);
+ mkblurpalette(i->image->palette);
+ } else {
+ if (s->savedpalette != NULL) {
+ restorepalette(i->image->palette, s->savedpalette);
+ destroypalette(s->savedpalette);
+ s->savedpalette = NULL;
+ }
+ }
+ clear_image2(i->image);
+ }
+ if (!inherimage
+ (f, i, TOUCHIMAGE | IMAGEDATA, 0, 0,
+ i->image->palette->type == C256 ? s->palette : NULL, 0, 0))
+ return 0;
+ if (f->image->palette->type == C256) {
+ setfractalpalette(f, s->savedpalette);
+ }
+ if (i->image == NULL) {
+ return 0;
+ }
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct blurdata *i = (struct blurdata *) calloc(1, sizeof(*i));
+ i->savedpalette = NULL;
+ i->palette =
+ createpalette(0, 256, SMALLITER, 0, 256, NULL, NULL, NULL, NULL,
+ NULL);
+ i->palette->size = SIZE2;
+ i->palette->end = SIZE2;
+ i->table = NULL;
+ f->childimage = NULL;
+ f->data = i;
+ f->name = "Motionblur";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ struct blurdata *i = (struct blurdata *) f->data;
+ if (i->table != NULL)
+ free(i->table);
+ if (i->savedpalette != NULL)
+ destroypalette(i->savedpalette);
+ destroypalette(i->palette);
+ destroyinheredimage(f);
+ free(f->data);
+ free(f);
+}
+
+/* An part of blur function that should be done paraely */
+static void blur82(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *srci = f->childimage, *desti = f->image;
+ struct blurdata *s = (struct blurdata *) f->data;
+ unsigned char (*table)[256];
+ int i, im;
+ unsigned char *src, *dest, *srcend;
+
+ im = srci->width;
+ table = s->table;
+ for (i = r1; i < r2; i++) {
+ src = srci->currlines[i];
+ srcend = src + im;
+ dest = desti->currlines[i];
+ for (; src < srcend; src++, dest++) {
+ dest[0] = table[src[0]][dest[0]];
+ }
+ }
+}
+
+#ifdef SUPPORT16
+static void blur16(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *srci = f->childimage, *desti = f->image;
+ struct blurdata *s = (struct blurdata *) f->data;
+ struct truec *info = &srci->palette->info.truec;
+ unsigned int rmask = info->rmask;
+ unsigned int gmask = info->gmask;
+ unsigned int bmask = info->bmask;
+ unsigned int n = (unsigned int) s->n;
+ int i;
+ pixel16_t *src, *dest, *srcend;
+ for (i = r1; i < r2; i++) {
+ src = (pixel16_t *) srci->currlines[i];
+ srcend = src + srci->width;
+ dest = (pixel16_t *) desti->currlines[i];
+ for (; src < srcend; src++, dest++) {
+ *dest = interpol(*src, *dest, n, rmask, gmask, bmask);
+ }
+ }
+}
+#endif
+#ifdef STRUECOLOR24
+static void blur24(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *srci = f->childimage, *desti = f->image;
+ struct blurdata *s = (struct blurdata *) f->data;
+ unsigned char (*table)[256] = s->table;
+ unsigned char *src, *dest, *srcend;
+ int i, im;
+ im = srci->width * 3;
+ if (!srci->palette->info.truec.byteexact) {
+ x_fatalerror
+ ("Blur filter:unsupported color configuration! Please contact authors.");
+ }
+ for (i = r1; i < r2; i++) {
+ src = srci->currlines[i];
+ srcend = src + im;
+ dest = desti->currlines[i];
+ for (; src < srcend; src += 3, dest += 3) {
+ dest[0] = table[src[0]][dest[0]];
+ dest[1] = table[src[1]][dest[1]];
+ dest[2] = table[src[2]][dest[2]];
+ }
+ }
+}
+#endif
+static void blur32(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *srci = f->childimage, *desti = f->image;
+ struct blurdata *s = (struct blurdata *) f->data;
+ unsigned char (*table)[256] = s->table;
+ unsigned char *src, *dest, *srcend;
+ int i, im;
+ im = srci->width * 4;
+ if (!srci->palette->info.truec.byteexact) {
+ x_fatalerror
+ ("Blur filter:unsupported color configuration! Please contact authors.");
+ }
+ for (i = r1; i < r2; i++) {
+ src = srci->currlines[i];
+ srcend = src + im;
+ dest = desti->currlines[i];
+ switch (f->image->palette->info.truec.missingbyte) {
+ case 3:
+ for (; src < srcend; src += 4, dest += 4) {
+ dest[0] = table[src[0]][dest[0]];
+ dest[1] = table[src[1]][dest[1]];
+ dest[2] = table[src[2]][dest[2]];
+ }
+ break;
+ case 2:
+ for (; src < srcend; src += 4, dest += 4) {
+ dest[0] = table[src[0]][dest[0]];
+ dest[1] = table[src[1]][dest[1]];
+ dest[3] = table[src[2]][dest[2]];
+ }
+ break;
+ case 1:
+ for (; src < srcend; src += 4, dest += 4) {
+ dest[0] = table[src[0]][dest[0]];
+ dest[2] = table[src[1]][dest[1]];
+ dest[3] = table[src[2]][dest[2]];
+ }
+ break;
+ case 0:
+ for (; src < srcend; src += 4, dest += 4) {
+ dest[1] = table[src[1]][dest[1]];
+ dest[2] = table[src[2]][dest[2]];
+ dest[3] = table[src[3]][dest[3]];
+ }
+ break;
+ default:
+ for (; src < srcend; src += 4, dest += 4) {
+ dest[1] = table[src[1]][dest[1]];
+ dest[2] = table[src[2]][dest[2]];
+ dest[3] = table[src[3]][dest[3]];
+ dest[4] = table[src[4]][dest[4]];
+ }
+ }
+ }
+}
+
+static int doit(struct filter *f, int flags, int time1)
+{
+ int val, n;
+ int time = time1;
+ struct blurdata *s = (struct blurdata *) f->data;
+ updateinheredimage(f);
+ val = f->previous->action->doit(f->previous, flags, time);
+ s->counter += time;
+ if (val & CHANGED)
+ s->counter = 0;
+ n = (int) ((1 - pow(1.0 - AMOUNT, (time + s->bckuptime) / DIV)) * 256);
+ if (s->counter >= 2 * MAXFRAMES) {
+ return val;
+ }
+ if (n < 10) {
+ s->bckuptime += time;
+ return val | ANIMATION;
+ }
+ s->bckuptime = 0;
+ if (s->counter >= MAXFRAMES)
+ n = 256, s->counter = 2 * MAXFRAMES;
+ if (s->n != n) {
+ s->n = n;
+ switch (f->image->bytesperpixel) {
+ case 1:
+ if (s->table == NULL)
+ s->table = (unsigned char (*)[256]) malloc(256 * 256);
+ blur8(f);
+ break;
+ case 3:
+ case 4:
+ if (s->table == NULL)
+ s->table = (unsigned char (*)[256]) malloc(256 * 256);
+ blurtruecolor(f);
+ break;
+ default:
+ if (s->table != NULL)
+ free(s->table), s->table = NULL;
+ }
+ }
+ switch (f->image->palette->type) {
+ case C256:
+ case GRAYSCALE:
+ xth_function(blur82, f, f->image->height);
+ break;
+#ifdef SUPPORT16
+ case TRUECOLOR16:
+ xth_function(blur16, f, f->image->height);
+ break;
+#endif
+ case TRUECOLOR:
+ xth_function(blur32, f, f->image->height);
+ break;
+#ifdef STRUECOLOR24
+ case TRUECOLOR24:
+ xth_function(blur24, f, f->image->height);
+ break;
+#endif
+ }
+ xth_sync();
+ if (s->counter == 2 * MAXFRAMES) {
+ return val | CHANGED;
+ }
+ return val | CHANGED | ANIMATION;
+}
+
+static void myremovefilter(struct filter *f)
+{
+ struct blurdata *s = (struct blurdata *) f->data;
+ if (s->savedpalette != NULL) {
+ restorepalette(f->image->palette, s->savedpalette);
+ destroypalette(s->savedpalette);
+ s->savedpalette = NULL;
+ }
+}
+
+CONST struct filteraction blur_filter = {
+ "Motionblur",
+ "blur",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ myremovefilter
+};
diff --git a/src/engine/btrace.c b/src/engine/btrace.c
new file mode 100644
index 0000000..3c02570
--- /dev/null
+++ b/src/engine/btrace.c
@@ -0,0 +1,596 @@
+#include <config.h>
+#ifndef _plan9_
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <math.h>
+#include <stdio.h>
+#include <string.h>
+#include <limits.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#define SLARGEITER
+#include <filter.h>
+#include <fractal.h>
+#include <xthread.h>
+/*
+ * This is an implementation of famous boundary trace algorithm.
+ * See fractint documentation if you don't know what this means :)
+ *
+ * Here is two different implentation of this algorithm - one is faster
+ * and second is threadable.
+ *
+ * An faster one is quite usual implementation - get first uncalculated pixel,
+ * trace algorithm using labirinth "right hand rule" way (well, I currently
+ * use left hand rule) then trace same boundary again and fill. It is
+ * implemented in tracerectangle/tracecolor
+ *
+ * An threaded one follows description I sent to sci.fractals:
+ Hi
+ few weeks ago I asked for multithreaded algorithm for boundary trace
+ I received following reply by Paul Derbyshire
+ > One method is this. One b-trace algorithm pushes pixels onto a stack.
+ > Initially the screen border pixels are all pushed. Then a loop starts. A
+ > pixel is popped and calculated or recalled, with 4 orthogonal neighbors
+ > calculated or recalled if already calculated; if the central pixel is at a
+ > color boundary the neighbors are pushed. The image is done when the stack
+ > hits empty, then empty areas of image are floodfilled by their boundary
+ > color. (Fractint does it differently, not sure how). By this method, the
+ > stack will usually have at least 4 pixels, and so four substacks can be
+ > assigned to each of 4 processors, and each processor has a "processor to
+ > its left" designated as if they were in a "logical" ring. Each processor
+ > pushes new pixels on the processor to its left's substack, and pops from
+ > its own. This way, busy parts of the image wind up spread among all
+ > processors. By adding substacks, this can be expanded to accomodate more
+ > processors. Some amount is optimal, after which a point of diminishing
+ > returns is reached when most processors only do a few pixels and spend
+ > most of their time waiting for new stuff from the processor to its right.
+ > You'll need to figure out this optimum somehow; I can't guess what it
+ > would be. Probably around 64 processors. (More than that, you would do
+ > well just to assign separate processors small rectangular subsets of the
+ > image anyways.) Also, the end is only reached when NO processors have
+ > anything in their stacks.
+ This method looks very interesting but has few serious problems.
+ Most significant probably is that it always caluclates pixels up
+ to distance 3 from boundary. Simple modification should lower it
+ to distance 2. But "right hand rule" based algorithm should actualy
+ calculate points just to distance 1. So I want to implement such alrogithm,
+ since number of caluclated points is still significant.
+
+ So I think I have to extend stack for two informations:
+ 1) direction
+ 2) color of boundary I am tracking(not color I am at)
+ and main algorithm should look like:
+ 1) detect color of current point
+ 2) look right. Is there same color?
+ yes:add point at the right to stack and exit
+ is there boundary color?
+ no:we are meeting boundary with different color - so we need
+ to track this boundary too. add point at right to stack with oposite
+ direction and boundary color set to current color
+ 3) look forward: similiar scheme as to look right
+ 4) look left: again similiar
+ 5) exit
+
+ This hould trace boundaries to distance 1 (I hope) and do not miss anything.
+ Problem is that this algorithm never ends, since boundaries will be rescaned
+ again and again. So I need to add an caluclated array wich should looks like:
+ for every point has mask for all directions that were scaned+calculated mask
+ (set to 1 if pixel is already calculated)+inprocess mask(set to 1 if some
+ other processor is currently calculating it)
+
+ Scan masks should be set in thime when pixel is added to stack and pixel
+ should not be added in case that mask is already set. I don't this that locks
+ to this array is required since time spent by setting masks should be quite
+ small and possible race conditions should not be drastical(except recalculating
+ some point)
+
+ I was also thinking about perCPU queues. I think that one queue is OK,
+ it is simplier and should not take much more time(except it will be locked
+ more often but time spend in locked queue in comparsion to time spent
+ in rest should be so small so this should not be drastical for less than 10
+ procesors)
+
+ At the other hand - perCPU queues should have one advantage - each
+ cpu should own part of image and points from its part will be added to
+ this cpu. This should avoid procesor cache conflict and speed up process.
+ At the other hand, when cpu's queue is empty, cpu will have to browse
+ others queues too and steal some points from other CPU, wich should introduce
+ some slowdown and I am not sure if this way will bring any improvement.
+
+ Other think that should vote for perCPU queue is fact, that in one CPU
+ queue should be more often situations when queue is empty since one procesor
+ is caluclating points and other has wait, since it had tendency to trace
+ just one boundary at the time. At the other hand, most of boundaries should
+ cross broders, so they should be added to queue at the initialization, so
+ this should be OK.
+
+ I am beginer to threds, SMP etc. So I looking for ideas, and suggestions
+ to improve this alg. (or design different one).
+ Also someone with SMP box, who should test me code is welcomed.
+ BTW whats is the average/maximal number of CPU in todays SMP boxes?
+
+ Please reply directly to my email:hubicka@paru.cas.cz
+
+ Thanks
+ Honza
+ * This way is implemented in tracerectangle2/tracepoint. It is enabled
+ * just when threads are compiled in. Also when nthreads=1, old faster
+ * algorithm is used.
+ *
+ * Implementation notes:
+ * 1) I decided to use one queue instead of stack, since I expect, it will
+ * have tendency to trace all boundaries at the time, not just one.
+ * This will make queue bigger and reduce probability of situation, where
+ * queue is empty and other processors has to wait for one, that is
+ * calculating and should add something there (maybe :)
+ * 2) Stack (queue :) is used just when neccesary - in situations where queue
+ * is quite full (there is more items than 10) procesor just continues in
+ * tracing path it started. This reduces number of slow stack operations,
+ * locks/unlocks, cache conflicts and other bad thinks.
+ * 3) Just each fourth pixel should be added into queue
+ * 4) Foodfill algorithm should be avoided since colors at the boundaries
+ * are always correct, we should simply go trought each scanline and when
+ * pixel is uncalcualted, copy value from its left neighbor
+ *
+ * Current implementation has about 6% lower results than "fast" algorithm
+ * using one thread. When two threads enabled (at my one processor linux
+ * box) lock/unlock overhead eats next 8%, three threads eats next 1% :)
+ */
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#include <archaccel.h>
+
+#include <filter.h>
+#include <btrace.h>
+#include <plane.h>
+#include "calculate.h"
+
+#define UP 0
+#define RIGHT 1
+#define DOWN 2
+#define LEFT 3
+#define turnleft(d) (((d)+3)&3)
+#define turnright(d) (((d)+1)&3)
+#define turnoposite(d) (((d)+2)&3)
+#define callwait() if(cfilter.wait_function!=NULL) cfilter.wait_function(&cfilter);
+
+
+#ifndef nthreads
+static int size;
+static unsigned int inset;
+static int nwaiting;
+static int exitnow;
+#define PAGESHIFT 14
+#define PAGESIZE (1<<PAGESHIFT)
+#define MAXPAGES 200 /*Well limit is about 6MB of stack..Hope it will never owerflow */
+#define MAXSIZE (MAXPAGES*PAGESIZE-1)
+struct stack {
+ int color;
+ short x, y;
+ char direction;
+};
+static int npages[MAXTHREADS];
+static struct stack *pages[MAXPAGES];
+static struct stack **starts[MAXTHREADS];
+static int sizes[MAXTHREADS];
+static int maxsize, maxsize2;
+static CONST char dirrections[][2] = {
+ {0, -1},
+ {1, 0},
+ {0, 1},
+ {-1, 0},
+};
+
+#define addstack(sx,sy,d,c,periodicity) { \
+ int page; \
+ int nstack=(((sy)-ystart)*nthreads)/(yend-ystart+1); \
+ struct stack *ptr; \
+ calculated[sx+sy*CALCWIDTH]|=1<<d; \
+ xth_lock(0); \
+ if(size<maxsize2) {\
+ while(sizes[nstack]>=maxsize) if(nstack>=nthreads-1) nstack=0; else nstack++; \
+ page=sizes[nstack]>>PAGESHIFT; \
+ if(page==npages[nstack]) starts[nstack][npages[nstack]]=(struct stack *)malloc(sizeof(struct stack)*PAGESIZE),npages[nstack]++;\
+ ptr=starts[nstack][page]+(sizes[nstack]&(PAGESIZE-1)); \
+ ptr->x=sx; \
+ ptr->y=sy; \
+ if(periodicity) \
+ ptr->direction=d|8; else \
+ ptr->direction=d; \
+ ptr->color=c; \
+ size++; \
+ sizes[nstack]++; \
+ if(nwaiting) xth_wakefirst(0); \
+ } \
+ xth_unlock(0); \
+}
+/*Non locking one used by init code */
+#define addstack1(sx,sy,d,c) { \
+ int page; \
+ struct stack *ptr; \
+ int nstack=(((sy)-y1)*nthreads)/(y2-y1+1); \
+ calculated[sx+sy*CALCWIDTH]|=1<<d; \
+ if(size<maxsize2) {\
+ while(sizes[nstack]>=maxsize) if(nstack==nthreads-1) nstack=0; else nstack++; \
+ page=sizes[nstack]>>PAGESHIFT; \
+ if(page==npages[nstack]) starts[nstack][npages[nstack]]=(struct stack *)malloc(sizeof(struct stack)*PAGESIZE),npages[nstack]++; \
+ ptr=starts[nstack][page]+(sizes[nstack]&(PAGESIZE-1)); \
+ ptr->x=sx; \
+ ptr->y=sy; \
+ ptr->direction=d|8; \
+ ptr->color=c; \
+ size++; \
+ sizes[nstack]++; \
+ } \
+}
+static int xstart, ystart, xend, yend;
+#endif
+
+static unsigned char *calculated;
+#define CALCULATED 16
+#define CALCULATING 32
+#define CALCWIDTH cimage.width
+
+static number_t *xcoord, *ycoord;
+#ifndef inline
+REGISTERS(3)
+CONSTF static pixel32_t calculatepixel(int x, int y, int peri)
+{
+ return (calculate(xcoord[x], ycoord[y], peri));
+}
+#else
+#define calculatepixel(x,y,peri) (calculate(xcoord[x],ycoord[y],peri))
+#endif
+#define putpixel(x,y,c) p_setp((cpixel_t *)cimage.currlines[y],x,c)
+#define getpixel(x,y) p_getp((cpixel_t *)cimage.currlines[y],x)
+#include <c256.h>
+#define tracecolor tracecolor8
+#define tracepoint tracepoint8
+#define dosymetries dosymetries8
+#define queue queue8
+#define bfill bfill8
+#include "btraced.c"
+#include <hicolor.h>
+#define tracecolor tracecolor16
+#define tracepoint tracepoint16
+#define dosymetries dosymetries16
+#define queue queue16
+#define bfill bfill16
+#include "btraced.c"
+#include <true24.h>
+#define tracecolor tracecolor24
+#define tracepoint tracepoint24
+#define dosymetries dosymetries24
+#define queue queue24
+#define bfill bfill24
+#include "btraced.c"
+#include <truecolor.h>
+#define tracecolor tracecolor32
+#define tracepoint tracepoint32
+#define dosymetries dosymetries32
+#define queue queue32
+#define bfill bfill32
+#include "btraced.c"
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+#ifndef SLOWCACHESYNC
+#ifndef nthreads
+static int tracerectangle2(int x1, int y1, int x2, int y2)
+{
+ int x, y;
+ cfilter.max = y2 - y1;
+ cfilter.pass = gettext("Boundary trace");
+ cfilter.pos = 0;
+ maxsize = MAXPAGES / nthreads;
+ for (y = 0; y < nthreads; y++) {
+ npages[y] = 0; /*stack is empty */
+ sizes[y] = 0;
+ starts[y] = pages + y * maxsize;
+ }
+ maxsize *= PAGESIZE;
+ maxsize2 = maxsize * nthreads;
+ size = 0;
+ nwaiting = 0;
+ exitnow = 0;
+ inset = cpalette.pixels[0];
+ for (y = y1; y <= y2; y++) {
+ memset_long(calculated + x1 + y * CALCWIDTH, 0, x2 - x1 + 1);
+ }
+ for (x = x1; x <= x2; x += 4) {
+ addstack1(x, y1, LEFT, INT_MAX);
+ addstack1(x, y2, RIGHT, INT_MAX);
+ }
+ for (y = y1; y <= y2; y += 4) {
+ addstack1(x1, y, DOWN, INT_MAX);
+ addstack1(x2, y, UP, INT_MAX);
+ }
+ xstart = x1;
+ ystart = y1;
+ xend = x2;
+ yend = y2;
+ switch (cimage.bytesperpixel) {
+ case 1:
+ xth_function(queue8, NULL, 1);
+ xth_sync();
+ xth_function(bfill8, NULL, yend - ystart - 1);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ xth_function(queue16, NULL, 1);
+ xth_sync();
+ xth_function(bfill16, NULL, yend - ystart - 1);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ xth_function(queue24, NULL, 1);
+ xth_sync();
+ xth_function(bfill24, NULL, yend - ystart - 1);
+ break;
+#endif
+ case 4:
+ xth_function(queue32, NULL, 1);
+ xth_sync();
+ xth_function(bfill32, NULL, yend - ystart - 1);
+ break;
+ }
+ xth_sync();
+ for (y = 0; y < nthreads; y++)
+ for (x = 0; x < npages[y]; x++)
+ free(starts[y][x]); /*free memory allocated for stack */
+ return 1;
+}
+#endif
+#endif
+static void skip(int x1, int y1, int x2, int y2)
+{
+ int src = y1;
+ int xstart = x1 * cimage.bytesperpixel;
+ int xsize = (x2 - x1 + 1) * cimage.bytesperpixel;
+ y1++;
+ for (; y1 <= y2; y1++) {
+ memcpy(cimage.currlines[y1] + xstart,
+ cimage.currlines[src] + xstart, xsize);
+ ycoord[y1] = ycoord[src];
+ }
+}
+
+static int tracerectangle(int x1, int y1, int x2, int y2)
+{
+ int x, y;
+ unsigned char *calc;
+ cfilter.max = y2 - y1;
+ cfilter.pass = gettext("Boundary trace");
+ cfilter.pos = 0;
+ for (y = y1; y <= y2; y++) {
+ memset_long(calculated + x1 + y * CALCWIDTH, 0,
+ (size_t) (x2 - x1 + 1));
+ }
+ switch (cimage.bytesperpixel) {
+ case 1:
+ for (y = y1; y <= y2; y++) {
+ calc = calculated + y * CALCWIDTH;
+ for (x = x1; x <= x2; x++)
+ if (!calc[x]) {
+ tracecolor8(x1, y1, x2, y2, x, y);
+ }
+ cfilter.pos = y - y1;
+ callwait();
+ if (cfilter.interrupt) {
+ skip(x1, y, x2, y2);
+ return 0;
+ }
+ }
+ break;
+#ifdef SUPPORT16
+ case 2:
+ for (y = y1; y <= y2; y++) {
+ calc = calculated + y * CALCWIDTH;
+ for (x = x1; x <= x2; x++)
+ if (!calc[x]) {
+ tracecolor16(x1, y1, x2, y2, x, y);
+ }
+ cfilter.pos = y - y1;
+ callwait();
+ if (cfilter.interrupt) {
+ skip(x1, y, x2, y2);
+ return 0;
+ }
+ }
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ for (y = y1; y <= y2; y++) {
+ calc = calculated + y * CALCWIDTH;
+ for (x = x1; x <= x2; x++)
+ if (!calc[x]) {
+ tracecolor24(x1, y1, x2, y2, x, y);
+ }
+ cfilter.pos = y - y1;
+ callwait();
+ if (cfilter.interrupt) {
+ skip(x1, y, x2, y2);
+ return 0;
+ }
+ }
+#endif
+ case 4:
+ for (y = y1; y <= y2; y++) {
+ calc = calculated + y * CALCWIDTH;
+ for (x = x1; x <= x2; x++)
+ if (!calc[x]) {
+ tracecolor32(x1, y1, x2, y2, x, y);
+ }
+ cfilter.pos = y - y1;
+ callwait();
+ if (cfilter.interrupt) {
+ skip(x1, y, x2, y2);
+ return 0;
+ }
+ }
+ break;
+ }
+ return 1;
+}
+
+int
+boundarytrace(int x1, int y1, int x2, int y2, number_t * xpos,
+ number_t * ypos)
+{
+ int i;
+ int i1;
+ int xsym, ysym;
+ int cy1, cy2;
+ int cx1, cx2;
+ int ydiv;
+#ifdef HAVE_ALLOCA
+ calculated = (unsigned char *) alloca(cimage.width * (y2 + 1));
+#else
+ calculated = (unsigned char *) malloc(cimage.width * (y2 + 1));
+#endif
+ if (calculated == NULL) {
+ return 0;
+ }
+ xcoord = xpos;
+ ycoord = ypos;
+
+
+ if (cursymetry.xsym < cfractalc.rs.nc
+ || cursymetry.xsym > cfractalc.rs.mc)
+ xsym = -10;
+ else
+ xsym =
+ (int) (0.5 +
+ ((cursymetry.xsym -
+ cfractalc.rs.nc) * cimage.width / (cfractalc.rs.mc -
+ cfractalc.rs.nc)));
+ if (cursymetry.ysym < cfractalc.rs.ni
+ || cursymetry.ysym > cfractalc.rs.mi)
+ ysym = -10;
+ else
+ ysym =
+ (int) (0.5 +
+ ((cursymetry.ysym -
+ cfractalc.rs.ni) * cimage.height / (cfractalc.rs.mi -
+ cfractalc.rs.
+ ni)));
+ ydiv =
+ (int) (0.5 +
+ ((-cfractalc.rs.ni) * cimage.height /
+ (cfractalc.rs.mi - cfractalc.rs.ni)));
+ if (xsym > x1 && xsym < x2) {
+ if (xsym - x1 > x2 - xsym)
+ cx1 = x1, cx2 = xsym;
+ else
+ /*xsym--, */ cx1 = xsym, cx2 = x2;
+ } else
+ xsym = -1, cx1 = x1, cx2 = x2;
+ if (ysym > y1 && ysym < y2) {
+ if (ysym - y1 > y2 - ysym)
+ cy1 = y1, cy2 = ysym;
+ else
+ cy1 = ysym, cy2 = y2;
+ } else
+ ysym = -1, cy1 = y1, cy2 = y2;
+ for (i = cx1; i <= cx2; i++) {
+ xcoord[i] =
+ cfractalc.rs.nc + i * (cfractalc.rs.mc -
+ cfractalc.rs.nc) / cimage.width;
+ }
+ for (i = cy1; i <= cy2; i++) {
+ ycoord[i] =
+ cfractalc.rs.ni + i * (cfractalc.rs.mi -
+ cfractalc.rs.ni) / cimage.height;
+ }
+ i = 1;
+#ifndef SLOWCACHESYNC
+#ifndef nthreads
+ if (nthreads != 1) {
+ if (ydiv > cy1 && ydiv < cy2) {
+ i |= tracerectangle2(cx1, cy1, cx2, ydiv),
+ i |= tracerectangle2(cx1, ydiv, cx2, cy2);
+ } else
+ i |= tracerectangle2(cx1, cy1, cx2, cy2);
+ } else
+#endif
+#endif
+ {
+ if (ydiv > cy1 && ydiv < cy2) {
+ i |= tracerectangle(cx1, cy1, cx2, ydiv),
+ i |= tracerectangle(cx1, ydiv, cx2, cy2);
+ } else
+ i |= tracerectangle(cx1, cy1, cx2, cy2);
+ }
+ if (!i) {
+#ifndef HAVE_ALLOCA
+ free(calculated);
+#endif
+ return 0;
+ }
+#ifndef HAVE_ALLOCA
+ free(calculated);
+#endif
+ drivercall(cimage,
+ dosymetries8(x1, x2, y1, y2, xsym, cx1, cx2),
+ dosymetries16(x1, x2, y1, y2, xsym, cx1, cx2),
+ dosymetries24(x1, x2, y1, y2, xsym, cx1, cx2),
+ dosymetries32(x1, x2, y1, y2, xsym, cx1, cx2));
+ for (i = cx1; i <= cx2; i++) {
+ if (xsym != -1) {
+ i1 = 2 * xsym - i;
+ if (i1 >= x1 && i1 <= x2 && i != i1)
+ xcoord[i1] = 2 * cursymetry.xsym - xcoord[i];
+ }
+ }
+ for (i = cy1; i <= cy2; i++) {
+ if (ysym != -1) {
+ i1 = 2 * ysym - i;
+ if (i1 >= y1 && i1 <= y2 && i != i1)
+ ycoord[i1] = 2 * cursymetry.ysym - ycoord[i];
+ }
+ }
+ if (cy1 != y1) {
+ register int yy1, yy2;
+ int xstart = x1 * cimage.bytesperpixel;
+ int xsize = (x2 - x1 + 1) * cimage.bytesperpixel;
+ yy1 = y1;
+ yy2 = 2 * ysym - y1;
+ while (yy1 < yy2) {
+ memcpy(cimage.currlines[yy1] + xstart,
+ cimage.currlines[yy2] + xstart, (size_t) xsize);
+ yy1++;
+ yy2--;
+ }
+ }
+ if (cy2 != y2) {
+ register int yy1, yy2;
+ int xstart = x1 * cimage.bytesperpixel;
+ int xsize = (x2 - x1 + 1) * cimage.bytesperpixel;
+ yy1 = y2;
+ yy2 = 2 * ysym - y2;
+ while (yy1 > yy2) {
+ memcpy(cimage.currlines[yy1] + xstart,
+ cimage.currlines[yy2] + xstart, (size_t) xsize);
+ yy1--;
+ yy2++;
+ }
+ }
+ return 1;
+}
+
+int boundarytraceall(number_t * xpos, number_t * ypos)
+{
+ return (boundarytrace
+ (0, 0, cimage.width - 1, cimage.height - 1, xpos, ypos));
+}
diff --git a/src/engine/btraced.c b/src/engine/btraced.c
new file mode 100644
index 0000000..e0073c0
--- /dev/null
+++ b/src/engine/btraced.c
@@ -0,0 +1,466 @@
+#ifndef UNSUPPORTED
+REGISTERS(3)
+static void
+tracecolor(int xstart, int ystart, int xend, int yend, register int
+ x, register int y)
+{
+ int dir = RIGHT, fill = 0;
+ register unsigned char *calc;
+ int peri = 0;
+ cpixeldata_t c = (cpixeldata_t) calculatepixel(x, y, 0);
+ cpixeldata_t w = (cpixeldata_t) 0;
+ cpixeldata_t inset = (cpixeldata_t) cpalette.pixels[0];
+ putpixel(x, y, c);
+ calc = calculated + x + y * CALCWIDTH;
+ *calc = (unsigned char) 1;
+ while (x > xstart && getpixel(x - 1, y) == c)
+ x--, calc--;
+ *calc = (unsigned char) 2;
+ if (c == inset)
+ peri = 1;
+ do {
+ if (!fill && !*calc) {
+ *calc = (unsigned char) 1;
+ putpixel(x, y, c);
+ }
+ switch (dir) {
+ case RIGHT:
+ if (y > ystart) {
+ if (!*(calc - CALCWIDTH)) {
+ w = (cpixeldata_t) calculatepixel(x, y - 1, peri);
+ putpixel(x, y - 1, w);
+ *(calc - CALCWIDTH) = (unsigned char) 1;
+ } else
+ w = getpixel(x, y - 1);
+ if (w == c) {
+ dir = UP;
+ calc -= CALCWIDTH;
+ y--;
+ break;
+ }
+ }
+
+ if (x < xend) {
+ if (!*(calc + 1)) {
+ w = (cpixeldata_t) calculatepixel(x + 1, y, peri);
+ putpixel(x + 1, y, w);
+ *(calc + 1) = (unsigned char) 1;
+ } else
+ w = getpixel(x + 1, y);
+ if (w == c) {
+ calc++;
+ x++;
+ break;
+ }
+ }
+
+ if (y < yend) {
+ if (!*(calc + CALCWIDTH)) {
+ w = (cpixeldata_t) calculatepixel(x, y + 1, peri);
+ putpixel(x, y + 1, w);
+ *(calc + CALCWIDTH) = (unsigned char) 1;
+ } else
+ w = getpixel(x, y + 1);
+ if (w == c) {
+ dir = DOWN;
+ calc += CALCWIDTH;
+ y++;
+ break;
+ }
+ }
+
+ if (*calc == (unsigned char) 2) {
+ *calc = (unsigned char) 1;
+ return;
+ }
+
+ dir = LEFT;
+ x--;
+ calc--;
+ break;
+
+ case LEFT:
+ if (y < yend) {
+ if (!*(calc + CALCWIDTH)) {
+ w = (cpixeldata_t) calculatepixel(x, y + 1, peri);
+ putpixel(x, y + 1, w);
+ *(calc + CALCWIDTH) = (unsigned char) 1;
+ } else
+ w = getpixel(x, y + 1);
+ if (w == c) {
+ dir = DOWN;
+ calc += CALCWIDTH;
+ y++;
+ break;
+ }
+ }
+
+ if (x > xstart) {
+ if (!*(calc - 1)) {
+ w = (cpixeldata_t) calculatepixel(x - 1, y, peri);
+ putpixel(x - 1, y, w);
+ *(calc - 1) = (unsigned char) 1;
+ } else
+ w = getpixel(x - 1, y);
+ if (w == c) {
+ calc--;
+ x--;
+ break;
+ }
+ }
+
+ if (y > ystart) {
+ if (!*(calc - CALCWIDTH)) {
+ w = (cpixeldata_t) calculatepixel(x, y - 1, peri);
+ putpixel(x, y - 1, w);
+ *(calc - CALCWIDTH) = (unsigned char) 1;
+ } else
+ w = getpixel(x, y - 1);
+ if (w == c) {
+ dir = UP;
+ calc -= CALCWIDTH;
+ y--;
+ break;
+ }
+ }
+
+
+ dir = RIGHT;
+ x++;
+ calc++;
+ break;
+
+ case UP:
+ if (fill) {
+ unsigned char *calc1;
+ cpixel_t *pixel1;
+ calc1 = calc + 1;
+ pixel1 = p_add((cpixel_t *) cimage.currlines[y], x + 1);
+ while (pixel1 <=
+ p_add((cpixel_t *) cimage.currlines[y], xend)) {
+ if (!*calc1)
+ *calc1 = (unsigned char) 1, p_set(pixel1, c);
+ else if (p_get(pixel1) != c)
+ break;
+ p_inc(pixel1, 1);
+ calc1++;
+ }
+ }
+ if (x > xstart) {
+ if (!*(calc - 1)) {
+ w = (cpixeldata_t) calculatepixel(x - 1, y, peri);
+ putpixel(x - 1, y, w);
+ *(calc - 1) = (unsigned char) 1;
+ }
+ w = getpixel(x - 1, y);
+ if (w == c) {
+ dir = LEFT;
+ calc--;
+ x--;
+ break;
+ }
+ }
+
+ if (y > ystart) {
+ if (!*(calc - CALCWIDTH)) {
+ w = (cpixeldata_t) calculatepixel(x, y - 1, peri);
+ putpixel(x, y - 1, w);
+ *(calc - CALCWIDTH) = (unsigned char) 1;
+ }
+ w = getpixel(x, y - 1);
+ if (w == c) {
+ calc -= CALCWIDTH;
+ y--;
+ break;
+ }
+ }
+
+ if (x < xend) {
+ if (!*(calc + 1)) {
+ w = (cpixeldata_t) calculatepixel(x + 1, y, peri);
+ putpixel(x + 1, y, w);
+ *(calc + 1) = (unsigned char) 1;
+ } else
+ w = getpixel(x + 1, y);
+ if (w == c) {
+ dir = RIGHT;
+ calc++;
+ x++;
+ break;
+ }
+ }
+
+ dir = DOWN;
+ y++;
+ calc += CALCWIDTH;
+ break;
+ case DOWN:
+ if (x < xend) {
+ if (!*(calc + 1)) {
+ w = (cpixeldata_t) calculatepixel(x + 1, y, peri);
+ putpixel(x + 1, y, w);
+ *(calc + 1) = (unsigned char) 1;
+ } else
+ w = getpixel(x + 1, y);
+ if (w == c) {
+ dir = RIGHT;
+ calc++;
+ x++;
+ break;
+ }
+ }
+
+ if (y < yend) {
+ if (!*(calc + CALCWIDTH)) {
+ w = (cpixeldata_t) calculatepixel(x, y + 1, peri);
+ putpixel(x, y + 1, w);
+ *(calc + CALCWIDTH) = (unsigned char) 1;
+ } else
+ w = getpixel(x, y + 1);
+ if (w == c) {
+ dir = DOWN;
+ calc += CALCWIDTH;
+ y++;
+ break;
+ }
+ }
+
+ if (x > xstart) {
+ if (!*(calc - 1)) {
+ w = (cpixeldata_t) calculatepixel(x - 1, y, peri);
+ putpixel(x - 1, y, w);
+ *(calc - 1) = (unsigned char) 1;
+ } else
+ w = getpixel(x - 1, y);
+ if (w == c) {
+ dir = LEFT;
+ calc--;
+ x--;
+ break;
+ }
+ }
+
+ dir = UP;
+ calc -= CALCWIDTH;
+ y--;
+ break;
+
+ }
+ if (*calc == (unsigned char) 2) {
+ if (fill) {
+ *calc = (unsigned char) 1;
+ return;
+ }
+ fill = 1;
+ dir = RIGHT;
+ }
+ }
+ while (1);
+}
+
+#ifndef SLOWCACHESYNC
+#ifndef nthreads
+#define ethreads 1
+REGISTERS(3)
+static INLINE void
+tracepoint(int xp, int yp, int dir, unsigned int color, int xstart,
+ int xend, int ystart, int yend)
+{
+ unsigned char *calc;
+ cpixeldata_t mycolor;
+ int i, lookdir;
+ unsigned int c;
+ int x, y;
+ int periodicity = (dir & 8) != 0;
+ dir &= ~8;
+ calc = calculated + xp + yp * CALCWIDTH;
+
+ if (!(*calc & (CALCULATED | CALCULATING))) {
+ *calc |= CALCULATING;
+ mycolor = (cpixeldata_t) calculatepixel(xp, yp, periodicity);
+ putpixel(xp, yp, mycolor);
+ *calc |= CALCULATED;
+ *calc &= ~CALCULATING;
+ } else {
+ if (*calc & CALCULATING) {
+ /*Bad luck..some other procesor is working with out pixel :) try
+ *later.*/
+ addstack(xp, yp, dir, color, periodicity);
+ return;
+ }
+ mycolor = getpixel(xp, yp);
+ }
+
+ while (1) {
+ periodicity = (mycolor == inset || color == inset);
+ lookdir = turnright(dir);
+ for (i = 0; i < 3; i++) {
+ x = xp + dirrections[lookdir][0];
+ y = yp + dirrections[lookdir][1];
+ if (x >= xstart && x <= xend && y >= ystart && y <= yend) {
+ calc = calculated + x + y * CALCWIDTH;
+ if (!(*calc & (CALCULATED | CALCULATING))) {
+ *calc |= CALCULATING;
+ c = calculatepixel(x, y, periodicity);
+ putpixel(x, y, c);
+ *calc |= CALCULATED;
+ *calc &= ~CALCULATING;
+ } else {
+ if (*calc & CALCULATING) {
+ /*Bad luck..some other procesor is working with out pixel :) try
+ *later.*/
+ addstack(xp, yp, dir, color, periodicity);
+ return;
+ }
+ c = getpixel(x, y);
+ }
+ if (c == mycolor)
+ break;
+ if (c != color) {
+ int dir2 = turnright(lookdir);
+ int mask = (1 << dir2) + (1 << turnright(dir2));
+ if (!(*calc & mask)) {
+ addstack(x, y, dir2, mycolor, periodicity);
+ }
+ color = c;
+ }
+ }
+ lookdir = turnleft(lookdir);
+ }
+ x = xp + dirrections[lookdir][0];
+ y = yp + dirrections[lookdir][1];
+ if (x >= xstart && x <= xend && y >= ystart && y <= yend) {
+ calc = calculated + x + y * CALCWIDTH;
+ if (!(*calc & (1 << lookdir))) {
+ *calc |= (1 << lookdir);
+ if (size < 10) {
+ addstack(x, y, lookdir, color, periodicity);
+ return;
+ } else {
+ xp = x;
+ yp = y;
+ dir = lookdir;
+ calc = calculated + xp + yp * CALCWIDTH;
+ }
+ } else
+ return;
+ } else
+ return;
+ }
+}
+
+static void queue(void *data, struct taskinfo *task, int r1, int r2)
+{
+ int x, y, d, c;
+ int pos = 0;
+
+ while (1) {
+ int nstack;
+ xth_lock(0);
+ while (!size) { /*Well stack is empty. */
+ if (exitnow) { /*Possibly everything is done now.. */
+ xth_unlock(0);
+ return;
+ }
+ if (nwaiting == nthreads - 1) { /*We are last working CPU */
+ exitnow = 1; /*So we should exit now */
+ xth_wakeup(0); /*Wake up all waiting tasks */
+ xth_unlock(0);
+ return; /*and exit :) */
+ }
+ nwaiting++; /*We are not latest task. */
+ xth_sleep(0, 0); /*Wait until other task will push some data */
+ nwaiting--;
+ if (exitnow) { /*Evrything is done now? */
+ xth_unlock(0);
+ return;
+ }
+ }
+ nstack = xth_nthread(task);
+ while (!sizes[nstack])
+ if (nstack != nthreads - 1)
+ nstack++;
+ else
+ nstack = 0;
+ sizes[nstack]--;
+ size--;
+ pos++;
+ if (pos >= sizes[nstack])
+ pos = 0;
+ x = starts[nstack][pos >> PAGESHIFT][pos & (PAGESIZE - 1)].x;
+ y = starts[nstack][pos >> PAGESHIFT][pos & (PAGESIZE - 1)].y;
+ d = starts[nstack][pos >> PAGESHIFT][pos & (PAGESIZE - 1)].
+ direction;
+ c = starts[nstack][pos >> PAGESHIFT][pos & (PAGESIZE - 1)].color;
+ /* Well stack currently is queue. Should have better results at
+ * SMP, since has tendency trace all ways at time, so (I believe)
+ * should avoid some cache conflict and situation where queue is
+ * empty. At the other hand, makes queue bigger and needs following
+ * copy:
+ */
+ starts[nstack][pos >> PAGESHIFT][pos & (PAGESIZE - 1)] =
+ starts[nstack][sizes[nstack] >> PAGESHIFT][sizes[nstack] &
+ (PAGESIZE - 1)];
+ xth_unlock(0);
+ tracepoint(x, y, d, c, xstart, xend, ystart, yend);
+ }
+}
+
+static void bfill(void *dat, struct taskinfo *task, int r1, int r2)
+{
+ int y;
+ cpixel_t *pos, *end;
+ unsigned char *data;
+ r1 += ystart + 1;
+ r2 += ystart + 1;
+ for (y = r1; y < r2; y++) {
+ pos = p_add((cpixel_t *) cimage.currlines[y], xstart + 1);
+ end = p_add((cpixel_t *) cimage.currlines[y], xend);
+ data = calculated + xstart + y * CALCWIDTH + 1;
+ for (; pos < end; p_inc(pos, 1), data++) {
+ if (!*data)
+ p_copy(pos, 0, pos, -1);
+ }
+ }
+}
+
+#undef ethreads
+#endif
+#endif
+static void
+dosymetries(int x1, int x2, int y1, int y2, int xsym, int cx1, int cx2)
+{
+ if (cx1 != x1) {
+ register int y;
+ register cpixel_t *xx1, *xx2;
+ for (y = y1; y <= y2; y++) {
+ xx1 = p_add((cpixel_t *) cimage.currlines[y], x1);
+ xx2 = p_add((cpixel_t *) cimage.currlines[y], 2 * xsym - x1);
+ while (xx1 < xx2) {
+ p_copy(xx1, 0, xx2, 0);
+ p_inc(xx1, 1);
+ p_inc(xx2, -1);
+ }
+ }
+ }
+ if (cx2 != x2) {
+ register int y;
+ register cpixel_t *xx1, *xx2;
+ for (y = y1; y <= y2; y++) {
+ xx1 = p_add((cpixel_t *) cimage.currlines[y], x2);
+ xx2 = p_add((cpixel_t *) cimage.currlines[y], 2 * xsym - x2);
+ while (xx1 > xx2) {
+ p_copy(xx1, 0, xx2, 0);
+ p_inc(xx1, -1);
+ p_inc(xx2, 1);
+ }
+ }
+ }
+}
+#endif
+
+#undef dosymetries
+#undef tracepoint
+#undef tracecolor
+#undef queue
+#undef bfill
diff --git a/src/engine/calculate.h b/src/engine/calculate.h
new file mode 100644
index 0000000..ab6ca40
--- /dev/null
+++ b/src/engine/calculate.h
@@ -0,0 +1,37 @@
+
+static pixel32_t INLINE
+calculate(number_t x, number_t y, int periodicity) CONSTF;
+static pixel32_t INLINE calculate(number_t x, number_t y, int periodicity)
+{
+ pixel32_t i;
+
+ rotateback(cfractalc, x, y);
+ if (cfractalc.plane) {
+ recalculate(cfractalc.plane, &x, &y);
+ }
+ STAT(ncalculated2++);
+#ifndef SLOWFUNCPTR
+ if (cfractalc.mandelbrot) {
+ if (cformula.flags & STARTZERO)
+ i = cfractalc.calculate[periodicity] (cfractalc.bre,
+ cfractalc.bim, x, y);
+ else
+ i = cfractalc.calculate[periodicity] (x + cfractalc.bre,
+ y + cfractalc.bim, x, y);
+ } else
+ i = cfractalc.calculate[periodicity] (x, y, cfractalc.pre,
+ cfractalc.pim);
+#else
+ if (cfractalc.mandelbrot) {
+ if (cformula.flags & STARTZERO)
+ i = calculateswitch(cfractalc.bre, cfractalc.bim, x, y,
+ periodicity);
+ else
+ i = calculateswitch(x + cfractalc.bre, y + cfractalc.bim, x, y,
+ periodicity);
+ } else
+ i = calculateswitch(x, y, cfractalc.pre, cfractalc.pim,
+ periodicity);
+#endif
+ return (i);
+}
diff --git a/src/engine/dither.c b/src/engine/dither.c
new file mode 100644
index 0000000..f46de36
--- /dev/null
+++ b/src/engine/dither.c
@@ -0,0 +1,1200 @@
+/*
+ * This file contains code of three conversion filters based at dithering:
+ * truecolor conversion filter - it should convert 8bpp, fixedcolor and
+ * bitmaps to truecolor
+ * fixedcolor conversion - emulates user palette at 8bpp displays with static
+ * palette
+ * bitmap conversion - emulates 8bpp at 1bpp displays.
+ *
+ * Since this filters share quite a lot code, they are implemented in one
+ * file. Internal loops are quire messy, since they are optimized for speed.
+ * Let me know about all ideas to make it faster.
+ *
+ * Note that quite interesting alg. is for preparing dithering table at
+ * fixedcolor displays.
+ */
+#include <config.h>
+#ifndef _plan9_
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <stdio.h>
+#include <string.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#include <stdlib.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <fconfig.h>
+#include <filter.h>
+#include <xerror.h>
+#include <fractal.h>
+#include <xthread.h>
+#include <archaccel.h>
+#define MSIZE 8
+static CONST unsigned char matrix[MSIZE][MSIZE] = {
+ {0, 192, 48, 240, 12, 204, 60, 252,},
+ {128, 64, 176, 112, 140, 76, 188, 124,},
+ {32, 224, 16, 208, 44, 236, 28, 220,},
+ {160, 96, 144, 80, 172, 108, 156, 92,},
+ {8, 200, 56, 248, 4, 196, 52, 244,},
+ {136, 72, 184, 120, 132, 68, 180, 116,},
+ {40, 232, 24, 216, 36, 228, 20, 212,},
+ {168, 104, 152, 88, 164, 100, 148, 84},
+};
+
+struct ditherdata {
+ unsigned char table[32][32][32];
+ int rmat[MSIZE][MSIZE];
+ int gmat[MSIZE][MSIZE];
+ int bmat[MSIZE][MSIZE];
+ struct palette *palette;
+ int active;
+};
+struct fixeddata {
+ /*6kKb of table */
+ unsigned char ctable[8][8][256];
+ /*and 32kB */
+ unsigned char table[32][32][32];
+ /*and 768 bytes... */
+ int rmat[MSIZE][MSIZE];
+ int gmat[MSIZE][MSIZE];
+ int bmat[MSIZE][MSIZE];
+ struct palette *palette;
+ int forversion;
+ int active;
+ int fixcolor;
+};
+struct bitmapdata {
+ struct palette *palette;
+ int intensity[256];
+ int forversion;
+ int active;
+ int fixcolor;
+};
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~IMAGEDATA;
+ r->supportedmask =
+ FIXEDCOLOR | MASK1BPP | MASK3BPP | MASK2BPP | MASK4BPP | BITMAPS;
+ return (f->next->action->requirement(f->next, r));
+}
+
+#ifdef SFIXEDCOLOR
+/* create_rgb_table:
+ * Fills an lookup table with conversion data for the specified
+ * palette.
+ *
+ * Uses alg. similiar to foodfill - it adds one seed per every color in
+ * palette to its best possition. Then areas around seed are filled by
+ * same color because it is best aproximation for them, and then areas
+ * about them etc...
+ *
+ * It does just about 80000 tests for distances and this is about 100
+ * times better than normal 256*32000 tests so the caluclation time
+ * is now less than one second at all computers I tested.
+ */
+#define UNUSED 65535
+#define LAST 65532
+
+/* macro add adds to single linked list */
+#define add(i) (next[(i)] == UNUSED ? (next[(i)] = LAST, \
+ (first != LAST ? (next[last] = (i)) : (first = (i))), \
+ (last = (i))) : 0)
+
+ /* same but w/o checking for first element */
+#define add1(i) (next[(i)] == UNUSED ? (next[(i)] = LAST, \
+ next[last] = (i), \
+ (last = (i))) : 0)
+
+ /* calculates distance between two colors */
+#define dist(a1, a2, a3, b1, b2, b3) \
+ (col_diff[0][((a2) - (b2)) & 0x1FF] + \
+ col_diff[1][((a1) - (b1)) & 0x1FF] + \
+ col_diff[2][((a3) - (b3)) & 0x1FF])
+
+ /* converts r,g,b to position in array and back */
+#define pos(r, g, b) \
+((((int)(r)) / 8) * 32 * 32 + (((int)(g)) / 8) * 32 + (((int)(b)) / 8))
+
+#define depos(pal, r, g, b) \
+ ((b) = ((unsigned int)(pal) & 31) * 8, \
+ (g) = (((unsigned int)(pal) >> 5) & 31) * 8, \
+ (r) = (((unsigned int)(pal) >> 10) & 31) * 8)
+
+ /* is current color better than pal1? */
+#define better(r1, g1, b1, pal1) \
+ (((int)dist((r1), (g1), (b1), \
+ (int)(pal1)[0], (int)(pal1)[1], (int)(pal1)[2])) > (int)dist2)
+#define better1(r1, g1, b1, pal1) \
+ (((int)dist((r1), (g1), (b1), \
+ (int)(pal1)[0], (int)(pal1)[1], (int)(pal1)[2])))
+
+ /* checking of possition */
+#define dopos(rp, gp, bp, ts) \
+ if ((rp > -1 || r > 0) && (rp < 1 || r < 248) && \
+ (gp > -1 || g > 0) && (gp < 1 || g < 248) && \
+ (bp > -1 || b > 0) && (bp < 1 || b < 248)) { \
+ i = first + rp * 32 * 32 + gp * 32 + bp; \
+ if (ts ? data[i] != val : !data[i]) { \
+ dist2 = (rp ? col_diff[1][(r+8*rp-(int)pal[val][0]) & 0x1FF] : r2) + \
+ (gp ? col_diff[0][(g+8*gp-(int)pal[val][1]) & 0x1FF] : g2) + \
+ (bp ? col_diff[2][(b+8*bp-(int)pal[val][2]) & 0x1FF] : b2); \
+ if (better((r+8*rp), (g+8*gp), (b+8*bp), pal[data[i]])) { \
+ data[i] = val; \
+ add1 (i); \
+ } \
+ } \
+ }
+
+static void
+create_rgb_table(unsigned char table[32][32][32], struct palette *palette)
+{
+ int i, curr, r, g, b, val, r2, g2, b2, dist2;
+ rgb_t *pal = palette->rgb;
+ unsigned short *next;
+ unsigned char *data;
+ int first = LAST;
+ int last = LAST;
+ int count = 0;
+
+ next = (unsigned short *) malloc(sizeof(short) * 32 * 32 * 32);
+ if (col_diff[0][1] == 0)
+ bestfit_init();
+
+ memset_long(next, 255, sizeof(short) * 32 * 32 * 32);
+ memset_long(table, palette->start, sizeof(char) * 32 * 32 * 32);
+ depos(32 * 32 * 32 - 1, r, g, b);
+
+ data = (unsigned char *) table;
+
+ /* add starting seeds for foodfill */
+ for (i = palette->start + 1; i < palette->end; i++) {
+ curr = pos((int) pal[i][0], (int) pal[i][1], (int) pal[i][2]);
+ if (next[curr] == UNUSED) {
+ data[curr] = (unsigned int) i;
+ add(curr);
+ }
+ }
+
+ /* main foodfill: two versions of loop for faster growing in blue axis */
+ while (first != LAST) {
+ depos(first, r, g, b);
+
+ /* calculate distance of current color */
+ val = data[first];
+ r2 = col_diff[1][(((int) pal[val][0]) - (r)) & 0x1FF];
+ g2 = col_diff[0][(((int) pal[val][1]) - (g)) & 0x1FF];
+ b2 = col_diff[2][(((int) pal[val][2]) - (b)) & 0x1FF];
+
+ /* try to grow to all directions */
+ dopos(0, 0, 1, 1);
+ dopos(0, 0, -1, 1);
+ dopos(1, 0, 0, 1);
+ dopos(-1, 0, 0, 1);
+ dopos(0, 1, 0, 1);
+ dopos(0, -1, 0, 1);
+
+ /* faster growing of blue direction */
+ if ((b > 0) && (data[first - 1] == val)) {
+ b -= 8;
+ first--;
+ b2 = col_diff[2][(((int) pal[val][2]) - (b)) & 0x1ff];
+
+ dopos(-1, 0, 0, 0);
+ dopos(1, 0, 0, 0);
+ dopos(0, -1, 0, 0);
+ dopos(0, 1, 0, 0);
+
+ first++;
+ }
+
+ /* get next from list */
+ i = first;
+ first = next[first];
+ next[i] = UNUSED;
+
+ /* second version of loop */
+ if (first != LAST) {
+ depos(first, r, g, b);
+
+ val = data[first];
+ r2 = col_diff[1][(((int) pal[val][0]) - (r)) & 0x1ff];
+ g2 = col_diff[0][(((int) pal[val][1]) - (g)) & 0x1ff];
+ b2 = col_diff[2][(((int) pal[val][2]) - (b)) & 0x1ff];
+
+ dopos(0, 0, 1, 1);
+ dopos(0, 0, -1, 1);
+ dopos(1, 0, 0, 1);
+ dopos(-1, 0, 0, 1);
+ dopos(0, 1, 0, 1);
+ dopos(0, -1, 0, 1);
+
+ if ((b < 248) && (data[first + 1] == val)) {
+ b += 8;
+ first++;
+ b2 = col_diff[2][(((int) pal[val][2]) - (b)) & 0x1ff];
+
+ dopos(-1, 0, 0, 0);
+ dopos(1, 0, 0, 0);
+ dopos(0, -1, 0, 0);
+ dopos(0, 1, 0, 0);
+
+ first--;
+ }
+
+ i = first;
+ first = next[first];
+ next[i] = UNUSED;
+ }
+
+ count++;
+ }
+ free(next);
+}
+
+static void
+checksizes(unsigned char table[32][32][32], int *RESTRICT red,
+ int *RESTRICT green, int *RESTRICT blue)
+{
+ int r, g, b;
+ int color;
+ int n, maxn;
+ maxn = 0;
+ n = 0;
+ for (r = 0; r < 32; r++)
+ for (g = 0; g < 32; g++) {
+ color = 512;
+ for (b = 0; b < 32; b++)
+ if (color != table[r][g][b]) {
+ if (maxn < n)
+ maxn = n;
+ color = table[r][g][b];
+ n = 0;
+ } else
+ n++;
+ }
+ *blue = (maxn) * 8;
+ maxn = 0;
+ n = 0;
+ for (b = 0; b < 32; b++)
+ for (g = 0; g < 32; g++) {
+ color = 512;
+ for (r = 0; r < 32; r++)
+ if (color != table[r][g][b]) {
+ if (maxn < n)
+ maxn = n;
+ color = table[r][g][b];
+ n = 0;
+ } else
+ n++;
+ }
+ *red = (maxn) * 8;
+ maxn = 0;
+ n = 0;
+ for (b = 0; b < 32; b++)
+ for (r = 0; r < 32; r++) {
+ color = 512;
+ for (g = 0; g < 32; g++)
+ if (color != table[r][g][b]) {
+ if (maxn < n)
+ maxn = n;
+ color = table[r][g][b];
+ n = 0;
+ } else
+ n++;
+ }
+ *green = (maxn) * 8;
+}
+#endif /*FIXEDCOLOR */
+static int initialize(struct filter *f, struct initdata *i)
+{
+ struct ditherdata *s = (struct ditherdata *) f->data;
+ struct palette *palette;
+ int r, g, b;
+ inhermisc(f, i);
+ if (i->image->bytesperpixel <= 1) {
+ int red, green, blue;
+ if (!inherimage
+ (f, i, TOUCHIMAGE /*| IMAGEDATA */ , 0, 0, s->palette, 0, 0))
+ return 0;
+ if (!s->active) {
+ palette = clonepalette(f->image->palette);
+ restorepalette(s->palette, palette);
+ destroypalette(palette);
+ }
+ switch (f->image->palette->type) {
+ case C256:
+ blue = mkrgb(f->image->palette);
+ red = blue / 256 / 256;
+ green = (blue / 256) & 255;
+ blue &= 255;
+ for (r = 0; r < 32; r++)
+ for (g = 0; g < 32; g++)
+ for (b = 0; b < 32; b++) {
+ s->table[r][g][b] =
+ f->image->palette->
+ pixels[((r * red + red / 2) / 32) +
+ ((g * green +
+ green / 2) / 32) * blue * red +
+ ((b * blue + blue / 2) / 32) * red];
+ }
+ for (r = 0; r < MSIZE; r++)
+ for (g = 0; g < MSIZE; g++) {
+ s->rmat[r][g] =
+ ((int) matrix[r][g] - 128) * 256 / red / 256;
+ s->gmat[r][g] =
+ ((int) matrix[(r + 3) % MSIZE][(g + 6) % MSIZE] -
+ 128) * 256 / green / 256;
+ s->bmat[r][g] =
+ ((int) matrix[(r + 6) % MSIZE][(g + 3) % MSIZE] -
+ 128) * 256 / blue / 256;
+ }
+ break;
+#ifdef SFIXEDCOLOR
+ case FIXEDCOLOR:
+ create_rgb_table(s->table, f->image->palette);
+ checksizes(s->table, &red, &green, &blue);
+ for (r = 0; r < MSIZE; r++)
+ for (g = 0; g < MSIZE; g++) {
+ s->rmat[r][g] = ((int) matrix[r][g] - 128) * red / 256;
+ s->gmat[r][g] =
+ ((int) matrix[(r + 3) % MSIZE][(g + 6) % MSIZE] -
+ 128) * green / 256;
+ s->bmat[r][g] =
+ ((int) matrix[(r + 6) % MSIZE][(g + 3) % MSIZE] -
+ 128) * blue / 256;
+ }
+ break;
+#endif
+#ifdef BITMAPS
+ case MBITMAP:
+ case LBITMAP:
+ case MIBITMAP:
+ case LIBITMAP:
+ break;
+#endif
+ case GRAYSCALE:
+ break;
+ default:
+ x_fatalerror("Unsupported image type. Recompile XaoS.");
+ }
+ setfractalpalette(f, s->palette);
+ s->active = 1;
+ f->queue->saveimage = f->childimage;
+ return (f->previous->action->initialize(f->previous, i));
+ } else {
+ if (s->active) {
+ f->image = i->image;
+ palette = clonepalette(s->palette);
+ restorepalette(f->image->palette, palette);
+ destroypalette(palette);
+ }
+ s->active = 0;
+ return (f->previous->action->initialize(f->previous, i));
+ }
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct ditherdata *i = (struct ditherdata *) calloc(1, sizeof(*i));
+ i->palette =
+ createpalette(0, 65536, TRUECOLOR, 0, 65536, NULL, NULL, NULL,
+ NULL, NULL);
+ f->data = i;
+ f->name = "Truecolor to 8bpp convertor";
+ return (f);
+}
+
+static void convert(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *RESTRICT f = (struct filter *) data;
+ struct image *RESTRICT img1 = f->childimage;
+ struct image *RESTRICT img2 = f->image;
+ CONST struct ditherdata *RESTRICT s = (struct ditherdata *) f->data;
+ CONST pixel32_t *RESTRICT src, *srcend;
+ int r, g, b;
+ pixel8_t *RESTRICT dest;
+ int i;
+ int x = 0;
+
+ for (i = r1; i < r2; i++) {
+ src = (pixel32_t *) img1->currlines[i];
+ dest = img2->currlines[i];
+ srcend = src + img1->width;
+ x++;
+ x = x & (MSIZE - 1);
+ for (; src < srcend; src++, dest++) {
+ b = *src;
+ g = (b >> 8) & 0xff;
+ r = (b >> 16);
+ b &= 0xff;
+ r += s->rmat[x][(unsigned long) dest & (MSIZE - 1)];
+ g += s->gmat[x][(unsigned long) dest & (MSIZE - 1)];
+ b += s->bmat[x][(unsigned long) dest & (MSIZE - 1)];
+ if (r & (~255)) {
+ if (r < 0)
+ r = 0;
+ else if (r > 255)
+ r = 255;
+ }
+ if (g & (~255)) {
+ if (g < 0)
+ g = 0;
+ else if (g > 255)
+ g = 255;
+ }
+ if (b & (~255)) {
+ if (b < 0)
+ b = 0;
+ else if (b > 255)
+ b = 255;
+ }
+ *dest = s->table[r >> 3][g >> 3][b >> 3];
+ }
+ }
+}
+
+#define intenzity(x) ((int)(((x)&255) * 76 + (((x)>>8)&255) * 151 + (((x)>>16)&255) * 28)>>8)
+static void convertgray(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *img1 = f->childimage;
+ struct image *img2 = f->image;
+ pixel32_t *src, *srcend;
+ pixel8_t *dest;
+ int i;
+ int x = 0;
+ unsigned char table[256];
+ for (i = 0; i < 256; i++)
+ table[i] =
+ i * (img2->palette->end - img2->palette->start) / 256 +
+ img2->palette->start;
+
+ for (i = r1; i < r2; i++) {
+ src = (pixel32_t *) img1->currlines[i];
+ dest = img2->currlines[i];
+ srcend = src + img1->width;
+ x++;
+ x = x & (MSIZE - 1);
+ for (; src < srcend; src++, dest++) {
+ *dest = table[intenzity(*src)];
+ }
+ }
+}
+
+#ifdef SBITMAPS
+#define inten(x) ((int)(((x)&255) * 76 + (((x)>>8)&255) * 151 + (((x)>>16)&255) * 28)>>8)-256
+static void
+converttbitmap(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *img1 = f->childimage;
+ struct image *img2 = f->image;
+ pixel32_t *src, *srcend;
+ pixel8_t *dest = NULL;
+ int i, y;
+ unsigned int mask = 0;
+ int x = 0;
+ unsigned int val = 0;
+ src = (pixel32_t *) img1->currlines[0];
+ for (i = r1; i < r2; i++) {
+ dest = img2->currlines[i];
+ x = i & (MSIZE - 1);
+ src = (pixel32_t *) img1->currlines[i];
+ srcend = src + (img1->width & ~7);
+ switch (img2->palette->type) {
+#ifdef SMBITMAPS
+ case MBITMAP:
+ for (; src < srcend; dest++) {
+ if (inten(src[0]) + (int) matrix[x][0] >= 0)
+ val = 128;
+ else
+ val = 0;
+ if (inten(src[1]) + (int) matrix[x][1] >= 0)
+ val |= 64;
+ if (inten(src[2]) + (int) matrix[x][2] >= 0)
+ val |= 32;
+ if (inten(src[3]) + (int) matrix[x][3] >= 0)
+ val |= 16;
+ if (inten(src[4]) + (int) matrix[x][4] >= 0)
+ val |= 8;
+ if (inten(src[5]) + (int) matrix[x][5] >= 0)
+ val |= 4;
+ if (inten(src[6]) + (int) matrix[x][6] >= 0)
+ val |= 2;
+ if (inten(src[7]) + (int) matrix[x][7] >= 0)
+ val |= 1;
+ src += 8;
+ *dest = val;
+ }
+ srcend = (pixel32_t *) img1->currlines[i] + img1->width;
+ if (src != srcend) {
+ y = 0;
+ for (val = 0, mask = 128; src < srcend;
+ mask >>= 1, src++, y++) {
+ if (inten(*src) + (int) matrix[x][y] >= 0)
+ val |= mask;
+ }
+ if (!mask)
+ *dest = val, dest++;
+ }
+ break;
+ case MIBITMAP:
+ for (; src < srcend; dest++) {
+ if (inten(src[0]) + (int) matrix[x][0] <= 0)
+ val = 128;
+ else
+ val = 0;
+ if (inten(src[1]) + (int) matrix[x][1] <= 0)
+ val |= 64;
+ if (inten(src[2]) + (int) matrix[x][2] <= 0)
+ val |= 32;
+ if (inten(src[3]) + (int) matrix[x][3] <= 0)
+ val |= 16;
+ if (inten(src[4]) + (int) matrix[x][4] <= 0)
+ val |= 8;
+ if (inten(src[5]) + (int) matrix[x][5] <= 0)
+ val |= 4;
+ if (inten(src[6]) + (int) matrix[x][6] <= 0)
+ val |= 2;
+ if (inten(src[7]) + (int) matrix[x][7] <= 0)
+ val |= 1;
+ src += 8;
+ *dest = val;
+ }
+ srcend = (pixel32_t *) img1->currlines[i] + img1->width;
+ if (src != srcend) {
+ y = 0;
+ for (val = 0, mask = 128; src < srcend;
+ mask >>= 1, src++, y++) {
+ if (inten(*src) + (int) matrix[x][y] <= 0)
+ val |= mask;
+ }
+ if (!mask)
+ *dest = val, dest++;
+ }
+ break;
+#endif
+#ifdef SLBITMAPS
+ case LBITMAP:
+ for (; src < srcend; dest++) {
+ if (inten(src[0]) + (int) matrix[x][0] >= 0)
+ val = 1;
+ else
+ val = 0;
+ if (inten(src[1]) + (int) matrix[x][1] >= 0)
+ val |= 2;
+ if (inten(src[2]) + (int) matrix[x][2] >= 0)
+ val |= 4;
+ if (inten(src[3]) + (int) matrix[x][3] >= 0)
+ val |= 8;
+ if (inten(src[4]) + (int) matrix[x][4] >= 0)
+ val |= 16;
+ if (inten(src[5]) + (int) matrix[x][5] >= 0)
+ val |= 32;
+ if (inten(src[6]) + (int) matrix[x][6] >= 0)
+ val |= 64;
+ if (inten(src[7]) + (int) matrix[x][7] >= 0)
+ val |= 128;
+ src += 8;
+ *dest = val;
+ }
+ srcend = (pixel32_t *) img1->currlines[i] + img1->width;
+ if (src != srcend) {
+ y = 0;
+ for (val = 0, mask = 1; src < srcend;
+ mask <<= 1, src++, y++) {
+ if (inten(*src) + (int) matrix[x][y] >= 0)
+ val |= mask;
+ }
+ if (!mask)
+ *dest = val, dest++;
+ }
+ break;
+ case LIBITMAP:
+ for (; src < srcend; dest++) {
+ if (inten(src[0]) + (int) matrix[x][0] <= 0)
+ val = 1;
+ else
+ val = 0;
+ if (inten(src[1]) + (int) matrix[x][1] <= 0)
+ val |= 2;
+ if (inten(src[2]) + (int) matrix[x][2] <= 0)
+ val |= 4;
+ if (inten(src[3]) + (int) matrix[x][3] <= 0)
+ val |= 8;
+ if (inten(src[4]) + (int) matrix[x][4] <= 0)
+ val |= 16;
+ if (inten(src[5]) + (int) matrix[x][5] <= 0)
+ val |= 32;
+ if (inten(src[6]) + (int) matrix[x][6] <= 0)
+ val |= 64;
+ if (inten(src[7]) + (int) matrix[x][7] <= 0)
+ val |= 128;
+ src += 8;
+ *dest = val;
+ }
+ srcend = (pixel32_t *) img1->currlines[i] + img1->width;
+ if (src != srcend) {
+ y = 0;
+ for (val = 0, mask = 1; src < srcend;
+ mask <<= 1, src++, y++) {
+ if (inten(*src) + (int) matrix[x][y] <= 0)
+ val |= mask;
+ }
+ if (!mask)
+ *dest = val, dest++;
+ }
+ break;
+#endif
+ }
+ }
+ *dest = val;
+}
+#endif
+static void destroyinstance(struct filter *f)
+{
+ struct ditherdata *i = (struct ditherdata *) f->data;
+ destroypalette(i->palette);
+ free(f->data);
+ destroyinheredimage(f);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ int val;
+ struct ditherdata *s = (struct ditherdata *) f->data;
+ if (s->active)
+ updateinheredimage(f);
+ val = f->previous->action->doit(f->previous, flags, time);
+ if (s->active) {
+#ifdef SBITMAPS
+ if (f->image->palette->type & BITMAPS) {
+ xth_function(converttbitmap, f, f->image->height);
+ } else
+#endif
+ {
+ if (f->image->palette->type == GRAYSCALE)
+ xth_function(convertgray, f, f->image->height);
+ else
+ xth_function(convert, f, f->image->height);
+ }
+ xth_sync();
+ }
+ return val;
+}
+
+static void myremovefilter(struct filter *f)
+{
+ struct ditherdata *s = (struct ditherdata *) f->data;
+ struct palette *palette;
+ if (s->active) {
+ palette = clonepalette(s->palette);
+ restorepalette(f->image->palette, palette);
+ destroypalette(palette);
+ }
+}
+
+
+CONST struct filteraction truecolor_filter = {
+ "Truecolor emulator",
+ "truecolor",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ myremovefilter,
+};
+
+
+
+#ifdef SCONVERTORS
+static int
+myfixedalloccolor(struct palette *p, int init, int r, int g, int b)
+{
+ struct palette *palette = (struct palette *) p->data;
+ fixedalloccolor(p, init, r, g, b);
+ return (palette->alloccolor(palette, init, r, g, b));
+}
+
+static void myallocfinished(struct palette *p)
+{
+ struct palette *palette = (struct palette *) p->data;
+ palette->allocfinished(palette);
+}
+
+static void mysetcolor(struct palette *p, int start, int end, rgb_t * rgb)
+{
+ p->data = &p;
+}
+#endif
+#ifdef SFIXEDCOLOR
+
+static int initializefixed(struct filter *f, struct initdata *i)
+{
+ struct fixeddata *s = (struct fixeddata *) f->data;
+ struct palette *palette;
+ int r, g;
+ inhermisc(f, i);
+ if (i->image->palette->type == FIXEDCOLOR
+ && !(f->req.supportedmask & FIXEDCOLOR)) {
+ int red, green, blue;
+ i->image->palette->alloccolor = myfixedalloccolor;
+ i->image->palette->allocfinished = myallocfinished;
+ i->image->palette->data = s->palette;
+ if (!inherimage
+ (f, i, TOUCHIMAGE | IMAGEDATA, 0, 0, s->palette, 0, 0))
+ return 0;
+ if (s->active == -1) {
+ palette = clonepalette(f->image->palette);
+ restorepalette(s->palette, palette);
+ destroypalette(palette);
+ }
+ create_rgb_table(s->table, f->image->palette);
+ checksizes(s->table, &red, &green, &blue);
+ for (r = 0; r < MSIZE; r++)
+ for (g = 0; g < MSIZE; g++) {
+ s->rmat[r][g] = ((int) matrix[r][g] - 128) * red / 256;
+ s->gmat[r][g] =
+ ((int) matrix[(r + 3) % MSIZE][(g + 6) % MSIZE] -
+ 128) * green / 256;
+ s->bmat[r][g] =
+ ((int) matrix[(r + 6) % MSIZE][(g + 3) % MSIZE] -
+ 128) * blue / 256;
+ }
+ s->palette->data = &s->palette;
+ setfractalpalette(f, s->palette);
+ s->active = 1;
+ f->queue->saveimage = f->childimage;
+ f->queue->palettechg = f;
+ return (f->previous->action->initialize(f->previous, i));
+ } else {
+ if (s->active == 1) {
+ s->fixcolor = 1;
+ }
+ s->active = 0;
+ return (f->previous->action->initialize(f->previous, i));
+ }
+}
+
+static struct filter *getinstancefixed(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct fixeddata *i = (struct fixeddata *) calloc(1, sizeof(*i));
+ i->palette =
+ createpalette(0, 256, C256, 0, 256, NULL, mysetcolor, NULL, NULL,
+ NULL);
+ i->active = -1;
+ f->data = i;
+ f->name = "Palete emulator";
+ return (f);
+}
+
+static void convertfixed(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *img1 = f->childimage;
+ struct image *img2 = f->image;
+ struct fixeddata *s = (struct fixeddata *) f->data;
+ pixel8_t *src, *srcend;
+ pixel8_t *dest;
+ int i;
+ int x = 0;
+ for (i = r1; i < r2; i++) {
+ src = (pixel8_t *) img1->currlines[i];
+ dest = img2->currlines[i];
+ srcend = src + img1->width;
+ x++;
+ x = x & (MSIZE - 1);
+ for (; src < srcend; src++, dest++) {
+ *dest =
+ s->ctable[x][((unsigned long) dest) & (MSIZE - 1)][*src];
+ }
+ }
+}
+
+static int doitfixed(struct filter *f, int flags, int time)
+{
+ int val;
+ struct fixeddata *s = (struct fixeddata *) f->data;
+ if (s->fixcolor && !s->active) {
+ struct palette *palette;
+ s->fixcolor = 0;
+ palette = clonepalette(s->palette);
+ restorepalette(f->previous->childimage->palette, palette);
+ destroypalette(palette);
+ }
+ if (s->active)
+ updateinheredimage(f);
+ if (!(flags & PALETTEONLY))
+ val = f->previous->action->doit(f->previous, flags, time);
+ else
+ val = 0;
+ if (s->active) {
+ if (s->palette->data != NULL) {
+ int i, x, y;
+ s->palette->data = NULL;
+ val |= CHANGED;
+ for (i = 0; i < 256; i++) {
+ for (x = 0; x < 8; x++)
+ for (y = 0; y < 8; y++) {
+ int r, g, b;
+ r = s->palette->rgb[i][0] + s->rmat[x][y];
+ if (r & (~255)) {
+ if (r < 0)
+ r = 0;
+ else if (r > 255)
+ r = 255;
+ }
+ g = s->palette->rgb[i][1] + s->gmat[x][y];
+ if (g & (~255)) {
+ if (g < 0)
+ g = 0;
+ else if (g > 255)
+ g = 255;
+ }
+ b = s->palette->rgb[i][2] + s->bmat[x][y];
+ if (b & (~255)) {
+ if (b < 0)
+ b = 0;
+ else if (b > 255)
+ b = 255;
+ }
+ s->ctable[x][y][i] =
+ s->table[r >> 3][g >> 3][b >> 3];
+ }
+ }
+ }
+ xth_function(convertfixed, f, f->image->height);
+ xth_sync();
+ }
+ return val;
+}
+
+static void myremovefilterfixed(struct filter *f)
+{
+ struct fixeddata *s = (struct fixeddata *) f->data;
+ struct palette *palette;
+ if (s->active) {
+ palette = clonepalette(s->palette);
+ restorepalette(f->image->palette, palette);
+ destroypalette(palette);
+ }
+}
+
+static void destroyinstancefixed(struct filter *f)
+{
+ struct fixeddata *i = (struct fixeddata *) f->data;
+ destroypalette(i->palette);
+ free(f->data);
+ destroyinheredimage(f);
+ free(f);
+}
+
+CONST struct filteraction fixedcolor_filter = {
+ "Palette emulator",
+ "fixedcolor",
+ 0,
+ getinstancefixed,
+ destroyinstancefixed,
+ doitfixed,
+ requirement,
+ initializefixed,
+ convertupgeneric,
+ convertdowngeneric,
+ myremovefilterfixed,
+};
+#endif
+
+#ifdef SBITMAPS
+static int initializebitmap(struct filter *f, struct initdata *i)
+{
+ struct bitmapdata *s = (struct bitmapdata *) f->data;
+ struct palette *palette;
+ inhermisc(f, i);
+ if ((i->image->palette->type & BITMAPS)
+ && !(f->req.supportedmask & BITMAPS)) {
+ i->image->palette->alloccolor = myfixedalloccolor;
+ i->image->palette->allocfinished = myallocfinished;
+ i->image->palette->data = s->palette;
+ if (!inherimage
+ (f, i, TOUCHIMAGE | IMAGEDATA, 0, 0, s->palette, 0, 0))
+ return 0;
+ if (s->active == -1) {
+ palette = clonepalette(f->image->palette);
+ restorepalette(s->palette, palette);
+ destroypalette(palette);
+ }
+ s->palette->data = &s->palette;
+ setfractalpalette(f, s->palette);
+ s->active = 1;
+ f->queue->saveimage = f->childimage;
+ f->queue->palettechg = f;
+ return (f->previous->action->initialize(f->previous, i));
+ } else {
+ if (s->active == 1) {
+ s->fixcolor = 1;
+ }
+ s->active = 0;
+ return (f->previous->action->initialize(f->previous, i));
+ }
+}
+
+static struct filter *getinstancebitmap(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct bitmapdata *i = (struct bitmapdata *) calloc(1, sizeof(*i));
+ i->palette =
+ createpalette(0, 256, C256, 0, 256, NULL, mysetcolor, NULL, NULL,
+ NULL);
+ i->active = -1;
+ f->data = i;
+ f->name = "Palete emulator";
+ return (f);
+}
+
+#define INTENSITY(r,g,b) (r * 30U + g * 59U + b * 11U)/100U-256U
+static void
+convertbitmap(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *img1 = f->childimage;
+ struct image *img2 = f->image;
+ struct bitmapdata *s = (struct bitmapdata *) f->data;
+ pixel8_t *src, *srcend;
+ pixel8_t *dest = NULL;
+ int *intensity = s->intensity;
+ int i;
+ unsigned int mask = 0;
+ int x = 0, y;
+ unsigned int val = 0;
+ src = (pixel8_t *) img1->currlines[0];
+ for (i = r1; i < r2; i++) {
+ dest = img2->currlines[i];
+ x = i & (MSIZE - 1);
+ src = (pixel8_t *) img1->currlines[i];
+ srcend = src + (img1->width & ~7);
+ switch (img2->palette->type) {
+#ifdef SMBITMAPS
+ case MBITMAP:
+ for (; src < srcend; dest++) {
+ if (intensity[src[0]] + (int) matrix[x][0] >= 0)
+ val = 128;
+ else
+ val = 0;
+ if (intensity[src[1]] + (int) matrix[x][1] >= 0)
+ val |= 64;
+ if (intensity[src[2]] + (int) matrix[x][2] >= 0)
+ val |= 32;
+ if (intensity[src[3]] + (int) matrix[x][3] >= 0)
+ val |= 16;
+ if (intensity[src[4]] + (int) matrix[x][4] >= 0)
+ val |= 8;
+ if (intensity[src[5]] + (int) matrix[x][5] >= 0)
+ val |= 4;
+ if (intensity[src[6]] + (int) matrix[x][6] >= 0)
+ val |= 2;
+ if (intensity[src[7]] + (int) matrix[x][7] >= 0)
+ val |= 1;
+ src += 8;
+ *dest = val;
+ }
+ srcend = (pixel8_t *) img1->currlines[i] + img1->width;
+ if (src != srcend) {
+ y = 0;
+ for (val = 0, mask = 128; src < srcend;
+ mask >>= 1, src++, y++) {
+ if (intensity[*src] + (int) matrix[x][y] >= 0)
+ val |= mask;
+ }
+ *dest = val, dest++;
+ }
+ break;
+ case MIBITMAP:
+ for (; src < srcend; dest++) {
+ if (intensity[src[0]] + (int) matrix[x][0] <= 0)
+ val = 128;
+ else
+ val = 0;
+ if (intensity[src[1]] + (int) matrix[x][1] <= 0)
+ val |= 64;
+ if (intensity[src[2]] + (int) matrix[x][2] <= 0)
+ val |= 32;
+ if (intensity[src[3]] + (int) matrix[x][3] <= 0)
+ val |= 16;
+ if (intensity[src[4]] + (int) matrix[x][4] <= 0)
+ val |= 8;
+ if (intensity[src[5]] + (int) matrix[x][5] <= 0)
+ val |= 4;
+ if (intensity[src[6]] + (int) matrix[x][6] <= 0)
+ val |= 2;
+ if (intensity[src[7]] + (int) matrix[x][7] <= 0)
+ val |= 1;
+ src += 8;
+ *dest = val;
+ }
+ srcend = (pixel8_t *) img1->currlines[i] + img1->width;
+ if (src != srcend) {
+ y = 0;
+ for (val = 0, mask = 128; src < srcend;
+ mask >>= 1, src++, y++) {
+ if (intensity[*src] + (int) matrix[x][y] <= 0)
+ val |= mask;
+ }
+ *dest = val, dest++;
+ }
+ break;
+#endif
+#ifdef SLBITMAPS
+ case LBITMAP:
+ for (; src < srcend; dest++) {
+ if (intensity[src[0]] + (int) matrix[x][0] >= 0)
+ val = 1;
+ else
+ val = 0;
+ if (intensity[src[1]] + (int) matrix[x][1] >= 0)
+ val |= 2;
+ if (intensity[src[2]] + (int) matrix[x][2] >= 0)
+ val |= 4;
+ if (intensity[src[3]] + (int) matrix[x][3] >= 0)
+ val |= 8;
+ if (intensity[src[4]] + (int) matrix[x][4] >= 0)
+ val |= 16;
+ if (intensity[src[5]] + (int) matrix[x][5] >= 0)
+ val |= 32;
+ if (intensity[src[6]] + (int) matrix[x][6] >= 0)
+ val |= 64;
+ if (intensity[src[7]] + (int) matrix[x][7] >= 0)
+ val |= 128;
+ src += 8;
+ *dest = val;
+ }
+ srcend = (pixel8_t *) img1->currlines[i] + img1->width;
+ if (src != srcend) {
+ y = 0;
+ for (val = 0, mask = 1; src < srcend;
+ mask <<= 1, src++, y++) {
+ if (intensity[*src] + (int) matrix[x][y] >= 0)
+ val |= mask;
+ }
+ *dest = val, dest++;
+ }
+ case LIBITMAP:
+ for (; src < srcend; dest++) {
+ if (intensity[src[0]] + (int) matrix[x][0] <= 0)
+ val = 1;
+ else
+ val = 0;
+ if (intensity[src[1]] + (int) matrix[x][1] <= 0)
+ val |= 2;
+ if (intensity[src[2]] + (int) matrix[x][2] <= 0)
+ val |= 4;
+ if (intensity[src[3]] + (int) matrix[x][3] <= 0)
+ val |= 8;
+ if (intensity[src[4]] + (int) matrix[x][4] <= 0)
+ val |= 16;
+ if (intensity[src[5]] + (int) matrix[x][5] <= 0)
+ val |= 32;
+ if (intensity[src[6]] + (int) matrix[x][6] <= 0)
+ val |= 64;
+ if (intensity[src[7]] + (int) matrix[x][7] <= 0)
+ val |= 128;
+ src += 8;
+ *dest = val;
+ }
+ srcend = (pixel8_t *) img1->currlines[i] + img1->width;
+ if (src != srcend) {
+ y = 0;
+ for (val = 0, mask = 1; src < srcend;
+ mask <<= 1, src++, y++) {
+ if (intensity[*src] + (int) matrix[x][y] <= 0)
+ val |= mask;
+ }
+ *dest = val, dest++;
+ }
+ break;
+#endif
+ }
+ }
+}
+
+static int doitbitmap(struct filter *f, int flags, int time)
+{
+ int val;
+ struct bitmapdata *s = (struct bitmapdata *) f->data;
+ if (s->fixcolor && !s->active) {
+ struct palette *palette;
+ s->fixcolor = 0;
+ palette = clonepalette(s->palette);
+ restorepalette(f->previous->childimage->palette, palette);
+ destroypalette(palette);
+ }
+ if (s->active)
+ updateinheredimage(f);
+ if (!(flags & PALETTEONLY))
+ val = f->previous->action->doit(f->previous, flags, time);
+ else
+ val = 0;
+ if (s->active) {
+ if (s->palette->data != NULL) {
+ int i;
+ for (i = 0; i < 256; i++)
+ s->intensity[i] =
+ INTENSITY(f->childimage->palette->rgb[i][0],
+ f->childimage->palette->rgb[i][1],
+ f->childimage->palette->rgb[i][2]);
+ val |= CHANGED;
+ }
+ xth_function(convertbitmap, f, f->image->height);
+ xth_sync();
+ }
+ return val;
+}
+
+static void myremovefilterbitmap(struct filter *f)
+{
+ struct bitmapdata *s = (struct bitmapdata *) f->data;
+ struct palette *palette;
+ if (s->active) {
+ palette = clonepalette(s->palette);
+ restorepalette(f->image->palette, palette);
+ destroypalette(palette);
+ }
+}
+
+static void destroyinstancebitmap(struct filter *f)
+{
+ struct bitmapdata *i = (struct bitmapdata *) f->data;
+ destroypalette(i->palette);
+ free(f->data);
+ destroyinheredimage(f);
+ free(f);
+}
+
+CONST struct filteraction bitmap_filter = {
+ "Palette emulator",
+ "bitmap",
+ 0,
+ getinstancebitmap,
+ destroyinstancebitmap,
+ doitbitmap,
+ requirement,
+ initializebitmap,
+ convertupgeneric,
+ convertdowngeneric,
+ myremovefilterbitmap,
+};
+#endif
diff --git a/src/engine/docalc.c b/src/engine/docalc.c
new file mode 100644
index 0000000..9cacf27
--- /dev/null
+++ b/src/engine/docalc.c
@@ -0,0 +1,790 @@
+
+/* Hello reader!
+
+ * Are you sure you want read this? Its very cryptic and strange code. YOU
+ * HAVE BEEN WARNED! Its purpose is to genereate as fast as possible
+ * calculation loops for various formulas/algorithms. It uses lots of
+ * coprocesor magic. It is included from formulas.c
+ */
+
+#ifndef VARIABLES /*supply defaultd values */
+#define VARIABLES
+#endif
+#ifndef PRETEST
+#define PRETEST 0
+#endif
+#ifndef INIT
+#define INIT
+#endif
+#ifndef POSTCALC
+#define POSTCALC
+#endif
+#ifndef PRESMOOTH
+#define PRESMOOTH zre=rp+ip
+#endif
+#ifndef UFORMULA
+#define UFORMULA FORMULA
+#endif
+#ifndef UEND
+#define UEND
+#endif
+#ifndef SAVE
+#define SAVE
+#endif
+#ifndef SAVEVARIABLES
+#define SAVEVARIABLES
+#endif
+#ifndef RESTORE
+#define RESTORE
+#endif
+#ifndef RANGE
+#define RANGE 2
+#endif
+#ifndef __GNUC__
+#undef USEHACKS
+#endif
+#ifndef __i386__
+#undef USEHACKS
+#endif
+#ifdef NOASSEMBLY
+#undef USEHACKS
+#endif
+
+/* Prepare main loop */
+#ifndef NSFORMULALOOP
+#define NSFORMULALOOP(iter) \
+ do \
+ { /*try first 8 iterations */ \
+ FORMULA; \
+ iter--; \
+ } \
+ while (BTEST && iter)
+#endif
+#ifndef SFORMULALOOP
+#define SFORMULALOOP(iter) \
+ do \
+ { /*try first 8 iterations */ \
+ SAVEZMAG; \
+ FORMULA; \
+ iter--; \
+ } \
+ while (BTEST && iter)
+#endif
+#ifndef FORMULALOOP
+#ifdef SMOOTHMODE
+#define FORMULALOOP SFORMULALOOP
+#else
+#define FORMULALOOP NSFORMULALOOP
+#endif
+#endif
+
+#ifdef USEHACKS
+#ifdef RPIP
+#define I386HACK1 __asm__ ("#HACK1" : \
+ : \
+ "m" (szre), \
+ "m" (szim) \
+ );
+#define I386HACK __asm__ ("#HACK" : \
+ : \
+ "f" (zre), \
+ "f" (zim) \
+ );
+#else
+#define I386HACK __asm__ ("#HACK" : \
+ : \
+ "f" (zre), \
+ "f" (zim) \
+ );
+#endif
+#else
+#define I386HACK
+#define I386HACK1
+#endif
+
+#ifdef SMOOTHMODE
+#ifdef CUSTOMSAVEZMAG
+#define SAVEZMAG CUSTOMSAVEZMAG;
+#else
+#define SAVEZMAG szmag=rp+ip;
+#endif
+#else
+#define SAVEZMAG
+#endif
+
+#ifdef UNCOMPRESS
+/*uncompressed version of loop */
+#ifdef SMOOTHMODE
+static unsigned int FUNCTYPE
+SCALC(register number_t zre, register number_t zim, register number_t pre,
+ register number_t pim)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned int FUNCTYPE
+SCALC(register number_t zre, register number_t zim,
+ register number_t pre, register number_t pim)
+#else
+static unsigned int FUNCTYPE
+CALC(register number_t zre, register number_t zim, register number_t pre,
+ register number_t pim)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned
+CALC(register number_t zre, register number_t zim,
+ register number_t pre, register number_t pim)
+#endif
+{
+ register unsigned int iter = cfractalc.maxiter;
+ number_t szre = 0, szim = 0;
+#ifdef RPIP
+ register number_t rp = 0, ip;
+#endif
+#ifdef SMOOTHMODE
+ number_t szmag = 0;
+#endif
+ SAVEVARIABLES VARIABLES;
+ INIT;
+ if (PRETEST)
+ iter = 0;
+ else {
+#ifdef RPIP
+ rp = zre * zre;
+ ip = zim * zim;
+#endif
+ if (iter < 16) {
+ I386HACK1;
+ I386HACK;
+
+ /*try first 8 iterations */
+ if (BTEST && iter) {
+ FORMULALOOP(iter);
+ }
+ /*
+ while (BTEST && iter)
+ {
+ SAVEZMAG;
+ FORMULA;
+ iter--;
+ } */
+ } else {
+ iter = 8 + (cfractalc.maxiter & 7);
+ I386HACK1;
+ I386HACK;
+
+ /*try first 8 iterations */
+ if (BTEST && iter) {
+ FORMULALOOP(iter);
+ }
+ /*
+ while (BTEST && iter)
+ {
+ SAVEZMAG;
+ FORMULA;
+ iter--;
+ } */
+ if (BTEST) {
+ iter = (cfractalc.maxiter - 8) & (~7);
+ iter >>= 3;
+ I386HACK1;
+ I386HACK; /*do next 8 iteration w/o out of bounds checking */
+ do {
+ /*hmm..we are probably in some deep area. */
+ szre = zre; /*save current possition */
+ szim = zim;
+ SAVE;
+ UFORMULA;
+ UFORMULA;
+ UFORMULA;
+ UFORMULA;
+ UFORMULA;
+ UFORMULA;
+ UFORMULA;
+ UFORMULA;
+ UEND;
+ iter--;
+ }
+ while (BTEST && iter);
+ if (!(BTEST)) { /*we got out of bounds */
+ iter <<= 3;
+ iter += 8; /*restore saved possition */
+ RESTORE;
+ zre = szre;
+ zim = szim;
+#ifdef RPIP
+ rp = zre * zre;
+ ip = zim * zim;
+#endif
+ I386HACK1;
+ I386HACK;
+ FORMULALOOP(iter);
+ /*
+ do
+ {
+ SAVEZMAG
+ FORMULA;
+ iter--;
+ }
+ while (BTEST && iter); */
+ }
+ } else
+ iter += cfractalc.maxiter - 8 - (cfractalc.maxiter & 7);
+ }
+ }
+#ifdef SMOOTHMODE
+ if (iter)
+ SMOOTHOUTPUT();
+ POSTCALC;
+ iter = cfractalc.maxiter - iter;
+ INOUTPUT();
+#else
+ POSTCALC;
+ iter = cfractalc.maxiter - iter;
+ OUTPUT();
+#endif
+}
+#else
+#ifdef SMOOTHMODE
+static unsigned int FUNCTYPE
+SCALC(register number_t zre, register number_t zim, register number_t pre,
+ register number_t pim)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned int FUNCTYPE
+SCALC(register number_t zre, register number_t zim,
+ register number_t pre, register number_t pim)
+#else
+static unsigned int FUNCTYPE
+CALC(register number_t zre, register number_t zim, register number_t pre,
+ register number_t pim)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned int FUNCTYPE
+CALC(register number_t zre, register number_t zim,
+ register number_t pre, register number_t pim)
+#endif
+{
+ register unsigned int iter = cfractalc.maxiter /*& (~(int) 3) */ ;
+#ifdef RPIP
+ register number_t rp, ip;
+#endif
+#ifdef SMOOTHMODE
+ number_t szmag = 0;
+#endif
+ VARIABLES;
+ INIT;
+ if (PRETEST)
+ iter = 0;
+ else {
+#ifdef RPIP
+ rp = zre * zre;
+ ip = zim * zim;
+#endif
+ if (BTEST && iter) {
+ FORMULALOOP(iter);
+ }
+ /*
+ while (BTEST && iter)
+ {
+ I386HACK;
+ SAVEZMAG
+ FORMULA;
+ iter--;
+
+ } */
+ }
+#ifdef SMOOTHMODE
+ if (iter)
+ SMOOTHOUTPUT();
+ POSTCALC;
+ iter = cfractalc.maxiter - iter;
+ INOUTPUT();
+#else
+ POSTCALC;
+ iter = cfractalc.maxiter - iter;
+ OUTPUT();
+#endif
+}
+#endif
+
+
+/*F. : Periodicity checking rountines. (16-02-97)
+ All comments preceded by F. are mine (Fabrice Premel premelfa@etu.utc.fr).
+ Tried to make code as efficient as possible.
+ Next to do is convert lim in a variable that would be updated sometimes
+ I'll try to make here a short explanation on periodicity checking :
+ first, we'll define 2 variables : whentosave and whenincsave, which are, respectively,
+ a measure of when we have to update saved values to be checked, and when to increase
+ interval between 2 updates, as if they're too close, we'll miss large periods.
+ We save Z at the beginning, and then we compare each new iteration with this Z, and if naerly
+ equal, we declare the suite to be periodic.
+ When ( iter mod whentosave ) == 0, we store a new value, and we repeat.
+
+ UNCOMPRESSed form is just an extension, with careful that if we only check whentosave
+ all 8 iterations, number of iterations must be well set at the begining.This is
+ done by adding a (iter&7) in the while statement preceeding then uncompressed
+ calculation. */
+
+/*F. : This is from then lim factor that depends all periodicity check spped : the bigger it is, the faster we
+ can detect periodicity, but the bigger it is, the more we can introduce errors.
+ I suggest a value of (maxx-minx)/(double)getmaxx for a classic Mandelbrot Set,
+ and maybe a lesser value for an extra power Mandelbrot.
+ But this should be calculated outter from here (ie each frame, for example), to avoid
+ new calculs */
+#ifdef PERI
+#define PCHECK (abs_less_than(r1 - zre, cfractalc.periodicity_limit) && abs_less_than(s1 - zim, cfractalc.periodicity_limit))
+
+#ifndef UNCOMPRESS
+
+#ifdef SMOOTHMODE
+static unsigned int FUNCTYPE
+SPERI(register number_t zre, register number_t zim, register number_t pre,
+ register number_t pim)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned int FUNCTYPE
+SPERI(register number_t zre, register number_t zim,
+ register number_t pre, register number_t pim)
+#else
+static unsigned int FUNCTYPE
+PERI(register number_t zre, register number_t zim, register number_t pre,
+ register number_t pim)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned int FUNCTYPE
+PERI(register number_t zre, register number_t zim,
+ register number_t pre, register number_t pim)
+#endif
+{
+ register unsigned int iter =
+ cfractalc.maxiter /*& (~(int) 3) */ , iter1 =
+ 8;
+ register number_t r1, s1;
+ int whensavenew, whenincsave;
+#ifdef RPIP
+ register number_t rp, ip;
+#endif
+#ifdef SMOOTHMODE
+ number_t szmag = 0;
+#endif
+ VARIABLES;
+ INIT;
+ if (PRETEST)
+ iter = 0;
+ else {
+#ifdef RPIP
+ rp = zre * zre;
+ ip = zim * zim;
+#endif
+ I386HACK;
+ if (iter < iter1)
+ iter1 = iter, iter = 8;
+
+ /*H. : do first few iterations w/o checking */
+ if (BTEST && iter1) {
+ FORMULALOOP(iter1);
+ }
+ /*
+ while (BTEST && iter1)
+ {
+ SAVEZMAG;
+ FORMULA;
+ iter1--;
+ } */
+ if (iter1) {
+ if (iter >= 8)
+ iter -= 8 - iter1;
+ goto end;
+ }
+ if (iter <= 8) {
+ iter = iter1;
+ } else {
+ iter -= 8;
+ r1 = zre;
+ s1 = zim;
+ whensavenew = 3; /*You should adapt theese values */
+ /*F. : We should always define whensavenew as 2^N-1, so we could use a AND instead of % */
+
+ whenincsave = 10;
+ /*F. : problem is that after deep zooming, peiodicity is never detected early, cause is is
+ quite slow before going in a periodic loop.
+ So, we should start checking periodicity only after some times */
+ while (BTEST && iter) {
+ SAVEZMAG;
+ FORMULA;
+ if ((iter & whensavenew) == 0) { /*F. : changed % to & */
+ r1 = zre;
+ s1 = zim;
+ whenincsave--;
+ if (!whenincsave) {
+ whensavenew = ((whensavenew + 1) << 1) - 1; /*F. : Changed to define a new AND mask */
+ whenincsave = 10;
+ }
+ } else {
+ if (PCHECK) {
+ PERIINOUTPUT();
+ }
+ }
+ iter--;
+
+ }
+ }
+ }
+ end:
+#ifdef SMOOTHMODE
+ if (iter)
+ SMOOTHOUTPUT();
+ POSTCALC;
+ iter = cfractalc.maxiter - iter;
+ INOUTPUT();
+#else
+ POSTCALC;
+ iter = cfractalc.maxiter - iter;
+ OUTPUT();
+#endif
+}
+
+#else
+
+/*F. : UNCOMPRESSed version. Note that whensavenew+1 should be a multiple of 8, else periodicity won't be able
+ to detect anything. */
+/*F. : this macros definitions are really strange, but after a while, it's good */
+
+#ifdef SMOOTHMODE
+static unsigned int FUNCTYPE
+SPERI(register number_t zre, register number_t zim, register number_t pre,
+ register number_t pim)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned int FUNCTYPE
+SPERI(register number_t zre, register number_t zim,
+ register number_t pre, register number_t pim)
+#else
+static unsigned int FUNCTYPE
+PERI(register number_t zre, register number_t zim, register number_t pre,
+ register number_t pim)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned int FUNCTYPE
+PERI(register number_t zre, register number_t zim,
+ register number_t pre, register number_t pim)
+#endif
+{
+ register unsigned int iter = cfractalc.maxiter /*& (~(int) 3) */ ;
+ register number_t r1 = zre, s1 = zim;
+ number_t szre = 0, szim = 0; /*F. : Didn't declared register, cause they are few used */
+ unsigned int whensavenew, whenincsave;
+#ifdef RPIP
+ register number_t rp = 0, ip;
+#endif
+#ifdef SMOOTHMODE
+ number_t szmag = 0;
+#endif
+ SAVEVARIABLES VARIABLES;
+ INIT;
+ if (PRETEST)
+ iter = 0;
+ else {
+ if (cfractalc.maxiter <= 16) {
+ I386HACK1;
+ /*I386HACK; */
+#ifdef RPIP
+ rp = zre * zre;
+ ip = zim * zim;
+#endif
+ /*F. : Added iter&7 to be sure we'll be on a 8 multiple */
+ if (BTEST && iter) {
+ FORMULALOOP(iter);
+ }
+ /*
+ while (BTEST && iter)
+ {
+ SAVEZMAG
+ FORMULA;
+ iter--;
+ } */
+ } else {
+ whensavenew = 7; /*You should adapt theese values */
+ /*F. : We should always define whensavenew as 2^N-1, so we could use a AND instead of % */
+
+ whenincsave = 10;
+#ifdef RPIP
+ rp = zre * zre;
+ ip = zim * zim;
+#endif
+ /*F. : problem is that after deep zooming, peiodicity is never detected early, cause is is
+ quite slow before going in a periodic loop.
+ So, we should start checking periodicity only after some times */
+ I386HACK1;
+ /*I386HACK; */
+ iter = 8 + (cfractalc.maxiter & 7);
+ while (BTEST && iter) { /*F. : Added iter&7 to be sure we'll be on a 8 multiple */
+ SAVEZMAG FORMULA;
+ iter--;
+ }
+ if (BTEST) { /*F. : BTEST is calculed two times here, isn't it ? */
+ /*H. : No gcc is clever and adds test to the end :) */
+ iter = (cfractalc.maxiter - 8) & (~7);
+ do {
+ szre = zre, szim = zim;
+ SAVE;
+ SAVEZMAG
+ /*I386HACK; */
+ I386HACK1;
+ FORMULA; /*F. : Calculate one time */
+ if (PCHECK)
+ goto periodicity;
+ FORMULA;
+ if (PCHECK)
+ goto periodicity;
+ FORMULA;
+ if (PCHECK)
+ goto periodicity;
+ FORMULA;
+ if (PCHECK)
+ goto periodicity;
+ FORMULA;
+ if (PCHECK)
+ goto periodicity;
+ FORMULA;
+ if (PCHECK)
+ goto periodicity;
+ FORMULA;
+ if (PCHECK)
+ goto periodicity;
+ FORMULA;
+ if (PCHECK)
+ goto periodicity;
+ iter -= 8;
+ /*F. : We only test this now, as it can't be true before */
+ if ((iter & whensavenew) == 0) { /*F. : changed % to & */
+ r1 = zre, s1 = zim; /*F. : Save new values */
+ whenincsave--;
+ if (!whenincsave) {
+ whensavenew = ((whensavenew + 1) << 1) - 1; /*F. : Changed to define a new AND mask */
+ whenincsave = 10; /*F. : Start back */
+ }
+ }
+ }
+ while (BTEST && iter);
+ if (!BTEST) { /*we got out of bounds */
+ iter += 8; /*restore saved possition */
+ RESTORE;
+ zre = szre;
+ zim = szim;
+#ifdef RPIP
+ rp = zre * zre;
+ ip = zim * zim;
+#endif
+ I386HACK1;
+ /*I386HACK; */
+ FORMULALOOP(iter);
+ /*
+ do
+ {
+ SAVEZMAG
+ FORMULA;
+ iter--;
+ }
+ while (BTEST && iter); */
+ }
+ } else
+ iter += cfractalc.maxiter - 8 - (cfractalc.maxiter & 7);
+ }
+ }
+#ifdef SMOOTHMODE
+ if (iter)
+ SMOOTHOUTPUT();
+ POSTCALC;
+ iter = cfractalc.maxiter - iter;
+ INOUTPUT();
+#else
+ POSTCALC;
+ iter = cfractalc.maxiter - iter;
+ OUTPUT();
+#endif
+ periodicity:
+ PERIINOUTPUT();
+}
+
+/*else uncompress */
+#endif
+
+/*endif PERI */
+#undef PCHECK
+#endif
+
+#ifndef SMOOTHMODE
+#ifdef JULIA
+static void
+JULIA(struct image *image, register number_t pre, register number_t pim)
+{
+ int i, i1, i2, j, x, y;
+ unsigned char iter, itmp2, itmp;
+ number_t rp = 0, ip = 0;
+ register number_t zre, zim, im, xdelta, ydelta, range, rangep;
+ number_t xstep, ystep;
+ unsigned char *queue[QMAX];
+ unsigned char **qptr;
+ unsigned char *addr, **addr1 = image->currlines;
+#ifdef STATISTICS
+ int guessed = 0, unguessed = 0, iters = 0;
+#endif
+ VARIABLES;
+ range = (number_t) RANGE;
+ rangep = range * range;
+
+ xdelta = image->width / (RMAX - RMIN);
+ ydelta = image->height / (IMAX - IMIN);
+ xstep = (RMAX - RMIN) / image->width;
+ ystep = (IMAX - IMIN) / image->height;
+ init_julia(image, rangep, range, xdelta, ystep);
+ for (i2 = 0; i2 < 2; i2++)
+ for (i1 = 0; i1 < image->height; i1++) {
+ if (i1 % 2)
+ i = image->height / 2 - i1 / 2;
+ else
+ i = image->height / 2 + i1 / 2 + 1;
+ if (i >= image->height)
+ continue;
+ im = IMIN + (i + 0.5) * ystep;
+ for (j = (i + i2) & 1; j < image->width; j += 2) {
+ STAT(total2++);
+ addr = addr1[i] + j;
+ if (*addr != NOT_CALCULATED)
+ continue;
+ x = j;
+ y = i;
+ if (y > 0 && y < image->height - 1 && *(addr + 1) &&
+ x > 0 && x < image->width - 1) {
+ if ((iter = *(addr + 1)) != NOT_CALCULATED
+ && iter == *(addr - 1) && iter == addr1[y - 1][x]
+ && iter == addr1[y + 1][x]) {
+ *addr = *(addr + 1);
+ continue;
+ }
+ }
+ zim = im;
+ zre = RMIN + (j + 0.5) * xstep;
+ iter = (unsigned char) 0;
+ qptr = queue;
+ ip = (zim * zim);
+ rp = (zre * zre);
+ INIT;
+ while (1) {
+ if (*addr != NOT_CALCULATED
+#ifdef SAG
+ && (*addr == INPROCESS
+ || (*addr != (unsigned char) 1
+ && (itmp2 = *(addr + 1)) != NOT_CALCULATED
+ && ((itmp2 != (itmp = *(addr - 1))
+ && itmp != NOT_CALCULATED)
+ || (itmp2 !=
+ (itmp = *((addr1[y + 1]) + x))
+ && itmp != NOT_CALCULATED)
+ || (itmp2 !=
+ (itmp = *((addr1[y - 1]) + x))
+ && itmp != NOT_CALCULATED))))
+#endif
+ ) {
+ if (*addr == INPROCESS || *addr == INSET) {
+ *qptr = addr;
+ qptr++;
+ STAT(guessed++);
+ goto inset;
+ }
+ STAT(guessed++);
+ iter = *addr;
+ goto outset;
+ }
+#ifdef STATISTICS
+ if (*addr != NOT_CALCULATED)
+ unguessed++;
+#endif
+ if (*addr != INPROCESS) {
+ *qptr = addr;
+ qptr++;
+ *addr = INPROCESS;
+ if (qptr >= queue + QMAX)
+ goto inset;
+ }
+ STAT(iters++);
+ FORMULA;
+ ip = (zim * zim);
+ rp = (zre * zre);
+ if (greater_than(rp + ip, RANGE) || !(BTEST))
+ goto outset;
+ x = (int) ((zre - RMIN) * xdelta);
+ y = (int) ((zim - IMIN) * ydelta);
+ addr = addr1[y] + x;
+ if ((itmp = *(addr + 1)) != NOT_CALCULATED
+ && itmp == *(addr - 1) && itmp == addr1[y - 1][x]
+ && itmp == addr1[y + 1][x]) {
+ *addr = *(addr + 1);
+ }
+ }
+ inset:
+ while (qptr > queue) {
+ qptr--;
+ **qptr = INSET;
+ }
+ continue;
+ outset:
+ y = image->palette->size;
+ while (qptr > queue) {
+ qptr--;
+ iter++;
+ if ((int) iter >= y)
+ iter = (unsigned char) 1;
+ **qptr = iter;
+ }
+ }
+ }
+#ifdef STATISTICS
+ printf("guessed %i, unguessed %i, iterations %i\n", guessed, unguessed,
+ iters);
+ guessed2 += guessed;
+ unguessed2 += unguessed;
+ iters2 += iters;
+#endif
+}
+#endif
+#endif
+
+#undef FORMULALOOP
+#undef PCHECK
+#undef I386HACK
+#undef I386HACK1
+#undef SAVEZMAG
+#ifndef SMOOTHMODE
+#ifdef SMOOTH
+#define SMOOTHMODE
+#include "docalc.c"
+#endif
+#endif
+
+/*cleanup for next formula */
+#undef NSFORMULALOOP
+#undef SFORMULALOOP
+#undef PRESMOOTH
+#undef SMOOTH
+#undef SMOOTHMODE
+#undef RANGE
+#undef JULIA
+#undef PERI
+#undef SPERI
+#undef INIT
+#undef VARIABLES
+#undef PRETEST
+#undef BTEST
+#undef FORMULA
+#undef CALC
+#undef SCALC
+#undef RPIP
+#undef POSTCALC
+#undef UNCOMPRESS
+#undef SAVE
+#undef SAVEVARIABLES
+#undef RESTORE
+#undef USEHACKS
+#undef UFORMULA
+#undef UEND
diff --git a/src/engine/edge.c b/src/engine/edge.c
new file mode 100644
index 0000000..09d1403
--- /dev/null
+++ b/src/engine/edge.c
@@ -0,0 +1,113 @@
+/* An edge detection filter.
+ * This is very simple filter - it initializes smalliter image and then
+ * does an simple edge detection algo on it.
+ */
+#include <config.h>
+#ifndef _plan9_
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <stdio.h> /*for NULL */
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#define SLARGEITER
+#include <xthread.h>
+#include <filter.h>
+
+#define spixel_t pixel8_t
+#include <c256.h>
+#define do_edge do_edge8
+#include "edged.c"
+
+#undef spixel_t
+#define spixel_t pixel16_t
+#include <truecolor.h>
+#define do_edge do_edge32
+#include "edged.c"
+
+#include <true24.h>
+#define do_edge do_edge24
+#include "edged.c"
+
+#include <hicolor.h>
+#define do_edge do_edge16
+#include "edged.c"
+
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~IMAGEDATA;
+ r->supportedmask = MASK1BPP | MASK3BPP | MASK2BPP | MASK4BPP;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ inhermisc(f, i);
+ /*in/out coloring modes looks better in iter modes. This also saves some
+ memory in truecolor. */
+ if (f->data != NULL)
+ destroypalette((struct palette *) f->data);
+ f->data =
+ createpalette(0, 65536,
+ i->image->bytesperpixel <= 1 ? SMALLITER : LARGEITER,
+ 0, 65536, NULL, NULL, NULL, NULL, NULL);
+ if (!inherimage
+ (f, i, TOUCHIMAGE | NEWIMAGE, 0, 0, (struct palette *) f->data, 0,
+ 0))
+ return 0;
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ f->name = "Edge detection";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ if (f->data != NULL)
+ destroypalette((struct palette *) f->data);
+ destroyinheredimage(f);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ int val;
+ int size = f->childimage->palette->type == SMALLITER ? 240 : 65520;
+ if (f->image->palette->size < size)
+ size = f->image->palette->size;
+ if (((struct palette *) f->data)->size != size)
+ ((struct palette *) f->data)->size =
+ size, ((struct palette *) f->data)->version++;
+ updateinheredimage(f);
+ val = f->previous->action->doit(f->previous, flags, time);
+ drivercall(*f->image,
+ xth_function(do_edge8, f, f->image->height),
+ xth_function(do_edge16, f, f->image->height),
+ xth_function(do_edge24, f, f->image->height),
+ xth_function(do_edge32, f, f->image->height));
+ xth_sync();
+ return val;
+}
+
+CONST struct filteraction edge_filter = {
+ "Edge detection",
+ "edge",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ NULL
+};
diff --git a/src/engine/edge2.c b/src/engine/edge2.c
new file mode 100644
index 0000000..fbfeab5
--- /dev/null
+++ b/src/engine/edge2.c
@@ -0,0 +1,113 @@
+/* An edge detection filter.
+ * This is very simple filter - it initializes smalliter image and then
+ * does an simple edge detection algo on it.
+ */
+#include <config.h>
+#ifndef _plan9_
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <stdio.h> /*for NULL */
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#define SLARGEITER
+#include <xthread.h>
+#include <filter.h>
+
+#define spixel_t pixel8_t
+#include <c256.h>
+#define do_edge do_edge8
+#include "edge2d.c"
+
+#undef spixel_t
+#define spixel_t pixel16_t
+#include <truecolor.h>
+#define do_edge do_edge32
+#include "edge2d.c"
+
+#include <true24.h>
+#define do_edge do_edge24
+#include "edge2d.c"
+
+#include <hicolor.h>
+#define do_edge do_edge16
+#include "edge2d.c"
+
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~IMAGEDATA;
+ r->supportedmask = MASK1BPP | MASK2BPP | MASK3BPP | MASK4BPP;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ inhermisc(f, i);
+ /*in/out coloring modes looks better in iter modes. This also saves some
+ memory in truecolor. */
+ if (f->data != NULL)
+ destroypalette((struct palette *) f->data);
+ f->data =
+ createpalette(0, 65536,
+ i->image->bytesperpixel <= 1 ? SMALLITER : LARGEITER,
+ 0, 65536, NULL, NULL, NULL, NULL, NULL);
+ if (!inherimage
+ (f, i, TOUCHIMAGE | NEWIMAGE, 0, 0, (struct palette *) f->data, 0,
+ 0))
+ return 0;
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ f->name = "Edge detection";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ if (f->data != NULL)
+ destroypalette((struct palette *) f->data);
+ destroyinheredimage(f);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ int val;
+ int size = f->childimage->palette->type == SMALLITER ? 253 : 65536;
+ if (f->image->palette->size < size)
+ size = f->image->palette->size;
+ if (((struct palette *) f->data)->size != size)
+ ((struct palette *) f->data)->size =
+ size, ((struct palette *) f->data)->version++;
+ updateinheredimage(f);
+ val = f->previous->action->doit(f->previous, flags, time);
+ drivercall(*f->image,
+ xth_function(do_edge8, f, f->image->height),
+ xth_function(do_edge16, f, f->image->height),
+ xth_function(do_edge24, f, f->image->height),
+ xth_function(do_edge32, f, f->image->height));
+ xth_sync();
+ return val;
+}
+
+CONST struct filteraction edge2_filter = {
+ "Edge detection2",
+ "edge2",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ NULL
+};
diff --git a/src/engine/edge2d.c b/src/engine/edge2d.c
new file mode 100644
index 0000000..4402b42
--- /dev/null
+++ b/src/engine/edge2d.c
@@ -0,0 +1,53 @@
+#ifndef UNSUPPORTED
+static void do_edge(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ int y;
+ unsigned int *pixels = f->image->palette->pixels;
+ register unsigned int black = f->image->palette->pixels[0];
+ register cpixel_t *output, *end;
+ register spixel_t *up, *down, *input;
+
+ for (y = r1; y < r2; y++) {
+ output = p_add(((cpixel_t *) f->image->currlines[y]), 1);
+ input = ((spixel_t *) f->childimage->currlines[y]) + 1;
+
+ if (y != 0)
+ up = ((spixel_t *) f->childimage->currlines[y - 1]) + 1;
+ else
+ up = ((spixel_t *) f->childimage->currlines[y]) + 1;
+
+ if (y != f->image->height - 1)
+ down = ((spixel_t *) f->childimage->currlines[y + 1]) + 1;
+ else
+ down = ((spixel_t *) f->childimage->currlines[y]) + 1;
+
+ end =
+ p_add(((cpixel_t *) f->image->currlines[y]),
+ f->image->width - 1);
+ p_setp(output, -1, 0);
+ p_setp(output, f->image->width - 2, 0);
+
+ while (output < end) {
+ if (input[0] > up[0] || input[0] > down[0]) {
+ p_set(output, pixels[input[0]]);
+ } else if (input[0] != input[1]) {
+ if (input[0] < input[1]) {
+ p_set(output, black);
+ p_inc(output, 1);
+ input++;
+ up++;
+ down++;
+ }
+ p_set(output, pixels[input[0]]);
+ } else
+ p_set(output, black);
+ p_inc(output, 1);
+ input++;
+ up++;
+ down++;
+ }
+ }
+}
+#endif
+#undef do_edge
diff --git a/src/engine/edged.c b/src/engine/edged.c
new file mode 100644
index 0000000..918f308
--- /dev/null
+++ b/src/engine/edged.c
@@ -0,0 +1,66 @@
+#ifndef UNSUPPORTED
+static void do_edge(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ int y;
+ unsigned int *pixels = f->image->palette->pixels;
+ register unsigned int black = f->image->palette->pixels[0];
+ register cpixel_t *output, *end;
+ register spixel_t *up, *down, *input;
+ for (y = r1; y < r2; y++) {
+ output = p_add(((cpixel_t *) f->image->currlines[y]), 1);
+ input = ((spixel_t *) f->childimage->currlines[y]) + 1;
+ if (y != 0)
+ up = ((spixel_t *) f->childimage->currlines[y - 1]) + 2;
+ else
+ up = ((spixel_t *) f->childimage->currlines[y]) + 2;
+ if (y != f->image->height - 1)
+ down = ((spixel_t *) f->childimage->currlines[y + 1]) + 2;
+ else
+ down = ((spixel_t *) f->childimage->currlines[y]) + 2;
+ end =
+ p_add(((cpixel_t *) f->image->currlines[y]),
+ f->image->width - 1);
+ p_setp(output, -1, 0);
+ p_setp(output, f->image->width - 2, 0);
+ while (output < end) {
+ if (input[1] != input[0] || input[0] != up[0]
+ || input[0] != down[0]) {
+ if (output < end - 2) {
+ p_set(output, pixels[input[0]]);
+ p_setp(output, 1, pixels[input[1]]);
+ p_setp(output, 2, pixels[input[2]]);
+ p_inc(output, 3);
+ input += 3;
+ up += 3;
+ down += 3;
+ while (output < end - 1
+ && (input[0] != up[-1] || input[0] != down[-1]))
+ {
+ p_set(output, pixels[input[0]]);
+ p_setp(output, 1, pixels[input[1]]);
+ p_inc(output, 2);
+ input += 2;
+ up += 2;
+ down += 2;
+ }
+ if (output < end
+ && (input[-1] != input[0] || up[-2] != input[0]
+ || down[-2] != input[0])) {
+ p_set(output, pixels[input[0]]);
+ p_inc(output, 1);
+ input++;
+ up++;
+ down++;
+ }
+ } else
+ p_set(output, pixels[*input]), p_inc(output, 1),
+ input++, up++, down++;
+ } else
+ p_set(output, black), p_inc(output, 1), input++, up++,
+ down++;
+ }
+ }
+}
+#endif
+#undef do_edge
diff --git a/src/engine/emboss.c b/src/engine/emboss.c
new file mode 100644
index 0000000..f5bef92
--- /dev/null
+++ b/src/engine/emboss.c
@@ -0,0 +1,266 @@
+#include <config.h>
+#ifndef _plan9_
+#ifdef NO_MALLOC_H
+#include <stdlib.h>
+#else
+#include <malloc.h>
+#endif
+#include <stdio.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <filter.h>
+#include <fractal.h>
+#include <xthread.h>
+struct embossdata {
+ struct palette *savedpalette, *palette;
+ int xdist, ydist;
+ unsigned int table[512];
+};
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~(IMAGEDATA);
+ r->supportedmask =
+ GRAYSCALE | C256 | TRUECOLOR24 | TRUECOLOR | TRUECOLOR16;
+
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ int x;
+ struct embossdata *s = (struct embossdata *) f->data;
+ inhermisc(f, i);
+ s->palette->size = 256 / 32;
+ for (x = 0; x < 256 / 32; x++)
+ s->palette->pixels[x] = x * 32;
+#define SSTEP (32*8/64)
+#define SSTEP2 (32*8/256)
+ if (datalost(f, i) || i->image->version != f->imageversion) {
+ if (s->savedpalette == NULL)
+ s->savedpalette = clonepalette(i->image->palette);
+ mkgraypalette(i->image->palette);
+ if (i->image->palette->type & (C256 | GRAYSCALE)) {
+ for (x = 0; x < 256; x++) {
+ int dist = (x + SSTEP - 1) / SSTEP;
+ dist += 32;
+ if (dist > 63)
+ dist = 63;
+ s->table[x] = i->image->palette->pixels[dist];
+ }
+ for (x = 256; x < 512; x++) {
+ int dist = -(512 - x + SSTEP - 1) / SSTEP;
+ dist += 32;
+ if (dist < 0)
+ dist = 0;
+ s->table[x] = i->image->palette->pixels[dist];
+ }
+ } else {
+ for (x = 0; x < 256; x++) {
+ int dist = (x + SSTEP2 - 1) / SSTEP2;
+ dist += 128;
+ if (dist > 255)
+ dist = 255;
+ s->table[x] =
+ ((dist >> i->image->palette->info.truec.
+ rprec) << i->image->palette->info.truec.
+ rshift) | ((dist >> i->image->palette->info.
+ truec.gprec) << i->image->palette->
+ info.truec.
+ gshift) | ((dist >>
+ i->image->palette->info.truec.bprec)
+ <<
+ i->image->palette->info.truec.bshift);
+
+ }
+ for (x = 256; x < 512; x++) {
+ int dist = -(512 - x + SSTEP2 - 1) / SSTEP2;
+ dist += 128;
+ if (dist < 0)
+ dist = 0;
+ s->table[x] =
+ ((dist >> i->image->palette->info.truec.
+ rprec) << i->image->palette->info.truec.
+ rshift) | ((dist >> i->image->palette->info.
+ truec.gprec) << i->image->palette->
+ info.truec.
+ gshift) | ((dist >>
+ i->image->palette->info.truec.bprec)
+ <<
+ i->image->palette->info.truec.bshift);
+ }
+ }
+ }
+ s->xdist = (int) (0.1 / i->image->pixelwidth);
+ s->ydist = (int) (0.1 / i->image->pixelwidth);
+ if (s->xdist < 1)
+ s->xdist = 1;
+ if (s->ydist < 1)
+ s->ydist = 1;
+ if (!inherimage
+ (f, i, TOUCHIMAGE, i->image->width + s->xdist,
+ i->image->height + s->ydist, s->palette, 0, 0))
+ return 0;
+ clear_image(f->image);
+ setfractalpalette(f, s->savedpalette);
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct embossdata *i = (struct embossdata *) calloc(1, sizeof(*i));
+ i->savedpalette = NULL;
+ i->palette =
+ createpalette(0, 256, GRAYSCALE, 0, 256, NULL, NULL, NULL, NULL,
+ NULL);
+ f->childimage = NULL;
+ f->data = i;
+ f->name = "Emboss";
+ return (f);
+}
+
+static void emboss8(void *data, struct taskinfo *task, int r1, int r2)
+{
+ pixel8_t *src, *srcend, *src2;
+ pixel8_t *dest;
+ struct filter *f = (struct filter *) data;
+ struct embossdata *s = (struct embossdata *) f->data;
+ int i;
+ unsigned int *table = s->table;
+ for (i = r1; i < r2; i++) {
+ src = f->childimage->currlines[i];
+ src2 = f->childimage->currlines[i + s->ydist] + s->xdist;
+ srcend = src + f->image->width;
+ dest = f->image->currlines[i];
+ while (src < srcend) {
+ *dest = table[((int) *src2 - (int) *src) & 511];
+ src++;
+ src2++;
+ dest++;
+ }
+ }
+}
+
+#ifdef SUPPORT16
+static void emboss16(void *data, struct taskinfo *task, int r1, int r2)
+{
+ pixel8_t *src, *srcend, *src2;
+ pixel16_t *dest;
+ struct filter *f = (struct filter *) data;
+ struct embossdata *s = (struct embossdata *) f->data;
+ int i;
+ unsigned int *table = s->table;
+ for (i = r1; i < r2; i++) {
+ src = f->childimage->currlines[i];
+ src2 = f->childimage->currlines[i + s->ydist] + s->xdist;
+ srcend = src + f->image->width;
+ dest = (pixel16_t *) f->image->currlines[i];
+ while (src < srcend) {
+ *dest = table[((int) *src2 - (int) *src) & 511];
+ src++;
+ src2++;
+ dest++;
+ }
+ }
+}
+#endif
+#ifdef STRUECOLOR24
+static void emboss24(void *data, struct taskinfo *task, int r1, int r2)
+{
+ pixel8_t *src, *srcend, *src2;
+ pixel8_t *dest;
+ struct filter *f = (struct filter *) data;
+ struct embossdata *s = (struct embossdata *) f->data;
+ int i;
+ unsigned int *table = s->table;
+ for (i = r1; i < r2; i++) {
+ src = f->childimage->currlines[i];
+ src2 = f->childimage->currlines[i + s->ydist] + s->xdist;
+ srcend = src + f->image->width;
+ dest = (pixel8_t *) f->image->currlines[i];
+ while (src < srcend) {
+ *dest = *(dest + 1) = *(dest + 2) =
+ table[((int) *src2 - (int) *src) & 511];
+ src++;
+ src2++;
+ dest += 3;
+ }
+ }
+}
+#endif
+static void emboss32(void *data, struct taskinfo *task, int r1, int r2)
+{
+ pixel8_t *src, *srcend, *src2;
+ pixel32_t *dest;
+ struct filter *f = (struct filter *) data;
+ struct embossdata *s = (struct embossdata *) f->data;
+ int i;
+ unsigned int *table = s->table;
+ for (i = r1; i < r2; i++) {
+ src = f->childimage->currlines[i];
+ src2 = f->childimage->currlines[i + s->ydist] + s->xdist;
+ srcend = src + f->image->width;
+ dest = (pixel32_t *) f->image->currlines[i];
+ while (src < srcend) {
+ *dest = table[((int) *src2 - (int) *src) & 511];
+ src++;
+ src2++;
+ dest++;
+ }
+ }
+}
+
+static void destroyinstance(struct filter *f)
+{
+ struct embossdata *i = (struct embossdata *) f->data;
+ if (i->savedpalette != NULL)
+ destroypalette(i->savedpalette);
+ destroypalette(i->palette);
+ destroyinheredimage(f);
+ free(f->data);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time1)
+{
+ int val;
+ int time = time1;
+ updateinheredimage(f);
+ val = f->previous->action->doit(f->previous, flags, time);
+ drivercall(*f->image,
+ xth_function(emboss8, f, f->image->height),
+ xth_function(emboss16, f, f->image->height),
+ xth_function(emboss24, f, f->image->height),
+ xth_function(emboss32, f, f->image->height));
+ xth_sync();
+ return val;
+}
+
+static void myremovefilter(struct filter *f)
+{
+ struct embossdata *s = (struct embossdata *) f->data;
+ if (s->savedpalette != NULL) {
+ restorepalette(f->image->palette, s->savedpalette);
+ destroypalette(s->savedpalette);
+ s->savedpalette = NULL;
+ }
+}
+
+CONST struct filteraction emboss_filter = {
+ "Emboss",
+ "emboss",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ myremovefilter
+};
diff --git a/src/engine/engine.pri b/src/engine/engine.pri
new file mode 100644
index 0000000..1be3f0f
--- /dev/null
+++ b/src/engine/engine.pri
@@ -0,0 +1,35 @@
+SOURCES += \
+ $$PWD/formulas.c \
+ $$PWD/fractal.c \
+ $$PWD/btrace.c \
+ $$PWD/palettef.c \
+ $$PWD/emboss.c \
+ $$PWD/star.c \
+ $$PWD/anti.c \
+ $$PWD/dither.c \
+ $$PWD/edge.c \
+ $$PWD/edge2.c \
+ $$PWD/rotate.c \
+ $$PWD/zoom.c \
+ $$PWD/blur.c \
+ $$PWD/interlace.c \
+ $$PWD/itersmall.c \
+ $$PWD/stereogram.c \
+ $$PWD/3d.c \
+ $$PWD/subwindow.c \
+ $$PWD/plane.c \
+ $$PWD/julia.c \
+ $$PWD/i386.c
+
+OTHER_FILES += \
+ $$PWD/3dd.c \
+ $$PWD/btraced.c \
+ $$PWD/docalc.c \
+ $$PWD/edged.c \
+ $$PWD/edge2d.c \
+ $$PWD/docalc.c \
+ $$PWD/paletted.c \
+ $$PWD/rotated.c \
+ $$PWD/stard.c \
+ $$PWD/stereod.c \
+ $$PWD/zoomd.c
diff --git a/src/engine/formulas.c b/src/engine/formulas.c
new file mode 100644
index 0000000..239ff10
--- /dev/null
+++ b/src/engine/formulas.c
@@ -0,0 +1,3038 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#else
+/* Hello reader!
+ * code you are looking at is dangerous for both you and your hardware! PLEASE
+ * CLOSE THIS FILE UNLESS YOU REALY KNOW WHAT YOU ARE DOING.
+ *
+ * Main purpose of this file is to generate optimal caluclation loops for
+ * various formulas/algorithms. It heavily includes docalc.c - set of
+ * caluclation loops, that then uses macros instad of formulas. This lets me
+ * to change calculation loops easily. At the other hand it looks very ugly.
+ * You have been warned :)
+ */
+
+// Some help can be read below about line 700. :-)
+
+
+#ifndef _MAC
+#include <aconfig.h>
+#endif
+
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#include <string.h>
+#include <stdlib.h>
+#include <math.h>
+#include <float.h>
+#ifdef __EMX__
+#include <sys/cdefs.h>
+#endif
+#include <stdio.h>
+#endif /*plan9 */
+#include <archaccel.h>
+#include <config.h>
+#include <complex.h>
+#include <filter.h>
+#include <fractal.h>
+#include "julia.h"
+#include <ui_helper.h>
+#ifndef M_PI
+#define M_PI 3.1415
+#endif
+
+#ifdef SLOWFUNCPTR
+#define FUNCTYPE INLINE
+#else
+#define FUNCTYPE
+#endif
+
+#ifdef SFFE_USING
+#include "sffe.h"
+
+extern struct uih_context *globaluih; // to be able to use sffe parser
+#endif
+
+CONST char *CONST incolorname[] = {
+ "0",
+ "zmag",
+ "Decomposition-like",
+ "real/imag",
+ "abs(abs(c)-abs(r))",
+ "cos(mag)",
+ "mag*cos(real^2)",
+ "sin(real^2-imag^2)",
+ "atan(real*imag*creal*cimag)",
+ "squares",
+ "True-color",
+ NULL
+};
+
+CONST char *CONST outcolorname[] = {
+ "iter",
+ "iter+real",
+ "iter+imag",
+ "iter+real/imag",
+ "iter+real+imag+real/imag",
+ "binary decomposition",
+ "biomorphs",
+ "potential",
+ "color decomposition",
+ "smooth",
+ "True-color",
+ NULL
+};
+
+CONST char *CONST tcolorname[] = {
+ "black",
+ "re*im sin(re^2) angle",
+ "sin(re) sin(im) sin(square)",
+ "hsv",
+ "hsv2",
+ "cos(re^c) cos(im^2) cos(square)",
+ "abs(re^2) abs(im^2) abs(square)",
+ "re*im re*re im*im",
+ "abs(im*cim) abs(re*cre) abs(re*cim)",
+ "abs(re*im-csqr) abs(re^2-csqr) abs(im^2-csqr)",
+ "angle angle2 angle",
+ "Disable truecolor colouring",
+ "simple red (for education purposes)",
+ "simple blue (for education purposes)",
+ NULL
+};
+
+#define SHIFT 8
+#define SMUL 256
+
+#define __GNUC__EGCS
+/* i386 fp comparsions are incredibly slow. We get much better results when we
+ do it in integer unit. This trick works well for numbers>0*/
+#ifdef __GNUC__EGCS
+#ifdef __i386__121
+
+/* Use union to be alias-analysis correct. */
+typedef union {
+ unsigned int *i;
+ float *f;
+} fpint;
+#define less_than_4(x) ({float tmp=(x); fpint ptr; ptr.f=&tmp;*ptr.i<0x40800000U;})
+#define less_than_0(x) ({float tmp=(x); fpint ptr; ptr.f=&tmp;*ptr.i&0x80000000U;})
+#define greater_then_1Em6(x) ({float tmp=(x); fpint ptr; ptr.f=&tmp;*ptr.i>(unsigned int)0x358637bdU;})
+#define abs_less_than(x,y) ({float tmp=(x), tmp2=(y); fpint ptr, ptr2; ptr.f=&tmp; ptr2.f=&tmp2;(*ptr.i&~0x80000000U)<*ptr2.i;})
+#define greater_than(x,y) ({float tmp=(x), tmp2=(y); fpint ptr, ptr2; ptr.f=&tmp; ; ptr2.f=&tmp2;*ptr.i>*ptr2.i;})
+#endif
+#endif
+#ifndef less_than_4
+#define less_than_0(x) ((x)<0)
+#define less_than_4(x) ((x)<cfractalc.bailout)
+#define greater_then_1Em6(n) ((n)>1E-6)
+#define abs_less_than(x,y) (myabs(x)<y)
+#define greater_than(x,y) ((x)>(y))
+#endif
+
+
+
+#define PERIINOUTPUT() STAT(nperi++;ninside2++);return(cpalette.pixels[0])
+
+#define OUTOUTPUT() STAT(niter2+=iter);return(!cfractalc.coloringmode?cpalette.pixels[(iter%(cpalette.size-1))+1]:color_output(zre,zim,iter))
+#define INOUTPUT() STAT(niter1+=iter;ninside2++);return(cfractalc.incoloringmode?incolor_output(zre,zim,pre,pim,iter):cpalette.pixels[0])
+
+#define OUTPUT() if(iter>=(unsigned int)cfractalc.maxiter)\
+ { \
+ if(cfractalc.incoloringmode==10) return(truecolor_output(zre,zim,pre,pim,cfractalc.intcolor,1)); \
+ INOUTPUT(); \
+ } \
+ else { \
+ if(cfractalc.coloringmode==10) return(truecolor_output(zre,zim,pre,pim,cfractalc.outtcolor,0)); \
+ OUTOUTPUT(); \
+ }
+
+#define SMOOTHOUTPUT() {PRESMOOTH;zre+=0.000001;szmag+=0.000001; \
+ iter=(int)(((cfractalc.maxiter-iter)*256+log((double)(cfractalc.bailout/(szmag)))/log((double)((zre)/(szmag)))*256)); \
+ if (iter < 0) {\
+ iter = (((unsigned int)(cpalette.size - 1)) << 8) - ((-iter) % (((unsigned int)(cpalette.size - 1)) << 8))-1; \
+ if (iter < 0) iter=0; \
+ } \
+ iter %= ((unsigned int)(cpalette.size - 1)) << 8; \
+ \
+ if ((cpalette.type & (C256 | SMALLITER)) || !(iter & 255)) \
+ return (cpalette.pixels[1 + (iter >> 8)]); \
+ { \
+ unsigned int i1, i2; \
+ i1 = cpalette.pixels[1 + (iter >> 8)]; \
+ if ((iter >> 8) == (unsigned int)(cpalette.size - 2)) \
+ i2 = cpalette.pixels[1]; \
+ else \
+ i2 = cpalette.pixels[2 + (iter >> 8)]; \
+ iter &= 255; \
+ return (interpoltype (cpalette, i2, i1, iter)); \
+ } \
+ }
+/* 2009-07-30 JB Langston:
+ * Fixing bug #3: HSV modes are completely black when compiled with GCC 4...
+ * Removed CONSTF qualifier from hsv_to_rgb declaration. CONSTF macro is
+ * defined to __attribute__((__const__)), on which I found some more details
+ * here: http://unixwiz.net/techtips/gnu-c-attributes.html#const. Apparently
+ * this should never be used with a function that takes a pointer or relies on
+ * side-effects, and hsv_to_rgb does both. Therefore, it should never have
+ * been declared this way in the first place.
+ */
+
+static INLINE void
+hsv_to_rgb(int h, int s, int v, int *red, int *green, int *blue) /*CONSTF*/;
+static INLINE void
+hsv_to_rgb(int h, int s, int v, int *red, int *green, int *blue)
+{
+ int hue;
+ int f, p, q, t;
+
+ if (s == 0) {
+ *red = v;
+ *green = v;
+ *blue = v;
+ } else {
+ h %= 256;
+ if (h < 0)
+ h += 256;
+ hue = h * 6;
+
+ f = hue & 255;
+ p = v * (256 - s) / 256;
+ q = v * (256 - (s * f) / 256) >> 8;
+ t = v * (256 * 256 - (s * (256 - f))) >> 16;
+
+ switch ((int) (hue / 256)) {
+ case 0:
+ *red = v;
+ *green = t;
+ *blue = p;
+ break;
+ case 1:
+ *red = q;
+ *green = v;
+ *blue = p;
+ break;
+ case 2:
+ *red = p;
+ *green = v;
+ *blue = t;
+ break;
+ case 3:
+ *red = p;
+ *green = q;
+ *blue = v;
+ break;
+ case 4:
+ *red = t;
+ *green = p;
+ *blue = v;
+ break;
+ case 5:
+ *red = v;
+ *green = p;
+ *blue = q;
+ break;
+ }
+ }
+}
+
+static unsigned int
+truecolor_output(number_t zre, number_t zim, number_t pre, number_t pim,
+ int mode, int inset)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned int
+truecolor_output(number_t zre, number_t zim, number_t pre,
+ number_t pim, int mode, int inset)
+{
+ /* WARNING: r and b fields are swapped for HISTORICAL REASONS (BUG :),
+ * in other words: use r for blue and b for red. */
+ int r = 0, g = 0, b = 0, w = 0;
+
+ switch (mode) {
+ case 0:
+ break;
+ case 1:
+ b = (int) ((sin((double) atan2((double) zre, (double) zim) * 20) +
+ 1) * 127);
+ w = (int) ((sin((double) zim / zre)) * 127);
+ r = (int) ((int) (zre * zim));
+ g = (int) ((sin((double) (zre * zre) / 2) + 1) * 127);
+ break;
+ case 2:
+ if (!inset) {
+ r = (int) ((sin((double) zre * 2) + 1) * 127);
+ g = (int) ((sin((double) zim * 2) + 1) * 127);
+ b = (int) ((sin((double) (zim * zim + zre * zre) / 2) +
+ 1) * 127);
+ } else {
+ r = (int) ((sin((double) zre * 50) + 1) * 127);
+ g = (int) ((sin((double) zim * 50) + 1) * 127);
+ b = (int) ((sin((double) (zim * zim + zre * zre) * 50) +
+ 1) * 127);
+ }
+ w = (int) ((sin((double) zim / zre)) * 127);
+ break;
+ case 3:
+ if (inset)
+ hsv_to_rgb((int)
+ (atan2((double) zre, (double) zim) * 256 / M_PI),
+ (int) ((sin((double) (zre * 50)) + 1) * 128),
+ (int) ((sin((double) (zim * 50)) + 1) * 128), &r,
+ &g, &b);
+ else
+ hsv_to_rgb((int)
+ (atan2((double) zre, (double) zim) * 256 / M_PI),
+ (int) ((sin((double) zre) + 1) * 128),
+ (int) ((sin((double) zim) + 1) * 128), &r, &g, &b);
+ break;
+ case 4:
+ if (inset)
+ hsv_to_rgb((int)
+ (sin((double) (zre * zre + zim * zim) * 0.1) * 256),
+ (int) (sin(atan2((double) zre, (double) zim) * 10) *
+ 128 + 128),
+ (int) ((sin((double) (zre + zim) * 10)) * 65 + 128),
+ &r, &g, &b);
+ else
+ hsv_to_rgb((int)
+ (sin((double) (zre * zre + zim * zim) * 0.01) *
+ 256),
+ (int) (sin(atan2((double) zre, (double) zim) * 10) *
+ 128 + 128),
+ (int) ((sin((double) (zre + zim) * 0.3)) * 65 +
+ 128), &r, &g, &b);
+ break;
+ case 5:
+ {
+ if (!inset) {
+ r = (int) (cos((double) myabs(zre * zre)) * 128) + 128;
+ g = (int) (cos((double) myabs(zre * zim)) * 128) + 128;
+ b = (int) (cos((double) myabs(zim * zim + zre * zre)) *
+ 128) + 128;
+ } else {
+ r = (int) (cos((double) myabs(zre * zre) * 10) * 128) +
+ 128;
+ g = (int) (cos((double) myabs(zre * zim) * 10) * 128) +
+ 128;
+ b = (int) (cos((double) myabs(zim * zim + zre * zre) * 10)
+ * 128) + 128;
+ }
+ }
+ break;
+ case 6:
+ {
+ if (!inset) {
+ r = (int) (zre * zim * 64);
+ g = (int) (zre * zre * 64);
+ b = (int) (zim * zim * 64);
+ } else
+ r = (int) (zre * zim * 256);
+ g = (int) (zre * zre * 256);
+ b = (int) (zim * zim * 256);
+ }
+ break;
+ case 7:
+ {
+ if (!inset) {
+ r = (int) ((zre * zre + zim * zim - pre * pre -
+ pim * pim) * 16);
+ g = (int) ((zre * zre * 2 - pre * pre - pim * pim) * 16);
+ b = (int) ((zim * zim * 2 - pre * pre - pim * pim) * 16);
+ } else {
+ r = (int) ((zre * zre + zim * zim - pre * pre -
+ pim * pim) * 256);
+ g = (int) ((zre * zre * 2 - pre * pre - pim * pim) * 256);
+ b = (int) ((zim * zim * 2 - pre * pre - pim * pim) * 256);
+ }
+ }
+ break;
+ case 8:
+ {
+ if (!inset) {
+ r = (int) ((myabs(zim * pim)) * 64);
+ g = (int) ((myabs(zre * pre)) * 64);
+ b = (int) ((myabs(zre * pim)) * 64);
+ } else {
+ r = (int) ((myabs(zim * pim)) * 256);
+ g = (int) ((myabs(zre * pre)) * 256);
+ b = (int) ((myabs(zre * pim)) * 256);
+ }
+ }
+ break;
+ case 9:
+ {
+ if (!inset) {
+ r = (int) ((myabs(zre * zim - pre * pre - pim * pim)) *
+ 64);
+ g = (int) ((myabs(zre * zre - pre * pre - pim * pim)) *
+ 64);
+ b = (int) ((myabs(zim * zim - pre * pre - pim * pim)) *
+ 64);
+ } else {
+ r = (int) ((myabs(zre * zim - pre * pre - pim * pim)) *
+ 256);
+ g = (int) ((myabs(zre * zre - pre * pre - pim * pim)) *
+ 256);
+ b = (int) ((myabs(zim * zim - pre * pre - pim * pim)) *
+ 256);
+ }
+ }
+ break;
+ case 10:
+ {
+ r = (int) (atan2((double) zre, (double) zim) * 128 / M_PI) +
+ 128;
+ g = (int) (atan2((double) zre, (double) zim) * 128 / M_PI) +
+ 128;
+ b = (int) (atan2((double) zim, (double) zre) * 128 / M_PI) +
+ 128;
+ }
+ break;
+ // case 11 is for disabling truecolor mode
+ case 12:
+ {
+ b = 255;
+ g = 0;
+ r = 0;
+ w = 50;
+ }
+ break;
+ case 13:
+ {
+ r = 255;
+ g = 0;
+ b = 0;
+ w = 0;
+ }
+ break;
+ }
+
+ r += w;
+ g += w;
+ b += w;
+ if (r < 0)
+ r = 0;
+ else if (r > 255)
+ r = 255;
+ if (g < 0)
+ g = 0;
+ else if (g > 255)
+ g = 255;
+ if (b < 0)
+ b = 0;
+ else if (b > 255)
+ b = 255;
+
+ switch (cpalette.type) {
+ case GRAYSCALE:
+ return ((unsigned int) (r * 76 + g * 151 + b * 29) *
+ (cpalette.end - cpalette.start) >> 16) + cpalette.start;
+ case TRUECOLOR:
+ case TRUECOLOR24:
+ case TRUECOLOR16:
+ r >>= cpalette.info.truec.bprec;
+ g >>= cpalette.info.truec.gprec;
+ b >>= cpalette.info.truec.rprec;
+ return ((r << cpalette.info.truec.bshift) +
+ (g << cpalette.info.truec.gshift) +
+ (b << cpalette.info.truec.rshift));
+ }
+
+ return cpalette.pixels[inset];
+}
+
+#ifdef __alpha__
+#define __TEST__
+#endif
+static unsigned int
+color_output(number_t zre, number_t zim, unsigned int iter)
+CONSTF REGISTERS(3);
+static unsigned int
+REGISTERS(3) color_output(number_t zre, number_t zim, unsigned int iter)
+{
+ int i;
+ iter <<= SHIFT;
+ i = iter;
+
+ switch (cfractalc.coloringmode) {
+ case 9:
+ break;
+ case 1: /* real */
+ i = (int) (iter + zre * SMUL);
+ break;
+ case 2: /* imag */
+ i = (int) (iter + zim * SMUL);
+ break;
+ case 3: /* real / imag */
+#ifdef __TEST__
+ if (zim != 0)
+#endif
+ i = (int) (iter + (zre / zim) * SMUL);
+ break;
+ case 4: /* all of the above */
+#ifdef __TEST__
+ if (zim != 0)
+#endif
+ i = (int) (iter + (zre + zim + zre / zim) * SMUL);
+ break;
+ case 5:
+ if (zim > 0)
+ i = ((cfractalc.maxiter << SHIFT) - iter);
+ break;
+ case 6:
+ if (myabs(zim) < 2.0 || myabs(zre) < 2.0)
+ i = ((cfractalc.maxiter << SHIFT) - iter);
+ break;
+ case 7:
+ zre = zre * zre + zim * zim;
+#ifdef __TEST__
+ if (zre < 1 || !i)
+ i = 0;
+ else
+#endif
+ i = (int) (sqrt(log((double) zre) / i) * 256 * 256);
+ break;
+ default:
+ case 8:
+ i = (int) ((atan2((double) zre, (double) zim) / (M_PI + M_PI) +
+ 0.75) * 20000);
+ break;
+ }
+
+ if (i < 0) {
+ i = (((unsigned int) (cpalette.size - 1)) << 8) -
+ ((-i) % (((unsigned int) (cpalette.size - 1) << 8))) - 1;
+ if (i < 0)
+ i = 0;
+ }
+ iter = ((unsigned int) i) % ((cpalette.size - 1) << 8);
+ if ((cpalette.type & (C256 | SMALLITER)) || !(iter & 255))
+ return (cpalette.pixels[1 + (iter >> 8)]);
+ {
+ unsigned int i1, i2;
+
+ i1 = cpalette.pixels[1 + (iter >> 8)];
+
+ if ((int) (iter >> 8) == cpalette.size - 2)
+ i2 = cpalette.pixels[1];
+ else
+ i2 = cpalette.pixels[2 + (iter >> 8)];
+
+ iter &= 255;
+ return (interpoltype(cpalette, i2, i1, iter));
+ }
+
+}
+
+static unsigned int
+incolor_output(number_t zre, number_t zim, number_t pre, number_t pim,
+ unsigned int iter)
+CONSTF REGISTERS(3);
+REGISTERS(3)
+static unsigned int
+incolor_output(number_t zre, number_t zim, number_t pre, number_t pim,
+ unsigned int iter)
+{
+ int i = iter;
+ switch (cfractalc.incoloringmode) {
+ case 1: /* zmag */
+ i = (int) (((zre * zre + zim * zim) *
+ (number_t) (cfractalc.maxiter >> 1) * SMUL + SMUL));
+ break;
+ case 2: /* real */
+ i = (int) (((atan2((double) zre, (double) zim) / (M_PI + M_PI) +
+ 0.75) * 20000));
+ break;
+ default:
+ break;
+ case 3: /* real / imag */
+ i = (int) (100 + (zre / zim) * SMUL * 10);
+ break;
+ case 4:
+ zre = myabs(zre);
+ zim = myabs(zim);
+ pre = myabs(pre);
+ pre = myabs(pim);
+ i += (int) (myabs(pre - zre) * 256 * 64);
+ i += (int) (myabs(pim - zim) * 256 * 64);
+ break;
+ case 5:
+ if (((int) ((zre * zre + zim * zim) * 10)) % 2)
+ i = (int) (cos((double) (zre * zim * pre * pim)) * 256 * 256);
+ else
+ i = (int) (sin((double) (zre * zim * pre * pim)) * 256 * 256);
+ break;
+ case 6:
+ i = (int) ((zre * zre +
+ zim * zim) * cos((double) (zre * zre)) * 256 * 256);
+ break;
+ case 7:
+ i = (int) (sin((double) (zre * zre - zim * zim)) * 256 * 256);
+ break;
+ case 8:
+ i = (int) (atan((double) (zre * zim * pre * pim)) * 256 * 64);
+ break;
+ case 9:
+ if ((abs((int) (zre * 40)) % 2) ^ (abs((int) (zim * 40)) % 2))
+ i = (int) (((atan2((double) zre, (double) zim) /
+ (M_PI + M_PI) + 0.75)
+ * 20000));
+ else
+ i = (int) (((atan2((double) zim, (double) zre) /
+ (M_PI + M_PI) + 0.75)
+ * 20000));
+ break;
+ };
+
+ if (i < 0) {
+ i = (((unsigned int) (cpalette.size - 1)) << 8) -
+ ((-i) % (((unsigned int) (cpalette.size - 1) << 8))) - 1;
+ if (i < 0)
+ i = 0;
+ }
+ iter = ((unsigned int) i) % ((cpalette.size - 1) << 8);
+
+ if ((cpalette.type & (C256 | SMALLITER)) || !(iter & 255))
+ return (cpalette.pixels[1 + ((unsigned int) iter >> 8)]);
+ {
+ unsigned int i1, i2;
+ i1 = cpalette.pixels[1 + ((unsigned int) iter >> 8)];
+ if (((unsigned int) iter >> 8) ==
+ (unsigned int) (cpalette.size - 2))
+ i2 = cpalette.pixels[1];
+ else
+ i2 = cpalette.pixels[2 + ((unsigned int) iter >> 8)];
+ iter &= 255;
+ return (interpoltype(cpalette, i2, i1, iter));
+ }
+
+}
+
+#define VARIABLES
+#define INIT
+#define UNCOMPRESS
+#define USEHACKS
+#define PRETEST 0
+#define FORMULA \
+ zim=(zim*zre)*2+pim; \
+ zre = rp - ip + pre; \
+ ip=zim*zim; \
+ rp=zre*zre;
+#ifdef _NEVER_
+#ifdef __GNUC__
+#ifdef __i386__
+#ifndef NOASSEMBLY
+/* The hand optimized internal loops can save extra 9% of CPU speed compared
+ to latest GCC snapshot. */
+
+/* GCC has ugly support for asm statements with fp input/output, so we use
+ * memory. */
+#define NSFORMULALOOP(iter) \
+{ int tmp; \
+asm( \
+"movl %%edx, %1\n\t" \
+"fldt %9\n\t" \
+"fxch %%st(2)\n\t" \
+"fldt %8\n\t" \
+"fxch %%st(2)\n\t" \
+"fld %%st(0)\n\t" \
+".align 16\n\t" \
+"1:\n\t" \
+"fld %%st(0)\n\t" /* zre zre zim pre pim */ \
+"fxch %%st(2)\n\t" /* zim zre zre ... */ \
+"fmul %%st(0),%%st(2)\n\t" /* zim zre zim*zre */ \
+"movl %1,%%eax\n\t" \
+"fmul %%st(0),%%st(0)\n\t" /* zim*zim zre zim*zre */ \
+"fxch %%st(2)\n\t" /* zim*zre zre zim*zim */ \
+"fadd %%st(0),%%st(0)\n\t" /* 2*zre*zim zre zim*zim */ \
+"fxch %%st(1)\n\t" /* zre 2*zre*zim zim*zim */ \
+"fmul %%st(0),%%st(0)\n\t" /* zre*zre 2*zre*zim zim*zim */ \
+"fxch %%st(1)\n\t" /* 2*zre*zim zre*zre zim*zim */ \
+"fld %%st(2)\n\t" /* zim*zim 2*zre*zim zre*zre zim*zim */ \
+"fsub %%st(4),%%st(0)\n\t" /* zim*zim-pre 2*zre*zim zre*zre zim*zim */ \
+"fxch %%st(3)\n\t" /* zim*zim 2*zre*zim zre*zre zim*zim-pre */ \
+"fadd %%st(2),%%st(0)\n\t" /* zim*zim+zre*zre 2*zre*zim zre*zre zim*zim-pre */ \
+"fxch %%st(1)\n\t" /* 2*zre*zim zim*zim+zre*zre zre*zre zim*zim-pre */ \
+"fadd %%st(5),%%st(0)\n\t" /* 2*zre*zim*pim zim*zim+zre*zre zre*zre zim*zim-pre*/ \
+"fxch %%st(3)\n\t" /* zim*zim-pre zim*zim+zre*zre zre*zre 2*zre*zim+pim */ \
+"fsubp %%st(0),%%st(2)\n\t" /* zim*zim+zre*zre zre*zre-zim*zim+pre 2*zre*zim+pim */ \
+"cmpl %%edx,%%eax\n\t" \
+"ja 2f\n\t" /* cond branch */ \
+"fstps %1\n\t" /* aa-bb+r 2ab+i r i */ \
+"decl %%ecx\n\t" /* */ \
+"jnz 1b\n\t" /* */ \
+"fld %%st(0)\n\t" \
+"2:\n\t" \
+"fstp %%st(0)\n\t" \
+"fstp %%st(2)\n\t" \
+"fstp %%st(2)\n\t" \
+:"=c"(iter),"=m"(tmp),"=&t"(zim),"=&u"(zre) \
+:"d"(0x40800000),"0"(iter),"2"(zre),"3"(zim),"m"(pre),"m"(pim) \
+:"eax","st(2)","st(3)","st(4)","st(5)"); \
+}
+
+pacalc(long double zre, long double zim, long double pre, long double pim)
+{
+ int iter = 1000000;
+ NSFORMULALOOP(iter);
+ return iter;
+}
+#endif
+#endif
+#endif
+#endif
+
+/* Some help for the brave ones. :-)
+ *
+ * Mandelbrot's original formula is z=z^2+c which means
+ * z[next]=z[previous]^2+c.
+ * Here c is the pixel coordinates from the screen and z[0] is usually 0
+ * (if not perturbation was added.)
+ * In the following code z[previous] is described by (zre;zim)
+ * and z[next] will also be zre and zim.
+ * c is described by (pre;pim).
+ * Finally rp and ip are helper variables, mostly for checking the bailout
+ * (which usually means abs(z)>=4, see BTEST).
+ *
+ * Both basic operations and some other functions (c_mul, c_pow3, ...) can
+ * be used. For a "detailed" description refer to ../include/complex.h.
+ *
+ * If you add/modify fractals, please note that struct formula_formulas
+ * (at line cca. 1300) should be also edited for proper initialization
+ * and for menu entries. However it is not self-explanatory, just copy-paste
+ * existing tables and give it a try.
+ *
+ * Finally, please also edit the calculateswitch function and
+ * the nmformulas constant (at the end of this file).
+ *
+ * -- Zoltan, 2009-07-30
+ */
+
+
+#define BTEST less_than_4(rp+ip)
+#define SMOOTH
+#define SCALC smand_calc
+#define SPERI smand_peri
+#define CALC mand_calc
+#define PERI mand_peri
+#define JULIA mand_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#ifdef __i386__
+#define UNCOMPRESS
+#endif
+#define USEHACKS
+#define PRETEST 0
+#define FORMULA \
+ rp = zre * (rp - 3 * ip); \
+ zim = zim * (3 * zre * zre - ip) + pim; \
+ zre = rp + pre; \
+ rp = zre * zre; \
+ ip = zim * zim;
+#define BTEST less_than_4(rp+ip)
+#define SMOOTH
+#define SCALC smand3_calc
+#define SPERI smand3_peri
+#define CALC mand3_calc
+#define PERI mand3_peri
+#define JULIA mand3_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+
+#define UNCOMPRESS
+#define VARIABLES number_t br,tmp;
+#define FORMULA \
+ br = zre + zre + pre - 2; \
+ tmp = zre * zim; \
+ zre = rp - ip + pre - 1; \
+ ip = zim + zim + pim; \
+ zim = tmp + tmp + pim; \
+ tmp = 1 / (br * br + ip * ip); \
+ rp = (zre * br + zim * ip) * tmp; \
+ ip = (zim * br - zre * ip) * tmp; \
+ zre = (rp + ip) * (rp - ip); \
+ zim = rp * ip; \
+ zim += zim; \
+ rp = zre - 1; \
+ ip = zim * zim; \
+ rp = zre * zre;
+#define BTEST (rp+ip<(number_t)100*100&&(rp-2*zre+ip)>0.04/cfractalc.bailout-1)
+#define POSTCALC \
+ if(rp-2*zre+ip>0.04/cfractalc.bailout-1){ \
+ zre *= 0.08/cfractalc.bailout, zim *= 0.08/cfractalc.bailout; \
+ if(iter) \
+ iter = cfractalc.maxiter - iter + 1; \
+ }
+#define CALC magnet_calc
+#define PERI magnet_peri
+#define SCALC smagnet_calc
+#define SPERI smagnet_peri
+#define SMOOTH
+#define PRESMOOTH szmag/=100*100/4;zre=(rp+ip)/(100*100*4);
+#define JULIA magnet_julia
+#define RANGE 4
+#define RPIP
+#include "docalc.c"
+
+#define UNCOMPRESS
+#define VARIABLES number_t inre,inim,tmp1,tmp2,dnre,nmre,dnim;
+#define INIT \
+ inre = pre*pre - pim*pim - pre - pre - pre; \
+ inim = pre*pim; \
+ inim = inim + inim - pim - pim - pim;
+#define FORMULA \
+ tmp1 = rp - ip; \
+ tmp2 = zre*pre - zim*pim - zre; \
+ dnre = tmp1 + tmp1 + tmp1 + tmp2 + tmp2 + tmp2 - zre - zre - zre + inre + 3; \
+ tmp1 = zre*ip;\
+ nmre = zre*rp - tmp1 - tmp1 - tmp1 + tmp2 + tmp2 + tmp2 + inre + 2; \
+ tmp1 = zre*zim; \
+ tmp2 = zre*pim + zim*pre - zim; \
+ dnim = tmp1 + tmp1 + tmp1 + tmp1 + tmp1 + tmp1 + tmp2 + tmp2 + tmp2 - zim - zim - zim + inim; \
+ tmp1 = zim*rp; \
+ zim = tmp1 + tmp1 + tmp1 - zim*ip + tmp2 + tmp2 + tmp2 + inim; \
+ zre = nmre; \
+ ip = dnim; \
+ tmp1 = 1 / (dnre * dnre + ip * ip); \
+ rp = (zre * dnre + zim * ip) * tmp1; \
+ ip = (zim * dnre - zre * ip) * tmp1; \
+ zre = (rp + ip) * (rp - ip); \
+ zim = rp * ip; \
+ zim += zim; \
+ ip = zim * zim; \
+ rp = zre * zre;
+#define BTEST (rp+ip<(number_t)100*100&&(rp-2*zre+ip)>0.04/cfractalc.bailout-1)
+#define POSTCALC \
+ if(rp-2*zre+ip>0.04/cfractalc.bailout-1){ \
+ zre *= 0.08/cfractalc.bailout, zim *= 0.08/cfractalc.bailout; \
+ if(iter) \
+ iter = cfractalc.maxiter - iter + 1; \
+ }
+#define CALC magnet2_calc
+#define PERI magnet2_peri
+#define SCALC smagnet2_calc
+#define SPERI smagnet2_peri
+#define SMOOTH
+#define PRESMOOTH szmag/=100*100/4;zre=(rp+ip)/(100*100*4);
+#define JULIA magnet2_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#ifdef __i386__
+#define UNCOMPRESS
+#endif
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ rp = rp * rp - 6 * rp * ip + ip * ip + pre; \
+ zim = 4 * zre * zre * zre * zim - 4 * zre * ip * zim + pim; \
+ zre = rp; \
+ rp = zre * zre; \
+ ip = zim * zim;
+#define SMOOTH
+#define SCALC smand4_calc
+#define SPERI smand4_peri
+#define CALC mand4_calc
+#define PERI mand4_peri
+#define JULIA mand4_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES register number_t t;
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ c_pow4(zre, zim, rp, ip); \
+ c_mul(zre, zim, rp, ip, t, zim); \
+ zre = t + pre; \
+ zim += pim; \
+ rp = zre * zre; \
+ ip = zim * zim;
+#define SMOOTH
+#define SCALC smand5_calc
+#define SPERI smand5_peri
+#define CALC mand5_calc
+#define PERI mand5_peri
+#define JULIA mand5_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+
+#define VARIABLES register number_t t;
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ c_pow3(zre, zim, rp, ip); \
+ c_mul(rp, ip, rp, ip, t, zim); \
+ zre = t + pre; \
+ zim += pim; \
+ rp = zre * zre; \
+ ip = zim * zim;
+#define SMOOTH
+#define SCALC smand6_calc
+#define SPERI smand6_peri
+#define CALC mand6_calc
+#define PERI mand6_peri
+#define JULIA mand6_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+
+#define VARIABLES register number_t t;
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ c_pow3(zre, zim, rp, ip); \
+ c_pow3(rp, ip, t, zim); \
+ zre = t + pre; \
+ zim += pim; \
+ rp = zre * zre; \
+ ip = zim * zim;
+#define SMOOTH
+#define SCALC smand9_calc
+#define SPERI smand9_peri
+#define CALC mand9_calc
+#define PERI mand9_peri
+#define JULIA mand9_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+/* formulas from here to the next comment are not tested under plan9 compiler */
+
+#define VARIABLES
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ zim=zre*zim+zim/2+pim; \
+ zre=(rp-ip+zre)/2+pre; \
+ rp=zre*zre; \
+ ip=zim*zim;
+#define SMOOTH
+#define SCALC strice_calc
+#define SPERI strice_peri
+#define CALC trice_calc
+#define PERI trice_peri
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES register number_t zor,zoi;
+/* 2009-08-01 JB Langston
+ * On Mac OS X, for some reason Cat's Eye renders as an empty circle unless
+ * the bailout is slightly more than 4. This doesn't appear to happen on any
+ * other operating systems, and it's not processor specific. It's probably
+ * a compiler bug, but I haven't been able to figure out exactly what's
+ * happening. I can work around it by subtracting LDBL_MIN from the amount
+ * before performing the bailout test.
+ */
+// #define LDBL_MIN 0.00000001
+#define BTEST less_than_4(rp+ip-LDBL_MIN)
+#define FORMULA \
+ c_div(pre,pim,zre,zim,rp,ip); \
+ c_div(zre,zim,pre,pim,zor,zoi); \
+ zre=zor+rp; \
+ zim=zoi+ip; \
+ rp=zre*zre; \
+ ip=zim*zim;
+#define SMOOTH
+#define SCALC scatseye_calc
+#define SPERI scatseye_peri
+#define CALC catseye_calc
+#define PERI catseye_peri
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ zim=(zim*zre)*(-2.0)+pim; \
+ zre=rp-ip+pre; \
+ ip=zim*zim; \
+ rp=zre*zre;
+#define SMOOTH
+#define SCALC smbar_calc
+#define SPERI smbar_peri
+#define CALC mbar_calc
+#define PERI mbar_peri
+#define JULIA mbar_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES
+#define INIT \
+ rp=zre;zre=pre;pre=rp; \
+ ip=zim;zim=pim;pim=ip;
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ rp=ip-rp+zre; \
+ ip=zim-2*zre*zim; \
+ c_mul(rp,ip,pre,pim,zre,zim); \
+ rp=zre*zre; \
+ ip=zim*zim;
+#define SMOOTH
+#define SCALC smlambda_calc
+#define SPERI smlambda_peri
+#define CALC mlambda_calc
+#define PERI mlambda_peri
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES register number_t zre1,zim1,zre2,zim2;
+#define INIT zre1=zre;zim1=zim;
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ zre2=zre;zim2=zim; \
+ zim=(zim*zre)*2+pim+zim1; \
+ zre=rp-ip+pre+zre1; \
+ zre1=zre2; \
+ zim1=zim2; \
+ ip=zim*zim; \
+ rp=zre*zre;
+#define SMOOTH
+#define SCALC smanowar_calc
+#define CALC manowar_calc
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES register number_t zre1,zim1;
+#define INIT zre1=pre;zim1=pim;
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ zim=(zim*zre)*2+zim1; \
+ zre=rp-ip+zre1; \
+ zre1=zre1/2+zre; \
+ zim1=zim1/2+zim; \
+ ip=zim*zim; \
+ rp=zre*zre;
+#define SMOOTH
+#define SCALC sspider_calc
+#define CALC spider_calc
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES
+#define INIT \
+ if((zre==pre)&&(zim==pim)){pre=0.5;pim=0.8660254;} \
+ if(pim<0)pim=(-pim); \
+ if(((pim*zre-pre*zim)<0)||(zim<0)){zre=2*pre+2;zim=2*pim;}
+#define BTEST ((pim*zre+(1-pre)*zim)<pim)
+#define FORMULA \
+ zre=2*zre;zim=2*zim; \
+ if((pim*zre-pre*zim)>pim)zre=zre-1; \
+ if(zim>pim){zim=zim-pim;zre=zre-pre;}
+#define CALC sier_calc
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES
+#define INIT \
+ if((zre==pre)&&(zim==pim)){pre=0.5;pim=0.8660254;} \
+ if(pim<0)pim=(-pim); \
+ if(((pim*zre-pre*zim)<0)||(zim<0)){zre=2*pre+2;zim=2*pim;}
+#define BTEST ((pim*zre+(1-pre)*zim)<pim)
+#define FORMULA \
+ zre=1.6180339*zre;zim=1.6180339*zim; \
+ if((pim*zre-pre*zim)>pim*0.6180339)zre=zre-0.6180339; \
+ if(zim>pim*0.6180339){zim=zim-pim*0.6180339;zre=zre-pre*0.6180339;}
+#define CALC goldsier_calc
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES
+#define INIT
+#define BTEST (zre*zre+zim*zim<1)
+#define FORMULA \
+ zre=3*zre;zim=3*zim; \
+ if((zim-2)*(zim-2)+zre*zre<1)zim=zim-2; \
+ if((zim+2)*(zim+2)+zre*zre<1)zim=zim+2; \
+ if((zim-1)*(zim-1)+(zre-1.7320508)*(zre-1.7320508)<1){zim=zim-1;zre=zre-1.7320508;} \
+ if((zim+1)*(zim+1)+(zre-1.7320508)*(zre-1.7320508)<1){zim=zim+1;zre=zre-1.7320508;} \
+ if((zim-1)*(zim-1)+(zre+1.7320508)*(zre+1.7320508)<1){zim=zim-1;zre=zre+1.7320508;} \
+ if((zim+1)*(zim+1)+(zre+1.7320508)*(zre+1.7320508)<1){zim=zim+1;zre=zre+1.7320508;}
+#define CALC circle7_calc
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES
+#define INIT
+#define BTEST less_than_4((rp+ip)/4.0)
+#define FORMULA \
+ if (less_than_0 (zre)) { \
+ rp = zre + 1; \
+ } else { \
+ rp = zre - 1; \
+ } \
+ if (less_than_0 (zim)) { \
+ ip = zim + 1; \
+ } else { \
+ ip = zim - 1; \
+ } \
+ c_mul(rp, ip, pre, pim, zre, zim); \
+ rp = zre * zre; \
+ ip = zim * zim;
+#define SMOOTH
+#define CALC symbarn_calc
+#define JULIA symbarn_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES
+#define INIT \
+ if((zre==pre)&&(zim==pim)){pre=1;pim=1;} \
+ if(pre<0)pre=(-pre);if(pim<0)pim=(-pim); \
+ if((zre<0)||(zre>pre)){zre=pre/2;zim=pim/2;} \
+ if((zim<0)||(zim>pim)){zre=pre/2;zim=pim/2;}
+#define BTEST \
+ ((zre<pre/3)||(zre>2*pre/3)|| \
+ (zim<pim/3)||(zim>2*pim/3))
+#define FORMULA \
+ zre=3*zre;zim=3*zim; \
+ if(zre>2*pre)zre=zre-2*pre;else if(zre>pre)zre=zre-pre; \
+ if(zim>2*pim)zim=zim-2*pim;else if(zim>pim)zim=zim-pim;
+#define CALC carpet_calc
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+
+#define VARIABLES
+#define BTEST \
+ ((((1.5*zre+0.8660254038*zim)>0.8660254038)|| \
+ ((0.8660254038*zim-1.5*zre)>0.8660254038)|| \
+ (zim<(-0.5)))&& \
+ (((1.5*zre+0.8660254038*zim)<-0.8660254038)|| \
+ ((0.8660254038*zim-1.5*zre)<-0.8660254038)|| \
+ (zim>0.5)))
+#define FORMULA \
+ zre=3*zre;zim=3*zim; \
+ if((0.2886751346*zim-0.5*zre)>0.0){ \
+ if((0.2886751346*zim+0.5*zre)>0.0){ \
+ zim=zim-2.0;\
+ }else{ \
+ if(zim>0){zre=zre+1.732050808;zim=zim-1.0;} \
+ else{zre=zre+1.732050808;zim=zim+1.0;} \
+ } \
+ }else{ \
+ if((0.2886751346*zim+0.5*zre)<0.0){ \
+ zim=zim+2.0;\
+ }else{ \
+ if(zim>0){zre=zre-1.732050808;zim=zim-1.0;} \
+ else{zre=zre-1.732050808;zim=zim+1.0;} \
+ } \
+ }
+#define CALC koch_calc
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES register number_t zre1, zim1;
+#define INIT pim=fabs(pim); zre=pre; zim=pim;
+#define BTEST \
+ (!((zre<0)&&(zim>0)&&(-1.0*zre+1.732050808*zim<1.732050808)))
+#define FORMULA \
+ zre1=1.5*zre-0.866+0.866*zim; \
+ zim1=-1.5+1.5*zim-0.866*zre; \
+ zre=zre1; zim=zim1;
+#define CALC hornflake_calc
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+/* plan9 compiler has problem with rest of formulas files. Hope that will be fixed later */
+
+#define VARIABLES
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ if (less_than_0 (zre)) { \
+ rp = zre + 1; \
+ } else { \
+ rp = zre - 1; \
+ } \
+ c_mul(rp, zim, pre, pim, zre, zim); \
+ rp = zre * zre; \
+ ip = zim * zim;
+#define SMOOTH
+#define SCALC sbarnsley1_calc
+#define CALC barnsley1_calc
+#define JULIA barnsley1_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+
+#define VARIABLES
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ if (less_than_0 (zre*pim + zim*pre)) { \
+ rp = zre + 1; \
+ } else { \
+ rp = zre - 1; \
+ } \
+ c_mul(rp, zim, pre, pim, zre, zim); \
+ rp = zre * zre; \
+ ip = zim * zim;
+#define SMOOTH
+#define SCALC sbarnsley2_calc
+#define CALC barnsley2_calc
+#define JULIA barnsley2_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+#define VARIABLES
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ if (!less_than_0 (-zre)) { \
+ zim = 2*zre*zim + pim*zre; \
+ zre = rp - ip - 1 + pre*zre; \
+ } else { \
+ zim = 2*zre*zim; \
+ zre = rp - ip - 1; \
+ } \
+ rp = zre * zre; \
+ ip = zim * zim;
+#define SMOOTH
+#define SCALC sbarnsley3_calc
+#define CALC barnsley3_calc
+#define JULIA barnsley3_julia
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+
+#define VARIABLES register number_t n,sqrr,sqri,zre1,zim1;
+#define INIT sqri=zim*zim,n=zre,zre=pre,pre=n,n=zim,zim=pim,pim=n,n=(number_t)1;
+#define BTEST greater_then_1Em6(n)
+#define FORMULA \
+ zre1 = zre; \
+ zim1 = zim; \
+ n = zim * zim; \
+ sqri = zre * zre; \
+ sqrr = sqri - n; \
+ sqri = n + sqri; \
+ n = 0.3333333333 / ((sqri * sqri)); \
+ zim = (0.66666666) * zim - (zre + zre) * zim * n + pim; \
+ zre = (0.66666666) * zre + (sqrr) * n + pre; \
+ zre1 -= zre; \
+ zim1 -= zim; \
+ n = zre1 * zre1 + zim1 * zim1;
+#define CALC newton_calc
+#include "docalc.c"
+
+
+#define VARIABLES register number_t n,sqrr,sqri,zre1,zim1;
+#define INIT sqri=zim*zim,n=zre,zre=pre,pre=n,n=zim,zim=pim,pim=n,n=(number_t)1;
+#define BTEST greater_then_1Em6(n)
+#define FORMULA \
+ zre1 = zre; \
+ zim1 = zim; \
+ sqrr = zre * zre; \
+ sqri = zim * zim; \
+ n = sqri + sqrr; \
+ n = 1 / ((n * n * n)); \
+ zim = (0.25) * zim * (3 + (sqri - 3 * sqrr) * n) + pim; \
+ zre = (0.25) * zre * (3 + (sqrr - 3 * sqri) * n) + pre; \
+ zre1 -= zre; \
+ zim1 -= zim; \
+ n = zre1 * zre1 + zim1 * zim1;
+#define CALC newton4_calc
+#include "docalc.c"
+
+
+#define VARIABLES register number_t zpr,zip;
+#define SAVEVARIABLES register number_t szpr,szip;
+#define SAVE szpr=zpr,szip=zip;
+#define RESTORE zpr=szpr,zip=szip;
+#define INIT zpr=zip=(number_t)0;
+#define BTEST less_than_4(rp+ip)
+#define FORMULA \
+ rp = rp - ip + pre + pim * zpr; \
+ ip = 2 * zre * zim + pim * zip; \
+ zpr = zre, zip = zim; \
+ zre = rp; \
+ zim = ip; \
+ rp = zre * zre, ip = zim * zim;
+#define SMOOTH
+#define SCALC sphoenix_calc
+#define SPERI sphoenix_peri
+#define CALC phoenix_calc
+#define PERI phoenix_peri
+#define RPIP
+#include "docalc.c"
+
+
+#define VARIABLES register number_t tr,ti,zpr,zpm,rp1,ip1;
+#define INIT zpr=zpm=0,tr=zre,zre=pre,pre=tr,tr=zim,zim=pim,pim=tr,tr=1;
+#define BTEST less_than_4(zpr*zpr+zpm*zpm)
+#define FORMULA \
+ rp1 = zre; \
+ ip1 = zim; \
+ c_pow3(zre, zim, tr, ti); \
+ c_add(tr, ti, zpr, zpm, zre, zim); \
+ zpr = rp1 + pre; \
+ zpm = ip1 + pim;
+#define CALC octo_calc
+#define SCALC socto_calc
+#define SMOOTH
+#define CUSTOMSAVEZMAG szmag=zpr*zpr+zpm*zpm
+#define PRESMOOTH zre=zpr*zpr+zpm*zpm
+#include "docalc.c"
+
+
+#define VARIABLES register number_t yre, yim, re1tmp, re2tmp, im1tmp;
+#define BTEST (rp+ip<9||(yre*yre+yim*yim)<4*(rp+ip))
+#define INIT yre=pre; yim=pim;
+#define FORMULA \
+ re1tmp=zre; \
+ re2tmp=yre; \
+ im1tmp=zim; \
+ zre=re1tmp+yre; \
+ zim=im1tmp+yim; \
+ yre=(re1tmp*re2tmp-im1tmp*yim ); \
+ yim=(re1tmp*yim +re2tmp*im1tmp); \
+ rp=zre*zre; \
+ ip=zim*zim;
+#define CALC beryl_calc
+#define JULIA beryl_julia
+#define PERI beryl_peri
+#define RANGE 2
+#define RPIP
+#include "docalc.c"
+
+
+
+#ifdef SFFE_USING
+ /* SFFE - malczak */
+ //#define VARIABLES sffe *p = globaluih->parser;
+#define INIT cmplxset(pZ,0,0); cmplxset(C,pre,pim); \
+ if (globaluih->pinit) Z=sffe_eval(globaluih->pinit); else cmplxset(Z,zre,zim);
+ //#define SAVE cmplxset(pZ,real(Z),imag(Z));
+ //#define PRETEST 0
+#define FORMULA \
+ Z = sffe_eval(globaluih->parser);\
+ cmplxset(pZ,zre,zim); \
+ zre = real( Z ); \
+ zim = imag( Z );
+#define BTEST less_than_4(zre*zre+zim*zim)
+ //less_than_4(rp+ip)
+#define CALC sffe_calc
+#define JULIA sffe_julia
+#define SCALC ssffe_calc
+ //#define SMOOTH
+#include "docalc.c"
+#endif
+
+
+static CONST symetrytype sym6[] = {
+ {0, 1.73205080758},
+ {0, -1.73205080758}
+};
+
+static CONST symetrytype sym8[] = {
+ {0, 1},
+ {0, -1}
+};
+
+static CONST symetrytype sym16[] = {
+ {0, 1},
+ {0, -1},
+ {0, 0.414214},
+ {0, -0.414214},
+ {0, 2.414214},
+ {0, -2.414214}
+};
+
+CONST struct formula formulas[] = {
+ { /* 0 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ mand_calc,
+ mand_peri,
+ smand_calc,
+ smand_peri,
+#endif
+ mand_julia,
+ {"Mandelbrot", "Julia"},
+ "mandel",
+ /*{0.5, -2.0, 1.25, -1.25}, */
+ {-0.75, 0.0, 2.5, 2.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* 1 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ mand3_calc,
+ mand3_peri,
+ smand3_calc,
+ smand3_peri,
+#endif
+ mand3_julia,
+ {"Mandelbrot^3", "Julia^3"},
+ "mandel3",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {0, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {0, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, INT_MAX, 0, NULL},
+ {0, 0, 0, NULL},
+ {0, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {0, 0, 0, NULL},
+ {0, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* 2 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ mand4_calc,
+ mand4_peri,
+ smand4_calc,
+ smand4_peri,
+#endif
+ mand4_julia,
+ {"Mandelbrot^4", "Julia^4"},
+ "mandel4",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* 3 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ mand5_calc,
+ mand5_peri,
+ smand5_calc,
+ smand5_peri,
+#endif
+ mand5_julia,
+ {"Mandelbrot^5", "Julia^5"},
+ "mandel5",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {0, 0, 2, sym8},
+ {INT_MAX, 0, 0, NULL},
+ {0, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, INT_MAX, 0, NULL},
+ {0, 0, 2, sym8},
+ {0, 0, 2, sym8},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, 0, 2, sym8},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {0, 0, 2, sym8},
+ {0, 0, 2, sym8},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* 4 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ mand6_calc,
+ mand6_peri,
+ smand6_calc,
+ smand6_peri,
+#endif
+ mand6_julia,
+ {"Mandelbrot^6", "Julia^6"},
+ "mandel6",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* 5 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ newton_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ NULL,
+ {"Newton", "Newton julia?"},
+ "newton",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 0, 1, 1.0199502202048319698, 0.0,
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ STARTZERO,
+ },
+ { /* formula added by Andreas Madritsch *//* 6 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ newton4_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ NULL,
+ {"Newton^4", "Newton^4 julia?"},
+ "newton4",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 0, 1, 1.0199502202048319698, 0.0,
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ STARTZERO,
+ },
+ { /* 7 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ barnsley1_calc,
+ NULL,
+ sbarnsley1_calc,
+ NULL,
+#endif
+ barnsley1_julia,
+ {"Barnsley1 Mandelbrot", "Barnsley1"},
+ "barnsley",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 0, 0, -0.6, 1.1,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ STARTZERO | MANDEL_BTRACE,
+ },
+ { /* formula added by Andreas Madritsch *//* 8 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ barnsley2_calc,
+ NULL,
+ sbarnsley2_calc,
+ NULL,
+#endif
+ barnsley2_julia,
+ {"Barnsley2 Mandelbrot", "Barnsley2"},
+ "barnsley2",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 5.5},
+ 0, 0, -0.6, 1.1,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ STARTZERO | MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete *//* 9 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ barnsley3_calc,
+ NULL,
+ sbarnsley3_calc,
+ NULL,
+#endif
+ barnsley3_julia,
+ {"Barnsley3 Mandelbrot", "Barnsley3"},
+ "barnsley3",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 3.5},
+ 0, 0, 0.0, 0.4,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ STARTZERO | MANDEL_BTRACE,
+ },
+ { /* 10 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ octo_calc,
+ /*octo_peri, */ NULL,
+ socto_calc,
+ /*socto_peri, */ NULL,
+#endif
+ NULL,
+ {"Octal", "Octal"},
+ "octal",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 0, 1, 0.0, 0.0,
+ {
+ {0, 0, 6, sym16},
+ {INT_MAX, 0, 0, NULL},
+ {0, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, INT_MAX, 0, NULL},
+ {0, 0, 0, NULL},
+ {0, 0, 6, sym16},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, 0, 6, sym16},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {0, 0, 6, sym16},
+ {0, 0, 6, sym16},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE | STARTZERO,
+ },
+ { /* 11 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ phoenix_calc,
+ phoenix_peri,
+ sphoenix_calc,
+ sphoenix_peri,
+#endif
+ NULL,
+ {"MandPhoenix", "Phoenix"},
+ "phoenix",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 1, 0, 0.56667000000000001, -0.5,
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* 12 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ magnet_calc,
+ magnet_peri,
+ smagnet_calc,
+ smagnet_peri,
+#endif
+ magnet_julia,
+ {"Magnet", "Magnet"},
+ "magnet",
+ /*{3, 0, 2.2, -2.2}, */
+ {1.5, 0.0, 3.0, 4.4},
+ 1, 1, 0.0, 0.0,
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ STARTZERO,
+ },
+ { /* formula added by Andreas Madritsch *//* 13 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ magnet2_calc,
+ magnet2_peri,
+ smagnet2_calc,
+ smagnet2_peri,
+#endif
+ magnet2_julia,
+ {"Magnet2", "Magnet2"},
+ "magnet2",
+ /*{3, 0, 2.2, -2.2}, */
+ {1.0, 0.0, 3.0, 3.2},
+ 1, 1, 0.0, 0.0,
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ STARTZERO,
+ },
+ { /* formula added by Arpad Fekete *//* 14 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ trice_calc,
+ trice_peri,
+ strice_calc,
+ strice_peri,
+#endif
+ NULL,
+ {"Triceratops", "Triceratops Julia"},
+ "trice",
+ {0.0, 0.0, 2.5, 4.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete *//* 15 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ catseye_calc,
+ catseye_peri,
+ scatseye_calc,
+ scatseye_peri,
+#endif
+ NULL,
+ {"Catseye", "Catseye Julia"},
+ "catseye",
+ {0.0, 0.0, 2.5, 4.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {0, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, 0, 0, NULL},
+ {0, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {0, 0, 0, NULL},
+ {0, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, 0, 0, NULL},
+ {0, 0, 0, NULL},
+ {0, 0, 0, NULL},
+ {0, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /*formula added by Arpad Fekete *//* 16 */
+ /*in Gnofract4d from mathworld.wolfram.com */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ mbar_calc,
+ mbar_peri,
+ smbar_calc,
+ smbar_peri,
+#endif
+ mbar_julia,
+ {"Mandelbar", "Mandelbar Julia"},
+ "mbar",
+ {0.0, 0.0, 2.5, 3.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, 0, 2, sym6},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete (from fractint) *//* 17 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ mlambda_calc,
+ mlambda_peri,
+ smlambda_calc,
+ smlambda_peri,
+#endif
+ NULL,
+ {"Lambda Mandelbrot", "Lambda"},
+ "mlambda",
+ {0.5, 0.0, 2.5, 5.5},
+ 0, 0, 0.5, 0.0,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete (from fractint) *//* 18 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ manowar_calc,
+ NULL,
+ smanowar_calc,
+ NULL,
+#endif
+ NULL,
+ {"Manowar", "Manowar Julia"},
+ "manowar",
+ {0.0, 0.0, 2.5, 2.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete (from fractint) *//* 19 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ spider_calc,
+ NULL,
+ sspider_calc,
+ NULL,
+#endif
+ NULL,
+ {"Spider", "Spider Julia"},
+ "spider",
+ {0.0, 0.0, 2.5, 4.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, 0, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete, method from fractint *//* 20 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ sier_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ NULL,
+ {"Sierpinski", "Sierpinski"},
+ "sier",
+ {0.5, 0.43, 1.5, 1.0},
+ 0, 0, 0.5, 0.8660254,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete, method from fractint *//* 21 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ carpet_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ NULL,
+ {"S.Carpet", "S.Carpet"},
+ "carpet",
+ {0.5, 0.5, 1.5, 1.5},
+ 0, 0, 1, 1,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete, method from fractint *//* 22 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ koch_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ NULL,
+ {"Koch Snowflake", "Koch Snowflake"},
+ "koch",
+ {0.0, 0.0, 2.5, 2.5},
+ 0, 1, 0, 0,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Z. Kovacs *//* 23 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ hornflake_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ NULL,
+ {"Spidron hornflake", "Spidron hornflake"},
+ "hornflake",
+ {-0.75, 0, 3.8756, 3.8756},
+ 0, 1, 0, 0,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Z. Kovacs, originally mand6 but it was mand9 by accident *//* 24 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ mand9_calc,
+ mand9_peri,
+ smand9_calc,
+ smand9_peri,
+#endif
+ mand9_julia,
+ {"Mandelbrot^9", "Julia^9"},
+ "mandel9",
+ /*{1.25, -1.25, 1.25, -1.25}, */
+ {0.0, 0.0, 2.5, 2.5},
+ 1, 1, 0.0, 0.0,
+ {
+ {0, 0, 6, sym16},
+ {INT_MAX, 0, 0, NULL},
+ {0, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, INT_MAX, 0, NULL},
+ {0, 0, 0, NULL},
+ {0, 0, 6, sym16},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {0, 0, 6, sym16},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {0, 0, 6, sym16},
+ {0, 0, 6, sym16},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+
+ { /* formula added by S. Bizien *//* 25 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ beryl_calc,
+ beryl_peri,
+ NULL,
+ NULL,
+#endif
+ NULL,
+ {"Beryl", "Beryl"},
+ "beryl",
+ {-0.6, 0, 2, 2},
+ 0, 0, 1.0, 0.0,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete *//* 26 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ goldsier_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ NULL,
+ {"Golden Sierpinski", "Golden Sierpinski"},
+ "goldsier",
+ {0.5, 0.43, 1.5, 1.0},
+ 0, 0, 0.5, 0.8660254,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete *//* 27 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ circle7_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ NULL,
+ {"Circle 7", "Circle 7"},
+ "circle7",
+ {0.0, 0.0, 2.5, 2.5},
+ 0, 0, 0.0, 0.0,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ },
+ { /* formula added by Arpad Fekete *//* 28 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ symbarn_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ symbarn_julia,
+ {"Sym. Barnsley M.", "Sym. Barnsley"},
+ "symbarn",
+ {0.0, 0.0, 8.0, 1.0},
+ 0, 0, 1.3, 1.3,
+ /* Arpad hasn't created the symmetry properties, */
+ /* because he doesn't considered it to be important */
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE,
+ }
+
+#ifdef SFFE_USING
+ , { /* formula added by M. Malczak - SFFE *//* 29 */
+ FORMULAMAGIC,
+#ifndef SLOWFUNCPTR
+ sffe_calc,
+ NULL,
+ NULL,
+ NULL,
+#endif
+ sffe_julia,
+ {"User defined", "User defined"},
+ "user",
+ /*{0.5, -2.0, 1.25, -1.25}, */
+ /*{-0.75, 0.0, 1, 1},*/
+ /* 2009-08-01 JB Langston
+ * Changed default zoom level to match Mandelbrot
+ */
+ {-0.75, 0.0, 2.5, 2.5},
+ 0, 1, 0.0, 0.0,
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ {
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ {INT_MAX, INT_MAX, 0, NULL},
+ },
+ MANDEL_BTRACE | SFFE_FRACTAL,
+ }
+#endif
+
+};
+
+#ifdef SLOWFUNCPTR
+unsigned int
+calculateswitch(register number_t x1, register number_t y1,
+ register number_t x2, register number_t y2,
+ int periodicity)
+{
+ if (periodicity && cfractalc.periodicity)
+ if (cfractalc.coloringmode == 9)
+ switch (cfractalc.currentformula - formulas) { /* periodicity checking and smoothmode SPERI */
+ case 0:
+ return (smand_peri(x1, y1, x2, y2));
+ break;
+ case 1:
+ return (smand3_peri(x1, y1, x2, y2));
+ break;
+ case 2:
+ return (smand4_peri(x1, y1, x2, y2));
+ break;
+ case 3:
+ return (smand5_peri(x1, y1, x2, y2));
+ break;
+ case 4:
+ return (smand6_peri(x1, y1, x2, y2));
+ break;
+ case 5:
+ return (newton_calc(x1, y1, x2, y2));
+ break;
+ case 6:
+ return (newton4_calc(x1, y1, x2, y2));
+ break;
+ case 7:
+ return (sbarnsley1_calc(x1, y1, x2, y2));
+ break;
+ case 8:
+ return (sbarnsley2_calc(x1, y1, x2, y2));
+ break;
+ case 9:
+ return (sbarnsley3_calc(x1, y1, x2, y2));
+ break;
+ case 10:
+ return (octo_calc(x1, y1, x2, y2));
+ break;
+ case 11:
+ return (sphoenix_peri(x1, y1, x2, y2));
+ break;
+ case 12:
+ return (smagnet_peri(x1, y1, x2, y2));
+ break;
+ case 13:
+ return (smagnet2_peri(x1, y1, x2, y2));
+ break;
+ case 14:
+ return (strice_peri(x1, y1, x2, y2));
+ break;
+ case 15:
+ return (scatseye_peri(x1, y1, x2, y2));
+ break;
+ case 16:
+ return (smbar_peri(x1, y1, x2, y2));
+ break;
+ case 17:
+ return (smlambda_peri(x1, y1, x2, y2));
+ break;
+ case 18:
+ return (smanowar_calc(x1, y1, x2, y2));
+ break;
+ case 19:
+ return (sspider_calc(x1, y1, x2, y2));
+ break;
+ case 20:
+ return (sier_calc(x1, y1, x2, y2));
+ break;
+ case 21:
+ return (carpet_calc(x1, y1, x2, y2));
+ break;
+ case 22:
+ return (koch_calc(x1, y1, x2, y2));
+ break;
+ case 23:
+ return (hornflake_calc(x1, y1, x2, y2));
+ break;
+ case 24:
+ return (smand9_peri(x1, y1, x2, y2));
+ break;
+ case 25:
+ return (beryl_calc(x1, y1, x2, y2));
+ break;
+ case 26:
+ return (goldsier_calc(x1, y1, x2, y2));
+ break;
+ case 27:
+ return (circle7_calc(x1, y1, x2, y2));
+ break;
+ case 28:
+ return (symbarn_calc(x1, y1, x2, y2));
+ break;
+
+#ifdef SFFE_USING
+ case 29:
+ return (sffe_calc(x1, y1, x2, y2));
+ break;
+#endif
+ } else
+ switch (cfractalc.currentformula - formulas) { /* periodicity checking and no smoothmode PERI */
+ case 0:
+ return (mand_peri(x1, y1, x2, y2));
+ break;
+ case 1:
+ return (mand3_peri(x1, y1, x2, y2));
+ break;
+ case 2:
+ return (mand4_peri(x1, y1, x2, y2));
+ break;
+ case 3:
+ return (mand5_peri(x1, y1, x2, y2));
+ break;
+ case 4:
+ return (mand6_peri(x1, y1, x2, y2));
+ break;
+ case 5:
+ return (newton_calc(x1, y1, x2, y2));
+ break;
+ case 6:
+ return (newton4_calc(x1, y1, x2, y2));
+ break;
+ case 7:
+ return (barnsley1_calc(x1, y1, x2, y2));
+ break;
+ case 8:
+ return (barnsley2_calc(x1, y1, x2, y2));
+ break;
+ case 9:
+ return (barnsley3_calc(x1, y1, x2, y2));
+ break;
+ case 10:
+ return (octo_calc(x1, y1, x2, y2));
+ break;
+ case 11:
+ return (phoenix_peri(x1, y1, x2, y2));
+ break;
+ case 12:
+ return (magnet_peri(x1, y1, x2, y2));
+ break;
+ case 13:
+ return (magnet2_peri(x1, y1, x2, y2));
+ break;
+ case 14:
+ return (trice_peri(x1, y1, x2, y2));
+ break;
+ case 15:
+ return (catseye_peri(x1, y1, x2, y2));
+ break;
+ case 16:
+ return (mbar_peri(x1, y1, x2, y2));
+ break;
+ case 17:
+ return (mlambda_peri(x1, y1, x2, y2));
+ break;
+ case 18:
+ return (manowar_calc(x1, y1, x2, y2));
+ break;
+ case 19:
+ return (spider_calc(x1, y1, x2, y2));
+ break;
+ case 20:
+ return (sier_calc(x1, y1, x2, y2));
+ break;
+ case 21:
+ return (carpet_calc(x1, y1, x2, y2));
+ break;
+ case 22:
+ return (koch_calc(x1, y1, x2, y2));
+ break;
+ case 23:
+ return (hornflake_calc(x1, y1, x2, y2));
+ break;
+ case 24:
+ return (mand9_peri(x1, y1, x2, y2));
+ break;
+ case 25:
+ return (beryl_peri(x1, y1, x2, y2));
+ break;
+ case 26:
+ return (goldsier_calc(x1, y1, x2, y2));
+ break;
+ case 27:
+ return (circle7_calc(x1, y1, x2, y2));
+ break;
+ case 28:
+ return (symbarn_calc(x1, y1, x2, y2));
+ break;
+
+#ifdef SFFE_USING
+ case 29:
+ return (sffe_calc(x1, y1, x2, y2));
+ break;
+#endif
+ } else if (cfractalc.coloringmode == 9)
+ switch (cfractalc.currentformula - formulas) { /* no periodicity checking and smoothmode SCALC */
+ case 0:
+ return (smand_calc(x1, y1, x2, y2));
+ break;
+ case 1:
+ return (smand3_calc(x1, y1, x2, y2));
+ break;
+ case 2:
+ return (smand4_calc(x1, y1, x2, y2));
+ break;
+ case 3:
+ return (smand5_calc(x1, y1, x2, y2));
+ break;
+ case 4:
+ return (smand6_calc(x1, y1, x2, y2));
+ break;
+ case 5:
+ return (newton_calc(x1, y1, x2, y2));
+ break;
+ case 6:
+ return (newton4_calc(x1, y1, x2, y2));
+ break;
+ case 7:
+ return (sbarnsley1_calc(x1, y1, x2, y2));
+ break;
+ case 8:
+ return (sbarnsley2_calc(x1, y1, x2, y2));
+ break;
+ case 9:
+ return (sbarnsley3_calc(x1, y1, x2, y2));
+ break;
+ case 10:
+ return (socto_calc(x1, y1, x2, y2));
+ break;
+ case 11:
+ return (sphoenix_calc(x1, y1, x2, y2));
+ break;
+ case 12:
+ return (smagnet_calc(x1, y1, x2, y2));
+ break;
+ case 13:
+ return (smagnet2_calc(x1, y1, x2, y2));
+ break;
+ case 14:
+ return (strice_calc(x1, y1, x2, y2));
+ break;
+ case 15:
+ return (scatseye_calc(x1, y1, x2, y2));
+ break;
+ case 16:
+ return (smbar_calc(x1, y1, x2, y2));
+ break;
+ case 17:
+ return (smlambda_calc(x1, y1, x2, y2));
+ break;
+ case 18:
+ return (smanowar_calc(x1, y1, x2, y2));
+ break;
+ case 19:
+ return (sspider_calc(x1, y1, x2, y2));
+ break;
+ case 20:
+ return (sier_calc(x1, y1, x2, y2));
+ break;
+ case 21:
+ return (carpet_calc(x1, y1, x2, y2));
+ break;
+ case 22:
+ return (koch_calc(x1, y1, x2, y2));
+ break;
+ case 23:
+ return (hornflake_calc(x1, y1, x2, y2));
+ break;
+ case 24:
+ return (smand6_calc(x1, y1, x2, y2));
+ break;
+ case 25:
+ return (beryl_calc(x1, y1, x2, y2));
+ break;
+ case 26:
+ return (goldsier_calc(x1, y1, x2, y2));
+ break;
+ case 27:
+ return (circle7_calc(x1, y1, x2, y2));
+ break;
+ case 28:
+ return (symbarn_calc(x1, y1, x2, y2));
+ break;
+
+#ifdef SFFE_USING
+ case 29:
+ return (sffe_calc(x1, y1, x2, y2));
+ break;
+#endif
+ } else
+ switch (cfractalc.currentformula - formulas) { /* no periodicity checking and no smoothmode CALC */
+ case 0:
+ return (mand_calc(x1, y1, x2, y2));
+ break;
+ case 1:
+ return (mand3_calc(x1, y1, x2, y2));
+ break;
+ case 2:
+ return (mand4_calc(x1, y1, x2, y2));
+ break;
+ case 3:
+ return (mand5_calc(x1, y1, x2, y2));
+ break;
+ case 4:
+ return (mand6_calc(x1, y1, x2, y2));
+ break;
+ case 5:
+ return (newton_calc(x1, y1, x2, y2));
+ break;
+ case 6:
+ return (newton4_calc(x1, y1, x2, y2));
+ break;
+ case 7:
+ return (barnsley1_calc(x1, y1, x2, y2));
+ break;
+ case 8:
+ return (barnsley2_calc(x1, y1, x2, y2));
+ break;
+ case 9:
+ return (barnsley3_calc(x1, y1, x2, y2));
+ break;
+ case 10:
+ return (octo_calc(x1, y1, x2, y2));
+ break;
+ case 11:
+ return (phoenix_calc(x1, y1, x2, y2));
+ break;
+ case 12:
+ return (magnet_calc(x1, y1, x2, y2));
+ break;
+ case 13:
+ return (magnet2_calc(x1, y1, x2, y2));
+ break;
+ case 14:
+ return (trice_calc(x1, y1, x2, y2));
+ break;
+ case 15:
+ return (catseye_calc(x1, y1, x2, y2));
+ break;
+ case 16:
+ return (mbar_calc(x1, y1, x2, y2));
+ break;
+ case 17:
+ return (mlambda_calc(x1, y1, x2, y2));
+ break;
+ case 18:
+ return (manowar_calc(x1, y1, x2, y2));
+ break;
+ case 19:
+ return (spider_calc(x1, y1, x2, y2));
+ break;
+ case 20:
+ return (sier_calc(x1, y1, x2, y2));
+ break;
+ case 21:
+ return (carpet_calc(x1, y1, x2, y2));
+ break;
+ case 22:
+ return (koch_calc(x1, y1, x2, y2));
+ break;
+ case 23:
+ return (hornflake_calc(x1, y1, x2, y2));
+ break;
+ case 24:
+ return (mand9_calc(x1, y1, x2, y2));
+ break;
+ case 25:
+ return (beryl_peri(x1, y1, x2, y2));
+ break;
+ case 26:
+ return (goldsier_calc(x1, y1, x2, y2));
+ break;
+ case 27:
+ return (circle7_calc(x1, y1, x2, y2));
+ break;
+ case 28:
+ return (symbarn_calc(x1, y1, x2, y2));
+ break;
+
+#ifdef SFFE_USING
+ case 29:
+ return (sffe_calc(x1, y1, x2, y2));
+ break;
+#endif
+ }
+ return 0;
+}
+#endif
+
+CONST struct formula *currentformula;
+CONST int nformulas = sizeof(formulas) / sizeof(struct formula);
+CONST int nmformulas = 16; // Is this correct here? -- Zoltan, 2009-07-30
diff --git a/src/engine/fractal.c b/src/engine/fractal.c
new file mode 100644
index 0000000..87da2c1
--- /dev/null
+++ b/src/engine/fractal.c
@@ -0,0 +1,471 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*#define STATISTICS */
+#include <aconfig.h>
+#include <string.h>
+#include <config.h>
+#include <fconfig.h>
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#else
+#include <stdio.h>
+#ifndef _MAC
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#endif
+#ifndef _plan9_
+#include <limits.h>
+#include <assert.h>
+#include <math.h>
+#endif
+#endif
+#ifdef __EMX__
+#include <float.h>
+#include <sys/cdefs.h>
+#endif
+#include <filter.h>
+#include <complex.h>
+#include <plane.h>
+#include "../include/timers.h"
+#ifdef __GNUC__
+#ifdef __i386__
+#ifndef PC_64
+#include <i386/ctrl87.h>
+#endif
+#endif
+#endif
+#ifdef __alpha__
+#ifdef __linux__
+#include <asm/fpu.h>
+#endif
+#endif
+#ifndef M_PI
+#define M_PI 3.1415
+#endif
+#include <xerror.h>
+
+struct symetryinfo2 cursymetry;
+struct palette cpalette;
+struct image cimage;
+struct fractal_context cfractalc;
+struct formula cformula;
+
+static symetry2 sym_lines[100];
+
+
+static void precalculate_rotation(fractal_context * c)
+{
+ c->sin = sin((c->angle) * M_PI / 180);
+ c->cos = cos((c->angle) * M_PI / 180);
+}
+
+static void recalc_view(fractal_context * c)
+{
+ number_t
+ xs = c->s.rr, ys = c->s.ri * c->windowwidth / c->windowheight,
+ xc = c->s.cr, yc = c->s.ci, size;
+ precalculate_rotation(c);
+ rotate(*c, xc, yc);
+ /*assert(c->s.rr >= 0);
+ assert(c->s.ri >= 0); */
+
+ xs = myabs(xs); /*do not crash in owerflowing cases */
+ ys = myabs(ys);
+ if (xs > ys)
+ size = xs;
+ else
+ size = ys;
+ c->rs.nc = xc - size / 2;
+ c->rs.mc = xc + size / 2;
+ c->rs.ni = yc - size * c->windowheight / c->windowwidth / 2;
+ c->rs.mi = yc + size * c->windowheight / c->windowwidth / 2;
+ if (c->rs.nc > c->rs.mc)
+ xc = c->rs.nc, c->rs.nc = c->rs.mc, c->rs.mc = xc;
+ if (c->rs.ni > c->rs.mi)
+ xc = c->rs.ni, c->rs.ni = c->rs.mi, c->rs.mi = xc;
+}
+
+static void set_view(fractal_context * c, CONST vinfo * s)
+{
+ c->s = *s;
+ recalc_view(c);
+}
+
+/*FIXME most of this code is obsolette */
+static void /*INLINE */ combine_methods(void)
+{
+#ifdef __UNDEFINED__
+ int i, j;
+#endif
+ int angle = (int) cfractalc.angle;
+ CONST struct symetryinfo *s1 =
+ cfractalc.currentformula->out + cfractalc.coloringmode, *s2 =
+ cfractalc.currentformula->in + cfractalc.incoloringmode;
+ if (angle < 0) {
+ angle = 360 - ((-angle) % 360);
+ } else
+ angle %= 360;
+ if (cfractalc.mandelbrot != cfractalc.currentformula->mandelbrot ||
+ cfractalc.bre || cfractalc.bim) {
+ cursymetry.xsym = (number_t) INT_MAX;
+ cursymetry.ysym = (number_t) INT_MAX;
+ cursymetry.nsymetries = 0;
+ return;
+ }
+#ifdef __UNDEFINED__
+ cursymetry.xmul = cimage.width / (cfractalc.rs.mc - cfractalc.rs.nc);
+ cursymetry.ymul = cimage.height / (cfractalc.rs.mi - cfractalc.rs.ni);
+ cursymetry.xdist =
+ (cfractalc.rs.mc - cfractalc.rs.nc) / cimage.width / 6;
+ cursymetry.ydist =
+ (cfractalc.rs.mi - cfractalc.rs.ni) / cimage.height / 6;
+#endif
+ if (s1->xsym == s2->xsym)
+ cursymetry.xsym = s1->xsym;
+ else
+ cursymetry.xsym = (number_t) INT_MAX;
+ if (s1->ysym == s2->ysym)
+ cursymetry.ysym = s1->ysym;
+ else
+ cursymetry.ysym = (number_t) INT_MAX;
+ switch (cfractalc.plane) {
+ case P_PARABOL:
+ cursymetry.xsym = (number_t) INT_MAX;
+ break;
+ case P_LAMBDA:
+ if (cursymetry.xsym == 0 && cursymetry.ysym == 0)
+ cursymetry.xsym = (number_t) 1;
+ else
+ cursymetry.xsym = (number_t) INT_MAX;
+ break;
+ case P_INVLAMBDA:
+ cursymetry.xsym = (number_t) INT_MAX;
+ break;
+ case P_TRANLAMBDA:
+ if (cursymetry.xsym != 0 || cursymetry.ysym != 0)
+ cursymetry.xsym = (number_t) INT_MAX;
+ break;
+ case P_MEREBERG:
+ cursymetry.xsym = (number_t) INT_MAX;
+ break;
+ }
+ cursymetry.symetry = sym_lines;
+ cursymetry.nsymetries = 0;
+ if ((number_t) angle == cfractalc.angle) {
+ switch (angle) {
+ case 0:
+ break;
+ case 180:
+ cursymetry.xsym = -cursymetry.xsym;
+ cursymetry.ysym = -cursymetry.ysym;
+ break;
+ case 90:
+ {
+ number_t tmp = cursymetry.xsym;
+ cursymetry.xsym = -cursymetry.ysym;
+ cursymetry.ysym = tmp;
+ }
+ break;
+ case 210:
+ {
+ number_t tmp = cursymetry.xsym;
+ cursymetry.xsym = cursymetry.ysym;
+ cursymetry.ysym = -tmp;
+ }
+ break;
+ default:
+ cursymetry.xsym = (number_t) INT_MAX;
+ cursymetry.ysym = (number_t) INT_MAX;
+ }
+ } else {
+ cursymetry.xsym = (number_t) INT_MAX;
+ cursymetry.ysym = (number_t) INT_MAX;
+ }
+ if (cursymetry.xsym == -(number_t) INT_MAX)
+ cursymetry.xsym = (number_t) INT_MAX;
+ if (cursymetry.ysym == -(number_t) INT_MAX)
+ cursymetry.ysym = (number_t) INT_MAX;
+}
+
+void update_view(fractal_context * context)
+{
+ set_view(context, &context->s);
+}
+
+void set_fractalc(fractal_context * context, struct image *img)
+{
+ update_view(context);
+ precalculate_rotation(context);
+ cfractalc = *context; /*its better to copy often accesed data into fixed memory locations */
+ cpalette = *img->palette;
+ cimage = *img;
+ cformula = *context->currentformula;
+
+ if (cfractalc.maxiter < 1)
+ cfractalc.maxiter = 1;
+
+ if (cfractalc.bailout < 0)
+ cfractalc.bailout = 0;
+
+ if (cfractalc.periodicity) {
+ if (!cformula.hasperiodicity || cfractalc.incoloringmode
+ || !cfractalc.mandelbrot)
+ cfractalc.periodicity = 0;
+ else if (!cfractalc.plane)
+ cfractalc.periodicity_limit =
+ (context->rs.mc - context->rs.nc) / (double) img->width;
+ else {
+ int x, y;
+ number_t xstep =
+ ((context->rs.mc - context->rs.nc) / (double) img->width);
+ number_t ystep =
+ ((context->rs.mc - context->rs.nc) / (double) img->height);
+ number_t xstep2 = ((context->rs.mc - context->rs.nc) / 5);
+ number_t ystep2 = ((context->rs.mc - context->rs.nc) / 5);
+
+ for (x = 0; x < 5; x++)
+ for (y = 0; y < 5; y++) {
+ number_t x1 = context->rs.mc + xstep2 * x;
+ number_t y1 = context->rs.mi + ystep2 * y;
+ number_t x2 = context->rs.mc + xstep2 * x + xstep;
+ number_t y2 = context->rs.mi + ystep2 * y + ystep;
+
+ recalculate(cfractalc.plane, &x1, &y1);
+ recalculate(cfractalc.plane, &x2, &y2);
+
+ x1 = myabs(x2 - x1);
+ y1 = myabs(y2 - y1);
+
+ if (x == y && x == 0)
+ cfractalc.periodicity_limit = x1;
+ if (cfractalc.periodicity > x1)
+ cfractalc.periodicity_limit = x1;
+ if (cfractalc.periodicity > y1)
+ cfractalc.periodicity_limit = y1;
+ }
+ }
+ }
+
+ combine_methods();
+
+ if (cursymetry.xsym == (number_t) INT_MAX)
+ cursymetry.xsym = cfractalc.rs.mc + INT_MAX;
+
+ if (cursymetry.ysym == (number_t) INT_MAX)
+ cursymetry.ysym = cfractalc.rs.mi + INT_MAX;
+
+#ifndef SLOWFUNCPTR
+ if (cfractalc.coloringmode == 9 && cformula.smooth_calculate != NULL
+ && (cpalette.
+ type & (TRUECOLOR | TRUECOLOR16 | TRUECOLOR24 | GRAYSCALE |
+ LARGEITER))) {
+ cfractalc.calculate[0] = cformula.smooth_calculate;
+ if (cformula.smooth_calculate_periodicity && cfractalc.periodicity)
+ cfractalc.calculate[1] = cformula.smooth_calculate_periodicity;
+ else
+ cfractalc.calculate[1] = cformula.smooth_calculate;
+ } else {
+ cfractalc.calculate[0] = cformula.calculate;
+ if (cformula.calculate_periodicity && cfractalc.periodicity)
+ cfractalc.calculate[1] = cformula.calculate_periodicity;
+ else
+ cfractalc.calculate[1] = cformula.calculate;
+ }
+#endif
+
+}
+
+
+
+
+void set_formula(fractal_context * c, int num)
+{
+ assert(num < nformulas);
+ assert(num >= 0);
+ if (num >= nformulas)
+ num = 0;
+ if (c->currentformula != formulas + num) {
+ c->currentformula = formulas + num;
+ c->version++;
+ }
+ if (c->mandelbrot != c->currentformula->mandelbrot) {
+ c->mandelbrot = c->currentformula->mandelbrot;
+ c->version++;
+ }
+ if (c->currentformula->pre != c->pre) {
+ c->pre = c->currentformula->pre;
+ if (!c->mandelbrot)
+ c->version++;
+ }
+ if (c->currentformula->pim != c->pim) {
+ c->pim = c->currentformula->pim;
+ if (!c->mandelbrot)
+ c->version++;
+ }
+ if (c->angle) {
+ c->angle = 0;
+ c->version++;
+ }
+ if (c->s.cr != c->currentformula->v.cr ||
+ c->s.ci != c->currentformula->v.ci ||
+ c->s.rr != c->currentformula->v.rr ||
+ c->s.ri != c->currentformula->v.ri) {
+ c->s = c->currentformula->v;
+ c->version++;
+ }
+ if (c->bre && c->bim) {
+ c->bre = c->bim = 0;
+ if (c->mandelbrot)
+ c->version++;
+ }
+}
+
+
+void fractalc_resize_to(fractal_context * c, float wi, float he)
+{
+ c->windowwidth = wi;
+ c->windowheight = he;
+ recalc_view(c);
+ return;
+}
+
+
+
+fractal_context *make_fractalc(CONST int formula, float wi, float he)
+{
+ fractal_context *new_ctxt;
+
+#ifndef __BEOS__
+#ifdef __GNUC__
+#ifdef __i386__
+#ifndef NOASSEMBLY
+ _control87(PC_64 | MCW_EM | MCW_RC, MCW_PC | MCW_EM | MCW_RC);
+#endif
+#endif
+#endif
+#endif
+#ifdef __alpha__
+#ifdef __linux__
+ extern void ieee_set_fp_control(unsigned long);
+ /* ieee_set_fp_control(IEEE_TRAP_ENABLE_INV); */
+ ieee_set_fp_control(0UL); /* ignore everything possible */
+#endif
+#endif
+#ifdef _plan9_
+ {
+ unsigned long fcr = 0; /*getfcr(); */
+ fcr |= FPRNR | FPPEXT;
+ /*fcr &= ~(FPINEX | FPOVFL | FPUNFL | FPZDIV); */
+ setfcr(fcr);
+ }
+#endif
+ new_ctxt = (fractal_context *) calloc(1, sizeof(fractal_context));
+ if (new_ctxt == NULL)
+ return 0;
+ new_ctxt->windowwidth = wi;
+ new_ctxt->periodicity = 1;
+ new_ctxt->windowheight = he;
+ new_ctxt->maxiter = DEFAULT_MAX_ITER;
+ new_ctxt->bailout = DEFAULT_BAILOUT;
+ new_ctxt->coloringmode = 0;
+ new_ctxt->intcolor = 0;
+ new_ctxt->outtcolor = 0;
+ new_ctxt->slowmode = 0;
+ new_ctxt->range = 3;
+ new_ctxt->angle = 0;
+ set_formula(new_ctxt, formula);
+ return (new_ctxt);
+}
+
+void free_fractalc(fractal_context * c)
+{
+ free(c);
+}
+
+#ifdef NOASSEMBLY
+#define rdtsc() 0
+#else
+#define rdtsc() ({unsigned long time; asm __volatile__ ("rdtsc":"=a"(time)); time; })
+#endif
+
+void speed_test(fractal_context * c, struct image *img)
+{
+ //unsigned int sum;
+ tl_timer *t;
+ int time;
+ unsigned int i;
+ set_fractalc(c, img);
+ t = tl_create_timer();
+ cfractalc.maxiter = 100;
+#ifdef SLOWFUNCPTR
+ i = calculateswitch(0.0, 0.0, 0.0, 0.0, 0);
+#else
+ cfractalc.currentformula->calculate(0.0, 0.0, 0.0, 0.0);
+ if (cfractalc.currentformula->calculate_periodicity != NULL)
+ cfractalc.currentformula->calculate_periodicity(0.0, 0.0, 0.0,
+ 0.0);
+ if (cfractalc.currentformula->smooth_calculate != NULL)
+ cfractalc.currentformula->smooth_calculate(0.0, 0.0, 0.0, 0.0);
+ if (cfractalc.currentformula->smooth_calculate_periodicity != NULL)
+ cfractalc.currentformula->smooth_calculate_periodicity(0.0, 0.0,
+ 0.0, 0.0);
+#endif
+ cfractalc.maxiter = 20000000;
+
+ tl_update_time();
+ tl_reset_timer(t);
+ /*sum = rdtsc (); */
+#ifdef SLOWFUNCPTR
+ i = calculateswitch(0.0, 0.0, 0.0, 0.0, 0);
+#else
+ i = cfractalc.currentformula->calculate(0.0, 0.0, 0.0, 0.0);
+#endif
+ /*sum -= rdtsc ();
+ printf ("%f\n", (double) (-sum) / cfractalc.maxiter); */
+ tl_update_time();
+ time = tl_lookup_timer(t);
+ x_message("Result:%i Formulaname:%s Time:%i Mloops per sec:%.2f",
+ (int) i,
+ cfractalc.currentformula->name[0], time,
+ cfractalc.maxiter / (double) time);
+
+#ifndef SLOWFUNCPTR
+
+
+ if (cfractalc.currentformula->smooth_calculate != NULL) {
+ tl_update_time();
+ tl_reset_timer(t);
+ i = cfractalc.currentformula->smooth_calculate(0.0, 0.0, 0.0, 0.0);
+ tl_update_time();
+ time = tl_lookup_timer(t);
+ x_message("Result:%i Formulaname:%s Time:%i Mloops per sec:%.2f",
+ (int) i,
+ cfractalc.currentformula->name[0],
+ time, cfractalc.maxiter / (double) time);
+ }
+#endif
+
+ tl_free_timer(t);
+}
diff --git a/src/engine/i386.c b/src/engine/i386.c
new file mode 100644
index 0000000..b7a862d
--- /dev/null
+++ b/src/engine/i386.c
@@ -0,0 +1,187 @@
+
+/*
+ * ctrl87.c
+ */
+
+
+#define __CONTROL87_C__
+
+
+#include "../include/i386/ctrl87.h"
+#include <config.h>
+
+#ifdef __GNUC__
+#ifdef __i386__
+#ifndef NOASSEMBLY
+
+/***** _control87 *****/
+unsigned short _control87(unsigned short newcw, unsigned short mask)
+{
+ unsigned short cw;
+
+ asm volatile (" \n\
+ wait \n\
+ fstcw %0 ": /* outputs */ "=m" (cw)
+ : /* inputs */
+ );
+
+ if (mask) { /* mask is not 0 */
+ asm volatile (" \n\
+ mov %2, %%ax \n\
+ mov %3, %%cx \n\
+ and %%cx, %%ax \n\
+ not %%cx \n\
+ nop \n\
+ wait \n\
+ mov %1, %%dx \n\
+ and %%cx, %%dx \n\
+ or %%ax, %%dx \n\
+ mov %%dx, %0 \n\
+ wait \n\
+ fldcw %1 ":
+ /* outputs */ "=m" (cw)
+ : /* inputs */ "m"(cw), "m"(newcw), "m"(mask)
+ : /* registers */ "ax", "cx", "dx"
+ );
+ }
+ return cw;
+
+} /* _control87 */
+#endif
+#endif
+#endif
+
+#ifdef __GNUC__
+#ifdef __i386__
+#if 0
+
+/*
+ * copy.c -- fast memcpy routines for Pentium using FPU
+ * Copyright (c) 1995, 1996 Robert Krawitz <rlk@tiac.net>
+ * and Gerhard Koerting (G.Koerting@techem.ruhr-uni-bochum.de)
+ * Exception handling in kernel/userspace routines by Gerhard
+ * Koerting.
+ * May be used and redistributed under the terms of the GNU Public License
+ */
+#include <sys/types.h>
+
+#define CACHELINE 32
+#define CACHEMASK (CACHELINE - 1)
+#define BIGMASK (~255)
+#define SMALLMASK (~31)
+
+void *penium___zero_chunk(void *_to, size_t _bytes)
+{
+ unsigned long temp0, temp1;
+ register unsigned long to asm("di") = (unsigned long) _to;
+ register unsigned long bytes asm("dx") = (unsigned long) _bytes;
+ char save[42];
+ unsigned long zbuf[2] = { 0, 0 };
+ temp0 = to & 7;
+ if (temp0) {
+ bytes -= temp0;
+ asm __volatile__("cld\n\t"
+ "rep; stosb\n\t":"=D"(to):"D"(to), "a"(0),
+ "c"(temp0):"cx");
+ }
+ asm __volatile__("shrl $3, %0\n\t"
+ "fstenv %4\n\t"
+ "fstpt 32+%4\n\t"
+ "movl (%1), %2\n\t"
+ "fildq %3\n"
+ "2:\n\t"
+ "fstl (%1)\n\t"
+ "addl $8, %1\n\t"
+ "decl %0\n\t"
+ "jne 2b\n\t"
+ "fstpl %%st\n\t"
+ "fldt 32+%4\n\t"
+ "fldenv %4\n\t":"=&r"(temp0), "=&r"(to),
+ "=&r"(temp1):"m"(*(char *) zbuf), "m"(*(char *) save),
+ "0"(bytes), "1"(to));
+ bytes &= 7;
+ if (bytes) {
+ asm __volatile__("shrl $2, %%ecx\n\t"
+ "cld\n\t"
+ "rep ; stosl\n\t"
+ "testb $2,%%dl\n\t"
+ "je 111f\n\t"
+ "stosw\n"
+ "111:\ttestb $1,%%dl\n\t"
+ "je 112f\n\t"
+ "stosb\n"
+ "112:":"=D"(to):"D"(to), "a"(0), "c"(bytes),
+ "d"(bytes):"cx", "memory");
+ }
+ return _to;
+}
+
+void *pentium__memcpy_g(void *_to, const void *_from, size_t _bytes)
+{
+ register unsigned long from asm("si") = (unsigned long) _from;
+ register unsigned long to asm("di") = (unsigned long) _to;
+ register unsigned long bytes asm("dx") = (unsigned long) _bytes;
+ if (bytes >= 1024) {
+ unsigned long temp0, temp1;
+ char save[108];
+
+ temp0 = to & 7;
+ if (temp0) {
+ bytes -= temp0;
+ asm __volatile__("cld\n\t"
+ "rep; movsb\n\t":"=D"(to), "=S"(from):"D"(to),
+ "S"(from), "c"(temp0):"cx");
+ }
+ asm __volatile__("shrl $8, %0\n\t"
+ "movl (%2), %3\n\t" "movl (%1), %3\n\t"
+ /*"fsave %4\n" */
+ "1:\n\t"
+ "movl $4, %3\n"
+ "2:\n\t"
+ "fildq 0x0(%2)\n\t"
+ "fildq 0x20(%2)\n\t"
+ "fildq 0x40(%2)\n\t"
+ "fildq 0x60(%2)\n\t"
+ "fildq 0x80(%2)\n\t"
+ "fildq 0xa0(%2)\n\t"
+ "fildq 0xc0(%2)\n\t"
+ "fildq 0xe0(%2)\n\t"
+ "fxch\n\t"
+ "fistpq 0xc0(%1)\n\t"
+ "fistpq 0xe0(%1)\n\t"
+ "fistpq 0xa0(%1)\n\t"
+ "fistpq 0x80(%1)\n\t"
+ "fistpq 0x60(%1)\n\t"
+ "fistpq 0x40(%1)\n\t"
+ "fistpq 0x20(%1)\n\t"
+ "fistpq 0x0(%1)\n\t"
+ "addl $8, %2\n\t"
+ "addl $8, %1\n\t"
+ "decl %3\n\t"
+ "jne 2b\n\t"
+ "addl $224, %2\n\t"
+ "addl $224, %1\n\t" "decl %0\n\t" "jne 1b\n\t"
+ /*"frstor %4\n\t" */
+ :"=&r"(temp0), "=&r"(to), "=&r"(from),
+ "=&r"(temp1):"m"(save[0]), "0"(bytes), "1"(to),
+ "2"(from):"memory");
+ bytes &= 255;
+ }
+ if (bytes) {
+ asm __volatile__("shrl $2, %%ecx\n\t"
+ "cld\n\t"
+ "rep ; movsl\n\t"
+ "testb $2,%%dl\n\t"
+ "je 111f\n\t"
+ "movsw\n"
+ "111:\ttestb $1,%%dl\n\t"
+ "je 112f\n\t"
+ "movsb\n"
+ "112:":"=D"(to), "=S"(from):"D"(to), "S"(from),
+ "c"(bytes), "d"(bytes):"cx", "memory");
+ }
+ return _to;
+}
+#endif
+#endif
+#endif
diff --git a/src/engine/interlace.c b/src/engine/interlace.c
new file mode 100644
index 0000000..0971a5a
--- /dev/null
+++ b/src/engine/interlace.c
@@ -0,0 +1,134 @@
+#include <config.h>
+#ifndef _plan9_
+#ifdef NO_MALLOC_H
+#include <stdlib.h>
+#else
+#include <malloc.h>
+#endif
+#include <stdio.h> /*for NULL */
+#include <string.h> /*for memcpy */
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <filter.h>
+struct intdata {
+ unsigned char *lastent;
+ int changed;
+ int first;
+};
+static int requirement(struct filter *f, struct requirements *r)
+{
+ r->nimages = 1;
+ r->flags |= IMAGEDATA;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ int x;
+ struct intdata *d = (struct intdata *) f->data;
+ pixel_t **lines1 =
+ (pixel_t **) malloc(sizeof(*lines1) * i->image->height / 2),
+ **lines2 =
+ (pixel_t **) malloc(sizeof(*lines2) * i->image->height / 2);
+ if (lines1 == NULL)
+ return 0;
+ inhermisc(f, i);
+ d->first = 1;
+ if (lines2 == NULL) {
+ free(lines1);
+ return 0;
+ }
+ if (f->childimage != NULL)
+ destroy_image(f->childimage);
+ f->image = i->image;
+ f->image->flags |= PROTECTBUFFERS;
+ i->flags |= DATALOST;
+ for (x = 0; x < (i->image->height) / 2; x++) {
+ lines1[x] = i->image->currlines[x * 2];
+ lines2[x] = i->image->currlines[x * 2 + 1];
+ }
+ f->childimage = i->image =
+ create_image_lines(i->image->width, (i->image->height) / 2, 2,
+ lines1, lines2, i->image->palette, NULL,
+ FREELINES | PROTECTBUFFERS,
+ f->image->pixelwidth,
+ f->image->pixelheight * 2);
+ if (i->image == NULL) {
+ free(lines1);
+ free(lines2);
+ return 0;
+ }
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct intdata *i = (struct intdata *) calloc(1, sizeof(*i));
+ f->data = i;
+ f->name = "Interlace filter";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ free(f->data);
+ if (f->childimage != NULL)
+ destroy_image(f->childimage);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ struct intdata *i = (struct intdata *) f->data;
+ int val;
+ if (!(f->req.flags & IMAGEDATA)
+ && f->childimage->currlines[0] == i->lastent)
+ f->childimage->flip(f->childimage);
+ i->lastent = f->childimage->currlines[0];
+ val = f->previous->action->doit(f->previous, flags, time);
+ if (i->first) {
+ int y;
+ for (y = 0; y < f->childimage->height; y++)
+ memcpy(f->childimage->oldlines[y], f->childimage->currlines[y],
+ f->childimage->width * f->childimage->bytesperpixel);
+ i->first = 0;
+ }
+ if (val & CHANGED)
+ i->changed = 1, val |= ANIMATION;
+ else {
+ if (i->changed)
+ val |= CHANGED;
+ i->changed = 0;
+ }
+ return (val);
+}
+
+static void convertup(struct filter *f, int *x, int *y)
+{
+ *y *= 2;
+ f->next->action->convertup(f->next, x, y);
+}
+
+static void convertdown(struct filter *f, int *x, int *y)
+{
+ *y /= 2;
+ f->previous->action->convertdown(f->previous, x, y);
+}
+
+CONST struct filteraction interlace_filter = {
+ "Interlace filter",
+ "interlace",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertup,
+ convertdown,
+ NULL
+};
diff --git a/src/engine/itersmall.c b/src/engine/itersmall.c
new file mode 100644
index 0000000..29985b4
--- /dev/null
+++ b/src/engine/itersmall.c
@@ -0,0 +1,171 @@
+#include <config.h>
+#ifndef _plan9_
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <config.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#include <stdlib.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#define SLARGEITER
+#include <filter.h>
+#include <xthread.h>
+#define NCOLORS 256
+#define IMAGETYPE SMALLITER
+#define spixel_t pixel8_t
+struct siterdata {
+ struct palette *palette;
+};
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~IMAGEDATA;
+ r->supportedmask = MASK1BPP | MASK2BPP | MASK3BPP | MASK4BPP;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ struct siterdata *s = (struct siterdata *) f->data;
+ inhermisc(f, i);
+ if (!inherimage(f, i, TOUCHIMAGE, 0, 0, s->palette, 0, 0))
+ return 0;
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct siterdata *i = (struct siterdata *) calloc(1, sizeof(*i));
+ i->palette =
+ createpalette(0, 65536, IMAGETYPE, 0, 65536, NULL, NULL, NULL,
+ NULL, NULL);
+ f->data = i;
+ f->name = "Smalliter image convertor";
+ return (f);
+}
+
+static void convert8(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *img1 = f->childimage, *img2 = f->image;
+ unsigned char *src, *srcend;
+ unsigned int *pixels = img2->palette->pixels;
+ pixel8_t *dest;
+ int i;
+ for (i = r1; i < r2; i++) {
+ src = img1->currlines[i];
+ dest = img2->currlines[i];
+ srcend = src + img1->width;
+ for (; src < srcend; src++, dest++)
+ *dest = pixels[*src];
+ }
+}
+
+static void convert16(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *img1 = f->childimage, *img2 = f->image;
+ unsigned char *src, *srcend;
+ unsigned int *pixels = img2->palette->pixels;
+ pixel16_t *dest;
+ int i;
+ for (i = r1; i < r2; i++) {
+ src = img1->currlines[i];
+ dest = (pixel16_t *) img2->currlines[i];
+ srcend = src + img1->width;
+ for (; src < srcend; src++, dest++) {
+ *dest = pixels[*src];
+ }
+ }
+}
+
+#ifdef STRUECOLOR24
+#include <true24.h>
+static void convert24(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *img1 = f->childimage, *img2 = f->image;
+ unsigned char *src, *srcend;
+ unsigned int *pixels = img2->palette->pixels;
+ cpixel_t *dest;
+ int i;
+ for (i = r1; i < r2; i++) {
+ src = img1->currlines[i];
+ dest = (cpixel_t *) img2->currlines[i];
+ srcend = src + img1->width;
+ for (; src < srcend; src++, dest += 3)
+ p_set(dest, pixels[*src]);
+ }
+}
+#endif
+static void convert32(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct image *img1 = f->childimage, *img2 = f->image;
+ unsigned char *src, *srcend;
+ unsigned int *pixels = img2->palette->pixels;
+ pixel32_t *dest;
+ int i;
+ for (i = r1; i < r2; i++) {
+ src = img1->currlines[i];
+ dest = (pixel32_t *) img2->currlines[i];
+ srcend = src + img1->width;
+ for (; src < srcend; src++, dest++)
+ *dest = pixels[*src];
+ }
+}
+
+static void destroyinstance(struct filter *f)
+{
+ struct siterdata *i = (struct siterdata *) f->data;
+ destroypalette(i->palette);
+ free(f->data);
+ destroyinheredimage(f);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ int val;
+ int size;
+ updateinheredimage(f);
+ if (f->image->palette->size < 256)
+ size = f->image->palette->size;
+ else
+ size = 256;
+ if (size != f->childimage->palette->size)
+ f->childimage->palette->size =
+ size, f->childimage->palette->version++;
+ val = f->previous->action->doit(f->previous, flags, time);
+ if (f->image->palette->type != SMALLITER
+ || f->image->currlines[0] != f->childimage->currlines[0]) {
+ drivercall(*f->image,
+ xth_function(convert8, f, f->image->height),
+ xth_function(convert16, f, f->image->height),
+ xth_function(convert24, f, f->image->height),
+ xth_function(convert32, f, f->image->height))}
+ xth_sync();
+ return val;
+}
+
+CONST struct filteraction smalliter_filter = {
+ "Smalliter image convertor",
+ "smalliter",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ NULL
+};
diff --git a/src/engine/julia.c b/src/engine/julia.c
new file mode 100644
index 0000000..d471bc8
--- /dev/null
+++ b/src/engine/julia.c
@@ -0,0 +1,120 @@
+#ifdef _plan9_
+#include <u.h>
+#include <stdio.h>
+#include <libc.h>
+#else
+#include <math.h>
+#include <string.h>
+#include <config.h>
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <stdio.h>
+#include <stdlib.h>
+#endif
+#include <filter.h>
+#include "julia.h"
+#include <config.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#include <filter.h>
+#include <archaccel.h>
+
+
+/*most of code was moved to docalc.c */
+
+#ifdef STATISTICS
+int iters2, guessed2, unguessed2, total2;
+#endif
+void
+init_julia(struct image *img, number_t rangep, number_t range,
+ number_t xdelta, number_t ystep)
+{
+ int i, j, x, y;
+ register number_t im;
+ unsigned char *addr, **addr1 = img->currlines;
+ for (i = 0; i < img->height; i++) {
+ im = IMIN + (i + 0.5) * ystep;
+ x = (int) (sqrt(rangep - im * im) * xdelta + 0.5);
+ if (!i || i == img->height - 1)
+ x = 0;
+ addr = addr1[i];
+ y = img->width / 2 - x;
+ if (y < 1)
+ y = 1;
+ for (j = 0; j < y; j++) {
+ addr[j] = 1;
+ }
+ y = img->width;
+ j = img->width / 2 + x;
+ if (j >= img->width)
+ j = img->width - 1;
+ for (j = img->width / 2 + x; j < y; j++) {
+ addr[j] = 1;
+ }
+ }
+ for (i = 0; i < img->height; i++) {
+ addr = addr1[i];
+ memset_long((char *) addr, NOT_CALCULATED, img->width);
+ }
+}
+
+
+static int requirement(struct filter *f, struct requirements *r)
+{
+ r->nimages = 1;
+ r->flags = 0;
+ r->supportedmask = SMALLITER;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ inhermisc(f, i);
+ f->image = i->image;
+ return (1);
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ f->name = "Julia generator";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ /*if(f->image->nimages==2) f->image->flip(f->image); */
+ if (f->fractalc->currentformula->calculate_julia != NULL) {
+ f->fractalc->currentformula->calculate_julia(f->image,
+ f->fractalc->pre,
+ f->fractalc->pim);
+ return (CHANGED);
+ }
+#ifdef STATISTICS
+ printf("Total guessed %i, unguessed %i, iterations %i\n", guessed2,
+ unguessed2, iters2);
+#endif
+
+ return 0;
+}
+
+CONST struct filteraction julia_filter = {
+ "Julia generator",
+ "julia",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ NULL,
+};
diff --git a/src/engine/julia.h b/src/engine/julia.h
new file mode 100644
index 0000000..a9377e7
--- /dev/null
+++ b/src/engine/julia.h
@@ -0,0 +1,18 @@
+#ifndef JULIA_H
+#define JULIA_H
+void init_julia(struct image *img, number_t rangep, number_t range,
+ number_t xdelta, number_t ystep);
+#define SAG /*solid anti-guessing */
+#define NOT_CALCULATED (unsigned char)0
+#define INSET (unsigned char)0
+#define INPROCESS (unsigned char)255
+#define RMIN -range
+#define RMAX range
+#define IMIN -range
+#define IMAX range
+#define QMAX 1000
+#ifdef STATISTICS
+extern int iters2, guessed2, unguessed2, total2, frames2;
+#endif
+
+#endif
diff --git a/src/engine/paletted.c b/src/engine/paletted.c
new file mode 100644
index 0000000..2a1a3f0
--- /dev/null
+++ b/src/engine/paletted.c
@@ -0,0 +1,22 @@
+#ifndef UNSUPPORTED
+static void cpalette(void *data, struct taskinfo *task, int r1, int r2)
+{
+ pixel8_t *src, *srcend;
+ cppixel_t dest;
+ struct filter *f = (struct filter *) data;
+ struct palettedata *s = (struct palettedata *) f->data;
+ int i;
+ unsigned int *table = s->table;
+ for (i = r1; i < r2; i++) {
+ src = f->childimage->currlines[i];
+ srcend = src + f->image->width;
+ dest = (cppixel_t) f->image->currlines[i];
+ while (src < srcend) {
+ p_set(dest, table[*src]);
+ src++;
+ p_inc(dest, 1);
+ }
+ }
+}
+#endif
+#undef cpalette
diff --git a/src/engine/palettef.c b/src/engine/palettef.c
new file mode 100644
index 0000000..3bdcbb0
--- /dev/null
+++ b/src/engine/palettef.c
@@ -0,0 +1,165 @@
+#include <config.h>
+#ifndef _plan9_
+#ifdef NO_MALLOC_H
+#include <stdlib.h>
+#else
+#include <malloc.h>
+#endif
+#include <stdio.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <filter.h>
+#include <fractal.h>
+#include <xthread.h>
+struct palettedata {
+ struct palette *palette;
+ int active;
+ unsigned int table[256];
+};
+#include <c256.h>
+#define cpalette palette8
+#include "paletted.c"
+
+#include <truecolor.h>
+#define cpalette palette32
+#include "paletted.c"
+
+#include <true24.h>
+#define cpalette palette24
+#include "paletted.c"
+
+#include <hicolor.h>
+#define cpalette palette16
+#include "paletted.c"
+
+static void mysetcolor(struct palette *p, int start, int end, rgb_t * rgb)
+{
+ p->data = &p;
+}
+
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~(IMAGEDATA);
+ r->supportedmask = MASK1BPP | MASK2BPP | MASK3BPP | MASK4BPP;
+
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ struct palettedata *s = (struct palettedata *) f->data;
+ inhermisc(f, i);
+ if (i->image->palette->type != C256
+ || i->image->palette->setpalette == NULL) {
+ if (datalost(f, i) || i->image->version != f->imageversion
+ || !s->active) {
+ if (!s->active) {
+ struct palette *palette;
+ palette = clonepalette(i->image->palette);
+ restorepalette(s->palette, palette);
+ destroypalette(palette);
+ }
+ s->palette->data = s;
+ if (i->image->palette->maxentries < 256)
+ s->palette->maxentries = i->image->palette->maxentries;
+ else
+ s->palette->maxentries = 256;
+ s->active = 1;
+ }
+ if (!inherimage
+ (f, i, TOUCHIMAGE | IMAGEDATA, 0, 0, s->palette, 0, 0))
+ return 0;
+ setfractalpalette(f, s->palette);
+ f->queue->saveimage = f->childimage;
+ f->queue->palettechg = f;
+ } else {
+ if (s->active) {
+ f->image = i->image;
+ restorepalette(f->image->palette, s->palette);
+ }
+ s->active = 0;
+ }
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct palettedata *i = (struct palettedata *) calloc(1, sizeof(*i));
+ i->active = 0;
+ i->palette =
+ createpalette(0, 256, C256, 0, 256, NULL, mysetcolor, NULL, NULL,
+ NULL);
+ f->childimage = NULL;
+ f->data = i;
+ f->name = "Palette emulator";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ struct palettedata *i = (struct palettedata *) f->data;
+ destroypalette(i->palette);
+ destroyinheredimage(f);
+ free(f->data);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time1)
+{
+ int val;
+ int time = time1;
+ struct palettedata *s = (struct palettedata *) f->data;
+ if (s->active)
+ updateinheredimage(f);
+ if (flags & PALETTEONLY)
+ val = 0;
+ else
+ val = f->previous->action->doit(f->previous, flags, time);
+ if (s->active) {
+ int i;
+ if (s->palette->data != NULL) {
+ val |= CHANGED;
+ restorepalette(f->image->palette, f->childimage->palette);
+ for (i = 0; i < 256; i++) {
+ s->table[i] =
+ f->image->palette->pixels[i % f->image->palette->size];
+ }
+ s->palette->data = NULL;
+ }
+ drivercall(*f->image,
+ xth_function(palette8, f, f->image->height),
+ xth_function(palette16, f, f->image->height),
+ xth_function(palette24, f, f->image->height),
+ xth_function(palette32, f, f->image->height));
+ xth_sync();
+ }
+ return val;
+}
+
+static void myremovefilter(struct filter *f)
+{
+ struct palettedata *s = (struct palettedata *) f->data;
+ if (s->active) {
+ restorepalette(f->image->palette, s->palette);
+ }
+}
+
+CONST struct filteraction palette_filter = {
+ "Palette emulator",
+ "palette",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ myremovefilter
+};
diff --git a/src/engine/plane.c b/src/engine/plane.c
new file mode 100644
index 0000000..20e08e7
--- /dev/null
+++ b/src/engine/plane.c
@@ -0,0 +1,144 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifdef __EMX__
+#include <float.h>
+#include <sys/cdefs.h>
+#endif
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#ifndef NULL
+#define NULL (void *)0
+#endif
+#else
+#include <stdio.h>
+#include <aconfig.h>
+#include <math.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#include <config.h>
+#endif
+#include <fconfig.h>
+#include <plane.h>
+#include <complex.h>
+CONST char *CONST planename[] = {
+ "mu",
+ "1/mu",
+ "1/(mu+0.25)",
+ "lambda",
+ "1/lambda",
+ "1/(lambda-1)",
+ "1/(mu-1.40115)",
+ NULL
+};
+
+
+REGISTERS(3)
+void recalculate(int plane, number_t * x1, number_t * y1)
+{
+ number_t x = *x1, y = *y1;
+ switch (plane) {
+ case 1:
+ { /* 1/mu */
+ number_t t;
+ if (myabs(x) + myabs(y) < 0.000001)
+ t = INT_MAX, y = INT_MAX;
+ else {
+
+ c_div(1, 0, x, y, t, y);
+ }
+ x = t;
+ }
+ break;
+ case 2:
+ { /* 1/(mu + 0.25) */
+ number_t t;
+ if (myabs(x) + myabs(y) < 0.000001)
+ t = INT_MAX, y = INT_MAX;
+ else {
+
+ c_div(1, 0, x, y, t, y);
+ }
+ x = t;
+ x += 0.25;
+ }
+ break;
+ case 3: /* lambda */
+ {
+ number_t tr, ti, mr, mi;
+
+ mr = x, mi = y;
+ c_pow2(x, y, tr, ti);
+ c_div(tr, ti, 4, 0, x, y);
+ c_div(mr, mi, 2, 0, tr, ti);
+ c_sub(tr, ti, x, y, mr, mi);
+ x = mr, y = mi;
+ }
+ break;
+ case 4: /* 1/lambda */
+ {
+ number_t tr, ti, mr, mi;
+
+ c_div(1, 0, x, y, tr, y);
+ x = tr;
+ mr = x, mi = y;
+ c_pow2(x, y, tr, ti);
+ c_div(tr, ti, 4, 0, x, y);
+ c_div(mr, mi, 2, 0, tr, ti);
+ c_sub(tr, ti, x, y, mr, mi);
+ x = mr, y = mi;
+ }
+ break;
+ case 5: /* 1/(lambda-1) */
+ {
+ number_t tr, ti, mr, mi;
+
+ c_div(1, 0, x, y, tr, y);
+ x = tr + 1;
+ mr = x, mi = y;
+ c_pow2(x, y, tr, ti);
+ c_div(tr, ti, 4, 0, x, y);
+ c_div(mr, mi, 2, 0, tr, ti);
+ c_sub(tr, ti, x, y, mr, mi);
+ x = mr, y = mi;
+ }
+ break;
+ case 6:
+ { /* 1/(mu + 0.25) */
+ number_t t;
+ if (myabs(x) + myabs(y) < 0.000001)
+ t = INT_MAX, y = INT_MAX;
+ else {
+
+ c_div(1, 0, x, y, t, y);
+ }
+ x = t;
+ x -= 1.40115;
+ }
+ break;
+ default:
+ break;
+ }
+ *x1 = x;
+ *y1 = y;
+}
diff --git a/src/engine/rotate.c b/src/engine/rotate.c
new file mode 100644
index 0000000..092501d
--- /dev/null
+++ b/src/engine/rotate.c
@@ -0,0 +1,200 @@
+/* An rotation filter. Uses bressemham algorithm combined with dda to rotate
+ * image around center
+ * This filter is used internally by XaoS and is unvisible to normal user in
+ * 'E' menu.
+ * It is used to implement fast rotation mode
+ */
+#include <config.h>
+#ifndef _plan9_
+#include <string.h>
+#include <limits.h>
+#include <archaccel.h>
+#ifndef __cplusplus
+#include <math.h>
+#endif
+#ifdef NO_MALLOC_H
+#include <stdlib.h>
+#else
+#include <malloc.h>
+#endif
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#define SLARGEITER
+#include <xthread.h>
+#include <filter.h>
+
+struct rotatedata {
+ number_t angle;
+ number_t x1, y1, x2, y2, xx1, yy1, xx2, yy2;
+};
+
+#include <c256.h>
+#define do_rotate do_rotate8
+#include "rotated.c"
+
+#include <truecolor.h>
+#define do_rotate do_rotate32
+#include "rotated.c"
+
+#include <true24.h>
+#define do_rotate do_rotate24
+#include "rotated.c"
+
+#include <hicolor.h>
+#define do_rotate do_rotate16
+#include "rotated.c"
+
+
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~IMAGEDATA;
+ r->supportedmask = MASK1BPP | MASK2BPP | MASK3BPP | MASK4BPP;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ float size, pixelsize;
+ struct rotatedata *s = (struct rotatedata *) f->data;
+ inhermisc(f, i);
+ s->angle = INT_MAX;
+ /*in/out coloring modes looks better in iter modes. This also saves some
+ memory in truecolor. */
+ if (i->image->pixelwidth < i->image->pixelheight)
+ pixelsize = i->image->pixelwidth;
+ else
+ pixelsize = i->image->pixelheight;
+ size =
+ sqrt(i->image->width * i->image->width * i->image->pixelwidth *
+ i->image->pixelwidth +
+ i->image->height * i->image->height * i->image->pixelheight *
+ i->image->pixelheight);
+ if (!inherimage
+ (f, i, TOUCHIMAGE | NEWIMAGE, (int) (size / pixelsize + 1),
+ (int) (size / pixelsize + 1), NULL, pixelsize, pixelsize))
+ return 0;
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct rotatedata *i = (struct rotatedata *) calloc(1, sizeof(*i));
+ f->name = "Rotation filter";
+ f->data = i;
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ free(f->data);
+ destroyinheredimage(f);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ int val;
+ struct rotatedata *s = (struct rotatedata *) f->data;
+ number_t angle = f->fractalc->angle;
+ number_t wx = f->fractalc->windowwidth, wy = f->fractalc->windowheight;
+ number_t rr = f->fractalc->s.rr, ir = f->fractalc->s.ri;
+ f->fractalc->windowwidth = f->fractalc->windowheight =
+ f->childimage->width * f->childimage->pixelwidth;
+ f->fractalc->s.rr *= f->fractalc->windowwidth / wx;
+ f->fractalc->s.ri *= f->fractalc->windowheight / wy;
+ f->fractalc->windowwidth = f->fractalc->windowheight = 1;
+ f->fractalc->angle = 0;
+ update_view(f->fractalc); /*update rotation tables */
+ updateinheredimage(f);
+ val = f->previous->action->doit(f->previous, flags, time);
+ f->fractalc->angle = angle;
+ update_view(f->fractalc); /*update rotation tables */
+ f->fractalc->s.rr = rr;
+ f->fractalc->s.ri = ir;
+ f->fractalc->windowwidth = wx;
+ f->fractalc->windowheight = wy;
+ if ((val & CHANGED) || s->angle != angle) {
+ s->xx2 = f->image->width * f->image->pixelwidth / 2;
+ s->yy2 = f->image->height * f->image->pixelheight / 2;
+ s->x1 = -s->xx2;
+ s->y1 = -s->yy2;
+ s->x2 = -s->xx2;
+ s->y2 = s->yy2;
+ s->xx1 = s->xx2;
+ s->yy1 = -s->yy2;
+ rotateback(*f->fractalc, s->x1, s->y1);
+ rotateback(*f->fractalc, s->x2, s->y2);
+ rotateback(*f->fractalc, s->xx1, s->yy1);
+ rotateback(*f->fractalc, s->xx2, s->yy2);
+ s->x1 /= f->childimage->pixelwidth;
+ s->x1 += f->childimage->width / 2;
+ s->y1 /= f->childimage->pixelwidth;
+ s->y1 += f->childimage->width / 2;
+ s->xx1 /= f->childimage->pixelwidth;
+ s->xx1 += f->childimage->width / 2;
+ s->yy1 /= f->childimage->pixelwidth;
+ s->yy1 += f->childimage->width / 2;
+ s->x2 /= f->childimage->pixelwidth;
+ s->x2 += f->childimage->width / 2;
+ s->y2 /= f->childimage->pixelwidth;
+ s->y2 += f->childimage->width / 2;
+ s->xx2 /= f->childimage->pixelwidth;
+ s->xx2 += f->childimage->width / 2;
+ s->yy2 /= f->childimage->pixelwidth;
+ s->yy2 += f->childimage->width / 2;
+
+ drivercall(*f->image,
+ xth_function(do_rotate8, f, f->image->height),
+ xth_function(do_rotate16, f, f->image->height),
+ xth_function(do_rotate24, f, f->image->height),
+ xth_function(do_rotate32, f, f->image->height));
+ xth_sync();
+ val |= CHANGED;
+ }
+ return val;
+}
+
+static void convertup(struct filter *f, int *x, int *y)
+{
+ number_t xd =
+ (*x - f->childimage->width / 2) * f->childimage->pixelwidth;
+ number_t yd =
+ (*y - f->childimage->height / 2) * f->childimage->pixelheight;
+ *x = (int) (f->image->width / 2 + xd / f->image->pixelwidth);
+ *y = (int) (f->image->height / 2 + yd / f->image->pixelheight);
+ if (f->next != NULL)
+ f->next->action->convertup(f->next, x, y);
+}
+
+static void convertdown(struct filter *f, int *x, int *y)
+{
+ number_t xd = (*x - f->image->width / 2) * f->image->pixelwidth;
+ number_t yd = (*y - f->image->height / 2) * f->image->pixelheight;
+ *x = (int) (f->childimage->width / 2 + xd / f->childimage->pixelwidth);
+ *y = (int) (f->childimage->height / 2 +
+ yd / f->childimage->pixelheight);
+ if (f->previous != NULL)
+ f->previous->action->convertdown(f->previous, x, y);
+}
+
+
+
+CONST struct filteraction rotate_filter = {
+ "Image rotation",
+ "rotate",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertup,
+ convertdown,
+ NULL
+};
diff --git a/src/engine/rotated.c b/src/engine/rotated.c
new file mode 100644
index 0000000..69e24fd
--- /dev/null
+++ b/src/engine/rotated.c
@@ -0,0 +1,56 @@
+#ifndef UNSUPPORTED
+static void do_rotate(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ struct rotatedata *s = (struct rotatedata *) f->data;
+ double xstep = (s->x2 - s->x1) * 65536 / f->image->height;
+ double ystep = (s->y2 - s->y1) * 65536 / f->image->height;
+ double x = (s->x1) * 65536, y = (s->y1) * 65536;
+
+ int ixstep = (int) ((s->xx1 - s->x1) * 65536);
+ int iystep = (int) ((s->yy1 - s->y1) * 65536);
+ int i;
+
+ if (x < 0)
+ x = 0; /*avoid shifting problems */
+ if (y < 0)
+ y = 0;
+
+ ixstep /= f->image->width;
+ iystep /= f->image->width;
+
+ /* I do floating point dda here since I expect that registers used by dda will
+ * not conflict with registers of integer one used by main loop so it will be
+ * faster than dda from stack :)
+ */
+ x += r1 * xstep;
+ y += r1 * ystep;
+ for (i = r1; i < r2; i++) {
+
+ {
+ register int ix = (int) x;
+ register int iy = (int) y;
+ register cpixel_t **vbuff =
+ (cpixel_t **) f->childimage->currlines;
+ register cpixel_t *end =
+ p_add((cpixel_t *) f->image->currlines[i],
+ f->image->width), *dest =
+ (cpixel_t *) f->image->currlines[i];
+ register int iixstep = ixstep, iiystep = iystep;
+
+ while (dest < end) {
+ p_copy(dest, 0, (cpixel_t *) (vbuff[iy >> 16]),
+ (ix >> 16));
+ p_inc(dest, 1);
+ ix += iixstep;
+ iy += iiystep;
+ }
+ }
+
+ x += xstep;
+ y += ystep;
+
+ }
+}
+#endif
+#undef do_rotate
diff --git a/src/engine/star.c b/src/engine/star.c
new file mode 100644
index 0000000..179894e
--- /dev/null
+++ b/src/engine/star.c
@@ -0,0 +1,135 @@
+#include <config.h>
+#ifndef _plan9_
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <config.h>
+#include <limits.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#include <stdlib.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <filter.h>
+#include <xthread.h>
+
+struct starfielddata {
+ struct palette *palette;
+ struct palette *savedpalette;
+};
+
+static unsigned int state;
+static INLINE void mysrandom(unsigned int x)
+{
+ state = x;
+}
+
+#define MYLONG_MAX 0xffffff /*this is enought for me. */
+static INLINE unsigned int myrandom(void)
+{
+ state = ((state * 1103515245) + 12345) & MYLONG_MAX;
+ return state;
+}
+
+#define IMAGETYPE SMALLITER
+#include <c256.h>
+#define do_starfield do_starfield8
+#include "stard.c"
+#include <hicolor.h>
+#define do_starfield do_starfield16
+#include "stard.c"
+#include <true24.h>
+#define do_starfield do_starfield24
+#include "stard.c"
+#include <truecolor.h>
+#define do_starfield do_starfield32
+#include "stard.c"
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~IMAGEDATA;
+ r->supportedmask =
+ C256 | TRUECOLOR24 | TRUECOLOR | TRUECOLOR16 | GRAYSCALE;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ struct starfielddata *s = (struct starfielddata *) f->data;
+ inhermisc(f, i);
+ if (s->savedpalette == NULL)
+ s->savedpalette = clonepalette(i->image->palette);
+ mkstarfieldpalette(i->image->palette);
+ if (!inherimage(f, i, TOUCHIMAGE, 0, 0, s->palette, 0, 0)) {
+ return 0;
+ }
+ setfractalpalette(f, s->savedpalette);
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct starfielddata *i =
+ (struct starfielddata *) calloc(1, sizeof(*i));
+ i->savedpalette = NULL;
+ i->palette =
+ createpalette(0, 65536, IMAGETYPE, 0, 65536, NULL, NULL, NULL,
+ NULL, NULL);
+ f->data = i;
+ f->name = "Starfield";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ struct starfielddata *i = (struct starfielddata *) f->data;
+ if (i->savedpalette != NULL)
+ destroypalette(i->savedpalette);
+ destroypalette(i->palette);
+ destroyinheredimage(f);
+ free(f);
+ free(i);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ int val;
+ val = f->previous->action->doit(f->previous, flags, time);
+ drivercall(*f->image,
+ xth_function(do_starfield8, f, f->image->height),
+ xth_function(do_starfield16, f, f->image->height),
+ xth_function(do_starfield24, f, f->image->height),
+ xth_function(do_starfield32, f, f->image->height));
+ xth_sync();
+ return val | CHANGED;
+}
+
+static void myremovefilter(struct filter *f)
+{
+ struct starfielddata *s = (struct starfielddata *) f->data;
+ if (s->savedpalette != NULL) {
+ restorepalette(f->image->palette, s->savedpalette);
+ destroypalette(s->savedpalette);
+ s->savedpalette = NULL;
+ }
+}
+
+CONST struct filteraction starfield_filter = {
+ "Starfield",
+ "starfield",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ myremovefilter
+};
diff --git a/src/engine/stard.c b/src/engine/stard.c
new file mode 100644
index 0000000..e6e58bc
--- /dev/null
+++ b/src/engine/stard.c
@@ -0,0 +1,31 @@
+#ifndef UNSUPPORTED
+static void do_starfield(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ cpixel_t *dest;
+ pixel8_t *src, *srcend;
+ unsigned int color;
+ int y;
+ cpixeldata_t black = (cpixeldata_t) f->image->palette->pixels[0];
+ mysrandom((unsigned int) rand());
+ for (y = r1; y < r2; y++) {
+ src = f->childimage->currlines[y];
+ srcend = f->childimage->currlines[y] + f->childimage->width;
+ dest = (cpixel_t *) f->image->currlines[y];
+ while (src < srcend) {
+ color = ((unsigned int) myrandom() >> 7) & 15;
+ if (!*src
+ || (unsigned int) *src * (unsigned int) *src *
+ (unsigned int) *src >
+ (unsigned int) ((unsigned int) myrandom() & (0xffffff))) {
+ p_set(dest,
+ (cpixeldata_t) f->image->palette->pixels[color]);
+ } else
+ p_set(dest, black);
+ p_inc(dest, 1);
+ src++;
+ }
+ }
+}
+#endif
+#undef do_starfield
diff --git a/src/engine/stereod.c b/src/engine/stereod.c
new file mode 100644
index 0000000..26ac857
--- /dev/null
+++ b/src/engine/stereod.c
@@ -0,0 +1,51 @@
+#ifndef UNSUPPORTED
+static void
+do_stereogram(void *data, struct taskinfo *task, int r1, int r2)
+{
+ struct filter *f = (struct filter *) data;
+ int i, y, lc;
+ struct stereogramdata *s = (struct stereogramdata *) f->data;
+ register cpixel_t *cs, *c, *src, *src1, *ce;
+ register spixel_t *c1;
+ unsigned int *pixels = f->image->palette->pixels;
+ s->minc = NCOLORS;
+ for (i = r1; i < r2; i++) {
+ int i1;
+ for (i1 = 0; i1 < 2; i1++) {
+ c1 = (spixel_t *) f->childimage->currlines[i];
+ c = cs = (cpixel_t *) f->image->currlines[2 * i + i1];
+ ce = p_add(cs, f->image->width);
+ src = src1 = c;
+ lc = 1024;
+ while (c < ce) {
+ y = *c1;
+ if (y == lc)
+ p_inc(src, 2);
+ else {
+ lc = y;
+ if (y < s->minc && y != 0)
+ s->minc = y;
+ y = table[y];
+ src = p_add(c, -y);
+ }
+ if (src < src1) {
+ p_set(c, pixels[(rand() & 15)]);
+ p_setp(c, 1, pixels[(rand() & 15)]);
+ } else {
+ if (src <= cs) {
+ p_set(c, pixels[(rand() & 15)]);
+ p_setp(c, 1, pixels[(rand() & 15)]);
+ } else {
+ p_copy(c, 0, src, 0);
+ p_copy(c, 1, src, 1);
+ }
+ src1 = src;
+ }
+ p_inc(c, 2);
+ c1++;
+ }
+ }
+ }
+}
+#endif
+#undef do_stereogram
diff --git a/src/engine/stereogram.c b/src/engine/stereogram.c
new file mode 100644
index 0000000..28f0c01
--- /dev/null
+++ b/src/engine/stereogram.c
@@ -0,0 +1,193 @@
+#ifndef _plan9_
+#include <config.h>
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#include <stdlib.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <xthread.h>
+#include <filter.h>
+
+#define PIXELWIDTH (f->image->pixelwidth) /*all distances in cm */
+#define PIXELHEIGHT (f->image->pixelheight)
+
+#define USER_DIST (60.0)
+#define INDEX_DIST (0.3)
+#define EYE_DIST (8.5)
+#define START1 (60.0)
+#define FNC(x) x
+
+#define NCOLORS 256
+#define IMAGETYPE SMALLITER
+#define spixel_t pixel8_t
+static int *table;
+struct stereogramdata {
+ int minc;
+ struct palette *palette;
+ struct palette *savedpalette;
+};
+
+#include <c256.h>
+#define do_stereogram do_stereogram8
+#include "stereod.c"
+
+#include <hicolor.h>
+#define do_stereogram do_stereogram16
+#include "stereod.c"
+
+#include <true24.h>
+#define do_stereogram do_stereogram24
+#include "stereod.c"
+
+#include <truecolor.h>
+#define do_stereogram do_stereogram32
+#include "stereod.c"
+
+static int requirement(struct filter *f, struct requirements *r)
+{
+ f->req = *r;
+ r->nimages = 1;
+ r->flags &= ~IMAGEDATA;
+ r->supportedmask =
+ C256 | TRUECOLOR | TRUECOLOR24 | TRUECOLOR16 | GRAYSCALE;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ struct stereogramdata *s = (struct stereogramdata *) f->data;
+ inhermisc(f, i);
+ if (s->savedpalette == NULL)
+ s->savedpalette = clonepalette(i->image->palette);
+ mkstereogrampalette(i->image->palette);
+ if (!inherimage
+ (f, i, TOUCHIMAGE, i->image->width / 2, (i->image->height) / 2,
+ s->palette, i->image->pixelwidth * 2, i->image->pixelheight * 2))
+ return 0;
+ setfractalpalette(f, s->savedpalette);
+ return (f->previous->action->initialize(f->previous, i));
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct stereogramdata *i =
+ (struct stereogramdata *) calloc(1, sizeof(*i));
+ i->minc = 0;
+ i->savedpalette = NULL;
+ i->palette =
+ createpalette(0, 65536, IMAGETYPE, 0, 65536, NULL, NULL, NULL,
+ NULL, NULL);
+ f->data = i;
+ f->name = "Random dot stereogram";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ struct stereogramdata *i = (struct stereogramdata *) f->data;
+ if (i->savedpalette != NULL)
+ destroypalette(i->savedpalette);
+ destroypalette(i->palette);
+ destroyinheredimage(f);
+ free(f);
+ free(i);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ int val;
+ struct stereogramdata *s = (struct stereogramdata *) f->data;
+ int i, y;
+ double start, maxdist, dist;
+ updateinheredimage(f);
+ if (f->fractalc->maxiter < NCOLORS)
+ s->palette->size = f->fractalc->maxiter;
+ else
+ s->palette->size = NCOLORS;
+ val = f->previous->action->doit(f->previous, flags, time);
+#ifdef HAVE_ALLOCA
+ table = (int *) alloca(sizeof(int) * NCOLORS);
+#else
+ table = (int *) malloc(sizeof(int) * NCOLORS);
+#endif
+ dist = (f->fractalc->s.rr) / 2;
+ maxdist = INDEX_DIST * FNC(f->fractalc->maxiter) + START1;
+ do {
+ start = dist * maxdist - INDEX_DIST * FNC(s->minc);
+ maxdist *= 5;
+ }
+ while (start + INDEX_DIST * (FNC(s->minc)) < 25.0);
+ if (f->fractalc->maxiter < NCOLORS)
+ y = f->fractalc->maxiter;
+ else
+ y = NCOLORS;
+ if (y < 256)
+ y = 256;
+ for (i = 0; i < y; i++) {
+ double dist;
+ if (i != 0)
+ dist = i;
+ else
+ dist = y - 1;
+ dist = INDEX_DIST * (FNC(dist)) + start;
+ table[i] =
+ (int) (EYE_DIST * dist / (dist + USER_DIST) / PIXELWIDTH);
+ }
+ drivercall(*f->image,
+ xth_function(do_stereogram8, f, f->childimage->height),
+ xth_function(do_stereogram16, f, f->childimage->height),
+ xth_function(do_stereogram24, f, f->childimage->height),
+ xth_function(do_stereogram32, f, f->childimage->height));
+ xth_sync();
+#ifndef HAVE_ALLOCA
+ free(table);
+#endif
+ return val;
+}
+
+static void convertup(struct filter *f, int *x, int *y)
+{
+ *y *= 2;
+ *x *= 2;
+ f->next->action->convertup(f->next, x, y);
+}
+
+static void convertdown(struct filter *f, int *x, int *y)
+{
+ *y /= 2;
+ *x /= 2;
+ if (f->previous != NULL)
+ f->previous->action->convertdown(f->previous, x, y);
+}
+
+static void myremovefilter(struct filter *f)
+{
+ struct stereogramdata *s = (struct stereogramdata *) f->data;
+ if (s->savedpalette != NULL) {
+ restorepalette(f->image->palette, s->savedpalette);
+ destroypalette(s->savedpalette);
+ s->savedpalette = NULL;
+ }
+}
+
+CONST struct filteraction stereogram_filter = {
+ "Random dot stereogram",
+ "stereogram",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertup,
+ convertdown,
+ myremovefilter
+};
diff --git a/src/engine/subwindow.c b/src/engine/subwindow.c
new file mode 100644
index 0000000..19b78bf
--- /dev/null
+++ b/src/engine/subwindow.c
@@ -0,0 +1,236 @@
+#ifndef _plan9_
+#include <config.h>
+#ifdef NO_MALLOC_H
+#include <stdlib.h>
+#else
+#include <malloc.h>
+#endif
+#include <stdio.h> /*for NULL */
+#include <string.h> /*for memcpy */
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <filter.h>
+#include <zoom.h>
+struct subdata {
+ struct filter *second;
+ struct image *image;
+ pixel_t **currlines;
+ int recal;
+ int forpversion, forversion;
+ number_t pre, pim;
+};
+void subwindow_setsecond(struct filter *f, struct filter *f1)
+{
+ struct subdata *s = (struct subdata *) f->data;
+ s->second = f1;
+}
+
+static void myflip(struct image *image)
+{
+ struct subdata *s = (struct subdata *) image->data;
+ flipgeneric(image);
+ s->image->flip(s->image);
+ s->currlines = s->image->currlines;
+}
+
+static int requirement(struct filter *f, struct requirements *r)
+{
+ r->nimages = 2;
+ r->flags |= IMAGEDATA;
+ return (f->next->action->requirement(f->next, r));
+}
+
+extern CONST struct filteraction threed_filter;
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+ struct subdata *s = (struct subdata *) f->data;
+ int x;
+ int val = 0;
+ pixel_t **lines1, **lines2 = NULL;
+ double size;
+ int width, height;
+ int threed = 0;
+ struct filter *f1 = f;
+
+ inhermisc(f, i);
+ if (datalost(f, i))
+ s->recal = 1;
+ while (f1) {
+ if (f1->action == &threed_filter)
+ threed = 1;
+ f1 = f1->next;
+ }
+ f->imageversion = i->image->version;
+ if (f->childimage != NULL)
+ destroy_image(f->childimage);
+ s->image = f->image = i->image;
+ s->image->flags |= PROTECTBUFFERS;
+ s->currlines = f->image->currlines;
+ s->forpversion = f->image->palette->version;
+ s->forversion = f->fractalc->version;
+ if (f->image->width * f->image->pixelwidth <
+ f->image->height * f->image->pixelheight)
+ size = f->image->width * f->image->pixelwidth / 2;
+ else
+ size = f->image->height * f->image->pixelheight / 2;
+ width = (int) (size / f->image->pixelwidth);
+ height = (int) (size / f->image->pixelheight);
+ /*fractalc_resize_to(f->fractalc,size,size); */
+ lines1 = (pixel_t **) malloc(sizeof(*lines1) * height);
+ if (f->image->nimages == 2)
+ lines2 = (pixel_t **) malloc(sizeof(*lines2) * height);
+ if (lines1 == NULL)
+ return 0;
+ if (f->image->nimages == 2 && lines2 == NULL) {
+ free(lines1);
+ return 0;
+ }
+ for (x = 0; x < height; x++) {
+ lines1[x] =
+ i->image->currlines[x + (threed ? f->image->height / 3 : 0)];
+ if (f->image->nimages == 2)
+ lines2[x] =
+ i->image->oldlines[x +
+ (threed ? f->image->height / 3 : 0)];
+ }
+ if (f->image->nimages == 2)
+ for (x = 0; x < f->image->height; x++) {
+ memcpy(f->image->oldlines[x], f->image->currlines[x],
+ f->image->width * f->image->bytesperpixel);
+ }
+ f->childimage = i->image =
+ create_image_lines(width, height, f->image->nimages, lines1,
+ lines2, i->image->palette, myflip, FREELINES,
+ f->image->pixelwidth, f->image->pixelheight);
+ if (i->image == NULL) {
+ free(lines1);
+ free(lines2);
+ return 0;
+ }
+ f->childimage->data = s;
+ x = f->previous->action->initialize(f->previous, i);
+ if (!x)
+ return 0;
+ if (s->second != NULL) {
+ i->image = f->image;
+ val = s->second->action->initialize(s->second, i);
+ if (!val)
+ return 0;
+ }
+ return (x | val);
+
+}
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ struct subdata *s = (struct subdata *) calloc(1, sizeof(*s));
+ f->name = "Subwindow";
+ f->data = s;
+ s->second = NULL;
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ free(f->data);
+ if (f->childimage != NULL)
+ destroy_image(f->childimage);
+ free(f);
+}
+
+static int doit(struct filter *f, int flags, int time)
+{
+ int val = 0, m, vold;
+ vinfo vs;
+ vrect rs;
+ float wwidth, wheight;
+ struct subdata *s = (struct subdata *) f->data;
+ static int v;
+ if (s->second != NULL
+ && (s->recal || s->forpversion != f->image->palette->version
+ || s->forversion != f->fractalc->version)) {
+ int x;
+ if (s->recal)
+ f->fractalc->version++;
+ s->forpversion = f->image->palette->version;
+ s->forversion = f->fractalc->version;
+ s->recal = 1;
+ val = (s->second->action->doit(s->second, flags, time));
+ if (val & ANIMATION)
+ return val;
+ s->recal = 0;
+ if (f->image->nimages == 2)
+ for (x = 0; x < f->image->height; x++) {
+ memcpy(f->image->oldlines[x], f->image->currlines[x],
+ f->image->width * f->image->bytesperpixel);
+ }
+ }
+ if (s->currlines != f->image->currlines && f->childimage->nimages == 2)
+ flipgeneric(f->childimage), s->currlines = f->image->currlines;
+ /*FIXME: ugly hack for new julia mode */
+ v++;
+ wwidth = f->fractalc->windowwidth;
+ wheight = f->fractalc->windowheight;
+ f->fractalc->windowwidth =
+ f->previous->image->width * f->previous->image->pixelwidth;
+ f->fractalc->windowheight =
+ f->previous->image->height * f->previous->image->pixelheight;
+ vs = f->fractalc->s;
+ rs = f->fractalc->rs;
+ f->fractalc->s = f->fractalc->currentformula->v;
+ if (f->fractalc->currentformula->calculate_julia) {
+ f->fractalc->s.cr = f->fractalc->s.ci = 0;
+ f->fractalc->s.rr = f->fractalc->s.ri = 4; /*FIXME should be set to real formula's bailout */
+ }
+ update_view(f->fractalc);
+ m = f->fractalc->mandelbrot;
+ vold = f->fractalc->version;
+ if (s->pre != f->fractalc->pre || s->pim != f->fractalc->pim) {
+ f->fractalc->version = v;
+ s->pre = f->fractalc->pre;
+ s->pim = f->fractalc->pim;
+ }
+ f->fractalc->mandelbrot = 0;
+ val = f->previous->action->doit(f->previous, flags, time) | val;
+ f->fractalc->mandelbrot = m;
+ f->fractalc->version = vold;
+ f->fractalc->s = vs;
+ f->fractalc->rs = rs;
+ f->fractalc->windowwidth = wwidth;
+ f->fractalc->windowheight = wheight;
+ return val;
+}
+
+static void myremove(struct filter *f)
+{
+ /*fractalc_resize_to(f->fractalc,f->queue->last->image->width*f->queue->last->image->pixelwidth,f->queue->last->image->height*f->queue->last->image->pixelheight); */
+}
+
+static void convertdown(struct filter *f, int *x, int *y)
+{
+ struct subdata *s = (struct subdata *) f->data;
+ if (s->second != NULL)
+ s->second->action->convertdown(s->second, x, y);
+ if (f->previous != NULL)
+ f->previous->action->convertdown(f->previous, x, y);
+}
+
+
+CONST struct filteraction subwindow_filter = {
+ "Subwindow",
+ "Subwindow",
+ 0,
+ getinstance,
+ destroyinstance,
+ doit,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdown,
+ myremove
+};
diff --git a/src/engine/zoom.c b/src/engine/zoom.c
new file mode 100644
index 0000000..907da95
--- /dev/null
+++ b/src/engine/zoom.c
@@ -0,0 +1,1762 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*#define DRAW */
+#include <config.h>
+#include <fconfig.h>
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#else
+#include <stdlib.h>
+#include <stdio.h>
+#ifndef _MAC
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#endif
+#ifdef __EMX__
+#include <float.h>
+#include <sys/cdefs.h>
+#endif
+#include <aconfig.h>
+#ifdef HAVE_LIMITS_H
+#include <limits.h>
+#endif
+#include <math.h>
+#include <string.h>
+#ifdef HAVE_ALLOCA_H
+#include <alloca.h>
+#endif
+#ifndef _plan9_
+/*#undef NDEBUG */
+#include <assert.h>
+#endif
+#endif
+#define SLARGEITER
+#include <filter.h>
+#include <zoom.h>
+#include <archaccel.h>
+#include <complex.h> /*for myabs */
+#include <plane.h>
+#include <btrace.h>
+#include <xthread.h>
+#include <xerror.h>
+#include "calculate.h" /*an inlined calulate function */
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+#define ASIZE 16
+#define ALIGN(x) (((x)+ASIZE-1)&(~(ASIZE-1)))
+static int nsymetrized;
+unsigned char *tmpdata, *tmpdata1;
+struct realloc_s {
+ number_t possition;
+ number_t price;
+ unsigned int plus;
+ int recalculate;
+ int symto;
+ int symref;
+ int dirty;
+}
+#ifdef __GNUC__
+__attribute__ ((aligned(32)))
+#endif
+ ;
+typedef struct realloc_s realloc_t;
+
+
+typedef struct zoom_context {
+ number_t *xpos, *ypos;
+ int newcalc;
+ int forversion;
+ int forpversion;
+ realloc_t *reallocx, *reallocy;
+ int uncomplette;
+ int changed;
+} zoom_context;
+
+struct filltable {
+ int from;
+ int to;
+ int length;
+ int end;
+};
+#define getzcontext(f) ((zoom_context *)((f)->data))
+#define getfcontext(f) ((f)->fractalc)
+
+#define callwait() if(cfilter.wait_function!=NULL) cfilter.wait_function(&cfilter);
+#define tcallwait() if(!xth_nthread(task)&&cfilter.wait_function!=NULL) cfilter.wait_function(&cfilter);
+#define setuncomplette(i) (getzcontext(&cfilter)->uncomplette=i)
+#define incuncomplette() (getzcontext(&cfilter)->uncomplette++)
+#define setchanged(i) (getzcontext(&cfilter)->changed=i)
+
+
+zoom_context czoomc;
+struct filter cfilter;
+#ifdef STATISTICS
+static int tocalculate = 0, avoided = 0;
+static int nadded = 0, nsymetry = 0, nskipped = 0;
+int nperi = 0;
+#endif
+
+#ifdef _NEVER_
+#define rdtsc() ({unsigned long long time; asm __volatile__ ("rdtsc":"=A"(time)); time; })
+#define startagi() ({asm __volatile__ ("rdmsr ; andw 0xfe00,%%ax ; orw 0x1f, %%ax ; wrmsr; "::"c"(22):"ax","dx"); })
+#define countagi() ({unsigned long long count; asm __volatile__ ("rdmsr":"=A"(count):"c"(12)); count;})
+#define cli() ({asm __volatile__ ("cli");})
+#define sti() ({asm __volatile__ ("sti");})
+#else
+#define rdtsc() 0
+#define cli() 0
+#define sti() 0
+#define startagi() 0
+#define countagi() 0
+#endif
+
+#ifndef USE_i386ASM
+static void
+moveoldpoints(void *data1, struct taskinfo *task, int r1, int r2)
+REGISTERS(0);
+static void fillline_8(int line) REGISTERS(0);
+static void fillline_16(int line) REGISTERS(0);
+static void fillline_24(int line) REGISTERS(0);
+static void fillline_32(int line) REGISTERS(0);
+#endif
+
+/*first of all inline driver section */
+/*If you think this way is ugly, I must agree. Please let me know
+ *about better one that allows to generate custom code for 8,16,24,32
+ *bpp modes and use of static variables
+ */
+#include <c256.h>
+#define fillline fillline_8
+#define dosymetry2 dosymetry2_8
+#define calcline calcline_8
+#define calccolumn calccolumn_8
+#include "zoomd.c"
+
+#include <truecolor.h>
+#define fillline fillline_32
+#define dosymetry2 dosymetry2_32
+#define calcline calcline_32
+#define calccolumn calccolumn_32
+#include "zoomd.c"
+
+#include <true24.h>
+#define fillline fillline_24
+#define dosymetry2 dosymetry2_24
+#define calcline calcline_24
+#define calccolumn calccolumn_24
+#include "zoomd.c"
+
+#include <hicolor.h>
+#define fillline fillline_16
+#define dosymetry2 dosymetry2_16
+#define calcline calcline_16
+#define calccolumn calccolumn_16
+#include "zoomd.c"
+
+#define calcline(a) drivercall(cimage,calcline_8(a),calcline_16(a),calcline_24(a),calcline_32(a));
+#define calccolumn(a) drivercall(cimage,calccolumn_8(a),calccolumn_16(a),calccolumn_24(a),calccolumn_32(a));
+
+
+struct dyn_data {
+ int price;
+ struct dyn_data *previous;
+};
+
+#define FPMUL 64 /*Let multable fit into pentium cache */
+#define RANGES 2 /*shift equal to x*RANGE */
+#define RANGE 4
+
+#define DSIZEHMASK (0x7) /*mask equal to x%(DSIZE) */
+#define DSIZE (2*RANGE)
+#define DSIZES (RANGES+1) /*shift equal to x*DSIZE */
+
+
+#define adddata(n,i) (dyndata+(((n)<<DSIZES)+(((i)&(DSIZEHMASK)))))
+#define getbest(i) (dyndata+((size)<<DSIZES)+(i))
+#define nosetadd ((size*2)<<DSIZES)
+#ifndef DEBUG
+#define CHECKPOS(pos)
+#else
+#define CHECKPOS(pos) (assert((pos)>=dyndata),assert((pos)<dyndata+(size)+((size)<<DSIZES)))
+#endif
+
+#ifdef __POWERPC__
+# undef USE_MULTABLE
+#else
+# define USE_MULTABLE 1
+#endif
+
+#ifdef USE_MULTABLE
+#define PRICE(i,i1) mulmid[(i)-(i1)]
+#else
+#define PRICE(i,i1) (((i)-(i1)) * ((i)-(i1)))
+#endif
+#define NEWPRICE (FPMUL*FPMUL*(RANGE)*(RANGE))
+
+#define NOSETMASK ((unsigned int)0x80000000)
+#define END NULL
+#define MAXPRICE INT_MAX
+/*static int dynsize = (int)sizeof (struct dyn_data);*/
+#ifndef INT_MIN
+#define INT_MIN (- INT_MAX - 1)
+#endif
+#define IRANGE FPMUL*RANGE
+
+#ifdef USE_MULTABLE
+static int multable[RANGE * FPMUL * 2];
+static int *mulmid;
+#endif
+
+/*Functions looks trought rows/columns marked for calculation and tries to use
+ *some symetrical one instead
+ */
+
+/*FIXME should be threaded...but thread overhead should take more work than
+ *do it in one, since it is quite simple and executes just in case fractal
+ *on the screen is symetrical and it is quite rare case...who knows
+ */
+static void
+ /*INLINE */ preparesymetries(register realloc_t * realloc, CONST int size,
+ register
+ int symi,
+ number_t
+ sym,
+ number_t
+ step)
+{
+ register int i;
+ register int istart = 0;
+ number_t fy, ftmp;
+ realloc_t *r = realloc, *reallocs;
+
+ sym *= 2;
+ i = 2 * symi - size;
+ if (i < 0)
+ i = 0;
+ realloc += i;
+
+ for (; i <= symi; i++, realloc++) { /*makes symetries */
+ int j, min = 0;
+ number_t dist = NUMBER_BIG, tmp1;
+
+ if (realloc->symto != -1)
+ continue;
+
+ fy = realloc->possition;
+ realloc->symto = 2 * symi - i;
+
+ if (realloc->symto >= size - RANGE)
+ realloc->symto = size - RANGE - 1;
+
+ dist = RANGE * step;
+ min = RANGE;
+#ifndef NDEBUG
+ if (realloc->symto < 0 || realloc->symto >= size) {
+ x_fatalerror("Internal error #22-1 %i", realloc->symto);
+ assert(0);
+ }
+#endif
+ reallocs = &r[realloc->symto];
+ j = (realloc->symto - istart >
+ RANGE) ? -RANGE : (-realloc->symto + istart);
+
+ if (realloc->recalculate) {
+ for (; j < RANGE && realloc->symto + j < size - 1; j++) {
+ ftmp = sym - (reallocs + j)->possition;
+ if ((tmp1 = myabs(ftmp - fy)) < dist) {
+ if ((realloc == r || ftmp > (realloc - 1)->possition)
+ && (ftmp < (realloc + 1)->possition)) {
+ dist = tmp1;
+ min = j;
+ }
+ } else if (ftmp < fy)
+ break;
+ }
+
+ } else {
+ for (; j < RANGE && realloc->symto + j < size - 1; j++) {
+ if (!realloc->recalculate)
+ continue;
+ ftmp = sym - (reallocs + j)->possition;
+ if ((tmp1 = myabs(ftmp - fy)) < dist) {
+ if ((realloc == r || ftmp > (realloc - 1)->possition)
+ && (ftmp < (realloc + 1)->possition)) {
+ dist = tmp1;
+ min = j;
+ }
+ } else if (ftmp < fy)
+ break;
+ }
+ }
+ realloc->symto += min;
+
+ if (min == RANGE || realloc->symto <= symi ||
+ (reallocs = reallocs + min)->symto != -1
+ || reallocs->symref != -1) {
+ realloc->symto = -1;
+ continue;
+ }
+
+ if (!realloc->recalculate) {
+ realloc->symto = -1;
+ if (reallocs->symto != -1 || !reallocs->recalculate)
+ continue;
+ reallocs->plus = realloc->plus;
+ reallocs->symto = i;
+ nsymetrized++;
+ istart = realloc->symto - 1;
+ reallocs->dirty = 1;
+ realloc->symref = (int) (reallocs - r);
+ STAT(nadded -= reallocs->recalculate);
+ reallocs->recalculate = 0;
+ reallocs->possition = sym - realloc->possition;
+ } else {
+ if (reallocs->symto != -1) {
+ realloc->symto = -1;
+ continue;
+ }
+ istart = realloc->symto - 1;
+ STAT(nadded -= realloc->recalculate);
+ nsymetrized++;
+ realloc->dirty = 1;
+ realloc->plus = reallocs->plus;
+ realloc->recalculate = 0;
+ reallocs->symref = i;
+ realloc->possition = sym - reallocs->possition;
+ }
+ STAT(nsymetry++);
+
+#ifndef NDEBUG
+ if (realloc->symto < -1 || realloc->symto >= size) {
+ x_fatalerror("Internal error #22 %i", realloc->symto);
+ assert(0);
+ }
+ if (reallocs->symto < -1 || reallocs->symto >= size) {
+ x_fatalerror("Internal error #22-2 %i", reallocs->symto);
+ assert(0);
+ }
+#endif
+ }
+
+}
+
+static /*INLINE */ void
+newpossitions(realloc_t * realloc, unsigned int size, number_t begin1,
+ number_t end1, CONST number_t * fpos, int yend)
+{
+ realloc_t *rs, *re, *rend;
+ number_t step = size / (end1 - begin1);
+ number_t start;
+ number_t end;
+ rend = realloc + size;
+ rs = realloc - 1;
+ re = realloc;
+ while (rs < rend - 1) {
+ re = rs + 1;
+ if (re->recalculate) {
+ while (re < rend && re->recalculate)
+ re++;
+
+ if (re == rend)
+ end = end1;
+ else
+ end = re->possition;
+
+ if (rs == realloc - 1) {
+ start = begin1;
+ if (start > end)
+ start = end;
+ } else
+ start = rs->possition;
+
+ if (re == rend && start > end)
+ end = start;
+
+ if (re - rs == 2)
+ end = (end - start) * 0.5;
+ else
+ end = ((number_t) (end - start)) / (re - rs);
+
+
+ switch (yend) {
+ case 1:
+ for (rs++; rs < re; rs++) {
+ start += end, rs->possition = start;
+ rs->price =
+ 1 / (1 + myabs(fpos[rs - realloc] - start) * step);
+ }
+ break;
+ case 2:
+ for (rs++; rs < re; rs++) {
+ start += end, rs->possition = start;
+ rs->price = (myabs(fpos[rs - realloc] - start) * step);
+ if (rs == realloc || rs == rend - 1)
+ rs->price *= 500;
+ }
+ break;
+ default:
+ for (rs++; rs < re; rs++) {
+ start += end, rs->possition = start;
+ rs->price = (number_t) 1;
+ }
+ break;
+ }
+ }
+ rs = re;
+ }
+}
+
+/* This is the main reallocation algorithm described in xaos.info
+ * It is quite complex since many loops are unrooled and uses custom
+ * fixedpoint
+ *
+ * Takes approx 30% of time so looking for way to do it threaded.
+ * Let me know :)
+ */
+static /*INLINE */ void
+mkrealloc_table(CONST number_t * RESTRICT fpos,
+ realloc_t * RESTRICT realloc,
+ CONST unsigned int size, CONST number_t begin,
+ CONST number_t end, number_t sym, unsigned char *tmpdata)
+{
+ unsigned int i;
+ int counter;
+ unsigned int ps, ps1 = 0, pe;
+ register unsigned int p;
+ int bestprice = MAXPRICE;
+ realloc_t *r = realloc;
+ struct dyn_data *RESTRICT dyndata;
+ int yend, y;
+ register struct dyn_data **RESTRICT best;
+ struct dyn_data **RESTRICT best1, **tmp;
+ register int *RESTRICT pos;
+ number_t step, tofix;
+ int symi = -1;
+ unsigned int lastplus = 0;
+ struct dyn_data *RESTRICT data;
+ register struct dyn_data *previous = NULL, *bestdata = NULL;
+ register int myprice;
+#ifdef STATISTICS
+ nadded = 0, nsymetry = 0, nskipped = 0;
+#endif
+
+ pos = (int *) tmpdata;
+ best =
+ (struct dyn_data **) (tmpdata + ALIGN((size + 2) * sizeof(int)));
+ best1 =
+ (struct dyn_data **) (tmpdata + ALIGN((size + 2) * sizeof(int)) +
+ ALIGN(size * sizeof(struct dyn_data **)));
+ dyndata =
+ (struct dyn_data *) (tmpdata + ALIGN((size + 2) * sizeof(int)) +
+ 2 * ALIGN(size * sizeof(struct dyn_data **)));
+
+ tofix = size * FPMUL / (end - begin);
+ pos[0] = INT_MIN;
+ pos++;
+ for (counter = (int) size - 1; counter >= 0; counter--) {
+ pos[counter] = (int) ((fpos[counter] - begin) * tofix); /*first convert everything into fixedpoint */
+ if (counter < (int) size - 1 && pos[counter] > pos[counter + 1])
+ /*Avoid processing of missordered rows.
+ They should happend because of limited
+ precisity of FP numbers */
+ pos[counter] = pos[counter + 1];
+ }
+ pos[size] = INT_MAX;
+ step = (end - begin) / (number_t) size;
+ if (begin > sym || sym > end) /*calculate symetry point */
+ symi = -2;
+ else {
+ symi = (int) ((sym - begin) / step);
+
+ }
+
+ ps = 0;
+ pe = 0;
+ y = 0;
+
+ /* This is first pass that fills table dyndata, that holds information
+ * about all ways algorithm thinks about. Correct way is discovered at
+ * end by looking backward and determining witch way algorithm used to
+ * calculate minimal value*/
+
+ for (i = 0; i < size; i++, y += FPMUL) {
+ bestprice = MAXPRICE;
+ p = ps; /*just inicialize parameters */
+
+ tmp = best1;
+ best1 = best;
+ best = tmp;
+
+ yend = y - IRANGE;
+ if (yend < -FPMUL) /*do no allow lines outside screen */
+ yend = -FPMUL;
+
+ while (pos[p] <= yend) /*skip lines out of range */
+ p++;
+#ifdef _UNDEFINED_
+ if (pos[p - 1] > yend) /*warning...maybe this is the bug :) */
+ p--, assert(0);
+#endif
+ ps1 = p;
+ yend = y + IRANGE;
+
+ /*First try case that current line will be newly calculated */
+
+ /*Look for best way how to connect previous lines */
+ if (ps != pe && p > ps) { /*previous point had lines */
+ assert(p >= ps);
+ if (p < pe) {
+ previous = best[p - 1];
+ CHECKPOS(previous);
+ } else
+ previous = best[pe - 1];
+ CHECKPOS(previous);
+ myprice = previous->price; /*find best one */
+ } else {
+ if (i > 0) { /*previous line had no lines */
+ previous = getbest(i - 1);
+ myprice = previous->price;
+ } else
+ previous = END, myprice = 0;
+ }
+
+ data = getbest(i); /*find store possition */
+ myprice += NEWPRICE;
+ bestdata = data;
+ data->previous = previous;
+ bestprice = myprice; /*calculate best available price */
+ data->price = myprice; /*store data */
+ assert(bestprice >= 0); /*FIXME:tenhle assert muze FAILIT! */
+#ifdef _UNDEFINED_
+ if (yend > end + FPMUL) /*check bounds */
+ yend = end + FPMUL;
+#endif
+ data = adddata(p, i); /*calcualte all lines good for this y */
+
+ /* Now try all acceptable connection and calculate best possibility
+ * with this connection
+ */
+ if (ps != pe) { /*in case that previous had also possitions */
+ int price1 = INT_MAX;
+ /*At first line of previous interval we have only one possibility
+ *don't connect previous line at all.
+ */
+ if (p == ps) { /*here we must skip previous point */
+ if (pos[p] != pos[p + 1]) {
+ previous = getbest(i - 1);
+ myprice = previous->price;
+ myprice += PRICE(pos[p], y); /*store data */
+ if (myprice < bestprice) { /*calcualte best */
+ bestprice = myprice, bestdata = data;
+ data->price = myprice;
+ data->previous = previous;
+ }
+ }
+ assert(bestprice >= 0);
+ assert(myprice >= 0);
+ best1[p] = bestdata;
+ data += DSIZE;
+ p++;
+ }
+
+ previous = NULL;
+ price1 = myprice;
+ while (p < pe) { /*this is area where intervals of current point and previous one are crossed */
+ if (pos[p] != pos[p + 1]) {
+ if (previous != best[p - 1]) {
+
+ previous = best[p - 1];
+ CHECKPOS(previous);
+ price1 = myprice = previous->price;
+
+ /*In case we found revolutional point, we should think
+ *about changing our gusesses in last point too - don't
+ *connect it at all, but use this way instead*/
+ if (myprice + NEWPRICE < bestprice) { /*true in approx 2/3 of cases */
+ bestprice = myprice + NEWPRICE, bestdata =
+ data - DSIZE;
+ (bestdata)->price = bestprice;
+ (bestdata)->previous = previous + nosetadd;
+ best1[p - 1] = bestdata;
+ }
+ } else
+ myprice = price1;
+
+ myprice += PRICE(pos[p], y); /*calculate price of new connection */
+
+ if (myprice < bestprice) { /*2/3 of cases *//*if it is better than previous, store it */
+ bestprice = myprice, bestdata = data;
+ data->price = myprice;
+ data->previous = previous;
+ } else if (pos[p] > y) {
+ best1[p] = bestdata;
+ data += DSIZE;
+ p++;
+ break;
+ }
+
+ }
+
+ assert(myprice >= 0);
+ assert(bestprice >= 0); /*FIXME:tenhle assert FAILI! */
+
+ best1[p] = bestdata;
+ data += DSIZE;
+ p++;
+ }
+ while (p < pe) { /*this is area where intervals of current point and previous one are crossed */
+#ifdef DEBUG
+ if (pos[p] != pos[p + 1]) {
+ if (previous != best[p - 1]) {
+ x_fatalerror("Missoptimization found!");
+ }
+ }
+#endif
+#ifdef _UNDEFINED_
+ /* Experimental results show, that probability for better approximation
+ * in this area is extremly low. Maybe it never happends.
+ * I will have to think about it a bit more... It seems to have
+ * to do something with meaning of universe and god... no idea
+ * why it is true.
+ *
+ * Anyway it don't seems to worth include the expensive tests
+ * here.
+ */
+ if (pos[p] != pos[p + 1]) {
+ if (previous != best[p - 1]) {
+
+ previous = best[p - 1];
+ CHECKPOS(previous);
+ myprice = previous->price;
+
+ /*In case we found revolutional point, we should think
+ *about changing our gusesses in last point too - don't
+ *connect it at all, but use this way instead*/
+ if (myprice + NEWPRICE < bestprice) { /*true in approx 2/3 of cases */
+ bestprice = myprice + NEWPRICE, bestdata =
+ data - DSIZE;
+ (bestdata)->price = bestprice;
+ (bestdata)->previous = previous + nosetadd;
+ best1[p - 1] = bestdata;
+ }
+ myprice += PRICE(pos[p], y); /*calculate price of new connection */
+ if (myprice < bestprice) { /*if it is better than previous, store it */
+ bestprice = myprice, bestdata = data;
+ data->price = myprice;
+ data->previous = previous;
+ }
+ }
+ }
+#endif
+ assert(myprice >= 0);
+ assert(bestprice >= 0); /*FIXME:tenhle assert FAILI! */
+
+ best1[p] = bestdata;
+ data += DSIZE;
+ p++;
+ }
+
+ /* OK...we passed crossed area. All next areas have same previous
+ * situation so our job is easier
+ * So find the best solution once for all od them
+ */
+ if (p > ps) {
+ previous = best[p - 1]; /*find best one in previous */
+ CHECKPOS(previous);
+ price1 = previous->price;
+ } else {
+ previous = getbest(i - 1);
+ price1 = previous->price;
+ }
+
+ /* Since guesses for "revolutional point" was allways one
+ * step back, we need to do last one*/
+ if (price1 + NEWPRICE < bestprice && p > ps1) {
+ myprice = price1 + NEWPRICE;
+ bestprice = myprice, bestdata = data - DSIZE;
+ (bestdata)->price = myprice;
+ (bestdata)->previous = previous + nosetadd;
+ best1[p - 1] = bestdata;
+ myprice -= NEWPRICE;
+ }
+
+ while (pos[p] < yend) {
+ if (pos[p] != pos[p + 1]) {
+ myprice = price1;
+ myprice += PRICE(pos[p], y); /*store data */
+ if (myprice < bestprice) { /*calcualte best */
+ bestprice = myprice, bestdata = data;
+ data->price = myprice;
+ data->previous = previous;
+ } else if (pos[p] > y)
+ break;
+ }
+
+ assert(bestprice >= 0);
+ assert(myprice >= 0);
+
+ best1[p] = bestdata;
+ data += DSIZE;
+ p++;
+ }
+ while (pos[p] < yend) {
+ best1[p] = bestdata;
+ p++;
+ }
+ } else {
+ /* This is second case - previous y was not mapped at all.
+ * Situation is simplier now, since we know that behind us is
+ * large hole and our decisions don't affect best solution for
+ * previous problem. Se we have just one answer
+ * Situation is similiar to latest loop in previous case
+ */
+ int myprice1; /*simplified loop for case that previous
+ y had no lines */
+ if (pos[p] < yend) {
+ if (i > 0) {
+ previous = getbest(i - 1);
+ myprice1 = previous->price;
+ } else
+ previous = END, myprice1 = 0;
+ while (pos[p] < yend) {
+ if (pos[p] != pos[p + 1]) {
+ myprice = myprice1 + PRICE(pos[p], y);
+ if (myprice < bestprice) {
+ data->price = myprice;
+ data->previous = previous;
+ bestprice = myprice, bestdata = data;
+ } else if (pos[p] > y)
+ break;
+ }
+ assert(bestprice >= 0);
+ assert(myprice >= 0);
+ best1[p] = bestdata;
+ p++;
+ data += DSIZE;
+ }
+ while (pos[p] < yend) {
+ best1[p] = bestdata;
+ p++;
+ }
+ }
+ }
+ /*previous = ps; *//*store possitions for next loop */
+ ps = ps1;
+ ps1 = pe;
+ pe = p;
+ }
+
+
+ assert(bestprice >= 0);
+
+ realloc = realloc + size;
+ yend = (int) ((begin > fpos[0]) && (end < fpos[size - 1]));
+
+ if (pos[0] > 0 && pos[size - 1] < (int) size * FPMUL)
+ yend = 2;
+
+
+
+ /*This part should be made threaded quite easily...but does it worth
+ *since it is quite simple loop 0...xmax
+ */
+ for (i = size; i > 0;) { /*and finally traces the path */
+ struct dyn_data *bestdata1;
+ realloc--;
+ i--;
+ realloc->symto = -1;
+ realloc->symref = -1;
+ bestdata1 = bestdata->previous;
+
+ if (bestdata1 >= dyndata + nosetadd
+ || bestdata >= dyndata + ((size) << DSIZES)) {
+ if (bestdata1 >= dyndata + nosetadd)
+ bestdata1 -= nosetadd;
+
+ realloc->recalculate = 1;
+ STAT(nadded++);
+ realloc->dirty = 1;
+ lastplus++;
+
+ if (lastplus >= size)
+ lastplus = 0;
+
+ realloc->plus = lastplus;
+
+ } else {
+ p = ((unsigned int) (bestdata - dyndata)) >> DSIZES;
+ assert(p >= 0 && p < size);
+ realloc->possition = fpos[p];
+ realloc->plus = p;
+ realloc->dirty = 0;
+ realloc->recalculate = 0;
+ lastplus = p;
+ }
+ bestdata = bestdata1;
+ }
+
+
+
+ newpossitions(realloc, size, begin, end, fpos, yend);
+ realloc = r;
+ if (symi <= (int) size && symi >= 0) {
+ preparesymetries(r, (int) size, symi, sym, step);
+ }
+
+
+ STAT(printf
+ ("%i added %i skipped %i mirrored\n", nadded, nskipped,
+ nsymetry));
+ STAT(nadded2 += nadded;
+ nskipped2 += nskipped;
+ nsymetry2 += nsymetry);
+}
+
+struct movedata {
+ unsigned int size;
+ unsigned int start;
+ unsigned int plus;
+};
+int avgsize;
+/*
+ * this function prepares fast moving table for moveoldpoints
+ * see xaos.info for details. It is not threaded since it is quite
+ * fast.
+ */
+static /*INLINE */ void preparemoveoldpoints(void)
+{
+ struct movedata *data, *sizend;
+ realloc_t *rx, *rx1, *rend1;
+ int sum = 0, num = 0;
+ int plus1 = 0;
+
+ data = (struct movedata *) tmpdata;
+ for (rx = czoomc.reallocx, rend1 = rx + cimage.width; rx < rend1; rx++)
+ if ((rx->dirty) && plus1 < cimage.width + 1)
+ plus1++;
+ else
+ break;
+ data->start = czoomc.reallocx->plus;
+ data->size = 0;
+ data->plus = plus1;
+ rend1--;
+ while (rend1->dirty) {
+ if (rend1 == czoomc.reallocx)
+ return;
+ rend1--;
+ }
+ rend1++;
+ for (; rx < rend1; rx++) {
+ if ((rx->dirty || rx->plus == data->start + data->size))
+ data->size++;
+ else {
+ if (data->size) {
+ plus1 = 0;
+ rx1 = rx - 1;
+ while (rx1 > czoomc.reallocx && rx1->dirty)
+ plus1++, data->size--, rx1--;
+ if (!
+ (data->start + data->size <
+ (unsigned int) cimage.width)
+&& !rx->dirty) {
+ int i;
+ if (rx == rend1)
+ break;
+ for (i = 0; rx->dirty && rx < rend1; rx++)
+ i++;
+ data++;
+ data->plus = plus1;
+ data->size = (unsigned int) i;
+ data->start = rx->plus - i;
+ } else {
+ sum += data->size;
+ num++;
+ data++;
+ data->plus = plus1;
+ data->start = rx->plus;
+ }
+ } else
+ data->start = rx->plus;
+ assert(rx->plus >= 0
+ && rx->plus < (unsigned int) cimage.width);
+ data->size = 1;
+ }
+
+ }
+ if (data->size) {
+ sizend = data + 1;
+ sum += data->size;
+ rx1 = rx - 1;
+ while (rx1 > czoomc.reallocx && rx1->dirty)
+ data->size--, rx1--;
+ num++;
+ } else
+ sizend = data;
+ sizend->size = 0;
+ if (cimage.bytesperpixel != 1) {
+ sum *= cimage.bytesperpixel;
+ for (data = (struct movedata *) tmpdata; data < sizend; data++) {
+ data->plus *= cimage.bytesperpixel;
+ data->size *= cimage.bytesperpixel;
+ data->start *= cimage.bytesperpixel;
+ }
+ }
+ if (num)
+ avgsize = sum / num;
+}
+
+#ifndef USE_i386ASM
+static /*INLINE */ void
+moveoldpoints(void /*@unused@ */ *data1,
+ struct taskinfo /*@unused@ */ *task,
+ int r1, int r2)
+{
+ struct movedata *data;
+ register unsigned char *vline, *vbuff;
+ realloc_t *ry, *rend;
+ int i = r1;
+
+ for (ry = czoomc.reallocy + r1, rend = czoomc.reallocy + r2; ry < rend;
+ ry++, i++) {
+ if (!ry->dirty) {
+ assert(ry->plus >= 0
+ && ry->plus < (unsigned int) cimage.height);
+ vbuff = cimage.currlines[i];
+ vline = cimage.oldlines[ry->plus];
+ for (data = (struct movedata *) tmpdata; data->size; data++) {
+ vbuff += data->plus;
+ memcpy(vbuff, vline + data->start, (size_t) data->size),
+ vbuff += data->size;
+ }
+ }
+ }
+}
+#endif
+/* This function prepares fast filling tables for fillline */
+static /*INLINE */ int mkfilltable(void)
+{
+ int vsrc;
+ int pos;
+ realloc_t *rx, *r1, *r2, *rend, *rend2;
+ int n = 0;
+ int num = 0;
+ struct filltable *tbl = (struct filltable *) tmpdata;
+
+ pos = 0;
+ vsrc = 0;
+
+ rx = czoomc.reallocx;
+ while (rx > czoomc.reallocx && rx->dirty)
+ rx--;
+ for (rend = czoomc.reallocx + cimage.width, rend2 =
+ czoomc.reallocx + cimage.width; rx < rend; rx++) {
+ if (rx->dirty) {
+ r1 = rx - 1;
+ for (r2 = rx + 1; r2 < rend2 && r2->dirty; r2++);
+ while (rx < rend2 && rx->dirty) {
+ n = (int) (r2 - rx);
+ assert(n > 0);
+ if (r2 < rend2
+ && (r1 < czoomc.reallocx
+ || rx->possition - r1->possition >
+ r2->possition - rx->possition))
+ vsrc = (int) (r2 - czoomc.reallocx), r1 = r2;
+ else {
+ vsrc = (int) (r1 - czoomc.reallocx);
+ if (vsrc < 0)
+ goto end;
+ }
+ pos = (int) (rx - czoomc.reallocx);
+ assert(pos >= 0 && pos < cimage.width);
+ assert(vsrc >= 0 && vsrc < cimage.width);
+
+ tbl[num].length = n;
+ tbl[num].to = pos * cimage.bytesperpixel;
+ tbl[num].from = vsrc * cimage.bytesperpixel;
+ tbl[num].end =
+ tbl[num].length * cimage.bytesperpixel + tbl[num].to;
+ /*printf("%i %i %i %i\n",num,tbl[num].length, tbl[num].to, tbl[num].from); */
+ while (n) {
+ rx->possition = czoomc.reallocx[vsrc].possition;
+ rx->dirty = 0;
+ rx++;
+ n--;
+ }
+ num++;
+ } /*while rx->dirty */
+ } /*if rx->dirty */
+ } /*for czoomc */
+ end:
+ tbl[num].length = 0;
+ tbl[num].to = pos;
+ tbl[num].from = vsrc;
+ return num;
+}
+
+static /*INLINE */ void filly(void /*@unused@ */
+ /*@null@ */ *data,
+ struct taskinfo /*@unused@ */ *task, int rr1,
+ int rr2)
+{
+ register unsigned char **vbuff = cimage.currlines;
+ realloc_t *ry, *r1, *r2, *rend, *rend2, *rs = NULL;
+ int linesize = cimage.width * cimage.bytesperpixel;
+
+ ry = czoomc.reallocy + rr1;
+
+ ry = czoomc.reallocy + rr1;
+ while (ry > czoomc.reallocy && ry->dirty > 0)
+ ry--;
+ for (rend = czoomc.reallocy + rr2, rend2 =
+ czoomc.reallocy + cimage.height; ry < rend; ry++) {
+ if (ry->dirty > 0) {
+ incuncomplette();
+ r1 = ry - 1;
+ for (r2 = ry + 1; r2 < rend2 && r2->dirty > 0; r2++);
+#ifdef _UNDEFINED_
+ if (r2 >= rend && (rr2 != cimage.height || ry == 0))
+#else
+ if (r2 >= rend2 && (rr2 != cimage.height || ry == 0))
+#endif
+ return;
+ while (ry < rend2 && ry->dirty > 0) {
+ if (r1 < czoomc.reallocy) {
+ rs = r2;
+ if (r2 >= rend2)
+ return;
+ } else if (r2 >= rend2)
+ rs = r1;
+ else if (ry->possition - r1->possition <
+ r2->possition - ry->possition)
+ rs = r1;
+ else
+ rs = r2;
+ if (!rs->dirty) {
+ drivercall(cimage,
+ fillline_8(rs - czoomc.reallocy),
+ fillline_16(rs - czoomc.reallocy),
+ fillline_24(rs - czoomc.reallocy),
+ fillline_32(rs - czoomc.reallocy));
+ ry->dirty = -1;
+ }
+ memcpy(vbuff[ry - czoomc.reallocy],
+ vbuff[rs - czoomc.reallocy], (size_t) linesize);
+ ry->possition = rs->possition;
+ ry->dirty = -1;
+ ry++;
+ }
+ }
+ if (ry < rend && !ry->dirty) {
+ drivercall(cimage,
+ fillline_8(ry - czoomc.reallocy),
+ fillline_16(ry - czoomc.reallocy),
+ fillline_24(ry - czoomc.reallocy),
+ fillline_32(ry - czoomc.reallocy));
+ ry->dirty = -1;
+ }
+ }
+}
+
+static void fill(void)
+{
+ if (cfilter.interrupt) {
+ cfilter.pass = "reducing resolution";
+ mkfilltable();
+ xth_function(filly, NULL, cimage.height);
+ }
+ xth_sync();
+}
+
+static /*INLINE */ void
+calculatenew(void /*@unused@ */ *data, struct taskinfo /*@unused@ */ *task,
+ int /*@unused@ */ r1, int /*@unused@ */ r2)
+{
+ int s;
+ int i, y;
+ realloc_t *rx, *ry, *rend;
+ int range = cfractalc.range * 2;
+ int positions[16];
+ int calcpositions[16];
+ /*int s3; */
+ if (range < 1)
+ range = 1;
+ if (range > 16)
+ range = 16;
+ memset(positions, 0, sizeof(positions));
+ calcpositions[0] = 0;
+ positions[0] = 1;
+ for (s = 1; s < range;) {
+ for (i = 0; i < range; i++) {
+ if (!positions[i]) {
+ for (y = i; y < range && !positions[y]; y++);
+ positions[(y + i) / 2] = 1;
+ calcpositions[s++] = (y + i) / 2;
+ }
+ }
+ }
+
+ if (!xth_nthread(task)) {
+ STAT(tocalculate = 0);
+ STAT(avoided = 0);
+ cfilter.pass = gettext("Solid guessing 1");
+ cfilter.max = 0;
+ cfilter.pos = 0;
+ }
+
+ /* We don't need to wory about race conditions here, since only
+ * problem that should happend is incorrectly counted number
+ * of lines to do...
+ *
+ * I will fix that problem later, but I think that this information
+ * should be quite useless at multithreaded systems so it should
+ * be a bit inaccurate. Just need to take care in percentage
+ * displayers that thinks like -100% or 150% should happend
+ */
+ if (!xth_nthread(task)) {
+ for (ry = czoomc.reallocy, rend = ry + cimage.height; ry < rend;
+ ry++) {
+ if (ry->recalculate)
+ cfilter.max++;
+ }
+ for (rx = czoomc.reallocx, rend = rx + cimage.width; rx < rend;
+ rx++) {
+ if (rx->recalculate) {
+ cfilter.max++;
+ }
+ }
+ }
+ tcallwait();
+ for (s = 0; s < range; s++) {
+ for (ry = czoomc.reallocy + calcpositions[s], rend =
+ czoomc.reallocy + cimage.height; ry < rend; ry += range) {
+ xth_lock(0);
+ if (ry->recalculate == 1) {
+ ry->recalculate = 2;
+ xth_unlock(0);
+ setchanged(1);
+ ry->dirty = 0;
+ calcline(ry);
+ cfilter.pos++;
+#ifndef DRAW
+ tcallwait();
+#endif
+ if (cfilter.interrupt) {
+ break;
+ }
+ } else {
+ xth_unlock(0);
+ }
+ } /*for ry */
+ for (rx = czoomc.reallocx + calcpositions[s], rend =
+ czoomc.reallocx + cimage.width; rx < rend; rx += range) {
+ xth_lock(1);
+ if (rx->recalculate == 1) {
+ rx->recalculate = 2;
+ xth_unlock(1);
+ setchanged(1);
+ rx->dirty = 0;
+ calccolumn(rx);
+ cfilter.pos++;
+#ifndef DRAW
+ tcallwait();
+#endif
+ if (cfilter.interrupt) {
+ return;
+ }
+ } else {
+ xth_unlock(1);
+ }
+ }
+ }
+ STAT(printf
+ ("Avoided caluclating of %i points from %i and %2.2f%% %2.2f%%\n",
+ avoided, tocalculate, 100.0 * (avoided) / tocalculate,
+ 100.0 * (tocalculate - avoided) / cimage.width / cimage.height));
+ STAT(avoided2 += avoided;
+ tocalculate2 += tocalculate;
+ frames2 += 1);
+}
+
+static void addprices(realloc_t * r, realloc_t * r2) REGISTERS(3);
+REGISTERS(3)
+static void addprices(realloc_t * r, realloc_t * r2)
+{
+ realloc_t *r3;
+ while (r < r2) {
+ r3 = r + (((unsigned int) (r2 - r)) >> 1);
+ r3->price = (r2->possition - r3->possition) * (r3->price);
+ if (r3->symref != -1)
+ r3->price = r3->price / 2;
+ addprices(r, r3);
+ r = r3 + 1;
+ }
+}
+
+/* We can't do both symetryies (x and y) in one loop at multithreaded
+ * systems,since we need to take care to points at the cross of symetrized
+ * point/column
+ */
+static /*INLINE */ void
+dosymetry(void /*@unused@ */ *data, struct taskinfo /*@unused@ */ *task,
+ int r1, int r2)
+{
+ unsigned char **vbuff = cimage.currlines + r1;
+ realloc_t *ry, *rend;
+ int linesize = cimage.width * cimage.bytesperpixel;
+
+ for (ry = czoomc.reallocy + r1, rend = czoomc.reallocy + r2; ry < rend;
+ ry++) {
+ assert(ry->symto >= 0 || ry->symto == -1);
+ if (ry->symto >= 0) {
+ assert(ry->symto < cimage.height);
+ if (!czoomc.reallocy[ry->symto].dirty) {
+ memcpy(*vbuff, cimage.currlines[ry->symto],
+ (size_t) linesize);
+ ry->dirty = 0;
+ }
+ }
+ vbuff++;
+ }
+}
+
+/*Well, clasical simple quicksort. Should be faster than library one
+ *because of reduced number of function calls :)
+ */
+static INLINE void myqsort(realloc_t ** start, realloc_t ** end)
+{
+ number_t med;
+ realloc_t **left = start, **right = end - 1;
+ while (1) {
+
+ /*Quite strange caluclation of median, but should be
+ *as good as Sedgewick middle of three method and is faster*/
+ med = ((*start)->price + (*(end - 1))->price) * 0.5;
+
+ /*Avoid one comparsion */
+ if (med > (*start)->price) {
+ realloc_t *tmp;
+ tmp = *left;
+ *left = *right;
+ *right = tmp;
+ }
+ right--;
+ left++;
+
+ while (1) {
+ realloc_t *tmp;
+
+ while (left < right && (*left)->price > med)
+ left++;
+ while (left < right && med > (*right)->price)
+ right--;
+
+ if (left < right) {
+ tmp = *left;
+ *left = *right;
+ *right = tmp;
+ left++;
+ right--;
+ } else
+ break;
+ }
+ if (left - start > 1)
+ myqsort(start, left);
+ if (end - right <= 2)
+ return;
+ left = start = right;
+ right = end - 1;
+ }
+}
+
+static int tocalcx, tocalcy;
+static void processqueue(void *data, struct taskinfo /*@unused@ */ *task,
+ int /*@unused@ */ r1, int /*@unused@ */ r2)
+{
+ realloc_t **tptr = (realloc_t **) data, **tptr1 =
+ (realloc_t **) tmpdata;
+ realloc_t *r, *end;
+ end = czoomc.reallocx + cimage.width;
+
+ while (tptr1 < tptr
+ && (!cfilter.interrupt || tocalcx == cimage.width
+ || tocalcy == cimage.height)) {
+ xth_lock(0);
+ r = *tptr1;
+ if (r != NULL) {
+ *tptr1 = NULL;
+ xth_unlock(0);
+ cfilter.pos++;
+ if (tocalcx < cimage.width - 2 && tocalcy < cimage.height - 2)
+ cfilter.readyforinterrupt = 1;
+ tcallwait();
+ if (r >= czoomc.reallocx && r < end) {
+ r->dirty = 0;
+ tocalcx--;
+ calccolumn(r);
+ } else {
+ r->dirty = 0;
+ tocalcy--;
+ calcline(r);
+ }
+ } else {
+ xth_unlock(0);
+ }
+ tptr1++;
+ }
+}
+
+/*
+ * Another long unthreaded code. It seems to be really long and
+ * ugly, but believe or not it takes just about 4% of calculation time,
+ * so why to worry about? :)
+ *
+ * This code looks for columns/lines to calculate, adds them into queue,
+ * sorts it in order of significancy and then calls parrel processqueue,
+ * that does the job.
+ */
+static void calculatenewinterruptible(void)
+{
+ realloc_t *r, *r2, *end, *end1;
+ realloc_t **table, **tptr;
+
+ /*tptr = table = (realloc_t **) malloc (sizeof (*table) * (cimage.width + cimage.height)); */
+ tptr = table = (realloc_t **) tmpdata;
+ end = czoomc.reallocx + cimage.width;
+ tocalcx = 0, tocalcy = 0;
+
+ STAT(tocalculate = 0);
+ STAT(avoided = 0);
+
+ cfilter.pass = gettext("Solid guessing");
+
+ for (r = czoomc.reallocx; r < end; r++)
+ if (r->dirty)
+ tocalcx++, setchanged(1);
+
+ for (r = czoomc.reallocx; r < end; r++) {
+ if (r->recalculate) {
+ for (r2 = r; r2 < end && r2->recalculate; r2++)
+ *(tptr++) = r2;
+ if (r2 == end)
+ /*(r2 - 1)->price = 0, */
+ r2--;
+ addprices(r, r2);
+ r = r2;
+ }
+ }
+
+ end1 = czoomc.reallocy + cimage.height;
+
+ for (r = czoomc.reallocy; r < end1; r++)
+ if (r->dirty)
+ tocalcy++, setchanged(1);
+
+ for (r = czoomc.reallocy; r < end1; r++) {
+ if (r->recalculate) {
+ for (r2 = r; r2 < end1 && r2->recalculate; r2++)
+ *(tptr++) = r2;
+ if (r2 == end1)
+ /*(r2 - 1)->price = 0, */
+ r2--;
+ addprices(r, r2);
+ r = r2;
+ }
+ }
+ if (table != tptr) {
+
+ if (tptr - table > 1)
+ myqsort(table, tptr);
+
+ cfilter.pos = 0;
+ cfilter.max = (int) (tptr - table);
+ cfilter.incalculation = 1;
+ callwait();
+
+ xth_function(processqueue, tptr, 1);
+
+ callwait();
+ }
+
+ cfilter.pos = 0;
+ cfilter.max = 0;
+ cfilter.pass = "Procesing symetries";
+ cfilter.incalculation = 0;
+ callwait();
+
+ xth_sync();
+ if (nsymetrized) {
+ xth_function(dosymetry, NULL, cimage.height);
+ xth_sync();
+ drivercall(cimage,
+ xth_function(dosymetry2_8, NULL, cimage.width),
+ xth_function(dosymetry2_16, NULL, cimage.width),
+ xth_function(dosymetry2_24, NULL, cimage.width),
+ xth_function(dosymetry2_32, NULL, cimage.width));
+ xth_sync();
+ }
+ if (cfilter.interrupt) {
+ cfilter.pass = "reducing resolution";
+ mkfilltable();
+ xth_function(filly, NULL, cimage.height);
+ }
+ xth_sync();
+
+ STAT(printf
+ ("Avoided caluclating of %i points from %i and %2.2f%% %2.2f%%\n",
+ avoided, tocalculate, 100.0 * (avoided) / tocalculate,
+ 100.0 * (tocalculate - avoided) / cimage.width / cimage.height));
+ STAT(avoided2 += avoided;
+ tocalculate2 += tocalculate;
+ frames2 += 1);
+}
+
+static void init_tables(struct filter *f)
+{
+ int i;
+ zoom_context *c = getzcontext(f);
+
+ /*c->dirty = 2; */
+ for (i = 0; i < f->image->width + 1; i++)
+ c->xpos[i] =
+ (-f->fractalc->rs.nc + f->fractalc->rs.mc) +
+ f->fractalc->rs.mc;
+ for (i = 0; i < f->image->height + 1; i++)
+ c->ypos[i] =
+ (-f->fractalc->rs.ni + f->fractalc->rs.mi) +
+ f->fractalc->rs.mi;
+}
+
+
+static int alloc_tables(struct filter *f)
+{
+ zoom_context *c = getzcontext(f);
+ c->xpos =
+ (number_t *) malloc((f->image->width + 8) * sizeof(*c->xpos));
+ if (c->xpos == NULL)
+ return 0;
+ c->ypos =
+ (number_t *) malloc((f->image->height + 8) * sizeof(*c->ypos));
+ if (c->ypos == NULL) {
+ free((void *) c->xpos);
+ return 0;
+ }
+ c->reallocx =
+ (realloc_t *) malloc(sizeof(realloc_t) * (f->image->width + 8));
+ if (c->reallocx == NULL) {
+ free((void *) c->xpos);
+ free((void *) c->ypos);
+ return 0;
+ }
+ c->reallocy =
+ (realloc_t *) malloc(sizeof(realloc_t) * (f->image->height + 8));
+ if (c->reallocy == NULL) {
+ free((void *) c->xpos);
+ free((void *) c->ypos);
+ free((void *) c->reallocx);
+ return 0;
+ }
+ return 1;
+}
+
+static void free_tables(struct filter *f)
+{
+ zoom_context *c = getzcontext(f);
+ if (c->xpos != NULL)
+ free((void *) c->xpos), c->xpos = NULL;
+ if (c->ypos != NULL)
+ free((void *) c->ypos), c->ypos = NULL;
+ if (c->reallocx != NULL)
+ free((void *) c->reallocx), c->reallocx = NULL;
+ if (c->reallocy != NULL)
+ free((void *) c->reallocy), c->reallocy = NULL;
+}
+
+static void free_context(struct filter *f)
+{
+ zoom_context *c;
+ c = getzcontext(f);
+ free_tables(f);
+ free((void *) c);
+ f->data = NULL;
+}
+
+static zoom_context *make_context(void)
+{
+ zoom_context *new_ctxt;
+
+ new_ctxt = (zoom_context *) calloc(1, sizeof(zoom_context));
+ if (new_ctxt == NULL)
+ return NULL;
+ new_ctxt->forversion = -1;
+ new_ctxt->newcalc = 1;
+ new_ctxt->reallocx = NULL;
+ new_ctxt->reallocy = NULL;
+ new_ctxt->xpos = NULL;
+ new_ctxt->ypos = NULL;
+ new_ctxt->uncomplette = 0;
+ return (new_ctxt);
+}
+
+static void startbgmkrealloc(void /*@unused@ */ *data,
+ struct taskinfo /*@unused@ */ *task,
+ int /*@unused@ */ r1,
+ int /*@unused@ */ r2)
+{
+ mkrealloc_table(czoomc.ypos, czoomc.reallocy,
+ (unsigned int) cimage.height, cfractalc.rs.ni,
+ cfractalc.rs.mi, cursymetry.ysym, tmpdata1);
+}
+
+static int do_fractal(struct filter *f, int flags, int /*@unused@ */ time)
+{
+ number_t *posptr;
+ int maxres;
+ int size;
+ int rflags = 0;
+ realloc_t *r, *rend;
+
+ f->image->flip(f->image);
+ cfilter = *f;
+ set_fractalc(f->fractalc, f->image);
+
+ if (getzcontext(f)->forversion != f->fractalc->version ||
+ getzcontext(f)->newcalc ||
+ getzcontext(f)->forpversion != f->image->palette->version) {
+ clear_image(f->image);
+ free_tables(f);
+ if (!alloc_tables(f))
+ return 0;
+ init_tables(f);
+ getzcontext(f)->newcalc = 0;
+ getzcontext(f)->forversion = getfcontext(f)->version;
+ getzcontext(f)->forpversion = f->image->palette->version;
+ czoomc = *getzcontext(f);
+ if (BTRACEOK && !(flags & INTERRUPTIBLE)) {
+ boundarytraceall(czoomc.xpos, czoomc.ypos);
+ f->flags &= ~ZOOMMASK;
+ return CHANGED | (cfilter.interrupt ? UNCOMPLETTE : 0);
+ }
+ } else
+ rflags |= INEXACT;
+
+ czoomc = *getzcontext(f);
+
+ setuncomplette(0);
+ setchanged(0);
+
+ maxres = cimage.width;
+ if (maxres < cimage.height)
+ maxres = cimage.height;
+ size =
+ ALIGN((maxres) * (DSIZE + 1) * (int) sizeof(struct dyn_data)) +
+ 2 * ALIGN(maxres * (int) sizeof(struct dyn_data **)) +
+ ALIGN((maxres + 2) * (int) sizeof(int));
+#ifdef HAVE_ALLOCA
+ tmpdata = (unsigned char *) alloca(size);
+#else
+ tmpdata = (unsigned char *) malloc(size);
+#endif
+ if (tmpdata == NULL) {
+ x_error
+ ("XaoS fatal error:Could not allocate memory for temporary data of size %i. "
+ "I am unable to handle this problem so please resize to smaller window.",
+ size);
+ return 0;
+ }
+ if (nthreads != 1) {
+#ifdef HAVE_ALLOCA
+ tmpdata1 = (unsigned char *) alloca(size);
+#else
+ tmpdata1 = (unsigned char *) malloc(size);
+#endif
+ if (tmpdata1 == NULL) {
+ x_error
+ ("XaoS fatal error:Could not allocate memory for temporary data of size %i. "
+ "I am unable to handle this problem so please resize to smaller window",
+ size);
+ return 0;
+ }
+ } else
+ tmpdata1 = tmpdata;
+
+ cfilter.incalculation = 0;
+ cfilter.readyforinterrupt = 0;
+ cfilter.interrupt = 0;
+
+ nsymetrized = 0;
+ cfilter.max = 0;
+ cfilter.pos = 0;
+ cfilter.pass = "Making y realloc table";
+ xth_bgjob(startbgmkrealloc, NULL);
+
+ cfilter.pass = "Making x realloc table";
+ mkrealloc_table(czoomc.xpos, czoomc.reallocx,
+ (unsigned int) cimage.width, cfractalc.rs.nc,
+ cfractalc.rs.mc, cursymetry.xsym, tmpdata);
+
+ callwait();
+
+ cfilter.pass = "Moving old points";
+ callwait();
+ preparemoveoldpoints();
+ xth_sync();
+#ifdef _NEVER_
+ {
+ static long long sum2, sum;
+ cli();
+ startagi();
+ sum -= rdtsc();
+ sum2 -= countagi();
+ xth_function(moveoldpoints, NULL, cimage.height);
+ sum += rdtsc();
+ sum2 += countagi();
+ sti();
+ printf("%i %i\n", (int) sum, (int) sum2);
+ }
+#else
+ xth_function(moveoldpoints, NULL, cimage.height);
+#endif
+
+ cfilter.pass = "Starting calculation";
+ callwait();
+ xth_sync();
+ if (flags & INTERRUPTIBLE)
+ calculatenewinterruptible();
+ else {
+ xth_function(calculatenew, NULL, 1);
+ if (cfilter.interrupt) {
+ getzcontext(f)->uncomplette = 1;
+ }
+ cfilter.pos = 0;
+ cfilter.max = 0;
+ cfilter.pass = "Procesing symetries";
+ callwait();
+ xth_sync();
+ if (nsymetrized) {
+ xth_function(dosymetry, NULL, cimage.height);
+ xth_sync();
+ drivercall(cimage,
+ xth_function(dosymetry2_8, NULL, cimage.width),
+ xth_function(dosymetry2_16, NULL, cimage.width),
+ xth_function(dosymetry2_24, NULL, cimage.width),
+ xth_function(dosymetry2_32, NULL, cimage.width));
+ xth_sync();
+ }
+ if (getzcontext(f)->uncomplette) {
+ fill();
+ }
+ }
+ for (r = czoomc.reallocx, posptr = czoomc.xpos, rend =
+ czoomc.reallocx + cimage.width; r < rend; r++, posptr++) {
+ *posptr = r->possition;
+ }
+ for (r = czoomc.reallocy, posptr = czoomc.ypos, rend =
+ czoomc.reallocy + cimage.height; r < rend; r++, posptr++) {
+ *posptr = r->possition;
+ }
+#ifdef STATISTICS
+ STAT(printf("Statistics: frames %i\n"
+ "mkrealloctable: added %i, symetry %i\n"
+ "calculate loop: tocalculate %i avoided %i\n"
+ "calculate:calculated %i inside %i\n"
+ "iters inside:%i iters outside:%i periodicty:%i\n",
+ frames2, nadded2, nsymetry2, tocalculate2, avoided2,
+ ncalculated2, ninside2, niter2, niter1, nperi));
+#endif
+ f->flags &= ~ZOOMMASK;
+ if (getzcontext(f)->uncomplette)
+ rflags |= UNCOMPLETTE, f->flags |= UNCOMPLETTE;
+ if (getzcontext(f)->uncomplette > (cimage.width + cimage.height) / 2)
+ f->flags |= LOWQUALITY;
+ if (getzcontext(f)->changed)
+ rflags |= CHANGED;
+#ifndef HAVE_ALLOCA
+ free(tmpdata);
+ if (nthreads != 1)
+ free(tmpdata1);
+#endif
+ return rflags;
+}
+
+
+static struct filter *getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ f->data = make_context();
+ f->name = "Zooming engine";
+ return (f);
+}
+
+static void destroyinstance(struct filter *f)
+{
+ free_context(f);
+ free(f);
+}
+
+static int requirement(struct filter *f, struct requirements *r)
+{
+ r->nimages = 2;
+ r->supportedmask =
+ C256 | TRUECOLOR | TRUECOLOR24 | TRUECOLOR16 | LARGEITER |
+ SMALLITER | GRAYSCALE;
+ r->flags = IMAGEDATA | TOUCHIMAGE;
+ return (f->next->action->requirement(f->next, r));
+}
+
+static int initialize(struct filter *f, struct initdata *i)
+{
+#ifdef USE_MULTABLE
+ if (!multable[0]) {
+ int i;
+ mulmid = multable + RANGE * FPMUL;
+ for (i = -RANGE * FPMUL; i < RANGE * FPMUL; i++)
+ mulmid[i] = i * i;
+ }
+#endif
+ inhermisc(f, i);
+ if (i->image != f->image || datalost(f, i))
+ getzcontext(f)->forversion = -1, f->image = i->image;
+ f->imageversion = i->image->version;
+ return (1);
+}
+
+CONST struct filteraction zoom_filter = {
+ "XaoS's zooming engine",
+ "zoom",
+ 0,
+ getinstance,
+ destroyinstance,
+ do_fractal,
+ requirement,
+ initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ NULL,
+};
diff --git a/src/engine/zoomd.c b/src/engine/zoomd.c
new file mode 100644
index 0000000..ef3b965
--- /dev/null
+++ b/src/engine/zoomd.c
@@ -0,0 +1,309 @@
+#ifndef UNSUPPORTED
+
+/* this two routines implements solid guessing. They are almost same. One
+ * caluclates lines, second rows.
+ *
+ * The heruistic is as follows:
+ *
+ * ---1------6------5------- (vbuffu)
+ * | | |
+ * ===7======X======8======= (vbuff1)
+ * | | |
+ * ---2------3------4------- (vbuffd)
+ * distdown rx distup
+ *
+ * -- and | means calculated lines. == is current line, names are pointers to
+ * them. Note that naming is quite confusing, because it is same in lines and
+ * rows.
+ *
+ * we do solid guessing as folows:
+ * |distl-vbuff1| < range
+ * |distr-vbuff1| < range
+ * the distance of distup and distdown is not limited, because we already
+ * have exact enought guesses 3 and 6
+ *
+ * points 1 2 3 4 5 6 8 must be the same (point 8 is not yet calculated)
+ *
+ */
+static void calcline(realloc_t * RESTRICT ry) REGISTERS(3);
+REGISTERS(3)
+static void calcline(realloc_t * RESTRICT ry)
+{
+ number_t y;
+ int range = cfractalc.range;
+ realloc_t *RESTRICT rx, *rend, *rend1, *ryl, *ryr;
+ int distl, distr, distup, distdown;
+ cpixel_t *RESTRICT vbuff, *RESTRICT vbuffu, *RESTRICT vbuffd;
+ cpixeldata_t inset = (cpixeldata_t) cpalette.pixels[0];
+ cpixeldata_t c;
+ cppixel_t *vbuff1 =
+ (cpixel_t **) cimage.currlines + (ry - czoomc.reallocy);
+ assert(ry >= czoomc.reallocy);
+ assert(ry < czoomc.reallocy + cimage.height);
+ y = ry->possition;
+ rend = ry - range - 1;
+ if (czoomc.reallocy > rend)
+ rend = czoomc.reallocy;
+ for (ryl = ry - 1; rend <= ryl && ryl->dirty; ryl--);
+ distl = (int) (ryl - ry);
+ rend = ry + range;
+ if (czoomc.reallocy + cimage.height < rend)
+ rend = czoomc.reallocy + cimage.height;
+ for (ryr = ry + 1; rend > ryr && ryr->dirty; ryr++);
+ distr = (int) (ryr - ry);
+ rend = czoomc.reallocy + cimage.height;
+ if (ryr == czoomc.reallocy + cimage.height || ryl < czoomc.reallocy
+ || ryr->dirty || ryl->dirty) {
+ for (rx = czoomc.reallocx, vbuff = *vbuff1,
+ rend1 = czoomc.reallocx + cimage.width; rx < rend1; rx++) {
+ if (!rx->dirty) {
+ STAT(tocalculate++);
+ p_set(vbuff,
+ (cpixeldata_t) calculate(rx->possition, y,
+ cfractalc.periodicity));
+#ifdef DRAW
+ vga_setcolor(0xff0000);
+ vga_drawpixel(rx - czoomc.reallocx, ry - czoomc.reallocy);
+#endif
+ }
+ p_inc(vbuff, 1);
+ }
+ } else {
+ distup = INT_MAX / 2;
+ distdown = 0;
+ for (rx = czoomc.reallocx,
+ vbuff = vbuff1[0], vbuffu = vbuff1[distl], vbuffd =
+ vbuff1[distr], rend1 = czoomc.reallocx + cimage.width;
+ rx < rend1; rx++) {
+ assert(rx < czoomc.reallocx + cimage.width);
+ assert(rx >= czoomc.reallocx);
+ if (!rx->dirty) {
+ STAT(tocalculate++);
+ if (distdown <= 0) {
+ for (ryr = rx + 1; ryr < rend1 && ryr->dirty; ryr++);
+ distdown = (int) (ryr - rx);
+ if (ryr == rend1)
+ distdown = INT_MAX / 2;
+ }
+ if (distdown < INT_MAX / 4 && distup < INT_MAX / 4 &&
+ (p_get(vbuffu) == (c = p_get(vbuffd)) &&
+ c == p_getp(vbuff, -distup) &&
+ c == p_getp(vbuffu, -distup) &&
+ c == p_getp(vbuffu, distdown) &&
+ c == p_getp(vbuffd, distdown) &&
+ c == p_getp(vbuffd, -distup))) {
+ p_set(vbuff, c);
+ STAT(avoided++);
+ } else {
+ if (cfractalc.periodicity &&
+ distdown < INT_MAX / 4 && distup < INT_MAX / 4 &&
+ (p_get(vbuffu) != inset &&
+ p_get(vbuffd) != inset &&
+ p_getp(vbuff, -distup) != inset &&
+ p_getp(vbuffu, -distup) != inset &&
+ p_getp(vbuffu, +distdown) != inset &&
+ p_getp(vbuffd, -distup) != inset &&
+ p_getp(vbuffd, +distdown) != inset))
+ p_set(vbuff,
+ (cpixeldata_t) calculate(rx->possition, y,
+ 0));
+ else
+ p_set(vbuff,
+ (cpixeldata_t) calculate(rx->possition, y,
+ cfractalc.
+ periodicity));
+#ifdef DRAW
+ vga_setcolor(0xffffff);
+ vga_drawpixel(rx - czoomc.reallocx,
+ ry - czoomc.reallocy);
+#endif
+ }
+ distup = 0;
+ }
+ p_inc(vbuff, 1);
+ p_inc(vbuffu, 1);
+ p_inc(vbuffd, 1);
+ distdown--;
+ distup++;
+ }
+ }
+ ry->recalculate = 0;
+ ry->dirty = 0;
+}
+
+static void calccolumn(realloc_t * RESTRICT rx) REGISTERS(3);
+REGISTERS(3)
+static void calccolumn(realloc_t * RESTRICT rx)
+{
+ number_t x;
+ int range = cfractalc.range;
+ realloc_t *RESTRICT ry, *rend, *rend1, *rxl, *rxr;
+ int pos, distl, distr, distup, distdown;
+ cpixeldata_t c;
+ cpixeldata_t inset = (cpixeldata_t) cpalette.pixels[0];
+ cppixel_t *RESTRICT vbuff;
+ pos = (int) (rx - czoomc.reallocx);
+ assert(pos >= 0);
+ assert(pos < cimage.width);
+ rend = rx - range + 1;
+ if (czoomc.reallocx > rend)
+ rend = czoomc.reallocx;
+ for (rxl = rx - 1; rend <= rxl && rxl->dirty; rxl--);
+ distl = (int) (rx - rxl);
+ rend = rx + range;
+ if (czoomc.reallocx + cimage.width < rend)
+ rend = czoomc.reallocx + cimage.width;
+ for (rxr = rx + 1; rxr < rend && rxr->dirty; rxr++);
+ distr = (int) (rxr - rx);
+ x = rx->possition;
+ rend = czoomc.reallocx + cimage.width;
+ if (rxr >= czoomc.reallocx + cimage.width || rxl < czoomc.reallocx
+ || rxr->dirty || rxl->dirty) {
+ for (ry = czoomc.reallocy, vbuff =
+ (cppixel_t *) cimage.currlines, rend1 =
+ czoomc.reallocy + cimage.height; ry < rend1; ry++, vbuff++) {
+ if (!ry->dirty) {
+ STAT(tocalculate++);
+ p_setp((*vbuff), pos,
+ (cpixeldata_t) calculate(x, ry->possition,
+ cfractalc.periodicity));
+#ifdef DRAW
+ vga_setcolor(0xff0000);
+ vga_drawpixel(rx - czoomc.reallocx, ry - czoomc.reallocy);
+#endif
+ }
+ }
+ } else {
+ distl = pos - distl;
+ distr = pos + distr;
+ assert(distl >= 0);
+ assert(distr < cimage.width);
+ distup = INT_MAX / 2;
+ distdown = 0;
+ for (ry = czoomc.reallocy, vbuff =
+ (cppixel_t *) cimage.currlines, rend1 =
+ czoomc.reallocy + cimage.height; ry < rend1; ry++) {
+ /*if (ry->symto == -1) { */
+ assert(ry < czoomc.reallocy + cimage.height);
+ if (!ry->dirty) {
+ STAT(tocalculate++);
+ if (distdown <= 0) {
+ for (rxr = ry + 1; rxr < rend1 && rxr->dirty; rxr++);
+ distdown = (int) (rxr - ry);
+ if (rxr == rend1)
+ distdown = INT_MAX / 2;
+ }
+ if (distdown < INT_MAX / 4 && distup < INT_MAX / 4 &&
+ (p_getp(vbuff[0], distl) ==
+ (c = p_getp(vbuff[0], distr))
+ && p_getp(vbuff[-distup], distl) == c
+ && p_getp(vbuff[-distup], distr) == c
+ && p_getp(vbuff[-distup], pos) == c
+ && p_getp(vbuff[distdown], distr) == c
+ && p_getp(vbuff[distdown], distl) == c)) {
+ STAT(avoided++);
+ p_setp(vbuff[0], pos, c);
+ } else {
+ if (cfractalc.periodicity &&
+ distdown < INT_MAX / 4 && distup < INT_MAX / 4 &&
+ (p_getp(vbuff[0], distl) != inset &&
+ p_getp(vbuff[0], distr) != inset &&
+ p_getp(vbuff[distdown], distr) != inset &&
+ p_getp(vbuff[distdown], distl) != inset &&
+ p_getp(vbuff[-distup], distl) != inset &&
+ p_getp(vbuff[-distup], pos) != inset &&
+ p_getp(vbuff[-distup], distr) != inset))
+ p_setp(vbuff[0], pos,
+ (cpixeldata_t) calculate(x, ry->possition,
+ 0));
+ else
+ p_setp(vbuff[0], pos,
+ (cpixeldata_t) calculate(x, ry->possition,
+ cfractalc.
+ periodicity));
+#ifdef DRAW
+ vga_setcolor(0xffffff);
+ vga_drawpixel(rx - czoomc.reallocx,
+ ry - czoomc.reallocy);
+#endif
+ }
+ distup = 0;
+ }
+ vbuff++;
+ distdown--;
+ distup++;
+ }
+ }
+ rx->recalculate = 0;
+ rx->dirty = 0;
+}
+
+static /*INLINE */ void
+dosymetry2(void /*@unused@ */ *data, struct taskinfo /*@unused@ */ *task,
+ int r1, int r2)
+{
+ cpixel_t **vbuff = (cpixel_t **) cimage.currlines;
+ realloc_t *rx, *rend;
+ cpixel_t **vend = (cpixel_t **) cimage.currlines + cimage.height;
+ for (rx = czoomc.reallocx + r1, rend = czoomc.reallocx + r2; rx < rend;
+ rx++) {
+ assert(rx->symto >= 0 || rx->symto == -1);
+ if (rx->symto >= 0) {
+ assert(rx->symto < cimage.width);
+ if (!czoomc.reallocx[rx->symto].dirty) {
+ int pos = (int) (rx - czoomc.reallocx);
+ int pos1 = rx->symto;
+ vbuff = (cpixel_t **) cimage.currlines;
+ for (; vbuff < vend; vbuff++)
+ p_copy(vbuff[0], pos, vbuff[0], pos1);
+ rx->dirty = 0;
+ }
+ }
+ }
+}
+
+#ifndef USE_i386ASM
+/*
+ * Fill - bitmap depended part.
+ *
+ * This function is called, when calculation was interrupted because of
+ * timeout. It fills uncalculated rows by nearest one
+ *
+ * This function is very time critical in higher resultions I am shooting
+ * for.
+ */
+#ifndef __GNUC__
+#undef bpp1
+#endif
+#ifndef __i386__
+#undef bpp1
+#endif
+#undef bpp1
+
+static INLINE void fillline(int line)
+{
+ register unsigned char *RESTRICT vbuff = cimage.currlines[line];
+ CONST struct filltable *RESTRICT table = (struct filltable *) tmpdata;
+ while (table->length) {
+ register cpixeldata_t s =
+ p_get((cpixel_t *) (vbuff + table->from));
+ register cpixel_t *vcurr = (cpixel_t *) (vbuff + table->to);
+#ifdef bpp1
+ memset(vcurr, s, table->length);
+#else
+ register cpixel_t *vend = (cpixel_t *) (vbuff + table->end);
+ while (vcurr < vend) {
+ p_set(vcurr, s);
+ p_inc(vcurr, 1);
+ }
+#endif
+ table++;
+ }
+}
+#endif
+#endif
+#undef dosymetry2
+#undef calcline
+#undef calccolumn
+#undef fillline
+#undef rend
diff --git a/src/filter/Makefile.in b/src/filter/Makefile.in
new file mode 100644
index 0000000..6786158
--- /dev/null
+++ b/src/filter/Makefile.in
@@ -0,0 +1,45 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = image.c \
+ palette.c \
+ random.c \
+ grlib.c \
+ font.c \
+ filter.c
+
+OBJS = $(SRCS:.c=.o)
+
+TLIB = ../lib/libfilter.a
+
+grlib.o: grlibd.c
+
+all: $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $(OBJS)
+ $(RANLIB) $@
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/filter/filter.c b/src/filter/filter.c
new file mode 100644
index 0000000..c851571
--- /dev/null
+++ b/src/filter/filter.c
@@ -0,0 +1,297 @@
+#include <config.h>
+#ifndef _plan9_
+#ifdef NO_MALLOC_H
+#include <stdlib.h>
+#else
+#include <malloc.h>
+#endif
+#else
+#include <u.h>
+#include <libc.h>
+#endif
+#include <stdio.h>
+#include <filter.h>
+/*#define DEBUG */
+struct queue *create_queue(struct filter *f)
+{
+ struct queue *q = (struct queue *) calloc(1, sizeof(struct queue));
+ q->first = q->last = f;
+ f->queue = q;
+ f->next = f->previous = NULL;
+ return (q);
+}
+
+void insertfilter(struct filter *f1, struct filter *f2)
+{
+ f1->next = f2;
+ f1->queue = f2->queue;
+ f1->queue->isinitialized = 0;
+ f1->previous = f2->previous;
+ if (f2->previous != NULL)
+ f2->previous->next = f1;
+ else
+ f2->queue->first = f1;
+ f2->previous = f1;
+}
+
+void addfilter(struct filter *f1, struct filter *f2)
+{
+ f1->previous = f2;
+ f1->queue = f2->queue;
+ f1->queue->isinitialized = 0;
+ f1->next = f2->next;
+ if (f2->next != NULL)
+ f2->next->previous = f1;
+ else
+ f2->queue->last = f1;
+ f2->next = f1;
+}
+
+void removefilter(struct filter *f)
+{
+ if (f->action->removefilter != NULL)
+ f->action->removefilter(f);
+ if (f->previous != NULL)
+ f->previous->next = f->next;
+ else
+ f->queue->first = f->next;
+ if (f->next != NULL)
+ f->next->previous = f->previous;
+ else
+ f->queue->last = f->previous;
+ f->queue->isinitialized = 0;
+}
+
+int initqueue(struct queue *q)
+{
+ struct requirements noreq = { 0, ALLMASK, 0 };
+ struct initdata init = { NULL, 0 };
+#ifdef DEBUG
+ printf("\n\nInitializing queue\n");
+#endif
+ q->palettechg = NULL;
+ if (!q->first->action->requirement(q->first, &noreq))
+ return 0;
+ if (!q->last->action->initialize(q->last, &init))
+ return 0;
+ q->isinitialized = 1;
+#ifdef DEBUG
+ printf("Correctly initialized\n");
+#endif
+ return 1;
+}
+
+int
+reqimage(struct filter *f, struct requirements *req, int supportedmask,
+ int flags)
+{
+ f->req = *req;
+ req->supportedmask &= supportedmask;
+ if (!req->supportedmask)
+ return 0;
+ if (flags & TOUCHIMAGE && req->flags & IMAGEDATA) {
+ req->flags = flags;
+ } else
+ req->flags &= flags;
+ return 1;
+}
+
+/* An function helping to filter create new image.
+ * It should be called by filter in inicialization. Filter passes
+ * width,height,pixelwidth, pixelheight
+ * and palette he wants to pass to his child and flags defining how it works
+ * with image(IMAGEDATA if it requires data from previous frames (like blur
+ * filter, TOUCHIMAGE if it changes data in image(like blur or stereogram
+ * filter but unlike interlace and NEWIMAGE if it strictly requires to create
+ * new image)
+ * As palette he should pass NULL to keep parents palette. Same as
+ * (pixel)width/height should be passed 0;
+ *
+ * Function then aplies some heruistic in order to minimize memory
+ * requirements. So it should share image, create image that shares image data
+ * or create new image)
+ *
+ * fills f->image, f->childimage and returns 1 if sucess and 0 if fail(usually
+ * out of memory or it is unable to fit child's requirements)
+ * and prepares data for child call.
+ */
+int
+inherimage(struct filter *f, struct initdata *data, int flags, int width,
+ int height, struct palette *palette, float pixelwidth,
+ float pixelheight)
+{
+ int newimage = 0;
+ int subimage = 1;
+ int sharedimage = 1;
+ struct image *i;
+
+ int ddatalost = 0;
+ if (width == 0)
+ width = data->image->width;
+ if (height == 0)
+ height = data->image->height;
+#ifdef DEBUG
+ printf("Inherimage:%s %i %i imagedata:%i %i\n", f->name, width, height,
+ flags & IMAGEDATA, flags & PROTECTBUFFERS);
+#endif
+ if (pixelwidth == 0)
+ pixelwidth = data->image->pixelwidth;
+ if (pixelheight == 0)
+ pixelheight = data->image->pixelheight;
+ if (palette == NULL)
+ palette = data->image->palette;
+ if (!(palette->type & f->req.supportedmask)) {
+#ifdef DEBUG
+ printf
+ ("Initalization of filter %s failed due to unsupported type by child %s-%i,%i\n",
+ f->name, f->previous->name, f->req.supportedmask,
+ palette->type);
+#endif
+ f->image = data->image;
+ return 0;
+ }
+
+ if (flags & NEWIMAGE)
+ newimage = 1, sharedimage = 0, subimage = 0;
+ if ((flags & IMAGEDATA) /*|| (data->image->flags & PROTECTBUFFERS) */ )
+ subimage = 0, sharedimage = 0, newimage = 1;
+ /*if filter touches data but child requires them, create separated image */
+ if ((flags & TOUCHIMAGE)
+ && ((f->req.flags & IMAGEDATA)
+ || (data->image->flags & PROTECTBUFFERS)))
+ subimage = 0, newimage = 1, sharedimage = 0;
+ /*if required image differs in size or so */
+ if (width != data->image->width || height != data->image->height ||
+ palette != data->image->palette)
+ newimage = 1, sharedimage = 0;
+
+ if (f->childimage != NULL && (f->flags & ALLOCEDIMAGE)) {
+ /*is an old child image still useable for us purposes? if not burn it it! */
+ /*We should share image? Why alloc new?? */
+ if (!newimage && (f->flags & ALLOCEDIMAGE))
+ destroyinheredimage(f), ddatalost = 1;
+ /*We should share data? but child image dont do that! */
+ if (subimage && !(f->flags & SHAREDDATA))
+ destroyinheredimage(f), ddatalost = 1;
+ /*We can't share data but child image does that? */
+ if (!subimage && (f->flags & SHAREDDATA))
+ destroyinheredimage(f), ddatalost = 1;
+ /*When image changed, child image must be recreated too */
+ if (f->flags & SHAREDDATA && ((data->flags & DATALOST)
+ || f->imageversion !=
+ data->image->version))
+ destroyinheredimage(f), ddatalost = 1;
+ /*We should share image with filter? Why keep created new one? */
+ if (sharedimage)
+ destroyinheredimage(f), ddatalost = 1;
+ /*When child image don't fit out needs */
+ if (f->childimage != NULL
+ && (f->childimage->width != width
+ || f->childimage->height != height
+ || f->childimage->palette != palette
+ || f->childimage->bytesperpixel !=
+ bytesperpixel(palette->type)
+ || f->childimage->nimages < f->req.nimages))
+ destroyinheredimage(f), ddatalost = 1;
+ /*Well now child image seems to be heavily probed */
+ }
+ i = f->childimage;
+ if (newimage) { /*Create new image when required */
+ if (!(f->flags & ALLOCEDIMAGE)) {
+ if (subimage) {
+ i = create_subimage(data->image, width, height,
+ f->req.nimages, palette, pixelwidth,
+ pixelheight);
+ f->flags |= ALLOCEDIMAGE | SHAREDDATA;
+ ddatalost = 1;
+ } else {
+ i = create_image_mem(width, height, f->req.nimages,
+ palette, pixelwidth, pixelheight);
+ f->flags |= ALLOCEDIMAGE;
+ ddatalost = 1;
+ }
+ }
+ }
+#ifdef DEBUG
+ printf("Filter:%s newimage:%i subimage:%i sharedimage:%i\n", f->name,
+ newimage, subimage, sharedimage);
+#endif
+ if (i == NULL) {
+ f->image = data->image;
+ return 0;
+ }
+ if (sharedimage)
+ i = data->image, ddatalost = (data->flags & DATALOST)
+ || (f->childimage != data->image);
+ if (sharedimage && datalost(f, data))
+ ddatalost = 1;
+ else if ((f->flags | SHAREDDATA) && datalost(f, data)
+ && !(i->flags & FREEDATA))
+ ddatalost = 1;
+ if (ddatalost)
+ data->flags |= DATALOST;
+ else
+ data->flags &= ~DATALOST;
+ f->image = data->image;
+ f->childimage = i;
+ f->imageversion = data->image->version;
+ data->image = i;
+#ifdef DEBUG
+ printf("OK %i datalost:%i\n", f->flags, ddatalost);
+#endif
+#ifdef DEBUG
+ printf("Inherimage2:%s %i %i\n", f->name, width, height);
+#endif
+ return 1;
+}
+
+void destroyinheredimage(struct filter *f)
+{
+ if (f->flags & ALLOCEDIMAGE)
+ destroy_image(f->childimage), f->flags &=
+ ~(ALLOCEDIMAGE | SHAREDDATA), f->childimage = NULL;
+}
+
+void updateinheredimage(struct filter *f)
+{
+ if ((f->flags & SHAREDDATA) && f->childimage) {
+ if (f->childimage->nimages == 2
+ && f->image->currimage != f->childimage->currimage)
+ f->childimage->flip(f->childimage); /*Hack for interlace filter */
+ }
+}
+
+void inhermisc(struct filter *f, CONST struct initdata *data)
+{
+ f->wait_function = data->wait_function;
+ f->fractalc = data->fractalc;
+}
+
+struct filter *createfilter(CONST struct filteraction *fa)
+{
+ struct filter *f = (struct filter *) calloc(1, sizeof(struct filter));
+ if (f == NULL)
+ return NULL;
+ f->queue = NULL;
+ f->next = NULL;
+ f->childimage = NULL;
+ f->flags = 0;
+ f->previous = NULL;
+ f->action = fa;
+ f->image = NULL;
+ f->req.nimages = 1;
+ f->data = NULL;
+ return (f);
+}
+
+void convertupgeneric(struct filter *f, int *x, int *y)
+{
+ if (f->next != NULL)
+ f->next->action->convertup(f->next, x, y);
+}
+
+void convertdowngeneric(struct filter *f, int *x, int *y)
+{
+ if (f->previous != NULL)
+ f->previous->action->convertdown(f->previous, x, y);
+}
diff --git a/src/filter/filter.pri b/src/filter/filter.pri
new file mode 100644
index 0000000..8746a51
--- /dev/null
+++ b/src/filter/filter.pri
@@ -0,0 +1,10 @@
+SOURCES += \
+ $$PWD/image.c \
+ $$PWD/palette.c \
+ $$PWD/random.c \
+ $$PWD/grlib.c \
+ $$PWD/font.c \
+ $$PWD/filter.c \
+
+OTHER_FILES += \
+ $$PWD/grlibd.c
diff --git a/src/filter/font.c b/src/filter/font.c
new file mode 100644
index 0000000..c478029
--- /dev/null
+++ b/src/filter/font.c
@@ -0,0 +1,1814 @@
+#include <config.h>
+#include "xfont16.c"
+#include "xfont32.c"
+#include "xfont48.c"
+
+CONST unsigned char xfont14[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00,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+ 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6,
+ 0x7c, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x6c, 0xfe, 0x6c, 0x28, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0xc6, 0xc6, 0xc6, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c,
+ 0x00, 0x00,
+ 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x06, 0x86, 0xc6, 0x7c,
+ 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0x86,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00,
+ 0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18,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 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xff,
+ 0x30, 0x30, 0x18, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00,
+ 0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x1c, 0x36, 0x32, 0x30, 0x78, 0x30, 0x30, 0x30, 0x30, 0x78,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c,
+ 0xcc, 0x78,
+ 0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x66,
+ 0x66, 0x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, 0x6c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06,
+ 0x0c, 0xf8,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,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0c, 0x18, 0x30, 0x60, 0xc2, 0xfe,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x66, 0x3c, 0x00, 0xfe, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xfe,
+ 0x00, 0x00,
+ 0x10, 0x38, 0x10, 0xfe, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc2, 0xfe,
+ 0x00, 0x00,
+ 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x0c, 0x06,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30,
+ 0x30, 0x1c,
+ 0x00, 0x00, 0x38, 0x18, 0x1e, 0x1c, 0x18, 0x38, 0x78, 0xd8, 0x18, 0x3c,
+ 0x00, 0x00,
+ 0x00, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x1e, 0xec, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
+ 0x18, 0x70,
+ 0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c,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, 0x24, 0x66, 0xff, 0x66, 0x24, 0x00, 0x00,
+ 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x00, 0x00,
+ 0x00, 0xff, 0xff, 0x7e, 0x3c, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x18, 0x00,
+ 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x6c, 0xfe, 0x6c, 0xfe, 0x6c, 0x6c, 0x00,
+ 0x18, 0x3e, 0x60, 0x3c, 0x06, 0x7c, 0x18, 0x00,
+ 0x00, 0xc6, 0xcc, 0x18, 0x30, 0x66, 0xc6, 0x00,
+ 0x38, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0x76, 0x00,
+ 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x18, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x00,
+ 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x18, 0x30, 0x00,
+ 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
+ 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
+ 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
+ 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00,
+ 0x38, 0x6c, 0xc6, 0xd6, 0xc6, 0x6c, 0x38, 0x00,
+ 0x18, 0x38, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x00,
+ 0x7c, 0xc6, 0x06, 0x1c, 0x30, 0x66, 0xfe, 0x00,
+ 0x7c, 0xc6, 0x06, 0x3c, 0x06, 0xc6, 0x7c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c, 0xcc, 0x76, 0x00,
+ 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x00,
+ 0x00, 0x00, 0xc6, 0xd6, 0xd6, 0xfe, 0x6c, 0x00,
+ 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x6c, 0xc6, 0x00,
+ 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0xfc,
+ 0x00, 0x00, 0x7e, 0x4c, 0x18, 0x32, 0x7e, 0x00,
+ 0x0e, 0x18, 0x18, 0x70, 0x18, 0x18, 0x0e, 0x00,
+ 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00,
+ 0x70, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x70, 0x00,
+ 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0x00, 0x18, 0x18, 0x3c, 0x3c, 0x18, 0x00,
+ 0x18, 0x18, 0x7e, 0xc0, 0xc0, 0x7e, 0x18, 0x18,
+ 0x38, 0x6c, 0x64, 0xf0, 0x60, 0x66, 0xfc, 0x00,
+ 0x00, 0xc6,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0x76, 0x00,
+ 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0x76, 0x00,
+ 0x18, 0x30, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0xfc,
+ 0xe0, 0x60, 0x7c, 0x66, 0x66, 0x7c, 0x60, 0xf0,
+ 0xc6, 0x00, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0xfc,
+};
+
+
+
+CONST unsigned char xfont16il1[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x1e, 0x0e, 0x1a, 0x32, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x78,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3f, 0x33, 0x3f, 0x30, 0x30, 0x30, 0x30, 0x70, 0xf0, 0xe0,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7f, 0x63, 0x7f, 0x63, 0x63, 0x63, 0x63, 0x67, 0xe7, 0xe6,
+ 0xc0, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x18, 0xdb, 0x3c, 0xe7, 0x3c, 0xdb, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xf8, 0xf0, 0xe0, 0xc0, 0x80,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x06, 0x0e, 0x1e, 0x3e, 0xfe, 0x3e, 0x1e, 0x0e, 0x06, 0x02,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6,
+ 0x7c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfe, 0x60, 0x30, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x6c, 0xfe, 0x6c, 0x28, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x06, 0x86, 0xc6, 0x7c,
+ 0x18, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0x86,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18,
+ 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xc6, 0xc6, 0x6c, 0x38,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc6, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x0c, 0x0c, 0x1e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xfe, 0xc6, 0x06, 0x06, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x0c, 0x78,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xde, 0xde, 0xde, 0xdc, 0xc0, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66, 0x66, 0xfc,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x60, 0x60, 0xf0,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xde, 0xc6, 0xc6, 0x66, 0x3a,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1e, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xcc, 0xcc, 0xcc, 0x78,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xe6, 0x66, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0x66, 0xe6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xf0, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe,
+ 0x00, 0x00, 0x00, 0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x00, 0x00,
+ 0x00, 0x00, 0xc6, 0xc6, 0x6c, 0x7c, 0x38, 0x38, 0x7c, 0x6c, 0xc6, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xfe, 0xc6, 0x86, 0x0c, 0x18, 0x30, 0x60, 0xc2, 0xc6, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x80, 0xc0, 0xe0, 0x70, 0x38, 0x1c, 0x0e, 0x06, 0x02,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x10, 0x38, 0x6c, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xff, 0x00, 0x00,
+ 0x00, 0x30, 0x18, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1c, 0x36, 0x32, 0x30, 0x78, 0x30, 0x30, 0x30, 0x30, 0x78,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c,
+ 0x0c, 0xcc, 0x78, 0x00,
+ 0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x66, 0x66, 0x3c, 0x00,
+ 0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0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c, 0xf8, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x7c, 0xc6, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0x60, 0xe6, 0xfc,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x7e, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18,
+ 0x18, 0x00, 0x00, 0x00,
+ 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6,
+ 0x7c, 0x00, 0x00, 0x00,
+ 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0x82, 0x9a, 0xa2, 0xa2, 0xa2, 0x9a, 0x82, 0x7c, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x06, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0x82, 0xb2, 0xaa, 0xb2, 0xaa, 0xaa, 0x82, 0x7c, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x7e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x3c, 0x66, 0x0c, 0x18, 0x32, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x7c, 0x06, 0x3c, 0x06, 0x06, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c,
+ 0x60, 0x60, 0xc0, 0x00,
+ 0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b, 0x1b,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18,
+ 0x0c, 0x78, 0x00, 0x00,
+ 0x00, 0x18, 0x38, 0x18, 0x18, 0x18, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x7c, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xd8, 0x6c, 0x36, 0x6c, 0xd8, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0xe0, 0x62, 0x66, 0x6c, 0x18, 0x30, 0x66, 0xce, 0x9a, 0x3f,
+ 0x06, 0x06, 0x00, 0x00,
+ 0x00, 0x60, 0xe0, 0x62, 0x66, 0x6c, 0x18, 0x30, 0x60, 0xdc, 0x86, 0x0c,
+ 0x18, 0x3e, 0x00, 0x00,
+ 0x00, 0xe0, 0x30, 0x62, 0x36, 0xec, 0x18, 0x30, 0x66, 0xce, 0x9a, 0x3f,
+ 0x06, 0x06, 0x00, 0x00,
+ 0x00, 0x00, 0x30, 0x30, 0x00, 0x30, 0x30, 0x60, 0xc0, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0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x60, 0x30, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0c, 0x18, 0x30, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x18, 0x3c, 0x66, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x66, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x34, 0x18, 0x2c, 0x06, 0x3e, 0x66, 0x66, 0x66, 0x66, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x76, 0xdc, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x30, 0x18, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x18, 0x30, 0x60, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x10, 0x38, 0x6c, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x76, 0xdc, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xc6, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xce, 0xde, 0xf6, 0xe6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x60, 0x30, 0x18, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x18, 0x30, 0x60, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x30, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0c, 0x18, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e,
+ 0x06, 0x0c, 0xf8, 0x00,
+ 0x00, 0x00, 0xe0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c,
+ 0x60, 0x60, 0xf0, 0x00,
+ 0x00, 0x00, 0xc6, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e,
+ 0x06, 0x0c, 0x78, 0x00,
+
+};
+
+CONST unsigned char xfont14il1[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x7e,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3,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0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x6c, 0xfe, 0x6c, 0x28, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x00, 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x66, 0x66, 0x66, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c,
+ 0x00, 0x00,
+ 0x00, 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x86, 0xc6, 0x7c,
+ 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 0x30, 0x66, 0xc6,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00,
+ 0x00, 0x18, 0x18, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18,
+ 0x30, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xd6, 0xc6, 0xc6, 0x6c, 0x38,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0xfe,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x0c, 0x1e,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xfe, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x0c, 0x78,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x18, 0x0c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0x0c, 0x18, 0x18, 0x00, 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xde, 0xde, 0xde, 0xdc, 0xc0, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xfc, 0x66, 0x66, 0x66, 0x7c, 0x66, 0x66, 0x66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x66, 0x66, 0x66, 0xe6,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x66,
+ 0x66, 0x3c,
+ 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x6c, 0x66, 0xe6,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x7c, 0x60,
+ 0x60, 0xf0,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0x7c, 0x0c,
+ 0x0c, 0x1e,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0xf0,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x70, 0x1c, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x36, 0x1c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0x6c, 0x38, 0x10,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xfe, 0x6c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x6c, 0xc6,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06,
+ 0x0c, 0x78,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x66, 0xfe,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x0e,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x70,
+ 0x00, 0x00,
+ 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x18, 0x18, 0x3c, 0x3c, 0x3c, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x7c, 0xc6, 0xc0, 0xc0, 0xc6, 0x7c, 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x6c, 0x64, 0x60, 0xf0, 0x60, 0x60, 0x60, 0xe6, 0xfc,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x7e, 0x18, 0x18,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18,
+ 0x18, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c,
+ 0xc6, 0x7c,
+ 0x00, 0xc6, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x44, 0x9a, 0xa2, 0xa2, 0xa2, 0x9a, 0x44, 0x38,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x6c, 0x6c, 0x3e, 0x00, 0x7e, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x6c, 0xd8, 0x6c, 0x36, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x06, 0x06, 0x06, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x38, 0x44, 0xba, 0xaa, 0xb2, 0xaa, 0xaa, 0x44, 0x38,
+ 0x00, 0x00,
+ 0x00, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00, 0x7e,
+ 0x00, 0x00,
+ 0x00, 0x3c, 0x66, 0x0c, 0x18, 0x32, 0x7e, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x78, 0x0c, 0x38, 0x0c, 0x0c, 0x78, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c,
+ 0x60, 0xc0,
+ 0x00, 0x00, 0x00, 0x7f, 0xdb, 0xdb, 0xdb, 0x7b, 0x1b, 0x1b, 0x1b, 0x1b,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0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x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x00, 0x7e, 0x00, 0x18, 0x00, 0x00,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xce, 0xde, 0xf6, 0xe6, 0x7c,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x60, 0x30, 0x18, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x18, 0x30, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x30, 0x78, 0xcc, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0xcc, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x18, 0x30, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06,
+ 0x0c, 0xf8,
+ 0x00, 0x00, 0x00, 0xe0, 0x60, 0x60, 0x7c, 0x66, 0x66, 0x66, 0x66, 0x7c,
+ 0x60, 0xf0,
+ 0x00, 0x00, 0x00, 0xc6, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e, 0x06,
+ 0x0c, 0x78,
+};
diff --git a/src/filter/font2.c b/src/filter/font2.c
new file mode 100644
index 0000000..ed57f50
--- /dev/null
+++ b/src/filter/font2.c
@@ -0,0 +1,35 @@
+#include "xfont16.c"
+
+// Doubles the xfont16 font for a bigger output of font (xfont32)
+// By Zoltan Kovacs <kovzol@particio.com>, 2006-04-25
+
+// Compile it with "gcc -o font2 font2.c" and then run it with
+// "./font2 > xfont32.c; indent xfont32.c".
+
+main()
+{
+ int a, b, i, j, k;
+ printf("#include <config.h>\nCONST unsigned char xfont32[] = {\n");
+
+ for (i = 0; i < 256; ++i) // 256 characters
+ {
+ for (j = 0; j < 16; ++j) // 16 lines vertically
+ {
+ a = xfont16[i * 16 + j]; // 8 bits of graphics read
+ b = 0; // this will be the output
+ for (k = 0; k < 8; ++k) {
+ b /= 4;
+ if (a % 2 == 1) // if the most right bit is set
+ b += 49152; // the the output will be also set, twice
+ a /= 2;
+ }
+ printf("0x%x, 0x%x, 0x%x, 0x%x", (b / 256), (b % 256),
+ (b / 256), (b % 256));
+ if (!(i == 255 && j == 15))
+ printf(", ");
+ } // end of character
+ printf("\n");
+ }
+ printf("};\n");
+
+}
diff --git a/src/filter/font23.c b/src/filter/font23.c
new file mode 100644
index 0000000..1477b70
--- /dev/null
+++ b/src/filter/font23.c
@@ -0,0 +1,36 @@
+#include "xfont16.c"
+
+// Doubles the xfont16 font for a bigger output of font (xfont48)
+// By Zoltan Kovacs <kovzol@particio.com>, 2006-04-25
+
+// Compile it with "gcc -o font23 font23.c" and then run it with
+// "./font23 > xfont48.c; indent xfont48.c".
+
+main()
+{
+ int a, b, i, j, k;
+ printf("#include <config.h>\nCONST unsigned char xfont48[] = {\n");
+
+ for (i = 0; i < 256; ++i) // 256 characters
+ {
+ for (j = 0; j < 16; ++j) // 16 lines vertically
+ {
+ a = xfont16[i * 16 + j]; // 8 bits of graphics read
+ b = 0; // this will be the output
+ for (k = 0; k < 8; ++k) {
+ b /= 4;
+ if (a % 2 == 1) // if the most right bit is set
+ b += 49152; // the the output will be also set, twice
+ a /= 2;
+ }
+ printf("0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x",
+ (b / 256), (b % 256), (b / 256),
+ (b % 256), (b / 256), (b % 256));
+ if (!(i == 255 && j == 15))
+ printf(", ");
+ } // end of character
+ printf("\n");
+ }
+ printf("};\n");
+
+}
diff --git a/src/filter/font3.c b/src/filter/font3.c
new file mode 100644
index 0000000..c1b6b05
--- /dev/null
+++ b/src/filter/font3.c
@@ -0,0 +1,41 @@
+#include "xfont16.c"
+
+// Doubles the xfont16 font for a bigger output of font (xfont48)
+// By Zoltan Kovacs <kovzol@particio.com>, 2006-04-25
+
+// Compile it with "gcc -o font3 font3.c" and then run it with
+// "./font3 > xfont48.c; indent xfont48.c".
+
+// Currently disabled, because XaoS does not support 24 bit width
+// fonts yet. :-(
+
+main()
+{
+ long a, b, i, j, k;
+ printf("#include <config.h>\nCONST unsigned char xfont48[] = {\n");
+
+ for (i = 0; i < 256; ++i) // 256 characters
+ {
+ for (j = 0; j < 16; ++j) // 16 lines vertically
+ {
+ a = xfont16[i * 16 + j]; // 8 bits of graphics read
+ b = 0; // this will be the output
+ for (k = 0; k < 8; ++k) {
+ b /= 8;
+ if (a % 2 == 1) // if the most right bit is set
+ b += (57344 * 256); // the the output will be also set, twice
+ a /= 2;
+ }
+ printf("0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x, 0x%x",
+ (b / 65536), ((b & 65535) / 256), (b % 256),
+ (b / 65536), ((b & 65535) / 256), (b % 256),
+ (b / 65536), ((b & 65535) / 256), (b % 256));
+
+ if (!(i == 255 && j == 15))
+ printf(", ");
+ } // end of character
+ printf("\n");
+ }
+ printf("};\n");
+
+}
diff --git a/src/filter/grlib.c b/src/filter/grlib.c
new file mode 100644
index 0000000..74692d4
--- /dev/null
+++ b/src/filter/grlib.c
@@ -0,0 +1,995 @@
+#include <config.h>
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#else
+#include <stdlib.h>
+#include <string.h>
+#endif
+#ifdef HAVE_GETTEXT
+#include <iconv.h>
+#endif
+#include <archaccel.h>
+
+#include <fconfig.h>
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <grlib.h>
+
+#define WIDTH(ch) (currentfont->width)
+#define RWIDTH(ch) (currentfont->realwidth)
+#define HEIGHT (currentfont->height)
+#define DATA currentfont->data
+
+extern CONST unsigned char xfont8[];
+extern CONST unsigned char xfont16[];
+extern CONST unsigned char xfont32[];
+extern CONST unsigned char xfont48[];
+extern CONST unsigned char xfont14[];
+extern CONST unsigned char xfont8il1[];
+extern CONST unsigned char xfont16il1[];
+extern CONST unsigned char xfont14il1[];
+unsigned char *aa_chardata;
+unsigned char *aa_colordata;
+int aa_cursorx, aa_cursory;
+static CONST struct xfont *currentfont;
+CONST struct xfont xaafont = {
+ NULL,
+ 2, 1, 2, 2
+};
+
+CONST struct xfont xsmallfont = {
+ xfont14,
+ 8, 14, 8, 2
+};
+
+CONST struct xfont xbigfont = {
+ xfont16,
+ 9, 16, 8, 2
+};
+
+CONST struct xfont xbigfont2 = {
+ xfont32,
+ 18, 32, 16, 2
+};
+
+CONST struct xfont xbigfont3 = {
+ xfont48,
+ 18, 48, 16, 2
+};
+
+CONST struct xfont xsmallfontil1 = {
+ xfont8il1,
+ 8, 8, 8, 1
+};
+
+CONST struct xfont xmedfontil1 = {
+ xfont14il1,
+ 8, 14, 8, 1
+};
+
+CONST struct xfont xbigfontil1 = {
+ xfont16il1,
+ 9, 16, 8, 1
+};
+
+#include <c256.h>
+#define drawchar drawchar8
+#define hline hline8
+#define vline vline8
+#define rectangle rectangle8
+#define savevline savevline8
+#define restorevline restorevline8
+#define line line8
+#define saveline saveline8
+#define restoreline restoreline8
+#include "grlibd.c"
+#include <hicolor.h>
+#define drawchar drawchar16
+#define hline hline16
+#define vline vline16
+#define rectangle rectangle16
+#define savevline savevline16
+#define restorevline restorevline16
+#define line line16
+#define saveline saveline16
+#define restoreline restoreline16
+#include "grlibd.c"
+#include <true24.h>
+#define drawchar drawchar24
+#define hline hline24
+#define vline vline24
+#define rectangle rectangle24
+#define savevline savevline24
+#define restorevline restorevline24
+#define line line24
+#define saveline saveline24
+#define restoreline restoreline24
+#include "grlibd.c"
+#include <truecolor.h>
+#define drawchar drawchar32
+#define hline hline32
+#define vline vline32
+#define rectangle rectangle32
+#define savevline savevline32
+#define restorevline restorevline32
+#define line line32
+#define saveline saveline32
+#define restoreline restoreline32
+#include "grlibd.c"
+#ifdef SBITMAPS
+static inline void
+drawchar1(struct image *img, int x, int y, int fgcolor,
+ unsigned char letter)
+{
+ int fontwidth = (RWIDTH(letter) + 7) / 8;
+ CONST unsigned char *bitmap = &DATA[letter * HEIGHT * fontwidth];
+ unsigned char *current;
+ int yend = y + HEIGHT;
+ if (y < 0)
+ bitmap -= y, y = 0;
+ if (yend > img->height)
+ yend = img->height;
+ for (; y < yend; y++) {
+ unsigned int b = *(bitmap++);
+ if (fontwidth == 2) {
+ b <<= 8;
+ b |= *bitmap++;
+ }
+ current = img->currlines[y] + x / 8;
+ b = b << (8 - ((x) & 7));
+#ifdef SLBITMAPS
+ if (img->palette->type & (LBITMAP | LIBITMAP)) {
+ /*Reverse order... */
+ b = ((b >> 1) & 0x5555) | ((b << 1) & 0xaaaa);
+ b = ((b >> 2) & 0x3333) | ((b << 2) & 0xcccc);
+ b = ((b >> 4) & 0x0f0f) | ((b << 4) & 0xf0f0);
+ }
+#endif
+ if (fgcolor) {
+ if (x & 7) {
+ current[1] |= b;
+ current[0] |= b >> 8;
+ } else
+ current[0] |= b >> 8;
+ } else {
+ if (x & 7) {
+ current[1] &= ~b;
+ current[0] &= ~(b >> 8);
+ } else
+ *current &= ~(b >> 8);
+ }
+ }
+}
+
+static void hline1(struct image *img, int x, int y, int l, int color)
+{
+ int x2 = x + l;
+ int c1 = 255;
+ int c2 = 255;
+ unsigned char *current = img->currlines[y] + x / 8;
+ unsigned char *currend = img->currlines[y] + x2 / 8;
+ if (img->palette->type & (LBITMAP | LIBITMAP)) {
+ c2 >>= x2 & 7;
+ c1 <<= 8 - (x & 7);
+ } else {
+ c1 >>= x & 7;
+ c2 <<= 8 - (x2 & 7);
+ }
+ if (current == currend) {
+ if (color)
+ *current |= c1 & c2;
+ else
+ *current &= ~(c1 & c2);
+ } else {
+ if (color) {
+ *current |= c1;
+ *currend |= c2;
+ memset(current + 1, (char) 255, currend - current - 1);
+ } else {
+ *current &= ~c1;
+ *currend &= ~c2;
+ memset(current + 1, 0, currend - current - 1);
+ }
+ }
+}
+
+static void vline1(struct image *img, int x, int y, int l, int color)
+{
+ unsigned char c = 128 >> (x & 7);
+ l += y;
+ x /= 8;
+ if (img->palette->type & (LBITMAP | LIBITMAP)) {
+ c = ((c >> 1) & 0x55) | ((c << 1) & 0xaa);
+ c = ((c >> 2) & 0x33) | ((c << 2) & 0xcc);
+ c = ((c >> 4) & 0x0f) | ((c << 4) & 0xf0);
+ }
+ if (color)
+ while (y <= l) {
+ unsigned char *current = img->currlines[y] + x;
+ *current |= c;
+ y++;
+ } else {
+ c = ~c;
+ while (y <= l) {
+ unsigned char *current = img->currlines[y] + x;
+ *current &= c;
+ y++;
+ }
+ }
+}
+
+static inline void
+rectangle1(struct image *img, int x, int y, int width, int height,
+ int fgcolor)
+{
+ height += y;
+ while (y < height)
+ hline1(img, x, y, width - 1, fgcolor), y++;
+}
+
+static inline void
+line1(struct image *img, int x, int y, int x2, int y2, int color)
+{
+ int dx = x2 - x;
+ int dy = y2 - y;
+ int ady = abs(dy);
+#ifdef SLBITMAPS
+ int type = img->palette->type;
+#endif
+ if (dx < ady) {
+ int plus = (dx << 16) / ady;
+ if (dy < 0) {
+ int dy = (x << 16) | (65536 / 2);
+ ady = y;
+#ifdef SLBITMAPS
+ if (type & (LBITMAP | LIBITMAP))
+ if (!color)
+ while (ady >= y2) {
+ unsigned char *current =
+ img->currlines[ady] + (dy >> 19);
+ *current &= ~(1 << ((dy >> 16) & 7));
+ dy += plus;
+ ady--;
+ } else
+ while (ady >= y2) {
+ unsigned char *current =
+ img->currlines[ady] + (dy >> 19);
+ *current |= (1 << ((dy >> 16) & 7));
+ dy += plus;
+ ady--;
+ } else
+#endif
+ if (!color)
+ while (ady >= y2) {
+ unsigned char *current =
+ img->currlines[ady] + (dy >> 19);
+ *current &= ~(128 >> ((dy >> 16) & 7));
+ dy += plus;
+ ady--;
+ } else
+ while (ady >= y2) {
+ unsigned char *current =
+ img->currlines[ady] + (dy >> 19);
+ *current |= (128 >> ((dy >> 16) & 7));
+ dy += plus;
+ ady--;
+ }
+ } else {
+ int dy = (x << 16) | (65536 / 2);
+ ady = y;
+#ifdef SLBITMAPS
+ if (type & (LBITMAP | LIBITMAP))
+ if (!color)
+ while (ady <= y2) {
+ unsigned char *current =
+ img->currlines[ady] + (dy >> 19);
+ *current &= ~(1 << ((dy >> 16) & 7));
+ dy += plus;
+ ady++;
+ } else
+ while (ady <= y2) {
+ unsigned char *current =
+ img->currlines[ady] + (dy >> 19);
+ *current |= (1 << ((dy >> 16) & 7));
+ dy += plus;
+ ady++;
+ } else
+#endif
+ if (!color)
+ while (ady <= y2) {
+ unsigned char *current =
+ img->currlines[ady] + (dy >> 19);
+ *current &= ~(128 >> ((dy >> 16) & 7));
+ dy += plus;
+ ady++;
+ } else
+ while (ady <= y2) {
+ unsigned char *current =
+ img->currlines[ady] + (dy >> 19);
+ *current |= (128 >> ((dy >> 16) & 7));
+ dy += plus;
+ ady++;
+ }
+ }
+ } else {
+ int plus = (dy << 16) / dx;
+ ady = x;
+ dy = (y << 16) | (65536 / 2);
+#ifdef SLBITMAPS
+ if (type & (LBITMAP | LIBITMAP))
+ if (!color)
+ while (ady <= x2) {
+ unsigned char *current =
+ img->currlines[dy >> 16] + (ady >> 3);
+ *current &= ~(1 << (ady & 7));
+ dy += plus;
+ ady++;
+ } else
+ while (ady <= x2) {
+ unsigned char *current =
+ img->currlines[dy >> 16] + (ady >> 3);
+ *current |= (1 << (ady & 7));
+ dy += plus;
+ ady++;
+ } else
+#endif
+ if (!color)
+ while (ady <= x2) {
+ unsigned char *current =
+ img->currlines[dy >> 16] + (ady >> 3);
+ *current &= ~(128 >> (ady & 7));
+ dy += plus;
+ ady++;
+ } else
+ while (ady <= x2) {
+ unsigned char *current =
+ img->currlines[dy >> 16] + (ady >> 3);
+ *current |= (128 >> (ady & 7));
+ dy += plus;
+ ady++;
+ }
+ }
+ return;
+}
+#endif
+
+static int skip(CONST char *text)
+{
+ int i = 0;
+ while (*text && *text != '\n')
+ i++, text++;
+ return (i);
+}
+
+#ifdef HAVE_GETTEXT
+int
+xiconv(int encoding, char *out, int *outlen, const char *in, int *inlen)
+{
+ /*
+ * Since the built-in text system only supports Latin-1 and Lqtin-2
+ * encodings, we must convert strings from the user's native encoding to
+ * either Latin-1 or Latin-2 encoding as appropriate for the selected
+ * language before passing them into the built-in text system. This
+ * function wraps the gnu iconv library for this purpose.
+ */
+
+ iconv_t cd;
+ char tocode[16];
+ size_t icv_inlen = *inlen, icv_outlen = *outlen;
+ const char *icv_in = (const char *) in;
+ char *icv_out = (char *) out;
+ int ret;
+
+ sprintf(tocode, "ISO-8859-%d", encoding);
+ cd = iconv_open(tocode, "UTF-8");
+ if (cd == (iconv_t) (-1))
+ return -1;
+
+ ret = iconv(cd, &icv_in, &icv_inlen, &icv_out, &icv_outlen);
+
+ if (in != NULL) {
+ *inlen -= icv_inlen;
+ *outlen -= icv_outlen;
+ out[*outlen] = '\0';
+ } else {
+ *inlen = 0;
+ *outlen = 0;
+ }
+
+ if (icv_inlen != 0 || ret == (size_t) - 1)
+ return -1;
+
+ ret = iconv_close(cd);
+
+ if (ret == -1)
+ return -1;
+
+ return 0;
+}
+#endif
+
+#ifndef PLATFORM_TEXT_RENDERING
+
+int
+xprint(struct image *image, CONST struct xfont *current, int x, int y,
+ CONST char *text, int fgcolor, int bgcolor, int mode)
+{
+ int i = 0;
+ int aacolor = 0;
+ char intext[BUFSIZ];
+ int inlen = strlen(text);
+ char outtext[BUFSIZ];
+ int outlen = BUFSIZ;
+ strncpy(intext, text, BUFSIZ);
+
+#ifdef HAVE_GETTEXT
+ if (current->encoding
+ && xiconv(current->encoding, outtext, &outlen, intext, &inlen) == 0)
+ text = outtext;
+#endif
+ if (!text[0])
+ return 0;
+ /*Do some clipping */
+ currentfont = current;
+ if (x + WIDTH(*text) > image->width)
+ return skip(text);
+ if (y + HEIGHT <= 0)
+ return skip(text);
+ if (y >= image->height)
+ return skip(text);
+ while (x < 0 && *text && *text != '\n')
+ text++, x += WIDTH(*text), i++;
+ if (x < 0)
+ return (skip(text) + i);
+
+ if (image->flags & AAIMAGE) {
+ aacolor = 0; /*normal */
+ if ((unsigned int) fgcolor == image->palette->index[2])
+ aacolor = 2;
+ if ((unsigned int) fgcolor == image->palette->index[0])
+ aacolor = 5; /*special */
+ }
+ /*Draw text visible letters */
+ while (x + WIDTH(*text) < image->width && *text && *text != '\n') {
+ if (image->flags & AAIMAGE) {
+ aa_colordata[x / 2 + y / 2 * (image->width / 2)] = aacolor;
+ aa_chardata[x / 2 + y / 2 * (image->width / 2)] = *text;
+ } else
+ switch (image->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ if (mode == TEXT_PRESSED) {
+ drawchar1(image, x + 1, y + 1, fgcolor, *text);
+ } else {
+ drawchar1(image, x + 1, y + 1, bgcolor, *text);
+ drawchar1(image, x, y, fgcolor, *text);
+ }
+ break;
+#endif
+ case 1:
+ if (mode == TEXT_PRESSED) {
+ drawchar8(image, x + 1, y + 1, fgcolor, *text);
+ } else {
+ drawchar8(image, x + 1, y + 1, bgcolor, *text);
+ drawchar8(image, x, y, fgcolor, *text);
+ }
+ break;
+#ifdef SUPPORT16
+ case 2:
+ if (mode == TEXT_PRESSED) {
+ drawchar16(image, x + 1, y + 1, fgcolor, *text);
+ } else {
+ drawchar16(image, x + 1, y + 1, bgcolor, *text);
+ drawchar16(image, x, y, fgcolor, *text);
+ }
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ if (mode == TEXT_PRESSED) {
+ drawchar24(image, x + 1, y + 1, fgcolor, *text);
+ } else {
+ drawchar24(image, x + 1, y + 1, bgcolor, *text);
+ drawchar24(image, x, y, fgcolor, *text);
+ }
+ break;
+#endif
+ case 4:
+ if (mode == TEXT_PRESSED) {
+ drawchar32(image, x + 1, y + 1, fgcolor, *text);
+ } else {
+ drawchar32(image, x + 1, y + 1, bgcolor, *text);
+ drawchar32(image, x, y, fgcolor, *text);
+ }
+ break;
+ }
+ x += WIDTH(*text);
+ text++;
+ i++;
+ }
+ /*
+ * We need to return the number of bytes used from the string that is
+ * passed into the function; not the number of characters displayed. The
+ * number of bytes and the number of characters is not always the same in
+ * UTF-8 encoding. So I changed this to count the number of bytes to
+ * the next newline or nul in the original string that was passed in.
+ */
+ /* return i + skip(text); */
+ return skip(intext);
+}
+
+int xtextwidth(CONST struct xfont *font, CONST char *text)
+{
+ int i;
+#ifdef HAVE_GETTEXT
+ char intext[BUFSIZ];
+ int inlen = strlen(text);
+ char outtext[BUFSIZ];
+ int outlen = BUFSIZ;
+
+ strncpy(intext, text, BUFSIZ);
+ if (font->encoding
+ && xiconv(font->encoding, outtext, &outlen, intext, &inlen) == 0)
+ text = outtext;
+#endif
+ for (i = 0; text[i] && text[i] != '\n'; i++);
+ if (font->width == 2)
+ return (i * font->width);
+ return (i * font->width + 1);
+}
+
+int xtextheight(CONST struct xfont *font)
+{
+ return font->height+1;
+}
+
+int xtextcharw(CONST struct xfont *font, CONST char c)
+{
+ return font->width;
+}
+
+#endif
+
+void xhline(struct image *image, int x, int y, int width, int fgcolor)
+{
+ /*Do some clipping */
+ if (x + width < 0 || y < 0 || y >= image->height || x >= image->width)
+ return;
+ if (x + width >= image->width - 1)
+ width = image->width - x - 2;
+ if (x < 0)
+ width += x, x = 0;
+ if (width < 0)
+ return;
+ switch (image->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ hline1(image, x, y, width, fgcolor);
+ break;
+#endif
+ case 1:
+ hline8(image, x, y, width, fgcolor);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ hline16(image, x, y, width, fgcolor);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ hline24(image, x, y, width, fgcolor);
+ break;
+#endif
+ case 4:
+ hline32(image, x, y, width, fgcolor);
+ break;
+ }
+}
+
+void xvline(struct image *image, int x, int y, int height, int fgcolor)
+{
+ /*Do some clipping */
+ if (x < 0 || y + height < 0 || y >= image->height || x >= image->width)
+ return;
+ if (y + height >= image->height - 1)
+ height = image->height - y - 2;
+ if (y < 0)
+ height += y, y = 0;
+ if (height < 0)
+ return;
+ switch (image->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ vline1(image, x, y, height, fgcolor);
+ break;
+#endif
+ case 1:
+ vline8(image, x, y, height, fgcolor);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ vline16(image, x, y, height, fgcolor);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ vline24(image, x, y, height, fgcolor);
+ break;
+#endif
+ case 4:
+ vline32(image, x, y, height, fgcolor);
+ break;
+ }
+}
+
+void
+xrectangle(struct image *image, int x, int y, int width, int height,
+ int fgcolor)
+{
+ /*Do some clipping */
+ if (x + width < 0 || y + height < 0 || y >= image->height
+ || x >= image->width)
+ return;
+ if (x + width >= image->width)
+ width = image->width - x;
+ if (x < 0)
+ width += x, x = 0;
+ if (width < 0)
+ return;
+ if (y + height >= image->height)
+ height = image->height - y;
+ if (y < 0)
+ height += y, y = 0;
+ if (height < 0)
+ return;
+ if (image->flags & AAIMAGE) {
+ int x1, y1;
+ for (x1 = x / 2; x1 < (x + width) / 2; x1++)
+ for (y1 = y / 2; y1 < (y + height) / 2; y1++)
+ aa_colordata[x1 + y1 * image->width / 2] = 255;
+ }
+ switch (image->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ rectangle1(image, x, y, width, height, fgcolor);
+ break;
+#endif
+ case 1:
+ rectangle8(image, x, y, width, height, fgcolor);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ rectangle16(image, x, y, width, height, fgcolor);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ rectangle24(image, x, y, width, height, fgcolor);
+ break;
+#endif
+ case 4:
+ rectangle32(image, x, y, width, height, fgcolor);
+ break;
+ }
+}
+
+static inline char *savehline(struct image *i, int x1, int y, int x2)
+{
+ int start, end;
+ char *c;
+ if (!i->bytesperpixel)
+ start = (x1) / 8, end = (x2 + 1 + 7) / 8;
+ else
+ start = x1 * i->bytesperpixel, end = (x2 + 1) * i->bytesperpixel;
+ c = (char *) malloc(end - start);
+ if (c == NULL)
+ return NULL;
+ memcpy(c, i->currlines[y] + start, end - start);
+ return c;
+}
+
+static inline void
+restorehline(struct image *i, char *c, int x1, int y, int x2)
+{
+ int start, end;
+ if (!i->bytesperpixel)
+ start = (x1) / 8, end = (x2 + 1 + 7) / 8;
+ else
+ start = x1 * i->bytesperpixel, end = (x2 + 1) * i->bytesperpixel;
+ memcpy(i->currlines[y] + start, c, end - start);
+}
+
+#define __clipx1 0
+#define __clipy1 0
+#define __clipx2 (img->width-2)
+#define __clipy2 (img->height-2)
+static inline int regioncode(struct image *img, const int x, const int y)
+{
+ int dx1, dx2, dy1, dy2;
+ int result;
+ result = 0;
+ dy2 = __clipy2 - y;
+ if (dy2 < 0)
+ result++;
+ result <<= 1;
+ dy1 = y - __clipy1;
+ if (dy1 < 0)
+ result++;
+ result <<= 1;
+ dx2 = __clipx2 - x;
+ if (dx2 < 0)
+ result++;
+ result <<= 1;
+ dx1 = x - __clipx1;
+ if (dx1 < 0)
+ result++;
+ return result;
+}
+
+#define swap(x, y) { int temp = x; x = y; y = temp; }
+#define doclip(ret) \
+ for (;;) \
+ { \
+ int r1 = regioncode (img, x1, y1); \
+ int r2 = regioncode (img, x2, y2); \
+ if (!(r1 | r2)) \
+ break; /* completely inside */ \
+ if (r1 & r2) \
+ ret; /* completely outside */ \
+ if (r1 == 0) \
+ { \
+ swap (x1, x2); /* make sure first */ \
+ swap (y1, y2); /* point is outside */ \
+ r1 = r2; \
+ } \
+ if (r1 & 1) \
+ { /* left */ \
+ y1 += (long) (__clipx1 - x1) * (long) (y2 - y1) / (long) (x2 - x1); \
+ x1 = __clipx1; \
+ } \
+ else if (r1 & 2) \
+ { /* right */ \
+ y1 += (long) (__clipx2 - x1) * (long) (y2 - y1) / (long) (x2 - x1); \
+ x1 = __clipx2; \
+ } \
+ else if (r1 & 4) \
+ { /* top */ \
+ x1 += (long) (__clipy1 - y1) * (long) (x2 - x1) / (long) (y2 - y1); \
+ y1 = __clipy1; \
+ } \
+ else if (r1 & 8) \
+ { /* bottom */ \
+ x1 += (long) (__clipy2 - y1) * (long) (x2 - x1) / (long) (y2 - y1); \
+ y1 = __clipy2; \
+ } \
+ } \
+ if(x2<x1) { \
+ swap(x1,x2); \
+ swap(y1,y2); \
+ }
+
+void xline(struct image *img, int x1, int y1, int x2, int y2, int color)
+{
+ doclip(return);
+ if (x1 == x2) {
+ if (y2 < y1) {
+ swap(y1, y2);
+ }
+ switch (img->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ vline1(img, x1, y1, y2 - y1, color);
+ break;
+#endif
+ case 1:
+ vline8(img, x1, y1, y2 - y1, color);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ vline16(img, x1, y1, y2 - y1, color);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ vline24(img, x1, y1, y2 - y1, color);
+ break;
+#endif
+ case 4:
+ vline32(img, x1, y1, y2 - y1, color);
+ break;
+ }
+ } else if (y1 == y2) {
+ switch (img->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ hline1(img, x1, y1, x2 - x1, color);
+ break;
+#endif
+ case 1:
+ hline8(img, x1, y1, x2 - x1, color);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ hline16(img, x1, y1, x2 - x1, color);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ hline24(img, x1, y1, x2 - x1, color);
+ break;
+#endif
+ case 4:
+ hline32(img, x1, y1, x2 - x1, color);
+ break;
+ }
+ } else {
+ switch (img->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ line1(img, x1, y1, x2, y2, color);
+ break;
+#endif
+ case 1:
+ line8(img, x1, y1, x2, y2, color);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ line16(img, x1, y1, x2, y2, color);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ line24(img, x1, y1, x2, y2, color);
+ break;
+#endif
+ case 4:
+ line32(img, x1, y1, x2, y2, color);
+ break;
+ }
+ }
+}
+
+char *xsaveline(struct image *img, int x1, int y1, int x2, int y2)
+{
+ doclip(return (NULL));
+ if (y1 == y2) {
+ return (savehline(img, x1, y1, x2));
+ } else if (x1 == x2) {
+ if (y2 < y1) {
+ swap(y1, y2);
+ }
+ switch (img->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ return (savevline8(img, x1 / 8, y1, y2 - y1));
+#endif
+ case 1:
+ return (savevline8(img, x1, y1, y2 - y1));
+#ifdef SUPPORT16
+ case 2:
+ return (savevline16(img, x1, y1, y2 - y1));
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ return (savevline24(img, x1, y1, y2 - y1));
+#endif
+ case 4:
+ return (savevline32(img, x1, y1, y2 - y1));
+ }
+ } else {
+ switch (img->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ if (x2 > img->height - 15)
+ x2 = img->height - 15;
+ if (x1 > img->height - 15)
+ x1 = img->height - 15;
+ return (saveline8(img, (x1 / 8), y1, (x2 / 8), y2));
+#endif
+ case 1:
+ return (saveline8(img, x1, y1, x2, y2));
+#ifdef SUPPORT16
+ case 2:
+ return (saveline16(img, x1, y1, x2, y2));
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ return (saveline24(img, x1, y1, x2, y2));
+#endif
+ case 4:
+ return (saveline32(img, x1, y1, x2, y2));
+ }
+ }
+ return NULL;
+}
+
+void xprepareimage(struct image *img)
+{
+ if (img->flags & AAIMAGE) {
+ memset(aa_colordata, (char) 255, img->width * img->height / 4);
+ }
+ aa_cursorx = -1;
+ aa_cursory = -1;
+}
+
+void xdrawcursor(struct image *img, int x, int y, int color, int height)
+{
+ if (img->flags & AAIMAGE) {
+ aa_cursorx = x / 2;
+ aa_cursory = y / 2;
+ } else {
+ xvline(img, x, y, height, color);
+ xhline(img, x - 1, y - 1, 1, color);
+ xhline(img, x + 1, y - 1, 1, color);
+ xhline(img, x - 1, y + height, 1, color);
+ xhline(img, x + 1, y + height, 1, color);
+ }
+}
+
+void
+xrestoreline(struct image *img, char *data, int x1, int y1, int x2, int y2)
+{
+ doclip(return);
+ if (y1 == y2) {
+ restorehline(img, data, x1, y1, x2);
+ return;
+ } else if (x1 == x2) {
+ if (y2 < y1) {
+ swap(y1, y2);
+ }
+ switch (img->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ restorevline8(img, data, x1 / 8, y1, y2 - y1);
+ break;
+#endif
+ case 1:
+ restorevline8(img, data, x1, y1, y2 - y1);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ restorevline16(img, data, x1, y1, y2 - y1);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ restorevline24(img, data, x1, y1, y2 - y1);
+ break;
+#endif
+ case 4:
+ restorevline32(img, data, x1, y1, y2 - y1);
+ break;
+ }
+ } else {
+ switch (img->bytesperpixel) {
+#ifdef SBITMAPS
+ case 0:
+ if (x2 > img->height - 15)
+ x2 = img->height - 15;
+ if (x1 > img->height - 15)
+ x1 = img->height - 15;
+ restoreline8(img, data, x1 / 8, y1, x2 / 8, y2);
+ break;
+#endif
+ case 1:
+ restoreline8(img, data, x1, y1, x2, y2);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ restoreline16(img, data, x1, y1, x2, y2);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ restoreline24(img, data, x1, y1, x2, y2);
+ break;
+#endif
+ case 4:
+ restoreline32(img, data, x1, y1, x2, y2);
+ break;
+ }
+ }
+ return;
+}
diff --git a/src/filter/grlibd.c b/src/filter/grlibd.c
new file mode 100644
index 0000000..bbdeec5
--- /dev/null
+++ b/src/filter/grlibd.c
@@ -0,0 +1,322 @@
+#ifndef UNSUPPORTED
+static inline void
+drawchar(struct image *img, int x, int y, int fgcolor,
+ unsigned char letter)
+{
+ int fontwidth = (RWIDTH(letter) + 7) / 8;
+ CONST unsigned char *bitmap = &DATA[letter * HEIGHT * fontwidth];
+ cpixel_t *current;
+ int yend = y + HEIGHT;
+ if (y < 0)
+ bitmap -= y, y = 0;
+ if (yend > img->height)
+ yend = img->height;
+ for (; y < yend; y++) {
+ int b = *(bitmap++);
+ int i = (1 << (RWIDTH(letter) - 1));
+ if (fontwidth == 2) {
+ b <<= 8;
+ b |= *bitmap++;
+ }
+ current = (cpixel_t *) img->currlines[y];
+ p_inc(current, x);
+ while (i) {
+ if (i & b) {
+ p_set(current, fgcolor);
+ }
+ i >>= 1;
+ p_inc(current, 1);
+ }
+ }
+}
+
+static inline void
+hline(struct image *img, int x, int y, int length, int fgcolor)
+{
+ cpixel_t *current = (cpixel_t *) img->currlines[y], *end =
+ (cpixel_t *) img->currlines[y];
+ p_inc(current, x);
+ p_inc(end, x + length);
+#ifdef bpp1
+ memset(current, fgcolor, end - current + 1);
+#else
+ while (current <= end) {
+ p_set(current, fgcolor);
+ p_inc(current, 1);
+ }
+#endif
+}
+
+static inline void
+vline(struct image *img, int x, int y, int length, int fgcolor)
+{
+ length += y;
+ while (y <= length) {
+ cpixel_t *current = (cpixel_t *) img->currlines[y];
+ p_inc(current, x);
+ p_set(current, fgcolor);
+ y++;
+ }
+}
+
+static inline void
+rectangle(struct image *img, int x, int y, int width, int height,
+ int fgcolor)
+{
+ height += y;
+ while (y < height)
+ hline(img, x, y, width - 1, fgcolor), y++;
+}
+
+static inline char *savevline(struct image *img, int x, int y, int length)
+{
+ cpixel_t *saved = (cpixel_t *) malloc(length * bpp + bpp), *s = saved;
+ length += y;
+ while (y <= length) {
+ cpixel_t *current = (cpixel_t *) img->currlines[y];
+ p_copy(s, 0, current, x);
+ p_inc(s, 1);
+ y++;
+ }
+ return (char *) saved;
+}
+
+static inline void
+restorevline(struct image *img, char *saved, int x, int y, int length)
+{
+ cpixel_t *s = (cpixel_t *) saved;
+ length += y;
+ while (y <= length) {
+ cpixel_t *current = (cpixel_t *) img->currlines[y];
+ p_copy(current, x, s, 0);
+ p_inc(s, 1);
+ y++;
+ }
+}
+
+static inline char *saveline(struct image *img, int x, int y, int x2,
+ int y2)
+{
+ int dx = x2 - x;
+ int dy = y2 - y;
+ int ady = abs(dy);
+ if (dx < ady) {
+ cpixel_t *saved = (cpixel_t *) malloc((ady + 1) * bpp * 2), *s =
+ saved;
+ int plus = (dx << 16) / ady;
+ if (dy < 0) {
+ int dy = (x << 16) /*| (65536 / 2) */ ;
+ ady = y;
+ while (ady >= y2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[ady];
+ p_inc(current, (dy >> 16));
+ p_copy(s, 0, current, 0);
+ p_copy(s, 1, current, 1);
+ p_inc(s, 2);
+ dy += plus;
+ ady--;
+ }
+ } else {
+ int dy = (x << 16) /*| (65536 / 2) */ ;
+ ady = y;
+ while (ady <= y2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[ady];
+ p_inc(current, (dy >> 16));
+ p_copy(s, 0, current, 0);
+ p_copy(s, 1, current, 1);
+ p_inc(s, 2);
+ dy += plus;
+ ady++;
+ }
+ }
+ return ((char *) saved);
+ } else {
+ cpixel_t *saved = (cpixel_t *) malloc((dx + 1) * bpp * 2), *s =
+ saved;
+ int plus = (dy << 16) / dx;
+ ady = x;
+ dy = (y << 16);
+ while (ady <= x2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[dy >> 16];
+ p_copy(s, 0, current, ady);
+ current = (cpixel_t *) img->currlines[(dy >> 16) + 1];
+ p_copy(s, 1, current, ady);
+ p_inc(s, 2);
+ dy += plus;
+ ady++;
+ }
+ return ((char *) saved);
+ }
+}
+
+static inline void
+restoreline(struct image *img, char *saved, int x, int y, int x2, int y2)
+{
+ int dx = x2 - x;
+ int dy = y2 - y;
+ int ady = abs(dy);
+ if (dx < ady) {
+ cpixel_t *s = (cpixel_t *) saved;
+ int plus = (dx << 16) / ady;
+ if (dy < 0) {
+ int dy = (x << 16) /*| (65536 / 2) */ ;
+ ady = y;
+ while (ady >= y2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[ady];
+ p_inc(current, (dy >> 16));
+ p_copy(current, 0, s, 0);
+ p_copy(current, 1, s, 1);
+ p_inc(s, 2);
+ dy += plus;
+ ady--;
+ }
+ } else {
+ int dy = (x << 16) /*| (65536 / 2) */ ;
+ ady = y;
+ while (ady <= y2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[ady];
+ p_inc(current, (dy >> 16));
+ p_copy(current, 0, s, 0);
+ p_copy(current, 1, s, 1);
+ p_inc(s, 2);
+ dy += plus;
+ ady++;
+ }
+ }
+ } else {
+ cpixel_t *s = (cpixel_t *) saved;
+ int plus = (dy << 16) / dx;
+ ady = x;
+ dy = (y << 16);
+ while (ady <= x2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[dy >> 16];
+ p_copy(current, ady, s, 0);
+ current = (cpixel_t *) img->currlines[(dy >> 16) + 1];
+ p_copy(current, ady, s, 1);
+ p_inc(s, 2);
+ dy += plus;
+ ady++;
+ }
+ }
+}
+
+#ifdef bpp1
+#define myinterpol(a,b,n) intergray(a,b,n)
+#else
+#define myinterpol(a,b,n) interpol(a,b,n,rmask,gmask,bmask)
+#endif
+static inline void
+line(struct image *img, int x, int y, int x2, int y2, int color)
+{
+ int dx = x2 - x;
+ int dy = y2 - y;
+ int ady = abs(dy);
+#ifndef bpp1
+ int rmask = img->palette->info.truec.rmask;
+ int gmask = img->palette->info.truec.gmask;
+ int bmask = img->palette->info.truec.bmask;
+#endif
+#ifdef bpp1
+ if (img->palette->type &= (C256 | FIXEDCOLOR)) {
+ if (dx < ady) {
+ int plus = (dx << 16) / ady;
+ if (dy < 0) {
+ int dy = (x << 16) | (65536 / 2);
+ ady = y;
+ while (ady >= y2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[ady];
+ p_inc(current, (dy >> 16));
+ p_set(current, color);
+ dy += plus;
+ ady--;
+ }
+ } else {
+ int dy = (x << 16) | (65536 / 2);
+ ady = y;
+ while (ady <= y2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[ady];
+ p_inc(current, (dy >> 16));
+ p_set(current, color);
+ dy += plus;
+ ady++;
+ }
+ }
+ } else {
+ int plus = (dy << 16) / dx;
+ ady = x;
+ dy = (y << 16) | (65536 / 2);
+ while (ady <= x2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[dy >> 16];
+ p_setp(current, ady, color);
+ dy += plus;
+ ady++;
+ }
+ }
+ return;
+ }
+#endif
+
+ if (dx < ady) {
+ int plus = (dx << 16) / ady;
+ if (dy < 0) {
+ int dy = (x << 16);
+ ady = y;
+ while (ady >= y2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[ady];
+ p_inc(current, (dy >> 16));
+ p_set(current,
+ myinterpol(p_get(current), color,
+ ((dy & 65535) >> 8)));
+ p_setp(current, 1,
+ myinterpol(color, p_getp(current, 1),
+ ((dy & 65535) >> 8)));
+ dy += plus;
+ ady--;
+ }
+ } else {
+ int dy = (x << 16);
+ ady = y;
+ while (ady <= y2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[ady];
+ p_inc(current, (dy >> 16));
+ p_set(current,
+ myinterpol(p_get(current), color,
+ ((dy & 65535) >> 8)));
+ p_setp(current, 1,
+ myinterpol(color, p_getp(current, 1),
+ ((dy & 65535) >> 8)));
+ dy += plus;
+ ady++;
+ }
+ }
+ } else {
+ int plus = (dy << 16) / dx;
+ ady = x;
+ dy = (y << 16);
+ while (ady <= x2) {
+ cpixel_t *current = (cpixel_t *) img->currlines[dy >> 16];
+ p_setp(current, ady,
+ myinterpol(p_getp(current, ady), color,
+ ((dy & 65535) >> 8)));
+ current = (cpixel_t *) img->currlines[(dy >> 16) + 1];
+ p_setp(current, ady,
+ myinterpol(color, p_getp(current, ady),
+ ((dy & 65535) >> 8)));
+ dy += plus;
+ ady++;
+ }
+ }
+}
+
+#undef myinterpol
+#endif
+
+#undef drawchar
+#undef hline
+#undef vline
+#undef rectangle
+#undef line
+#undef restoreline
+#undef saveline
+#undef savevline
+#undef restorevline
diff --git a/src/filter/image.c b/src/filter/image.c
new file mode 100644
index 0000000..1478419
--- /dev/null
+++ b/src/filter/image.c
@@ -0,0 +1,268 @@
+#ifndef _plan9_
+#include <string.h>
+#include <fconfig.h>
+#include <assert.h>
+#ifdef NO_MALLOC_H
+#include <stdlib.h>
+#else
+#include <malloc.h>
+#endif
+#include <stdio.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#include <fconfig.h>
+#endif
+#include <filter.h>
+void flipgeneric(struct image *img)
+{
+ pixel_t **line;
+ assert(img->nimages == 2);
+ img->currimage ^= 1;
+ line = img->currlines;
+ img->currlines = img->oldlines;
+ img->oldlines = line;
+}
+
+int bytesperpixel(int type)
+{
+ switch (type) {
+ case MBITMAP:
+ case LBITMAP:
+ case LIBITMAP:
+ case MIBITMAP:
+ return 0;
+ case SMALLITER:
+ case FIXEDCOLOR:
+ case GRAYSCALE:
+ case C256:
+ return 1;
+ case LARGEITER:
+ case TRUECOLOR16:
+ return 2;
+ case TRUECOLOR24:
+ return 3;
+ case TRUECOLOR:
+ return 4;
+ default:
+ assert(0);
+ return 0;
+ }
+}
+
+struct image *create_image_lines(int width, int height,
+ int nimages, pixel_t ** lines1,
+ pixel_t ** lines2,
+ struct palette *palette,
+ void (*flip) (struct image * img),
+ int flags, float pixelwidth,
+ float pixelheight)
+{
+ int i;
+ static int version = 1;
+ struct image *img = (struct image *) calloc(1, sizeof(*img));
+ if (img == NULL)
+ return NULL;
+ if (flip == NULL)
+ flip = flipgeneric;
+ img->width = width;
+ img->height = height;
+ img->nimages = nimages;
+ img->bytesperpixel = bytesperpixel(palette->type);
+ img->palette = palette;
+ img->currimage = 0;
+ img->flip = flip;
+ img->flags = flags;
+ img->version = version;
+ version += 65535;
+ img->currlines = lines1;
+ img->oldlines = lines2;
+ img->pixelwidth = pixelwidth;
+ img->pixelheight = pixelheight;
+ if (lines1 != NULL && (nimages != 2 || lines2 != NULL)) {
+ img->scanline = (int) (lines1[1] - lines1[0]);
+ if (img->scanline < 0)
+ img->scanline = -1;
+ else {
+ for (i = 0; i < height; i++) {
+ if (lines1[0] - lines1[i] != img->scanline * i) {
+ img->scanline = -1;
+ break;
+ }
+ if (nimages == 2
+ && lines2[0] - lines2[i] != img->scanline * i) {
+ img->scanline = -1;
+ break;
+ }
+ }
+ }
+ } else
+ img->scanline = -1;
+ return (img);
+}
+
+struct image *create_image_cont(int width, int height, int scanlinesize,
+ int nimages, pixel_t * buf1,
+ pixel_t * buf2, struct palette *palette,
+ void (*flip) (struct image * img),
+ int flags, float pixelwidth,
+ float pixelheight)
+{
+ struct image *img =
+ create_image_lines(width, height, nimages, NULL, NULL, palette,
+ flip,
+ flags, pixelwidth, pixelheight);
+ int i;
+ if (img == NULL) {
+ return NULL;
+ }
+ if ((img->currlines =
+ (pixel_t **) malloc(sizeof(*img->currlines) * height)) == NULL) {
+ free(img);
+ return NULL;
+ }
+ if (nimages == 2) {
+ if ((img->oldlines =
+ (pixel_t **) malloc(sizeof(*img->oldlines) * height)) == NULL)
+ {
+ free(img->currlines);
+ free(img);
+ return NULL;
+ }
+ }
+ for (i = 0; i < img->height; i++) {
+ img->currlines[i] = buf1;
+ buf1 += scanlinesize;
+ }
+ if (nimages == 2)
+ for (i = 0; i < img->height; i++) {
+ img->oldlines[i] = buf2;
+ buf2 += scanlinesize;
+ }
+ img->flags |= FREELINES;
+ img->scanline = scanlinesize;
+ return (img);
+}
+
+struct image *create_image_mem(int width, int height, int nimages,
+ struct palette *palette, float pixelwidth,
+ float pixelheight)
+{
+ unsigned char *data =
+ (unsigned char *) calloc(((width + 3) & ~3) * height,
+ bytesperpixel(palette->type));
+ unsigned char *data1 =
+ (unsigned char *) (nimages ==
+ 2 ? calloc(((width + 3) & ~3) * height,
+ bytesperpixel(palette->
+ type)) : NULL);
+ struct image *img;
+ if (data == NULL) {
+#ifdef DEBUG
+ printf("Image:out of memory\n");
+#endif
+ return (NULL);
+ }
+ if (nimages == 2 && data1 == NULL) {
+ free(data);
+#ifdef DEBUG
+ printf("Image:out of memory2\n");
+#endif
+ return NULL;
+ }
+ img =
+ create_image_cont(width, height,
+ ((width +
+ 3) & ~3) * bytesperpixel(palette->type),
+ nimages, data, data1, palette, NULL, 0,
+ pixelwidth, pixelheight);
+ if (img == NULL) {
+ free(data);
+ if (data1 != NULL)
+ free(data1);
+ return NULL;
+ }
+ img->flags |= FREEDATA;
+ return (img);
+}
+
+struct image *create_subimage(struct image *simg, int width, int height,
+ int nimages, struct palette *palette,
+ float pixelwidth, float pixelheight)
+{
+ int size = height * bytesperpixel(palette->type);
+ int i;
+ int shift1 = 0, shift2 = 0;
+ struct image *img;
+ if (size > simg->height * simg->bytesperpixel || height > simg->height
+ || (nimages == 2 && simg->nimages == 1))
+ return (create_image_mem
+ (width, height, nimages, palette, pixelwidth,
+ pixelheight));
+ nimages = simg->nimages;
+ img =
+ create_image_lines(width, height, nimages, NULL, NULL, palette,
+ NULL, 0, pixelwidth, pixelheight);
+ if (img == NULL)
+ return NULL;
+ if ((img->currlines =
+ (pixel_t **) malloc(sizeof(*img->currlines) * height)) == NULL) {
+ free(img);
+ return NULL;
+ }
+ if (nimages == 2) {
+ if ((img->oldlines =
+ (pixel_t **) malloc(sizeof(*img->oldlines) * height)) == NULL)
+ {
+ free(img->currlines);
+ free(img);
+ return NULL;
+ }
+ }
+ shift1 = simg->height - img->height;
+ shift2 =
+ simg->width * simg->bytesperpixel -
+ img->width * img->bytesperpixel;
+ for (i = 0; i < img->height; i++) {
+ img->currlines[i] = simg->currlines[i + shift1] + shift2;
+ }
+ if (nimages == 2)
+ for (i = 0; i < img->height; i++) {
+ img->oldlines[i] = simg->oldlines[i + shift1] + shift2;
+ }
+ img->flags |= FREELINES;
+ img->currimage = simg->currimage;
+ return (img);
+}
+
+void destroy_image(struct image *img)
+{
+ if (img->flags & FREEDATA) {
+ free(*img->currlines);
+ if (img->nimages == 2)
+ free(*img->oldlines);
+ }
+ if (img->flags & FREELINES) {
+ free(img->currlines);
+ if (img->nimages == 2)
+ free(img->oldlines);
+ }
+ free(img);
+}
+
+void clear_image(struct image *img)
+{
+ int i;
+ int color = img->palette->pixels[0];
+ int width = img->width * img->bytesperpixel;
+ if (img->palette->npreallocated)
+ color = img->palette->index[0];
+ if (!width) {
+ width = (img->width + 7) / 8;
+ if (color)
+ color = 255;
+ }
+ for (i = 0; i < img->height; i++)
+ memset(img->currlines[i], color, width);
+}
diff --git a/src/filter/palette.c b/src/filter/palette.c
new file mode 100644
index 0000000..6eae282
--- /dev/null
+++ b/src/filter/palette.c
@@ -0,0 +1,1097 @@
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#else
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+#include <fconfig.h>
+#include <config.h>
+#include <assert.h>
+#include <stdio.h>
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <limits.h>
+#endif
+#include <fconfig.h>
+#include <filter.h>
+#include <misc-f.h>
+#include <xerror.h>
+
+#define nprecells (context->type & (LARGEITER|SMALLITER|TRUECOLOR|TRUECOLOR16|TRUECOLOR24)?0:(context)->ncells)
+#define PREALLOCATED(palette) ((palette)->type & (LARGEITER|SMALLITER|TRUECOLOR|TRUECOLOR16|TRUECOLOR24)?0:(palette)->npreallocated)
+/*emulate allocation routines using setpalette */
+unsigned col_diff[3][512];
+static struct palette *context;
+static int maxentries;
+static int needupdate;
+static void
+genertruecolorinfo(struct truec *t, unsigned int r, unsigned int g,
+ unsigned int b)
+{
+ int n;
+
+ for (n = 0; !((r >> n) & 1); n++);
+ t->rshift = n;
+ for (; ((r >> n) & 1); n++);
+ t->rprec = 8 - (n - t->rshift);
+ t->rmask = r;
+
+ for (n = 0; !((g >> n) & 1); n++);
+ t->gshift = n;
+ for (; ((g >> n) & 1); n++);
+ t->gprec = 8 - (n - t->gshift);
+ t->gmask = g;
+
+ for (n = 0; !((b >> n) & 1); n++);
+ t->bshift = n;
+ for (; ((b >> n) & 1); n++);
+ t->bprec = 8 - (n - t->bshift);
+ t->bmask = b;
+
+ t->allmask = r | g | b;
+ if ((r & b) || (r & g) || (b & g)) {
+ x_fatalerror("Internal error:Invalid color masks 1 %x %x %x!\n", r,
+ g, b);
+ }
+ if ((r < g && g < b) || (b < g && g < r)) {
+ t->mask1 = r | b;
+ t->mask2 = g;
+ } else if ((g < r && r < b) || (b < r && r < g)) {
+ t->mask1 = g | b;
+ t->mask2 = r;
+ } else if ((g < b && b < r) || (r < b && b < g)) {
+ t->mask1 = g | r;
+ t->mask2 = b;
+ }
+ t->byteexact = 0;
+ t->missingbyte = -1;
+ if (!(t->rshift % 8) &&
+ !(t->gshift % 8) &&
+ !(t->bshift % 8) && !t->rprec && !t->gprec && !t->bprec) {
+ t->byteexact = 1;
+ {
+ unsigned char ch[4];
+ *(unsigned int *) ch = t->allmask;
+ if (!ch[0])
+ t->missingbyte = 0;
+ if (!ch[1])
+ t->missingbyte = 1;
+ if (!ch[2])
+ t->missingbyte = 2;
+ if (!ch[3])
+ t->missingbyte = 3;
+ }
+ }
+#ifdef DEBUG
+ printf("Image:\n");
+ printf("rshift:%i gshift:%i bshift:%i\n", t->rshift, t->gshift,
+ t->bshift);
+ printf("rprec:%i gprec:%i bprec:%i\n", t->rprec, t->gprec, t->bprec);
+ printf("rmask:%x gmask:%x bmask:%x\n", t->rmask, t->gmask, t->bmask);
+ printf("mask1:%x mask2:%x allmask:%x\n", t->mask1, t->mask2,
+ t->allmask);
+ printf("byteexact:%x missingbyte:%i\n", t->byteexact, t->missingbyte);
+#endif
+}
+
+void bestfit_init(void)
+{
+ int i;
+
+ for (i = 1; i < 256; i++) {
+ int k = i * i;
+ col_diff[0][i] = col_diff[0][512 - i] = k * (59 * 59) / 256;
+ col_diff[1][i] = col_diff[1][512 - i] = k * (30 * 30) / 256;
+ col_diff[2][i] = col_diff[2][512 - i] = k * (11 * 11) / 256;
+ }
+}
+
+static int
+allocgenerictruecolor(struct palette *palette, int init, int r, int g,
+ int b)
+{
+ unsigned int n;
+ switch (palette->type) {
+ case LARGEITER:
+ case SMALLITER:
+#ifdef _UNDEFINED_
+ if (init)
+ n = 0;
+ else
+ n = palette->size;
+#endif
+ return 1;
+ case TRUECOLOR:
+ case TRUECOLOR16:
+ case TRUECOLOR24:
+ default:
+ n = ((r >> palette->info.truec.rprec) << palette->info.truec.
+ rshift) | ((g >> palette->info.truec.gprec) << palette->info.
+ truec.gshift) | ((b >> palette->info.truec.
+ bprec) << palette->info.truec.
+ bshift);
+ break;
+ }
+ if (init)
+ palette->size = 0;
+ else if (palette->size >= palette->maxentries)
+ return -1;
+ palette->pixels[palette->size] = n;
+ palette->size++;
+ return palette->size;
+}
+
+static int
+allocgeneric(struct palette *palette, int init, int r, int g, int b)
+{
+ int start = palette->npreallocated + palette->start;
+ if (init)
+ palette->size = 0;
+ else if (palette->size >= palette->end - start)
+ return -1;
+ palette->pixels[palette->size] = palette->size + start;
+ palette->rgb[palette->size + start][0] = r;
+ palette->rgb[palette->size + start][1] = g;
+ palette->rgb[palette->size + start][2] = b;
+ palette->size++;
+ return (palette->size - 1);
+}
+
+int fixedalloccolor(struct palette *palette, int init, int r, int g, int b)
+{
+ int i, coldif, lowest, bestfit;
+ if (init)
+ palette->size = 0;
+ else if (palette->size >= palette->maxentries)
+ return -1;
+ lowest = INT_MAX;
+ bestfit = 1;
+ if (palette->type == FIXEDCOLOR || (palette->type & BITMAPS)) {
+ for (i = palette->start; i < palette->end; i++) {
+ coldif = col_diff[0][(g - palette->rgb[i][1]) & 0x1ff];
+ if (coldif < lowest) {
+ coldif += col_diff[1][(r - palette->rgb[i][0]) & 0x1ff];
+ if (coldif < lowest) {
+ coldif +=
+ col_diff[2][(b - palette->rgb[i][2]) & 0x1ff];
+ if (coldif < lowest) {
+ bestfit = i;
+ if (!coldif)
+ break;
+ lowest = coldif;
+ }
+ }
+ }
+ }
+ } else {
+ bestfit =
+ (r * 30 + g * 59 + b * 11) * (palette->end -
+ palette->start) / 256 / 100 +
+ palette->start;
+ }
+ palette->pixels[palette->size] = bestfit;
+ palette->size++;
+ return (palette->size - 1);
+}
+
+static void
+setcolorgeneric(struct palette *palette, int start, int end, rgb_t * rgb)
+{
+}
+
+static void allocfinishedgeneric(struct palette *palette)
+{
+ palette->setpalette(palette, palette->start,
+ palette->size + palette->start +
+ palette->npreallocated,
+ palette->rgb + palette->start);
+}
+
+static void cycle_entries(struct palette *c, int direction)
+{
+ int i;
+ int i1, i2, i3;
+ rgb_t *co;
+ if (direction > 0)
+ direction %= c->size - 1;
+ else
+ direction = -((-direction) % (c->size - 1));
+ if (!direction)
+ return;
+ co = (rgb_t *) malloc(c->end * sizeof(rgb_t));
+ memcpy(co, c->rgb, sizeof(*co) * c->end);
+ i3 = (c->size - 1 + direction) % (c->size - 1) + 1;
+ for (i = 1; i < c->size; i++) {
+ i1 = c->pixels[i];
+ i2 = c->pixels[i3];
+ c->rgb[i1][0] = co[i2][0];
+ c->rgb[i1][1] = co[i2][1];
+ c->rgb[i1][2] = co[i2][2];
+ i3++;
+ if (i3 >= c->size)
+ i3 = 1;
+ }
+ free(co);
+}
+
+static void cyclecolorsgeneric(struct palette *pal, int direction)
+{
+ cycle_entries(pal, direction);
+ pal->setpalette(pal, pal->pixels[0], pal->size + pal->pixels[0],
+ pal->rgb + pal->pixels[0]);
+}
+
+#define TRUECOLORPALETTE 65536
+struct palette *createpalette(int start, int end, int type, int flags,
+ int maxentries,
+ int (*alloccolor) (struct palette * pal,
+ int init, int r, int g,
+ int b),
+ void (*setcolor) (struct palette * pal,
+ int start, int end,
+ rgb_t * rgb),
+ void (*allocfinished) (struct palette * pal),
+ void (*cyclecolors) (struct palette * pal,
+ int direction),
+ union paletteinfo *info)
+{
+ static int versioncount;
+ struct palette *palette =
+ (struct palette *) calloc(1, sizeof(struct palette));
+
+ if (col_diff[0][1] == 0)
+ bestfit_init();
+ palette->ncells = 0;
+ palette->index = NULL;
+ palette->size = 0;
+ palette->rgb = NULL;
+ if (palette == NULL)
+ return NULL;
+
+ switch (type) {
+ case LBITMAP:
+ case MBITMAP:
+ case LIBITMAP:
+ case MIBITMAP:
+ end = 2;
+ start = 0;
+ maxentries = 256;
+ palette->rgb = (rgb_t *) calloc(end, sizeof(*palette->rgb));
+ if (palette->rgb == NULL) {
+ free(palette);
+ return NULL;
+ }
+ if (type & (LIBITMAP | MIBITMAP)) {
+ palette->rgb[0][0] = 255;
+ palette->rgb[0][1] = 255;
+ palette->rgb[0][2] = 255;
+ palette->rgb[1][0] = 0;
+ palette->rgb[1][1] = 0;
+ palette->rgb[1][2] = 0;
+ } else {
+ palette->rgb[0][0] = 0;
+ palette->rgb[0][1] = 0;
+ palette->rgb[0][2] = 0;
+ palette->rgb[1][0] = 255;
+ palette->rgb[1][1] = 255;
+ palette->rgb[1][2] = 255;
+ }
+ palette->maxentries = maxentries;
+ palette->alloccolor = fixedalloccolor;
+ palette->setpalette = NULL;
+ palette->allocfinished = NULL;
+ palette->cyclecolors = NULL;
+ break;
+ case FIXEDCOLOR:
+ if (!end)
+ end = 256;
+ if (!maxentries)
+ maxentries = 256;
+ palette->rgb = (rgb_t *) calloc(end, sizeof(*palette->rgb));
+ if (palette->rgb == NULL) {
+ free(palette);
+ return NULL;
+ }
+ palette->maxentries = maxentries;
+ palette->alloccolor = fixedalloccolor;
+ palette->setpalette = NULL;
+ palette->allocfinished = NULL;
+ palette->cyclecolors = NULL;
+ break;
+ case GRAYSCALE:
+ if (!end)
+ end = 256;
+ if (!maxentries)
+ maxentries = end - start;
+ palette->maxentries = 65536;
+ palette->alloccolor = fixedalloccolor;
+ palette->setpalette = NULL;
+ palette->allocfinished = NULL;
+ palette->cyclecolors = NULL;
+ palette->size = end - start;
+ break;
+ case C256:
+
+ if (!end)
+ end = 256;
+ if (!maxentries)
+ maxentries = end - start;
+ if (cyclecolors == NULL && setcolor != NULL)
+ cyclecolors = cyclecolorsgeneric;
+
+ if (alloccolor == NULL) {
+ alloccolor = allocgeneric, allocfinished =
+ allocfinishedgeneric;
+ if (setcolor == NULL && type == C256) /*non hardware palette */
+ setcolor = setcolorgeneric, cyclecolors =
+ cyclecolorsgeneric;
+ }
+ palette->rgb = (rgb_t *) calloc(end, sizeof(*palette->rgb));
+
+ if (palette->rgb == NULL) {
+ free(palette);
+ return NULL;
+ }
+
+ palette->maxentries = maxentries;
+ palette->alloccolor = alloccolor;
+ palette->setpalette = setcolor;
+ palette->allocfinished = allocfinished;
+ palette->cyclecolors = cyclecolors;
+
+ break;
+ default:
+ end = TRUECOLORPALETTE;
+ start = 0;
+ if (type == SMALLITER)
+ end = 256;
+ start = 0;
+ palette->maxentries = end;
+ palette->alloccolor = allocgenerictruecolor;
+ palette->cyclecolors = NULL;
+ palette->setpalette = NULL;
+ palette->allocfinished = NULL;
+ }
+ {
+ int ee = palette->maxentries;
+ /*if(end>palette->maxentries) ee=end; */
+ if (ee < 256)
+ palette->pixels =
+ (unsigned int *) calloc(256, sizeof(*palette->pixels));
+ else
+ palette->pixels =
+ (unsigned int *) calloc(ee, sizeof(*palette->pixels));
+ }
+ if (palette->pixels == NULL) {
+ free(palette);
+ return NULL;
+ }
+ if (type & (LARGEITER | SMALLITER)) {
+ int i;
+ palette->size = end;
+ palette->flags |= DONOTCHANGE;
+ for (i = 0; i < end; i++)
+ palette->pixels[i] = i;
+ }
+ palette->start = start;
+ palette->end = end;
+ palette->type = type;
+ palette->flags |= flags;
+ palette->version = (versioncount += 65536);
+ if (type == FIXEDCOLOR) {
+ int i;
+ if (setcolor != NULL)
+ setcolor(palette, start, end, palette->rgb);
+ for (i = 0; i < end - start; i++)
+ palette->pixels[i] = i + start;
+ }
+ if (type == GRAYSCALE) {
+ int i;
+ for (i = palette->start; i < end - start; i++)
+ palette->pixels[i] = i + start;
+ }
+ if (info != NULL
+ && (type == TRUECOLOR || type == TRUECOLOR24
+ || type == TRUECOLOR16)) {
+ genertruecolorinfo(&palette->info.truec, info->truec.rmask,
+ info->truec.gmask, info->truec.bmask);
+ } else {
+ if (type == TRUECOLOR)
+ genertruecolorinfo(&palette->info.truec, 255 << 16, 255 << 8,
+ 255);
+ if (type == TRUECOLOR24)
+ genertruecolorinfo(&palette->info.truec, 255 << 16, 255 << 8,
+ 255);
+ if (type == TRUECOLOR16)
+ genertruecolorinfo(&palette->info.truec, (255 >> 3) << 11,
+ (255 >> 2) << 5, (255 >> 3));
+ }
+ return (palette);
+}
+
+void destroypalette(struct palette *palette)
+{
+ free(palette->pixels);
+ if (palette->rgb != NULL)
+ free(palette->rgb);
+ if (palette->index != NULL)
+ free(palette->index);
+ free(palette);
+}
+
+#define MYMIN(x,y) ((x)<(y)?(x):(y))
+struct palette *clonepalette(struct palette *palette)
+{
+ struct palette *pal =
+ createpalette(palette->start, palette->end, palette->type,
+ palette->flags, palette->maxentries,
+ /*palette->alloccolor, palette->setpalette, palette->allocfinished, palette->cyclecolors */
+ NULL, NULL, NULL, NULL, &palette->info);
+ memcpy(pal->pixels, palette->pixels,
+ sizeof(*pal->pixels) * MYMIN(palette->end, pal->end));
+ if (pal->rgb != NULL) {
+ memcpy(pal->rgb, palette->rgb,
+ sizeof(*pal->rgb) * MYMIN(palette->end, pal->end));
+ }
+ pal->size = palette->size;
+ return (pal);
+}
+
+void preallocpalette(struct palette *pal)
+{
+ int i;
+ int p;
+ if (pal->index != NULL)
+ free(pal->index), pal->index = NULL;
+ pal->npreallocated = 0;
+ if (!pal->ncells)
+ return;
+ pal->index = (unsigned int *) malloc(sizeof(int) * (pal->ncells + 1));
+ for (i = 0; i < pal->ncells; i++) {
+ if (!i)
+ p = pal->pixels[0];
+ else
+ p = pal->pixels[pal->size];
+ pal->alloccolor(pal, i == 0, pal->prergb[i][0], pal->prergb[i][1],
+ pal->prergb[i][2]);
+ if (pal->size) {
+ pal->index[i] = pal->pixels[pal->size - 1];
+ pal->pixels[pal->size - 1] = p;
+ }
+ }
+ pal->npreallocated = pal->size;
+ pal->size = 0;
+ needupdate = 0;
+}
+
+void restorepalette(struct palette *dest, struct palette *src)
+{
+ int i;
+ preallocpalette(dest);
+ for (i = 0; i < src->size; i++) {
+ int r = 0, g = 0, b = 0;
+ switch (src->type) {
+ case SMALLITER:
+ r = g = b = i;
+ break;
+ case LARGEITER:
+ r = g = b = i / 256;
+ break;
+ case GRAYSCALE:
+ r = g = b = src->pixels[i];
+ break;
+ case C256:
+ case FIXEDCOLOR:
+ case MBITMAP:
+ case LBITMAP:
+ case MIBITMAP:
+ case LIBITMAP:
+ r = src->rgb[src->pixels[i]][0];
+ g = src->rgb[src->pixels[i]][1];
+ b = src->rgb[src->pixels[i]][2];
+ break;
+ case TRUECOLOR:
+ case TRUECOLOR16:
+ case TRUECOLOR24:
+ r = (((src->pixels[i] & src->info.truec.rmask) >> src->
+ info.truec.rshift)) << src->info.truec.rprec;
+ g = (((src->pixels[i] & src->info.truec.gmask) >> src->
+ info.truec.gshift)) << src->info.truec.gprec;
+ b = (((src->pixels[i] & src->info.truec.bmask) >> src->
+ info.truec.bshift)) << src->info.truec.bprec;
+ break;
+ }
+ if (dest->size >= dest->maxentries - PREALLOCATED(dest))
+ break;
+ if (dest->
+ alloccolor(dest, (i + dest->npreallocated) == 0, r, g,
+ b) == -1)
+ break;
+ }
+ if (!(dest->flags & FINISHLATER)) {
+ if (dest->allocfinished != NULL)
+ dest->allocfinished(dest);
+ } else
+ dest->flags |= UNFINISHED;
+ dest->version++;
+}
+
+/*Generation code for various palettes */
+
+
+#define DEFNSEGMENTS (255/8)
+#define MAXNSEGMENTS (4096)
+#define NSEGMENTS ((255/segmentsize))
+static int segmentsize;
+
+
+static unsigned char colors[MAXNSEGMENTS][3];
+static CONST unsigned char colors1[DEFNSEGMENTS][3] = {
+ /*{8, 14, 32}, */
+ {0, 0, 0},
+ {120, 119, 238},
+ {24, 7, 25},
+ {197, 66, 28},
+ {29, 18, 11},
+ {135, 46, 71},
+ {24, 27, 13},
+ {241, 230, 128},
+ {17, 31, 24},
+ {240, 162, 139},
+ {11, 4, 30},
+ {106, 87, 189},
+ {29, 21, 14},
+ {12, 140, 118},
+ {10, 6, 29},
+ {50, 144, 77},
+ {22, 0, 24},
+ {148, 188, 243},
+ {4, 32, 7},
+ {231, 146, 14},
+ {10, 13, 20},
+ {184, 147, 68},
+ {13, 28, 3},
+ {169, 248, 152},
+ {4, 0, 34},
+ {62, 83, 48},
+ {7, 21, 22},
+ {152, 97, 184},
+ {8, 3, 12},
+ {247, 92, 235},
+ {31, 32, 16}
+};
+
+REGISTERS(3)
+static int allocate(int r, int g, int b, int init)
+{
+ unsigned int n;
+ if (init)
+ preallocpalette(context);
+ n = context->pixels[(init ? 0 : context->size) /*+ context->start */ ];
+ if (!init && context->size == maxentries)
+ return 0;
+ if ((context->alloccolor(context, init
+ && !context->npreallocated, (int) r, (int) g,
+ (int) b)) == -1) {
+ return 0;
+ }
+ if (context->pixels[context->size - 1 /*+ context->start */ ] != n) {
+ needupdate = 1;
+ }
+ return (1);
+}
+
+static int mksmooth(int nsegments, int setsegments)
+{
+ int i, y;
+ float r, g, b, rs, gs, bs;
+ int segmentsize1 = segmentsize;
+
+ for (i = 0; i < setsegments; i++) {
+ if (i == setsegments - 1 && !(context->flags & UNKNOWNENTRIES)) {
+ segmentsize1 = maxentries - context->size - 2;
+ }
+ r = colors[i % nsegments][0];
+ g = colors[i % nsegments][1];
+ b = colors[i % nsegments][2];
+ rs = ((int) colors[(i + 1) % setsegments % nsegments][0] -
+ r) / (unsigned int) segmentsize1;
+ gs = ((int) colors[(i + 1) % setsegments % nsegments][1] -
+ g) / (unsigned int) segmentsize1;
+ bs = ((int) colors[(i + 1) % setsegments % nsegments][2] -
+ b) / (unsigned int) segmentsize1;
+ for (y = 0; y < segmentsize1; y++) {
+ if (!allocate((int) r, (int) g, (int) b, i == 0 && y == 0)) {
+ if (!i)
+ context->size = 2;
+ context->size = i * segmentsize;
+ return 0;
+ }
+ r += rs;
+ g += gs;
+ b += bs;
+ }
+ }
+ if (context->flags & UNKNOWNENTRIES)
+ context->size = i * segmentsize;
+ return 1;
+}
+
+static INLINE void
+hsv_to_rgb(int h, int s, int v,
+ unsigned char *red, unsigned char *green, unsigned char *blue)
+{
+ int hue;
+ int f, p, q, t;
+ h += 256;
+ h %= 256;
+
+ if (s == 0) {
+ *red = v;
+ *green = v;
+ *blue = v;
+ } else {
+ h %= 256;
+ if (h < 0)
+ h += 256;
+ hue = h * 6;
+
+ f = hue & 255;
+ p = v * (256 - s) / 256;
+ q = v * (256 - (s * f) / 256) >> 8;
+ t = v * (256 * 256 - (s * (256 - f))) >> 16;
+
+ switch ((int) (hue / 256)) {
+ case 0:
+ *red = v;
+ *green = t;
+ *blue = p;
+ break;
+ case 1:
+ *red = q;
+ *green = v;
+ *blue = p;
+ break;
+ case 2:
+ *red = p;
+ *green = v;
+ *blue = t;
+ break;
+ case 3:
+ *red = p;
+ *green = q;
+ *blue = v;
+ break;
+ case 4:
+ *red = t;
+ *green = p;
+ *blue = v;
+ break;
+ case 5:
+ *red = v;
+ *green = p;
+ *blue = q;
+ break;
+ }
+ }
+}
+
+static void randomize_segments3(int whitemode, int nsegments)
+{
+ int i = 0;
+ int h, s, v;
+
+ for (i = 0; i < nsegments; i++) {
+ if (!(i % 3)) {
+ if (i % 6)
+ colors[i][0] = 255, colors[i][1] = 255, colors[i][2] = 255;
+ else
+ colors[i][0] = 0, colors[i][1] = 0, colors[i][2] = 0;
+ } else {
+ s = (int) XaoS_random() % 256;
+ h = (int) XaoS_random() % (128 - 32);
+ v = (int) XaoS_random() % 128;
+ if (((i) % 6 > 3) ^ ((i) % 3 == 1))
+ /*if(((i)%3==1)) */
+ h += 42 + 16;
+ else
+ h += 42 + 128 + 16, v += 128 + 64;
+ hsv_to_rgb(h, s, v, colors[i], colors[i] + 1, colors[i] + 2);
+ }
+ }
+ colors[i - 1][0] = colors[0][0];
+ colors[i - 1][1] = colors[0][1];
+ colors[i - 1][2] = colors[0][2];
+}
+
+static void randomize_segments2(int whitemode, int nsegments)
+{
+ int i = 0;
+
+ for (i = 0; i < nsegments; i++) {
+ if (i % 3 == 2)
+ colors[i][0] = whitemode * 255,
+ colors[i][1] = whitemode * 255, colors[i][2] =
+ whitemode * 255;
+ else if (i % 3 == 0)
+ colors[i][0] = (!whitemode) * 255,
+ colors[i][1] = (!whitemode) * 255,
+ colors[i][2] = (!whitemode) * 255;
+ else
+ colors[i][0] = (int) XaoS_random() % 256,
+ colors[i][1] = (int) XaoS_random() % 256,
+ colors[i][2] = (int) XaoS_random() % 256;
+ }
+ colors[i - 1][0] = colors[0][0];
+ colors[i - 1][1] = colors[0][1];
+ colors[i - 1][2] = colors[0][2];
+}
+
+static void randomize_segments(int whitemode, int nsegments)
+{
+ int i = 0;
+ if (whitemode) {
+ colors[0][0] = 255, colors[0][1] = 255, colors[0][2] = 255;
+ for (i = 0; i < nsegments; i += 2) {
+ if (i != 0) {
+ colors[i][0] = (int) XaoS_random() % 256,
+ colors[i][1] = (int) XaoS_random() % 256,
+ colors[i][2] = (int) XaoS_random() % 256;
+ }
+ if (i + 1 < nsegments)
+ colors[i + 1][0] = (int) XaoS_random() % 35,
+ colors[i + 1][1] = (int) XaoS_random() % 35,
+ colors[i + 1][2] = (int) XaoS_random() % 35;
+ }
+ } else {
+ for (i = 0; i < nsegments; i += 2) {
+ colors[i][0] = (int) XaoS_random() % 35,
+ colors[i][1] = (int) XaoS_random() % 35,
+ colors[i][2] = (int) XaoS_random() % 35;
+ if (i + 1 < nsegments)
+ colors[i + 1][0] = (int) XaoS_random() % 256,
+ colors[i + 1][1] = (int) XaoS_random() % 256,
+ colors[i + 1][2] = (int) XaoS_random() % 256;
+ }
+ }
+ colors[i - 1][0] = colors[0][0];
+ colors[i - 1][1] = colors[0][1];
+ colors[i - 1][2] = colors[0][2];
+}
+
+#define MYLONG_MAX 0xffffff
+#define rrandom(i) ((int)(((int)XaoS_random()/(double)MYLONG_MAX)*(i)))
+/*Do not use modulo type random since it should bring very different results
+ *for slightly different sizes
+ */
+
+int mkpalette(struct palette *c, int seed, int algorithm)
+{
+ int i, ncolors = c->size;
+ int whitemode;
+ int i1;
+
+ context = c;
+ needupdate = 0;
+
+ if (c->flags & DONOTCHANGE)
+ return 0;
+ XaoS_srandom(seed);
+ seed = (int) XaoS_random();
+ whitemode = (int) XaoS_random() % 2;
+
+ if ((c->flags & UNKNOWNENTRIES) || !c->size) {
+ maxentries = context->maxentries - nprecells;
+ segmentsize = (rrandom(maxentries / 2)) & (~3);
+ if (segmentsize < 1)
+ segmentsize = 1;
+ } else {
+ if (maxentries > 8) {
+ int qq = 255;
+
+ maxentries = context->maxentries - nprecells;
+ segmentsize = rrandom(qq / 3 + 4);
+ segmentsize += rrandom(qq / 3 + 4);
+ segmentsize += rrandom(qq / 3 + 4);
+ segmentsize += rrandom(qq / 3 + 4); /*Make smaller segments with higher probability */
+
+ segmentsize = abs(segmentsize / 2 - qq / 3 + 3);
+ if (segmentsize < 8)
+ segmentsize = 8;
+ if (segmentsize > maxentries / 3)
+ segmentsize = maxentries / 3;
+ }
+ }
+
+ if (c->flags & UNKNOWNENTRIES)
+ i = rrandom(maxentries);
+ else
+ i = (maxentries + segmentsize - 5) / segmentsize;
+
+ if (i < 0)
+ i = 1;
+ if (i > MAXNSEGMENTS)
+ i1 = MAXNSEGMENTS;
+ else
+ i1 = i;
+
+ XaoS_srandom(seed);
+
+ switch (algorithm) {
+ case 2:
+ randomize_segments3(whitemode, i1);
+ break;
+ case 1:
+ randomize_segments2(whitemode, i1);
+ break;
+ case 0:
+ randomize_segments(whitemode, i1);
+ }
+ mksmooth(i1, i);
+
+ if (!(c->flags & FINISHLATER)) {
+ if (c->allocfinished != NULL)
+ c->allocfinished(c);
+ } else
+ c->flags |= UNFINISHED;
+ if (context->size != ncolors || needupdate) {
+ context->version++;
+ return 1;
+ }
+
+ return 0;
+}
+
+int mkstereogrampalette(struct palette *c)
+{
+ int i, ncolors = c->size;
+ context = c;
+ needupdate = 0;
+ for (i = 0; i < 16; i++)
+ allocate(i * 4, i * 4, i * 16, i == 0);
+ if (!(c->flags & FINISHLATER)) {
+ if (c->allocfinished != NULL)
+ c->allocfinished(c);
+ } else
+ c->flags |= UNFINISHED;
+ if (context->size != ncolors || needupdate) {
+ context->version++;
+ return 1;
+ }
+ return 0;
+}
+
+int mkstarfieldpalette(struct palette *c)
+{
+ int i, ncolors = c->size;
+ context = c;
+ needupdate = 0;
+ for (i = 0; i < 16; i++)
+ if (i % 2)
+ allocate(i * 4, i * 4, i * 16, i == 0);
+ else
+ allocate(i * 16, i * 16, i * 16, i == 0);
+ if (!(c->flags & FINISHLATER)) {
+ if (c->allocfinished != NULL)
+ c->allocfinished(c);
+ } else
+ c->flags |= UNFINISHED;
+ if (context->size != ncolors || needupdate) {
+ context->version++;
+ return 1;
+ }
+ return 0;
+}
+
+int mkblurpalette(struct palette *c)
+{
+ int i, ncolors = c->size;
+ context = c;
+ needupdate = 0;
+ for (i = 0; i < 63; i++)
+ allocate(i * 2, i * 2, i * 4, i == 0);
+ allocate(i * 2, i * 2, i * 4 - 1, 0);
+ if (!(c->flags & FINISHLATER)) {
+ if (c->allocfinished != NULL)
+ c->allocfinished(c);
+ } else
+ c->flags |= UNFINISHED;
+ if (context->size != ncolors || needupdate) {
+ context->version++;
+ return 1;
+ }
+ return 0;
+}
+
+int mkgraypalette(struct palette *c)
+{
+ int i, ncolors = c->size;
+ context = c;
+ needupdate = 0;
+ for (i = 0; i < 64; i++)
+ allocate(i * 4, i * 4, i * 4, i == 0);
+ for (i = 0; i < 16; i++)
+ allocate(255, 255 - i * 16, 255 - i * 16, 0);
+ for (i = 0; i < 16; i++)
+ allocate(255 - i * 16, 0, 0, 0);
+ if (!(c->flags & FINISHLATER)) {
+ if (c->allocfinished != NULL)
+ c->allocfinished(c);
+ } else
+ c->flags |= UNFINISHED;
+ if (context->size != ncolors || needupdate) {
+ context->version++;
+ return 1;
+ }
+ return 0;
+}
+
+int mkdefaultpalette(struct palette *c)
+{
+ int i, ncolors = c->size;
+ context = c;
+ needupdate = 0;
+ segmentsize = 8;
+
+ if (c->flags & DONOTCHANGE)
+ return 0;
+ memcpy(colors, colors1, sizeof(colors1));
+ maxentries = context->maxentries - nprecells;
+ if (c->flags & UNKNOWNENTRIES)
+ i = 128 / 8;
+ else
+ i = (maxentries + 3) / 8;
+ if (i < 0)
+ i = 1;
+ mksmooth(255 / 8, i);
+ if (!(c->flags & FINISHLATER)) {
+ if (c->allocfinished != NULL)
+ c->allocfinished(c);
+ } else
+ c->flags |= UNFINISHED;
+ if (context->size != ncolors || needupdate) {
+ context->version++;
+ return 1;
+ }
+ return 0;
+}
+
+int shiftpalette(struct palette *c, int shift)
+{
+ if (!c->size)
+ return 0;
+
+ while (shift < 0)
+ shift += c->size - 1;
+ shift = shift % (c->size - 1);
+
+ if (!shift)
+ return 0;
+
+ if (c->cyclecolors != NULL) {
+ if (c->flags & UNFINISHED) {
+ cycle_entries(c, shift);
+ } else {
+ c->cyclecolors(c, shift);
+ }
+ return 0;
+ }
+
+ if (c->type & (TRUECOLOR | TRUECOLOR24 | TRUECOLOR16)) {
+ int i;
+ int i3;
+ int *co;
+
+ if (shift > 0)
+ shift %= c->size - 1;
+ else
+ shift = -((-shift) % (c->size - 1));
+ if (!shift)
+ return 0;
+ co = (int *) malloc(c->size * sizeof(*co));
+ memcpy(co, c->pixels, sizeof(*co) * c->size);
+ i3 = (c->size - 1 + shift) % (c->size - 1) + 1;
+ for (i = 1; i < c->size; i++) {
+ c->pixels[i] = co[i3];
+ i3++;
+ if (i3 >= c->size)
+ i3 = 1;
+ }
+ c->version++;
+ free(co);
+ }
+ return 1;
+}
+
+static int allocrgb(struct palette *c, int r1, int g1, int b1)
+{
+ int r, g, b;
+ int f = 1;
+ for (g = 0; g < g1; g++)
+ for (b = 0; b < b1; b++) {
+ for (r = 0; r < r1; r++) {
+ if (!allocate
+ (r * 255 / (r1 - 1), g * 255 / (g1 - 1),
+ b * 255 / (b1 - 1), f))
+ return 0;
+ f = 0;
+ }
+ }
+ return 1;
+}
+
+int mkrgb(struct palette *c)
+{
+ int ncolors = c->size;
+ int red = 8, green = 8, blue = 4;
+
+ context = c;
+ needupdate = 0;
+
+ if (c->flags & UNKNOWNENTRIES) {
+ while (blue > 0) {
+ if (allocrgb(c, red, green, blue))
+ break;
+ red--;
+ if (allocrgb(c, red, green, blue))
+ break;
+ green--;
+ if (allocrgb(c, red, green, blue))
+ break;
+ red--;
+ if (allocrgb(c, red, green, blue))
+ break;
+ green--;
+ if (allocrgb(c, red, green, blue))
+ break;
+ blue--;
+ }
+ } else {
+ number_t n =
+ pow((c->maxentries - nprecells) / (0.5 * 0.2 * 0.3), 1.0 / 3);
+ green = (int) (n * 0.5);
+ blue = (int) (n * 0.2);
+ red = (int) (n * 0.3);
+ while ((blue + 1) * red * green < (c->maxentries - nprecells))
+ blue++;
+ while ((red + 1) * blue * green < (c->maxentries - nprecells))
+ red++;
+ while ((green + 1) * blue * red < (c->maxentries - nprecells))
+ green++;
+ allocrgb(c, red, green, blue);
+ }
+
+ if (!(c->flags & FINISHLATER)) {
+ if (c->allocfinished != NULL)
+ c->allocfinished(c);
+ } else
+ c->flags |= UNFINISHED;
+ if (context->size != ncolors || needupdate) {
+ context->version++;
+ }
+
+ return red * 256 * 256 + green * 256 + blue;
+}
diff --git a/src/filter/random.c b/src/filter/random.c
new file mode 100644
index 0000000..9c14c3c
--- /dev/null
+++ b/src/filter/random.c
@@ -0,0 +1,50 @@
+/*
+ * Copyright (c) 1983 Regents of the University of California.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms are permitted
+ * provided that the above copyright notice and this paragraph are
+ * duplicated in all such forms and that any documentation,
+ * advertising materials, and other materials related to such
+ * distribution and use acknowledge that the software was developed
+ * by the University of California, Berkeley. The name of the
+ * University may not be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
+ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
+ * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+ */
+
+/* The code is taken from GNU C library. Goal is to provide same
+ * random numbers at all platforms to make possible save random
+ * palette just by saving random seed
+ *
+ * Very simplified because I don't need to have numbers "very random"
+ */
+
+/*
+ * This is derived from the Berkeley source:
+ * @(#)random.c 5.5 (Berkeley) 7/6/88
+ * It was reworked for the GNU C Library by Roland McGrath.
+ */
+
+/* Ugly hack because of unknown problems w/ wa_list in v*print* in plan9 */
+#ifdef _plan9_
+#define va_list char *
+#endif
+
+#include <stdio.h>
+#include <config.h>
+#include <misc-f.h>
+static unsigned int state;
+void XaoS_srandom(unsigned int x)
+{
+ state = x;
+}
+
+#define MYLONG_MAX 0xffffff /* this is enough for me */
+long int XaoS_random(void)
+{
+ state = ((state * 1103515245) + 12345) & MYLONG_MAX;
+ return state;
+}
diff --git a/src/filter/xfont16.c b/src/filter/xfont16.c
new file mode 100644
index 0000000..1b56d1d
--- /dev/null
+++ b/src/filter/xfont16.c
@@ -0,0 +1,517 @@
+#ifndef CONST
+#define CONST const
+#endif
+CONST unsigned char xfont16[] = {
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7e, 0x81, 0xa5, 0x81, 0x81, 0xbd, 0x99, 0x81, 0x81, 0x7e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7e, 0xff, 0xdb, 0xff, 0xff, 0xc3, 0xe7, 0xff, 0xff, 0x7e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x6c, 0xfe, 0xfe, 0xfe, 0xfe, 0x7c, 0x38, 0x10,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x7c, 0xfe, 0x7c, 0x38, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0xe7, 0xe7, 0xe7, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x3c, 0x7e, 0xff, 0xff, 0x7e, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xff, 0xe7, 0xc3, 0xc3, 0xe7, 0xff, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x3c, 0x66, 0x42, 0x42, 0x66, 0x3c, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0xff, 0xff, 0xff, 0xff, 0xff, 0xc3, 0x99, 0xbd, 0xbd, 0x99, 0xc3, 0xff,
+ 0xff, 0xff, 0xff, 0xff,
+ 0x00, 0x00, 0x1e, 0x0e, 0x1a, 0x32, 0x78, 0xcc, 0xcc, 0xcc, 0xcc, 0x78,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3c, 0x66, 0x66, 0x66, 0x66, 0x3c, 0x18, 0x7e, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x3e, 0x36, 0x3e, 0x30, 0x30, 0x30, 0x30, 0x70, 0xf0, 0xe0,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7e, 0x66, 0x7e, 0x66, 0x66, 0x66, 0x66, 0x6e, 0xee, 0xec,
+ 0xc0, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x18, 0x18, 0xdb, 0x3c, 0xe7, 0x3c, 0xdb, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x80, 0xc0, 0xe0, 0xf0, 0xf8, 0xfe, 0xf8, 0xf0, 0xe0, 0xc0, 0x80,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x02, 0x06, 0x0e, 0x1e, 0x3e, 0xfe, 0x3e, 0x1e, 0x0e, 0x06, 0x02,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66, 0x00, 0x66, 0x66,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x6c, 0xc6, 0xc6, 0x6c, 0x38, 0x0c, 0xc6,
+ 0x7c, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0xfe, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18, 0x7e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e, 0x3c, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x0c, 0xfe, 0x0c, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x60, 0xfc, 0x60, 0x30, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xfe, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x6c, 0xfe, 0x6c, 0x28, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x38, 0x7c, 0x7c, 0xfe, 0xfe, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xfe, 0xfe, 0x7c, 0x7c, 0x38, 0x38, 0x10, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x3c, 0x3c, 0x3c, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0xc6, 0xc6, 0xc6, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c, 0x6c, 0xfe, 0x6c, 0x6c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0x18, 0x7c, 0xc6, 0xc2, 0xc0, 0x7c, 0x06, 0x06, 0x86, 0xc6, 0x7c,
+ 0x18, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0xc2, 0xc6, 0x0c, 0x18, 0x30, 0x60, 0xc6, 0x86,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x6c, 0x6c, 0x38, 0x76, 0xdc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x30, 0x30, 0x30, 0x60, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x66, 0x3c, 0xff, 0x3c, 0x66, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x7e, 0x18, 0x18, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x18,
+ 0x30, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x02, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x80,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x6c, 0xc6, 0xc6, 0xd6, 0xd6, 0xc6, 0xc6, 0x6c, 0x38,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x38, 0x78, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x7e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0xc6, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0x06, 0x06, 0x3c, 0x06, 0x06, 0x06, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x1c, 0x3c, 0x6c, 0xcc, 0xfe, 0x0c, 0x0c, 0x0c, 0x1e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xfe, 0xc0, 0xc0, 0xc0, 0xfc, 0x06, 0x06, 0x06, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x60, 0xc0, 0xc0, 0xfc, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xfe, 0xc6, 0x06, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0x7e, 0x06, 0x06, 0x06, 0x0c, 0x78,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x00, 0x18, 0x18, 0x30,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0x30, 0x18, 0x0c, 0x06,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x7e, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x0c, 0x18, 0x30, 0x60,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00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 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, 0x0c, 0x7c, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xe0, 0x60, 0x60, 0x78, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc0, 0xc0, 0xc0, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1c, 0x0c, 0x0c, 0x3c, 0x6c, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xfe, 0xc0, 0xc0, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x1c, 0x36, 0x32, 0x30, 0x78, 0x30, 0x30, 0x30, 0x30, 0x78,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c,
+ 0x0c, 0xcc, 0x78, 0x00,
+ 0x00, 0x00, 0xe0, 0x60, 0x60, 0x6c, 0x76, 0x66, 0x66, 0x66, 0x66, 0xe6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x06, 0x06, 0x00, 0x0e, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06,
+ 0x66, 0x66, 0x3c, 0x00,
+ 0x00, 0x00, 0xe0, 0x60, 0x60, 0x66, 0x6c, 0x78, 0x78, 0x6c, 0x66, 0xe6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x38, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0xfe, 0xd6, 0xd6, 0xd6, 0xd6, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x66,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x66, 0x66, 0x66, 0x66, 0x66, 0x7c,
+ 0x60, 0x60, 0xf0, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x76, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x7c,
+ 0x0c, 0x0c, 0x1e, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xdc, 0x76, 0x66, 0x60, 0x60, 0x60, 0xf0,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x30, 0x36, 0x1c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x76,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xcc, 0xcc, 0xcc, 0xcc, 0xcc, 0x78, 0x30,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xd6, 0xd6, 0xd6, 0xfe, 0x6c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x6c, 0x38, 0x38, 0x38, 0x6c, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7e,
+ 0x06, 0x0c, 0xf8, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0e, 0x18, 0x18, 0x18, 0x70, 0x18, 0x18, 0x18, 0x18, 0x0e,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x70, 0x18, 0x18, 0x18, 0x0e, 0x18, 0x18, 0x18, 0x18, 0x70,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x76, 0xdc, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xc6, 0xfe, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x10, 0x38, 0x6c, 0xc6, 0xc6, 0xfe, 0xc6, 0xc6, 0xc6, 0xc6,
+ 0x18, 0x30, 0x1e, 0x00,
+ 0x00, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xf0, 0x64, 0x6c, 0x78, 0x70, 0xe0, 0xe0, 0x62, 0x66, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x7c, 0xc6, 0xc6, 0xc6, 0x7c, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x1b, 0xee, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x62, 0x66, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0x30, 0x00, 0x7c, 0x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xcc, 0xcc, 0xcc, 0x76,
+ 0x18, 0x30, 0x1e, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x30, 0x60, 0x3c, 0x00,
+ 0x00, 0x00, 0x38, 0x1a, 0x1e, 0x1c, 0x18, 0x38, 0x78, 0x58, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0c, 0x18, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x1b, 0xee, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0x60, 0xf0,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x6c, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0x0c, 0x78, 0x00,
+ 0x00, 0x00, 0x6c, 0x38, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0x00, 0x00, 0x00, 0x7c, 0xc6, 0x60, 0x38, 0x0c, 0xc6, 0x7c,
+ 0x18, 0x0c, 0x78, 0x00,
+ 0x6c, 0x38, 0x00, 0x10, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x36, 0x1c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x0c, 0x18, 0x30, 0x00, 0xfe, 0xcc, 0x18, 0x30, 0x60, 0xc6, 0xfe,
+ 0x00, 0x00, 0x00, 0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66, 0x3c, 0x00, 0x3c, 0x66, 0xc2, 0xc0, 0xc0, 0xc0, 0xc2, 0x66, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x18, 0x30, 0x60, 0x00, 0xfe, 0x66, 0x60, 0x78, 0x60, 0x62, 0x66, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x60, 0x62, 0x66, 0xfe,
+ 0x18, 0x30, 0x1e, 0x00,
+ 0x6c, 0x00, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x38, 0x00, 0xfe, 0x66, 0x62, 0x68, 0x78, 0x68, 0x62, 0x66, 0xfe,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x18, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x3c, 0x66, 0x00, 0x3c, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x38, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0x66, 0x66, 0x66, 0x6c, 0xf8,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x00, 0x00, 0xf8, 0x6c, 0x66, 0x66, 0xf6, 0x66, 0x66, 0x66, 0x6c, 0xf8,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x18, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x6c, 0x38, 0x00, 0xc6, 0xe6, 0xf6, 0xfe, 0xde, 0xce, 0xc6, 0xc6, 0xc6,
+ 0x00, 0x00, 0x00, 0x00,
+ 0x0c, 0x18, 0x00, 0x7c, 0xc6, 0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 0xf0, 0x0, 0xf0, 0x0, 0xf0, 0x3f, 0xc0, 0x3f, 0xc0,
+ 0x3f, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3, 0xc0, 0x3, 0xc0, 0x3, 0xc0, 0x3,
+ 0xc0, 0x3, 0xc0, 0x3, 0xc0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
+ 0x0, 0x0, 0x0, 0x0, 0x0
+};
diff --git a/src/i18n/Makefile.in.in b/src/i18n/Makefile.in.in
new file mode 100644
index 0000000..5c444f8
--- /dev/null
+++ b/src/i18n/Makefile.in.in
@@ -0,0 +1,53 @@
+PO-FILES=@POFILES@
+LANGUAGES=$(PO-FILES:.po=)
+
+# Maybe this should be autogenerated by "configure".
+LOCALEDIR=@LOCALEDIR@
+
+# If other files will be translated, they must be also here:
+CSOURCES=../ui/ui.c ../ui-hlp/menu.c \
+../ui-hlp/play.c ../ui-hlp/ui_helper.c \
+../engine/zoom.c ../engine/btrace.c \
+../ui/dialog.c ../ui/filesel.c ../ui-hlp/render.c \
+../ui/ui-drv/win32/ui_win32.c \
+../ui/ui-drv/cocoa/AppController.m \
+../ui/ui-drv/cocoa/CustomDialog.m
+
+
+MO-FILES = $(LANGUAGES:=.mo)
+
+all: $(MO-FILES)
+
+install: $(MO-FILES)
+ @for i in $(LANGUAGES); do \
+ @INSTALL@ -d $(DESTDIR)$(LOCALEDIR)/$$i/LC_MESSAGES; \
+ @INSTALL@ -m 444 $$i.mo $(DESTDIR)$(LOCALEDIR)/$$i/LC_MESSAGES/xaos.mo; \
+ done
+
+install-win: $(MO-FILES)
+ @for i in $(LANGUAGES); do \
+ @INSTALL@ -d $(DESTDIR)/locale/$$i/LC_MESSAGES; \
+ @INSTALL@ -m 444 $$i.mo $(DESTDIR)/locale/$$i/LC_MESSAGES/xaos.mo; \
+ done
+
+clean:
+ rm -f $(MO-FILES)
+
+distclean: clean
+ rm Makefile
+
+messages.pot: $(CSOURCES)
+ @XGETTEXT@ -o messages.pot $(CSOURCES)
+
+$(PO-FILES): messages.pot
+ test -e $@
+ @MSGMERGE@ $@ messages.pot > $@.new
+ mv $@.new $@
+
+$(MO-FILES): $(PO-FILES)
+ @MSGFMT@ -o $@ -c -v --statistics $(@:.mo=.po)
+
+new-languages: Makefile
+ @for i in $(LANGUAGES); do \
+ test -e $$i.po || cp messages.pot $$i.po; \
+ done
diff --git a/src/i18n/README b/src/i18n/README
new file mode 100644
index 0000000..3f81455
--- /dev/null
+++ b/src/i18n/README
@@ -0,0 +1,156 @@
+Internationalization (i18n) in XaoS
+-----------------------------------
+
+Zoltan Kovacs <kovzol@math.u-szeged.hu>
+
+Last modification information:
+$Header: /home/jblang/XaoS-cvsbackup/XaoS/src/i18n/README,v 1.8 2008-04-21 05:48:44 kovzol Exp $
+
+
+
+1. INTRODUCTION
+
+As of version 3.1, i18n support is added to XaoS. This is done
+with the GNU gettext utility. In this first release only the menus
+and most internal strings can be translated, the old method in
+../../catalogs haven't changed yet.
+
+Note that i18n cannot be used if you don't have gettext installed
+on your system. I used gettext-0.10.37 which works greatly for Linux
+and gettext-0.10.40 for DOS version. You do not have to worry
+if you are running Linux: gettext is a standard package of most
+Linux installation.
+
+Bad news for Windows users: i18n does not work fully for Windows yet,
+only in DOS mode. In addition, some Windows support i18n in DOS mode,
+some of them not. (In fact in most Windows version I was not able to
+force i18n. I had to exit Windows and start native DOS mode. This should
+really work under Windows 95.) The main problem is that XaoS works
+with static dialogs and Win32 must be a bit rewritten to make
+it work.
+
+Unfortunately, under DOS some complex messages are not supported
+(press 'l' to check if your gettext version handles all types of
+message strings properly).
+
+
+2. HOW TO INSTALL A NEW LANGUAGE
+
+This will work only on Unix systems.
+
+* Edit ../../configure.in and add your language code into the LINGUAS
+variable. This is a 2 letter long code (e.g. "cs" for Czech, "de" for
+German).
+
+* Run autoconf.
+
+* Type "./configure" in the directory ../.., then come back.
+
+* Type "make new-languages". This will generate a so-called .po-file
+ for you (e.g. "cs.po" or "de.po").
+
+* Edit the generated file manually. The first 15 lines should be filled in
+ properly, otherwise nothing will work in your language. The other
+ lines should be also filled in respectively. Note that you should
+ change the "msgstr" rows only. See the Hungarian language file,
+ "hu.po" for example. Important, that the first "#, fuzzy" line must be
+ removed.
+
+* Type a "make" to generate the so-called .mo-files. These files will be
+ installed later to the directory /usr/share/locale/ under Linux
+ and ../../locale under Windows/DOS systems. You should have
+ superuser rights to install them to their appropriate place with
+ the well known statement "make install".
+
+* That's all, start XaoS and enjoy it. ;-)
+
+* Please share your .po-file with the others! You may inform me that a
+ new language file was created by you. If it works, we will add it to
+ the CVS tree of XaoS as well.
+
+
+3. EXPERT'S GUIDE
+
+I'm not an expert, I just only want to share my little knowledge with you
+if you're interested:
+
+* To set up different languages and try out each one you probably have
+ to set the LC_ALL variable. E.g., I had to change it to de_DE or hu_HU
+ to test different languages. (On DOS I had to set the variable
+ LANG to de or hu, etc.)
+
+* Read the gettext howto ("info gettext"). It's quite long, though.
+
+* To internationalize other texts in XaoS, you should edit first the
+ variable CSOURCES in the makefile. Second, each "not static" string
+ in these C sources may be internationalized with the gettext()
+ function. See the existing tags for example. Again, please share
+ your modified code with us.
+
+* Gettext for autoconf is written using a non-standard (but working) way.
+ If you find an error, please send a bug report to me.
+
+
+4. FUTURE PLANS
+
+XaoS i18n is not yet finished. I'm working on it in my spare time.
+Your help is also welcome.
+
+
+5. CONTRIBUTORS
+
+* Andreas Madritsch made the German translation and tested i18n very
+ intensively. With his help I made lots of fixes in i18n stuff.
+
+* Martin Dozsa translated menus into Czech.
+
+* Ceser Perez contributed the Spanish translations.
+
+Thanks to everyone!
+
+
+6. IMPORTANT NOTES FOR MODERN LINUX SYSTEMS
+
+(Contributed by Ã. Fekete and Z. Kovács.)
+
+! Note: the information provided in this section is not valid anymore,
+! because XaoS 3.4 already support UTF-8 encodings natively. We don't
+! delete this section, however, for historical reasons. ;-)
+
+This section describes how to display Hungarian characters correctly in XaoS
+on Ubuntu 7.10. But this may be help on other systems, too. The section should
+be useful for other non-English users as well.
+
+XaoS displays Hungarian characters wrongly because the locale is not set well.
+
+1.) So check the output of the following command:
+
+$ locale
+
+and if the locale character set is not ISO-8859-2,
+then this should be the problem. In this case,
+
+2.) check if your locale is in /var/lib/locales/supported.d/local
+(and /var/lib/locales/supported.d/*) and if not, write a line describing
+
+your locale to the end of these files. That line should be one line of
+the file /usr/share/i18n/SUPPORTED, for example:
+
+hu_HU ISO-8859-2
+
+3.) Run
+
+$ sudo dpkg-reconfigure locales
+
+entering your administrative password.
+
+4.) Before running xaos, give this locale to the LC_ALL environment
+variable, for example:
+
+$ export LC_ALL=hu_HU
+
+5.) You should be able to run xaos with the menu in readable format,
+but the letters õ and û are still not good in the terminal. If you want
+
+to change that and are using gnome-terminal, set the character encoding
+to Central European (ISO-8859-2) in the Terminal menu.
diff --git a/src/i18n/cs.po b/src/i18n/cs.po
new file mode 100644
index 0000000..b5ff6aa
--- /dev/null
+++ b/src/i18n/cs.po
@@ -0,0 +1,1836 @@
+# XaoS NLS file for Czech language.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Zoltan Kovacs <kovzol@math.u-szeged.hu>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XaoS 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-14 10:56+0100\n"
+"PO-Revision-Date: 2002-08-17 21:44+0200\n"
+"Last-Translator: MadSoft <madsoft@centrum.cz>\n"
+"Language-Team: Czech\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+# ../ui/ui.c:307
+#: ../ui/ui.c:314
+msgid "XaoS is out of memory."
+msgstr "Memórie je zaplnìná."
+
+# ../ui/ui.c:355
+#: ../ui/ui.c:360
+#, fuzzy, c-format
+msgid "%s %.2f times (%.1fE) %2.2f frames/sec %c %i %i %i %i "
+msgstr ""
+"%2$.2f-krát %1$s %3$2.2f obrazù/sec %4$c %5$i %6$i %7$i %8$i "
+
+# ../ui/ui.c:355
+#: ../ui/ui.c:361
+msgid "unzoomed"
+msgstr "zmen¹ení"
+
+# ../ui/ui.c:355
+#: ../ui/ui.c:361
+msgid "zoomed"
+msgstr "zvìt¹ení"
+
+# ../ui/ui.c:358
+#: ../ui/ui.c:369
+#, c-format
+msgid "framerate:%f\n"
+msgstr "obnovení obrazu:%f\n"
+
+# ../ui/ui.c:406
+#: ../ui/ui.c:409
+#, c-format
+msgid "Enabling: %s. "
+msgstr "%s zapnout."
+
+# ../ui/ui.c:408
+#: ../ui/ui.c:411
+#, c-format
+msgid "Disabling: %s. "
+msgstr "%s vypnout."
+
+# ../ui/ui.c:442
+#: ../ui/ui.c:441
+#, c-format
+msgid "Fractal name:%s"
+msgstr "Jméno fraktálu:%s"
+
+# ../ui/ui.c:444
+#: ../ui/ui.c:446
+#, c-format
+msgid "Fractal type:%s"
+msgstr "Tip fraktálu:%s"
+
+# ../ui-hlp/menu.c:1082
+#: ../ui/ui.c:448
+#, fuzzy
+msgid "Mandelbrot"
+msgstr "Souprava mandelbrot"
+
+# ../ui-hlp/menu.c:1083
+#: ../ui/ui.c:449
+#, fuzzy
+msgid "Julia"
+msgstr "Souprava julia"
+
+# ../ui-hlp/menu.c:916
+#: ../ui/ui.c:452
+#, fuzzy, c-format
+msgid "Formula:%s"
+msgstr "Vzorec"
+
+# ../ui/ui.c:446
+#: ../ui/ui.c:457
+#, c-format
+msgid "View:[%1.12f,%1.12f]"
+msgstr "Zobrazení:[%1.12f,%1.12f]"
+
+# ../ui/ui.c:448
+#: ../ui/ui.c:461
+#, c-format
+msgid "size:[%1.12f,%1.12f]"
+msgstr "Velikost:[%1.12fx%1.12f]"
+
+# ../ui/ui.c:450
+#: ../ui/ui.c:465
+#, c-format
+msgid "Rotation:%4.2f Screen size:%i:%i"
+msgstr "Otáèení:%4.2f Velikost obrazovky:%i:%i"
+
+# ../ui/ui.c:452
+#: ../ui/ui.c:470
+#, c-format
+msgid "Iterations:%-4i Palette size:%i"
+msgstr "Poèet iterací:%-4i Velikost palety barev:%i"
+
+# ../ui/ui.c:454
+#: ../ui/ui.c:477
+#, c-format
+msgid "Autopilot:%-4s Plane:%s"
+msgstr "Autopilot:%-4s Plocha:%s"
+
+# ../ui/ui.c:454
+#: ../ui/ui.c:478
+msgid "On"
+msgstr "Zapnout"
+
+# ../ui/ui.c:454
+#: ../ui/ui.c:478
+msgid "Off"
+msgstr "Vypnout"
+
+# ../ui/ui.c:456
+#: ../ui/ui.c:482
+#, c-format
+msgid "incoloring:%s outcoloring:%s"
+msgstr "vnitøní vybarvení:%s vnìj¹í vybarvení:%s"
+
+# ../ui/ui.c:458
+#: ../ui/ui.c:487
+#, c-format
+msgid "zoomspeed:%f"
+msgstr "rychlost zvìt¹ení:%f"
+
+# ../ui/ui.c:461
+#: ../ui/ui.c:491
+msgid "Parameter:none"
+msgstr "Parametr:není"
+
+# ../ui/ui.c:463
+#: ../ui/ui.c:493
+#, c-format
+msgid "Parameter:[%f,%f]"
+msgstr "Parametr:[%f,%f]"
+
+# ../ui/ui.c:550
+#: ../ui/ui.c:585
+#, c-format
+msgid "Please wait while calculating %s"
+msgstr "Prosím èekejte, %s fraktál se pøipravuje..."
+
+# ../ui/ui.c:657
+#: ../ui/ui.c:685
+#, c-format
+msgid "Letters per second %i "
+msgstr "%i písmen za sekundu"
+
+# ../ui/ui.c:669 ../ui/ui.c:677
+#: ../ui/ui.c:698 ../ui/ui.c:709
+#, c-format
+msgid "Rotation speed:%2.2f degrees per second "
+msgstr "Rychlost rotace:%2.2f stupòù za sekundu "
+
+# ../ui/ui.c:687
+#: ../ui/ui.c:719
+#, fuzzy, c-format
+msgid "Iterations: %i "
+msgstr "Poèet iterací: %i "
+
+# ../ui/ui.c:704
+#: ../ui/ui.c:735
+#, c-format
+msgid "Cycling speed: %i "
+msgstr "Rychlost obracení barev: %i "
+
+# ../ui/ui.c:717 ../ui/ui.c:730
+#: ../ui/ui.c:748 ../ui/ui.c:762
+#, c-format
+msgid "speed:%2.2f "
+msgstr "rychlost:%2.2f "
+
+# ../ui/ui.c:968
+#: ../ui/ui.c:854
+#, c-format
+msgid "Thank you for using XaoS\n"
+msgstr "Dìkujeme za pou¾ití programu XaoS\n"
+
+# ../ui/ui.c:1008
+#: ../ui/ui.c:891
+msgid "Skipping, please wait..."
+msgstr "Pøeskakování, prosím èekejte..."
+
+#: ../ui/ui.c:983 ../ui/ui.c:985 ../ui/ui-drv/win32/ui_win32.c:1453
+msgid "Resize"
+msgstr ""
+
+# ../ui/ui.c:1146
+#: ../ui/ui.c:998
+#, fuzzy
+msgid "Quit"
+msgstr "Zavøít"
+
+# ../ui/ui.c:1147
+#: ../ui/ui.c:999
+msgid "Exit now"
+msgstr "Zavøít ihned"
+
+# ../ui/ui.c:1148
+#: ../ui/ui.c:1001
+msgid "Not yet"
+msgstr "Je¹tì rad¹i ne"
+
+# ../ui-hlp/menu.c:935 ../ui-hlp/menu.c:940 ../ui/ui.c:1149
+#: ../ui/ui.c:1004 ../ui-hlp/menu.c:1055 ../ui-hlp/menu.c:1065
+#: ../ui/dialog.c:404 ../ui/dialog.c:1380
+msgid "Help"
+msgstr "Nápovìda"
+
+# ../ui/ui.c:1150
+#: ../ui/ui.c:1006
+msgid "Disable XaoS's builtin GUI"
+msgstr "Vypnutí zabudované GUI"
+
+# ../ui/ui.c:1152 ../ui/ui.c:1156
+#: ../ui/ui.c:1010 ../ui/ui.c:1016
+msgid "Status"
+msgstr "Vlastnosti"
+
+# ../ui/ui.c:1153 ../ui/ui.c:1157
+#: ../ui/ui.c:1012 ../ui/ui.c:1018
+msgid "Ministatus"
+msgstr "Hlavnìj¹í vlastnosti"
+
+# ../ui/ui.c:1159 ../ui/ui.c:1160
+#: ../ui/ui.c:1021 ../ui/ui.c:1022
+msgid "Driver"
+msgstr "Grafický ovladaè"
+
+# ../ui/ui.c:1494
+#: ../ui/ui.c:1413
+#, c-format
+msgid "Welcome to XaoS version %s"
+msgstr "Zdravíme vás ve %s Xaos verzi!"
+
+# ../ui/ui.c:801
+#: ../ui/ui.c:1580
+msgid "Can not allocate buffers"
+msgstr "Není dostatek pufferu"
+
+# ../ui/ui.c:812
+#: ../ui/ui.c:1598
+msgid "Can not create palette"
+msgstr "Paleta barev nelze vytvoøit"
+
+# ../ui/ui.c:820
+#: ../ui/ui.c:1610
+msgid "Can not create image"
+msgstr "Obraz nelze vytvoøit"
+
+# ../ui/ui.c:853 ../ui/ui.c:917
+#: ../ui/ui.c:1641 ../ui/ui.c:1692
+msgid "Can not allocate tables"
+msgstr "Není místo pro tabulky"
+
+# ../ui/ui.c:901
+#: ../ui/ui.c:1678
+msgid "Can not initialize driver"
+msgstr "Grafický ovladaè nelze inicializovat"
+
+# ../ui/ui.c:904
+#: ../ui/ui.c:1681
+msgid "Can not return back to previous driver"
+msgstr "Pøedchzí grafický ovladaè nelze zobrazit"
+
+# ../ui-hlp/menu.c:992 ../ui-hlp/menu.c:993 ../ui-hlp/menu.c:1099
+#: ../ui-hlp/menu.c:129
+#, fuzzy
+msgid "Perturbation:"
+msgstr "Perturbace"
+
+# ../ui-hlp/menu.c:1007
+#: ../ui-hlp/menu.c:133
+#, fuzzy
+msgid "Julia-seed:"
+msgstr "Rychlost julia"
+
+# ../ui-hlp/menu.c:892
+#: ../ui-hlp/menu.c:137
+#, fuzzy
+msgid "Morphing type:"
+msgstr "Pøetvoøící se èára"
+
+# ../ui/ui.c:1152 ../ui/ui.c:1156
+#: ../ui-hlp/menu.c:138
+#, fuzzy
+msgid "Startuptime:"
+msgstr "Vlastnosti"
+
+# ../ui/ui.c:1152 ../ui/ui.c:1156
+#: ../ui-hlp/menu.c:139
+#, fuzzy
+msgid "Stoptime:"
+msgstr "Vlastnosti"
+
+#: ../ui-hlp/menu.c:143
+msgid "File to render:"
+msgstr ""
+
+# ../ui-hlp/menu.c:928 ../ui-hlp/menu.c:938
+#: ../ui-hlp/menu.c:144
+#, fuzzy
+msgid "Basename:"
+msgstr "Soubor"
+
+#: ../ui-hlp/menu.c:145
+msgid "Width:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:146
+#, fuzzy
+msgid "Height:"
+msgstr "Doprava"
+
+#: ../ui-hlp/menu.c:147
+msgid "Real width (cm):"
+msgstr ""
+
+#: ../ui-hlp/menu.c:148
+msgid "Real height (cm):"
+msgstr ""
+
+# ../ui/ui.c:358
+#: ../ui-hlp/menu.c:149
+#, fuzzy
+msgid "Framerate:"
+msgstr "obnovení obrazu:%f\n"
+
+#: ../ui-hlp/menu.c:150
+msgid "Image type:"
+msgstr ""
+
+# ../ui-hlp/menu.c:1023
+#: ../ui-hlp/menu.c:151
+#, fuzzy
+msgid "Antialiasing:"
+msgstr "Iterace"
+
+# ../ui-hlp/menu.c:1045
+#: ../ui-hlp/menu.c:152
+#, fuzzy
+msgid "Always recalculate:"
+msgstr "Poèítání"
+
+#: ../ui-hlp/menu.c:153
+msgid "Calculate MPEG motion vectors:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:154
+msgid "Recommended I frame distance:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:158
+#, fuzzy
+msgid "Center:"
+msgstr "Doprostøed"
+
+#: ../ui-hlp/menu.c:159
+msgid "Radius:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:160 ../ui-hlp/menu.c:225
+msgid "Angle:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:164
+#, fuzzy
+msgid "Mode:"
+msgstr "Do prostøed"
+
+# ../ui/ui.c:1152 ../ui/ui.c:1156
+#: ../ui-hlp/menu.c:165
+#, fuzzy
+msgid "Start:"
+msgstr "Vlastnosti"
+
+#: ../ui-hlp/menu.c:166
+msgid "End:"
+msgstr ""
+
+# ../ui-hlp/menu.c:952
+#: ../ui-hlp/menu.c:170
+#, fuzzy
+msgid "Color:"
+msgstr "Barva"
+
+# ../ui-hlp/menu.c:1033
+#: ../ui-hlp/menu.c:174
+#, fuzzy
+msgid "Rotations per second:"
+msgstr "Rychlost rotace"
+
+# ../ui-hlp/menu.c:924 ../ui-hlp/menu.c:925
+#: ../ui-hlp/menu.c:178
+#, fuzzy
+msgid "Letters per second:"
+msgstr "Písmen za sekund"
+
+# ../ui-hlp/menu.c:1023
+#: ../ui-hlp/menu.c:182
+#, fuzzy
+msgid "Iterations:"
+msgstr "Iterace"
+
+#: ../ui-hlp/menu.c:186
+msgid "Text:"
+msgstr ""
+
+# ../ui-hlp/menu.c:944
+#: ../ui-hlp/menu.c:190
+#, fuzzy
+msgid "Your command:"
+msgstr "Pøíkaz"
+
+# ../ui-hlp/menu.c:928 ../ui-hlp/menu.c:938
+#: ../ui-hlp/menu.c:194 ../ui-hlp/menu.c:198 ../ui-hlp/menu.c:202
+#: ../ui-hlp/menu.c:206 ../ui-hlp/menu.c:258
+#, fuzzy
+msgid "Filename:"
+msgstr "Soubor"
+
+# ../ui-hlp/menu.c:916
+#: ../ui-hlp/menu.c:210 ../ui-hlp/menu.c:298
+#, fuzzy
+msgid "Formula:"
+msgstr "Vzorec"
+
+#: ../ui-hlp/menu.c:214
+#, fuzzy
+msgid "X center:"
+msgstr "Doprostøed"
+
+#: ../ui-hlp/menu.c:215
+#, fuzzy
+msgid "Y center:"
+msgstr "Doprostøed"
+
+#: ../ui-hlp/menu.c:216
+msgid "X Radius:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:217
+msgid "Y Radius:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:221
+msgid "Coordinates:"
+msgstr ""
+
+# ../ui-hlp/menu.c:1031
+#: ../ui-hlp/menu.c:229
+#, fuzzy
+msgid "continuous rotation"
+msgstr "Plynulá rotace"
+
+# ../ui-hlp/menu.c:1035
+#: ../ui-hlp/menu.c:233
+#, fuzzy
+msgid "Fast rotation"
+msgstr "Rychlý re¾im rotace"
+
+# ../ui-hlp/menu.c:919
+#: ../ui-hlp/menu.c:237
+#, fuzzy
+msgid "filter"
+msgstr "Filtr"
+
+#: ../ui-hlp/menu.c:238
+msgid "enable"
+msgstr ""
+
+#: ../ui-hlp/menu.c:242
+msgid "Amount:"
+msgstr ""
+
+# ../ui-hlp/menu.c:1048
+#: ../ui-hlp/menu.c:246
+#, fuzzy
+msgid "Zooming speed:"
+msgstr "Rychlost zvìt¹ení"
+
+#: ../ui-hlp/menu.c:250
+msgid "Name:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:254
+msgid "Bailout:"
+msgstr ""
+
+# ../ui-hlp/menu.c:999
+#: ../ui-hlp/menu.c:262
+#, fuzzy
+msgid "Julia mode:"
+msgstr "Re¾im julia"
+
+# ../ui-hlp/menu.c:953
+#: ../ui-hlp/menu.c:266
+#, fuzzy
+msgid "Horizontal position:"
+msgstr "Vodorovná pozice textu"
+
+# ../ui-hlp/menu.c:954
+#: ../ui-hlp/menu.c:267
+#, fuzzy
+msgid "Vertical position:"
+msgstr "Svislá pozice textu"
+
+# ../ui-hlp/menu.c:1021
+#: ../ui-hlp/menu.c:271
+#, fuzzy
+msgid "Dynamic resolution:"
+msgstr "Dinamické rozlo¾ení"
+
+#: ../ui-hlp/menu.c:275
+msgid "Time:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:279 ../ui-hlp/menu.c:283
+msgid "Number:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:287
+msgid "Algorithm number:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:288
+msgid "Seed:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:289
+msgid "Shift:"
+msgstr ""
+
+# ../ui-hlp/menu.c:924 ../ui-hlp/menu.c:925
+#: ../ui-hlp/menu.c:293
+#, fuzzy
+msgid "Frames per second:"
+msgstr "Písmen za sekund"
+
+# ../ui-hlp/menu.c:1023
+#: ../ui-hlp/menu.c:302
+#, fuzzy
+msgid "Initialization:"
+msgstr "Iterace"
+
+#: ../ui-hlp/menu.c:357
+msgid "renderanim: Must specify a valid absolute path for basename"
+msgstr ""
+
+#: ../ui-hlp/menu.c:364
+msgid ""
+"renderanim: Width parameter must be positive integer in the range 0..4096"
+msgstr ""
+
+#: ../ui-hlp/menu.c:370
+msgid ""
+"renderanim: Height parameter must be positive integer in the range 0..4096"
+msgstr ""
+
+#: ../ui-hlp/menu.c:376
+msgid "renderanim: Invalid real width and height dimensions"
+msgstr ""
+
+#: ../ui-hlp/menu.c:380
+msgid "renderanim: invalid framerate"
+msgstr ""
+
+#: ../ui-hlp/menu.c:386
+msgid "renderanim: antialiasing not supported in 256 color mode"
+msgstr ""
+
+#: ../ui-hlp/menu.c:390
+msgid "renderanim: incorrect I frame distance"
+msgstr ""
+
+#: ../ui-hlp/menu.c:441 ../ui-hlp/menu.c:454
+msgid "animateview: Invalid viewpoint"
+msgstr ""
+
+#: ../ui-hlp/menu.c:467
+msgid "Invalid viewpoint"
+msgstr ""
+
+# ../ui-hlp/menu.c:919
+#: ../ui-hlp/menu.c:696
+#, fuzzy
+msgid "Unknown palette type"
+msgstr "Filtr"
+
+#: ../ui-hlp/menu.c:771 ../ui-hlp/menu.c:785
+msgid "Initialization of color cycling failed."
+msgstr ""
+
+#: ../ui-hlp/menu.c:773 ../ui-hlp/menu.c:787
+msgid "Try to enable palette emulation filter"
+msgstr ""
+
+#: ../ui-hlp/menu.c:896
+#, c-format
+msgid "Algorithm:%i seed:%i size:%i"
+msgstr ""
+
+# ../ui-hlp/menu.c:876
+#: ../ui-hlp/menu.c:947
+msgid "Root menu"
+msgstr "Hlavní menu"
+
+# ../ui-hlp/menu.c:877
+#: ../ui-hlp/menu.c:948
+msgid "Animation root menu"
+msgstr "Hlavní menu animací"
+
+#: ../ui-hlp/menu.c:949
+msgid "Replay only commands"
+msgstr ""
+
+#: ../ui-hlp/menu.c:950
+msgid "Command line options only"
+msgstr ""
+
+#: ../ui-hlp/menu.c:953
+msgid "print menus specifications of all menus"
+msgstr ""
+
+# ../ui-hlp/menu.c:883
+#: ../ui-hlp/menu.c:958
+msgid "print menu specification"
+msgstr ""
+
+#: ../ui-hlp/menu.c:961
+msgid "print menu specification in xshl format"
+msgstr ""
+
+# ../ui-hlp/menu.c:885
+#: ../ui-hlp/menu.c:965
+msgid "print all menu specifications in xshl format"
+msgstr ""
+
+#: ../ui-hlp/menu.c:967
+msgid "print dialog specification"
+msgstr ""
+
+# ../ui-hlp/menu.c:890
+#: ../ui-hlp/menu.c:972
+msgid "Line drawing functions"
+msgstr "Funkce malování èar"
+
+# ../ui-hlp/menu.c:891
+#: ../ui-hlp/menu.c:973
+msgid "Line"
+msgstr "Èára"
+
+# ../ui-hlp/menu.c:892
+#: ../ui-hlp/menu.c:976
+msgid "Morph line"
+msgstr "Pøetvoøící se èára"
+
+# ../ui-hlp/menu.c:893
+#: ../ui-hlp/menu.c:978
+msgid "Morph last line"
+msgstr "Pøemìòující se poslední èára"
+
+# ../ui-hlp/menu.c:894
+#: ../ui-hlp/menu.c:981
+msgid "Set line key"
+msgstr "Nastavení èárového klíèe"
+
+# ../ui-hlp/menu.c:895
+#: ../ui-hlp/menu.c:983
+msgid "Clear line"
+msgstr "Vymazání èáry"
+
+# ../ui-hlp/menu.c:896
+#: ../ui-hlp/menu.c:986
+msgid "Clear all lines"
+msgstr "Vymazání v¹ech èar"
+
+# ../ui-hlp/menu.c:898
+#: ../ui-hlp/menu.c:988
+msgid "Animation functions"
+msgstr "Animace"
+
+# ../ui-hlp/menu.c:899 ../ui-hlp/menu.c:995 ../ui-hlp/menu.c:1000
+#: ../ui-hlp/menu.c:989 ../ui-hlp/menu.c:1181 ../ui-hlp/menu.c:1190
+msgid "View"
+msgstr "Zobrazení"
+
+# ../ui-hlp/menu.c:900
+#: ../ui-hlp/menu.c:993
+msgid "Morph view"
+msgstr ""
+
+# ../ui-hlp/menu.c:892
+#: ../ui-hlp/menu.c:995
+#, fuzzy
+msgid "Morph julia"
+msgstr "Pøetvoøící se èára"
+
+# ../ui-hlp/menu.c:902
+#: ../ui-hlp/menu.c:1000
+msgid "Move view"
+msgstr ""
+
+# ../ui-hlp/menu.c:892
+#: ../ui-hlp/menu.c:1002
+#, fuzzy
+msgid "Morph angle"
+msgstr "Pøetvoøící se èára"
+
+# ../ui-hlp/menu.c:904
+#: ../ui-hlp/menu.c:1004
+msgid "Zoom center"
+msgstr "Centrum zvìt¹ení"
+
+# ../ui-hlp/menu.c:905
+#: ../ui-hlp/menu.c:1006 ../ui/ui-drv/cocoa/AppController.m:343
+msgid "Zoom"
+msgstr "Zvìt¹ení"
+
+# ../ui-hlp/menu.c:906
+#: ../ui-hlp/menu.c:1007
+msgid "Un-zoom"
+msgstr "Zmen¹ení"
+
+# ../ui-hlp/menu.c:907
+#: ../ui-hlp/menu.c:1010
+msgid "Stop zooming"
+msgstr "Zastavení zvìt¹ení"
+
+# ../ui-hlp/menu.c:908
+#: ../ui-hlp/menu.c:1011
+msgid "Smooth morphing parameters"
+msgstr "Parametry zahladìní"
+
+# ../ui-hlp/menu.c:910
+#: ../ui-hlp/menu.c:1014
+msgid "Timing functions"
+msgstr "Èasování"
+
+# ../ui-hlp/menu.c:911
+#: ../ui-hlp/menu.c:1015
+msgid "Usleep"
+msgstr "Èekání"
+
+# ../ui-hlp/menu.c:912
+#: ../ui-hlp/menu.c:1018
+msgid "Wait for text"
+msgstr "Èekání na text"
+
+# ../ui-hlp/menu.c:913
+#: ../ui-hlp/menu.c:1020
+msgid "Wait for complete image"
+msgstr "Èekání na zobrazení obrazu"
+
+# ../ui-hlp/menu.c:914
+#: ../ui-hlp/menu.c:1022
+msgid "Include file"
+msgstr "Navlékání souboru"
+
+# ../ui-hlp/menu.c:915 ../ui-hlp/menu.c:1009
+#: ../ui-hlp/menu.c:1024 ../ui-hlp/menu.c:1222
+msgid "Default palette"
+msgstr "Základní barvy"
+
+# ../ui-hlp/menu.c:916
+#: ../ui-hlp/menu.c:1026
+msgid "Formula"
+msgstr "Vzorec"
+
+# ../ui-hlp/menu.c:917
+#: ../ui-hlp/menu.c:1028
+msgid "Maximal zooming step"
+msgstr "Maximální krok zìt¹ení"
+
+# ../ui-hlp/menu.c:918
+#: ../ui-hlp/menu.c:1030
+msgid "Zooming speedup"
+msgstr "Rychlost zvìt¹ení"
+
+# ../ui-hlp/menu.c:919
+#: ../ui-hlp/menu.c:1032
+msgid "Filter"
+msgstr "Filtr"
+
+# ../ui-hlp/menu.c:924 ../ui-hlp/menu.c:925
+#: ../ui-hlp/menu.c:1036 ../ui-hlp/menu.c:1041
+msgid "Letters per second"
+msgstr "Písmen za sekund"
+
+# ../ui-hlp/menu.c:926 ../ui-hlp/menu.c:1046
+#: ../ui-hlp/menu.c:1043 ../ui-hlp/menu.c:1314
+msgid "Interrupt"
+msgstr "Pøeru¹ení"
+
+# ../ui-hlp/menu.c:928 ../ui-hlp/menu.c:938
+#: ../ui-hlp/menu.c:1045 ../ui-hlp/menu.c:1057
+msgid "File"
+msgstr "Soubor"
+
+# ../ui-hlp/menu.c:929
+#: ../ui-hlp/menu.c:1046
+msgid "Edit"
+msgstr "Upravení"
+
+# ../ui-hlp/menu.c:930
+#: ../ui-hlp/menu.c:1047
+msgid "Fractal"
+msgstr "Fraktál"
+
+# ../ui-hlp/menu.c:931
+#: ../ui-hlp/menu.c:1048
+msgid "Calculation"
+msgstr "Poèítání"
+
+# ../ui-hlp/menu.c:932 ../ui-hlp/menu.c:1096
+#: ../ui-hlp/menu.c:1049 ../ui-hlp/menu.c:1391
+msgid "Filters"
+msgstr "Filtry"
+
+# ../ui-hlp/menu.c:933 ../ui-hlp/menu.c:941
+#: ../ui-hlp/menu.c:1050 ../ui-hlp/menu.c:1064
+msgid "UI"
+msgstr "U¾ivatelské rozhraní"
+
+# ../ui-hlp/menu.c:934
+#: ../ui-hlp/menu.c:1051
+msgid "Misc"
+msgstr "Ostatní"
+
+# ../ui-hlp/menu.c:982
+#: ../ui-hlp/menu.c:1053
+#, fuzzy
+msgid "Window"
+msgstr "Zpìt"
+
+# ../ui-hlp/menu.c:937
+#: ../ui-hlp/menu.c:1056
+msgid "Tutorials"
+msgstr "Výuky"
+
+# ../ui-hlp/menu.c:939
+#: ../ui-hlp/menu.c:1062
+msgid "Stop replay"
+msgstr "Zastavení opakování"
+
+# ../ui-hlp/menu.c:944
+#: ../ui-hlp/menu.c:1066
+msgid "Command"
+msgstr "Pøíkaz"
+
+# ../ui-hlp/menu.c:945
+#: ../ui-hlp/menu.c:1068
+msgid "Play string"
+msgstr "Spustìní øetìzce"
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/menu.c:1070
+#, fuzzy
+msgid "Render animation"
+msgstr "Jenom bìhem animace"
+
+# ../ui-hlp/menu.c:948
+#: ../ui-hlp/menu.c:1073
+msgid "Clear screen"
+msgstr "Vièi¹tìní obrazovky"
+
+# ../ui-hlp/menu.c:949
+#: ../ui-hlp/menu.c:1075
+msgid "Display fractal"
+msgstr "Zobrazení fraktálu"
+
+# ../ui-hlp/menu.c:951
+#: ../ui-hlp/menu.c:1078
+msgid "Display text"
+msgstr "Zobrazení textu"
+
+# ../ui-hlp/menu.c:952
+#: ../ui-hlp/menu.c:1080
+#, fuzzy
+msgid "Color"
+msgstr "Barva"
+
+# ../ui-hlp/menu.c:953
+#: ../ui-hlp/menu.c:1082
+msgid "Horizontal text position"
+msgstr "Vodorovná pozice textu"
+
+# ../ui-hlp/menu.c:954
+#: ../ui-hlp/menu.c:1084
+msgid "Vertical text position"
+msgstr "Svislá pozice textu"
+
+# ../ui-hlp/menu.c:955
+#: ../ui-hlp/menu.c:1086
+msgid "Text position"
+msgstr "Pozice textu"
+
+# ../ui-hlp/menu.c:956
+#: ../ui-hlp/menu.c:1090
+msgid "Message"
+msgstr "Vzkaz"
+
+# ../ui-hlp/menu.c:968
+#: ../ui-hlp/menu.c:1112
+msgid "Load"
+msgstr "Otevøení"
+
+# ../ui-hlp/menu.c:969
+#: ../ui-hlp/menu.c:1115
+msgid "Save"
+msgstr "Ulo¾ení"
+
+# ../ui-hlp/menu.c:972
+#: ../ui-hlp/menu.c:1117
+msgid "Record"
+msgstr "Nahrávání"
+
+# ../ui-hlp/menu.c:973
+#: ../ui-hlp/menu.c:1121
+msgid "Replay"
+msgstr "Pøehrávání"
+
+# ../ui-hlp/menu.c:975
+#: ../ui-hlp/menu.c:1128
+msgid "Save image"
+msgstr "Ulo¾ení obrazu"
+
+# ../ui-hlp/menu.c:976
+#: ../ui-hlp/menu.c:1130
+msgid "Load random example"
+msgstr "Nahrání náhodného pøíkladu"
+
+# ../ui-hlp/menu.c:977
+#: ../ui-hlp/menu.c:1132
+msgid "Save configuration"
+msgstr "Ulo¾ení konfigurace"
+
+# ../ui-hlp/menu.c:982
+#: ../ui-hlp/menu.c:1137
+msgid "Undo"
+msgstr "Zpìt"
+
+# ../ui-hlp/menu.c:983
+#: ../ui-hlp/menu.c:1141
+msgid "Redo"
+msgstr "Udìlat znovu"
+
+# ../ui-hlp/menu.c:984
+#: ../ui-hlp/menu.c:1145
+msgid "Formulae"
+msgstr "Vzorec"
+
+# ../ui-hlp/menu.c:984
+#: ../ui-hlp/menu.c:1146
+#, fuzzy
+msgid "More formulae"
+msgstr "Vzorec"
+
+# ../ui-hlp/menu.c:984
+#: ../ui-hlp/menu.c:1151
+#, fuzzy
+msgid "User formula"
+msgstr "Vzorec"
+
+# ../ui-hlp/menu.c:890
+#: ../ui-hlp/menu.c:1153
+#, fuzzy
+msgid "User initialization"
+msgstr "Funkce malování èar"
+
+# ../ui-hlp/menu.c:986
+#: ../ui-hlp/menu.c:1158
+msgid "Incoloring mode"
+msgstr "Vnitøní vybarvení"
+
+# ../ui-hlp/menu.c:987
+#: ../ui-hlp/menu.c:1159
+msgid "Outcoloring mode"
+msgstr "Vnìj¹í vybarvení"
+
+# ../ui-hlp/menu.c:988
+#: ../ui-hlp/menu.c:1160
+msgid "Plane"
+msgstr "Plocha"
+
+# ../ui-hlp/menu.c:989
+#: ../ui-hlp/menu.c:1161
+#, fuzzy
+msgid "Palette"
+msgstr "Paleta barev"
+
+# ../ui-hlp/menu.c:991
+#: ../ui-hlp/menu.c:1164
+msgid "Mandelbrot mode"
+msgstr "Re¾im mandelbrot"
+
+# ../ui-hlp/menu.c:992 ../ui-hlp/menu.c:993 ../ui-hlp/menu.c:1099
+#: ../ui-hlp/menu.c:1170 ../ui-hlp/menu.c:1174 ../ui-hlp/menu.c:1395
+msgid "Perturbation"
+msgstr "Perturbace"
+
+# ../ui-hlp/menu.c:997
+#: ../ui-hlp/menu.c:1185
+msgid "Reset to defaults"
+msgstr "Nastavení standartu zpìt"
+
+# ../ui-hlp/menu.c:999
+#: ../ui-hlp/menu.c:1186
+msgid "Julia mode"
+msgstr "Re¾im julia"
+
+# ../ui-hlp/menu.c:1001
+#: ../ui-hlp/menu.c:1193
+msgid "Set angle"
+msgstr "Nastavení úhlu"
+
+# ../ui-hlp/menu.c:1002
+#: ../ui-hlp/menu.c:1197
+msgid "Set plane"
+msgstr "Nastavení plochy"
+
+# ../ui-hlp/menu.c:1003
+#: ../ui-hlp/menu.c:1201
+msgid "Inside coloring mode"
+msgstr "Vnitøní vybarvení"
+
+# ../ui-hlp/menu.c:1004
+#: ../ui-hlp/menu.c:1206
+msgid "Outside coloring mode"
+msgstr "Vnìj¹í vybarvení"
+
+# ../ui-hlp/menu.c:1005
+#: ../ui-hlp/menu.c:1212
+msgid "Inside truecolor coloring mode"
+msgstr "Vnitøní truecolor vybarvení"
+
+# ../ui-hlp/menu.c:1006
+#: ../ui-hlp/menu.c:1216
+msgid "Outside truecolor coloring mode"
+msgstr "Vnìj¹í truecolor vybarvení"
+
+# ../ui-hlp/menu.c:1007
+#: ../ui-hlp/menu.c:1219
+msgid "Julia seed"
+msgstr "Rychlost julia"
+
+# ../ui-hlp/menu.c:1010
+#: ../ui-hlp/menu.c:1224
+msgid "Random palette"
+msgstr "Náhodné barvy"
+
+# ../ui-hlp/menu.c:1011
+#: ../ui-hlp/menu.c:1226
+msgid "Custom palette"
+msgstr "U¾ivatelské barvy"
+
+# ../ui-hlp/menu.c:1013
+#: ../ui-hlp/menu.c:1230
+msgid "Color cycling"
+msgstr "Cirkulace barev"
+
+# ../ui-hlp/menu.c:1014
+#: ../ui-hlp/menu.c:1232
+msgid "Reversed color cycling"
+msgstr "Zpìtná cirkulace barev"
+
+# ../ui-hlp/menu.c:1015
+#: ../ui-hlp/menu.c:1237
+msgid "Color cycling speed"
+msgstr "Rychlost cirkulace barev"
+
+# ../ui-hlp/menu.c:1017
+#: ../ui-hlp/menu.c:1241
+msgid "Shift palette"
+msgstr "Posun barevné palety"
+
+# ../ui-hlp/menu.c:1018
+#: ../ui-hlp/menu.c:1243
+msgid "Shift one forward"
+msgstr "Posun dopøedu o jeden krok"
+
+# ../ui-hlp/menu.c:1019
+#: ../ui-hlp/menu.c:1246
+msgid "Shift one backward"
+msgstr "Posun dozadu o jeden krok"
+
+# ../ui-hlp/menu.c:1020
+#: ../ui-hlp/menu.c:1248 ../engine/zoom.c:1357
+msgid "Solid guessing"
+msgstr "Solidní hádání"
+
+# ../ui-hlp/menu.c:1021
+#: ../ui-hlp/menu.c:1249
+msgid "Dynamic resolution"
+msgstr "Dinamické rozlo¾ení"
+
+# ../ui-hlp/menu.c:1022
+#: ../ui-hlp/menu.c:1251
+msgid "Periodicity checking"
+msgstr "Kontrola pravidelnosti"
+
+# ../ui-hlp/menu.c:1023
+#: ../ui-hlp/menu.c:1254
+msgid "Iterations"
+msgstr "Iterace"
+
+#: ../ui-hlp/menu.c:1256
+msgid "Bailout"
+msgstr ""
+
+# ../ui-hlp/menu.c:1025
+#: ../ui-hlp/menu.c:1260
+msgid "Fast julia mode"
+msgstr "Rychlý re¾im julia"
+
+# ../ui-hlp/menu.c:1026
+#: ../ui-hlp/menu.c:1262
+msgid "Rotation"
+msgstr "Rotace"
+
+# ../ui-hlp/menu.c:1027
+#: ../ui-hlp/menu.c:1263
+msgid "Solid guessing range"
+msgstr "Interval hádání"
+
+# ../ui-hlp/menu.c:1029
+#: ../ui-hlp/menu.c:1266
+msgid "Disable rotation"
+msgstr "Rotace vypnuta"
+
+# ../ui-hlp/menu.c:1031
+#: ../ui-hlp/menu.c:1270
+msgid "Continuous rotation"
+msgstr "Plynulá rotace"
+
+# ../ui-hlp/menu.c:1032
+#: ../ui-hlp/menu.c:1273
+msgid "Rotate by mouse"
+msgstr "Rotace mi¹í"
+
+# ../ui-hlp/menu.c:1033
+#: ../ui-hlp/menu.c:1277
+msgid "Rotation speed"
+msgstr "Rychlost rotace"
+
+# ../ui-hlp/menu.c:1034
+#: ../ui-hlp/menu.c:1280
+msgid "Automatic rotation"
+msgstr "Automatická rotace"
+
+# ../ui-hlp/menu.c:1035
+#: ../ui-hlp/menu.c:1285
+msgid "Fast rotation mode"
+msgstr "Rychlý re¾im rotace"
+
+# ../ui-hlp/menu.c:1037
+#: ../ui-hlp/menu.c:1289
+msgid "Disable dynamic resolution"
+msgstr "Dinamický rozli¹ení vypnuto"
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/menu.c:1292
+msgid "Use only during animation"
+msgstr "Jenom bìhem animace"
+
+# ../ui-hlp/menu.c:1040
+#: ../ui-hlp/menu.c:1296
+msgid "Use also for new images"
+msgstr "Pou¾ij toto i u nových obrazù"
+
+# ../ui-hlp/menu.c:1041
+#: ../ui-hlp/menu.c:1298
+msgid "Dynamic resolution mode"
+msgstr "Re¾im dinamického rozli¹ení"
+
+# ../ui-hlp/menu.c:1043
+#: ../ui-hlp/menu.c:1302
+msgid "Autopilot"
+msgstr "Autopilot"
+
+# ../ui-hlp/menu.c:999
+#: ../ui-hlp/menu.c:1306
+#, fuzzy
+msgid "VJ mode"
+msgstr "Re¾im julia"
+
+# ../ui-hlp/menu.c:1045
+#: ../ui-hlp/menu.c:1310
+msgid "Recalculate"
+msgstr "Poèítání"
+
+# ../ui-hlp/menu.c:1048
+#: ../ui-hlp/menu.c:1319
+msgid "Zooming speed"
+msgstr "Rychlost zvìt¹ení"
+
+# ../ui-hlp/menu.c:1049
+#: ../ui-hlp/menu.c:1321
+msgid "Fixed step"
+msgstr "Stálý krok"
+
+# ../ui-hlp/menu.c:1050
+#: ../ui-hlp/menu.c:1325
+msgid "Disable solid guessing"
+msgstr "Solidní hádání vypnuto"
+
+# ../ui-hlp/menu.c:1052
+#: ../ui-hlp/menu.c:1329
+msgid "Guess 2x2 rectangles"
+msgstr "2x2 obdélník"
+
+# ../ui-hlp/menu.c:1053
+#: ../ui-hlp/menu.c:1331
+msgid "Guess 3x3 rectangles"
+msgstr "3x3 obdélník"
+
+# ../ui-hlp/menu.c:1054
+#: ../ui-hlp/menu.c:1335
+msgid "Guess 4x4 rectangles"
+msgstr "4x4 obdélník"
+
+# ../ui-hlp/menu.c:1055
+#: ../ui-hlp/menu.c:1337
+msgid "Guess 5x5 rectangles"
+msgstr "5x5 obdélník"
+
+# ../ui-hlp/menu.c:1056
+#: ../ui-hlp/menu.c:1341
+msgid "Guess 6x6 rectangles"
+msgstr "6x6 obdélník"
+
+# ../ui-hlp/menu.c:1057
+#: ../ui-hlp/menu.c:1343
+msgid "Guess 7x7 rectangles"
+msgstr "7x7 obdélník"
+
+# ../ui-hlp/menu.c:1058
+#: ../ui-hlp/menu.c:1347
+msgid "Guess 8x8 rectangles"
+msgstr "8x8 obdélník"
+
+# ../ui-hlp/menu.c:1059
+#: ../ui-hlp/menu.c:1349
+msgid "Guess unlimited rectangles"
+msgstr "Nomezený èíslo obdélníkù"
+
+#: ../ui-hlp/menu.c:1354
+msgid "Language"
+msgstr ""
+
+# ../ui-hlp/menu.c:1065
+#: ../ui-hlp/menu.c:1357
+msgid "An introduction to fractals"
+msgstr "Zavedení do svìta fraktálù"
+
+# ../ui-hlp/menu.c:1066
+#: ../ui-hlp/menu.c:1359
+msgid "XaoS features overview"
+msgstr "Tipy a triky"
+
+# ../ui-hlp/menu.c:1067
+#: ../ui-hlp/menu.c:1361
+msgid "Math behind fractals"
+msgstr "Matematika fraktálù"
+
+#: ../ui-hlp/menu.c:1362 ../ui-hlp/menu.c:1403
+msgid "Other fractal types in XaoS"
+msgstr ""
+
+# ../ui-hlp/menu.c:1068
+#: ../ui-hlp/menu.c:1364
+msgid "What's new?"
+msgstr "Novinky"
+
+# ../ui-hlp/menu.c:1079 ../ui-hlp/menu.c:1103
+#: ../ui-hlp/menu.c:1374 ../ui-hlp/menu.c:1398
+msgid "Whole story"
+msgstr "V¹echny kapitoly"
+
+# ../ui-hlp/menu.c:1081
+#: ../ui-hlp/menu.c:1376
+msgid "Introduction"
+msgstr "Úvod"
+
+# ../ui-hlp/menu.c:1082
+#: ../ui-hlp/menu.c:1377
+msgid "Mandelbrot set"
+msgstr "Souprava mandelbrot"
+
+# ../ui-hlp/menu.c:1083
+#: ../ui-hlp/menu.c:1378
+msgid "Julia set"
+msgstr "Souprava julia"
+
+# ../ui-hlp/menu.c:1084
+#: ../ui-hlp/menu.c:1379
+msgid "Higher power Mandelbrots"
+msgstr "Mandelbroty vy¹¹í tøídy"
+
+# ../ui-hlp/menu.c:1085
+#: ../ui-hlp/menu.c:1380
+msgid "Newton's method"
+msgstr "Newtonova metoda"
+
+# ../ui-hlp/menu.c:1086
+#: ../ui-hlp/menu.c:1381
+msgid "Barnsley's formula"
+msgstr "Barnsleyuv vzorec"
+
+# ../ui-hlp/menu.c:1087
+#: ../ui-hlp/menu.c:1382
+msgid "Phoenix"
+msgstr "Phoenix"
+
+# ../ui-hlp/menu.c:1088
+#: ../ui-hlp/menu.c:1383
+msgid "Octo"
+msgstr "Octo"
+
+# ../ui-hlp/menu.c:1089
+#: ../ui-hlp/menu.c:1384
+msgid "Magnet"
+msgstr "Magnet"
+
+# ../ui-hlp/menu.c:1091
+#: ../ui-hlp/menu.c:1385
+msgid "All features"
+msgstr "V¹echny vlastnosti"
+
+# ../ui-hlp/menu.c:1093
+#: ../ui-hlp/menu.c:1387
+msgid "Outcoloring modes"
+msgstr "Vnìj¹í vybarvení"
+
+# ../ui-hlp/menu.c:1094
+#: ../ui-hlp/menu.c:1388
+msgid "Incoloring modes"
+msgstr "Vnitøní vybarvení"
+
+# ../ui-hlp/menu.c:1095
+#: ../ui-hlp/menu.c:1389
+msgid "True-color coloring modes"
+msgstr "True-color vybarvovací re¾imy"
+
+# ../ui-hlp/menu.c:1097
+#: ../ui-hlp/menu.c:1392
+msgid "Planes"
+msgstr "Plochy"
+
+# ../ui-hlp/menu.c:1098
+#: ../ui-hlp/menu.c:1393
+msgid "Animations and position files"
+msgstr "Animace a soubory pozic"
+
+# ../ui-hlp/menu.c:1100
+#: ../ui-hlp/menu.c:1396
+msgid "Random palettes"
+msgstr "Náhodné barevné palety"
+
+# ../ui-hlp/menu.c:1101
+#: ../ui-hlp/menu.c:1397
+msgid "Other noteworthy features"
+msgstr "Dal¹í malièkosti"
+
+# ../ui-hlp/menu.c:1105
+#: ../ui-hlp/menu.c:1400
+msgid "The definition and fractal dimension"
+msgstr "Definice a fraktaldimenze"
+
+# ../ui-hlp/menu.c:1106
+#: ../ui-hlp/menu.c:1402
+msgid "Escape time fractals"
+msgstr "Fraktaly na základu útìku"
+
+#: ../ui-hlp/menu.c:1406
+msgid "Triceratops and Catseye fractals"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1408
+msgid "Mandelbar, Lambda, Manowar and Spider"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1411
+msgid "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+msgstr ""
+
+# ../ui-hlp/menu.c:1108
+#: ../ui-hlp/menu.c:1413
+msgid "What's new in 3.0?"
+msgstr "Novinky ve verzi 3.0"
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:74
+#, fuzzy
+msgid "line available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+# ../ui-hlp/menu.c:893
+#: ../ui-hlp/play.c:99
+#, fuzzy
+msgid "Morphing non existing line!"
+msgstr "Pøemìòující se poslední èára"
+
+#: ../ui-hlp/play.c:121
+msgid "linekey not available in this context!"
+msgstr ""
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:291
+#, fuzzy
+msgid "clear_line available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:300
+#, fuzzy
+msgid "clear_lines available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+#: ../ui-hlp/play.c:359
+msgid "Catalog file not found"
+msgstr ""
+
+#: ../ui-hlp/play.c:405
+msgid "Replay is already active"
+msgstr ""
+
+# ../ui/ui.c:853 ../ui/ui.c:917
+#: ../ui-hlp/play.c:409
+#, fuzzy
+msgid "File open failed"
+msgstr "Není místo pro tabulky"
+
+# ../ui/ui.c:307
+#: ../ui-hlp/play.c:414
+#, fuzzy
+msgid "Out of memory"
+msgstr "Memórie je zaplnìná."
+
+# ../ui-hlp/menu.c:908
+#: ../ui-hlp/play.c:526 ../ui-hlp/play.c:542 ../ui-hlp/play.c:566
+#: ../ui-hlp/play.c:595
+#, fuzzy
+msgid "Missing parameter"
+msgstr "Parametry zahladìní"
+
+#: ../ui-hlp/play.c:528 ../ui-hlp/play.c:544 ../ui-hlp/play.c:568
+#: ../ui-hlp/play.c:597
+msgid "Unexpected end of file"
+msgstr ""
+
+#: ../ui-hlp/play.c:555 ../ui-hlp/play.c:574
+msgid "Token is too long"
+msgstr ""
+
+# ../ui-hlp/menu.c:919
+#: ../ui-hlp/play.c:629
+#, fuzzy
+msgid "Unknown formula type"
+msgstr "Filtr"
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:635
+#, fuzzy
+msgid "morph available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+#: ../ui-hlp/play.c:639
+msgid "morphview: Invalid viewpoint"
+msgstr ""
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:653
+#, fuzzy
+msgid "move available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:667
+#, fuzzy
+msgid "morphjulia available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:680
+#, fuzzy
+msgid "morphangle available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+# ../ui-hlp/menu.c:919
+#: ../ui-hlp/play.c:712
+#, fuzzy
+msgid "Unknown filter"
+msgstr "Filtr"
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:753
+#, fuzzy
+msgid "sleep available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+#: ../ui-hlp/play.c:767
+#, c-format
+msgid "Internal program error #12 %i\n"
+msgstr ""
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:788
+#, fuzzy
+msgid "wait available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+#: ../ui-hlp/play.c:834
+msgid "No catalog file loaded"
+msgstr ""
+
+#: ../ui-hlp/play.c:839
+msgid "Message not found in catalog file"
+msgstr ""
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/play.c:850
+#, fuzzy
+msgid "load available only in animation replay"
+msgstr "Jenom bìhem animace"
+
+#: ../ui-hlp/play.c:854
+msgid "Include level overflow"
+msgstr ""
+
+#: ../ui-hlp/play.c:863
+msgid "File not found"
+msgstr ""
+
+# ../ui-hlp/menu.c:908
+#: ../ui-hlp/play.c:881
+#, fuzzy
+msgid "Too many parameters"
+msgstr "Parametry zahladìní"
+
+#: ../ui-hlp/play.c:916
+#, c-format
+msgid "Replay disabled at line %i"
+msgstr ""
+
+#: ../ui-hlp/ui_helper.c:646
+msgid "Tutorial files not found. Reinstall XaoS"
+msgstr ""
+
+#: ../ui-hlp/ui_helper.c:651
+msgid "Preparing first image"
+msgstr ""
+
+# ../ui-hlp/menu.c:976
+#: ../ui-hlp/ui_helper.c:661
+#, fuzzy
+msgid "Could not open examples"
+msgstr "Nahrání náhodného pøíkladu"
+
+#: ../ui-hlp/ui_helper.c:667
+#, c-format
+msgid "File %s loaded."
+msgstr ""
+
+# ../ui-hlp/menu.c:975
+#: ../ui-hlp/ui_helper.c:676
+#, fuzzy
+msgid "Saving image..."
+msgstr "Ulo¾ení obrazu"
+
+# ../ui-hlp/menu.c:926 ../ui-hlp/menu.c:1046
+#: ../ui-hlp/ui_helper.c:684
+#, fuzzy
+msgid "Save interrupted"
+msgstr "Pøeru¹ení"
+
+#: ../ui-hlp/ui_helper.c:693 ../ui-hlp/ui_helper.c:710
+#: ../ui-hlp/ui_helper.c:777
+#, c-format
+msgid "File %s saved."
+msgstr ""
+
+# ../ui/ui.c:853 ../ui/ui.c:917
+#: ../ui-hlp/ui_helper.c:704
+#, fuzzy
+msgid "Can not open file"
+msgstr "Není místo pro tabulky"
+
+#: ../ui-hlp/ui_helper.c:799
+#, c-format
+msgid "Recording to file %s enabled."
+msgstr ""
+
+# ../ui-hlp/menu.c:1020
+#: ../engine/zoom.c:1128
+#, fuzzy
+msgid "Solid guessing 1"
+msgstr "Solidní hádání"
+
+#: ../engine/btrace.c:292 ../engine/btrace.c:373
+msgid "Boundary trace"
+msgstr ""
+
+#: ../ui/dialog.c:312 ../ui/dialog.c:398 ../ui/dialog.c:1377
+#: ../ui/ui-drv/cocoa/CustomDialog.m:302
+msgid "OK"
+msgstr ""
+
+#: ../ui/dialog.c:313 ../ui/dialog.c:401 ../ui/dialog.c:1379
+#: ../ui/filesel.c:184 ../ui/ui-drv/cocoa/CustomDialog.m:312
+msgid "Cancel"
+msgstr ""
+
+#: ../ui-hlp/render.c:46
+#, c-format
+msgid "Error: %s"
+msgstr ""
+
+# ../ui/ui.c:853 ../ui/ui.c:917
+#: ../ui-hlp/render.c:121
+#, fuzzy
+msgid "Cannot open motion vector file!"
+msgstr "Není místo pro tabulky"
+
+#: ../ui-hlp/render.c:270
+#, c-format
+msgid "Vectors: %i"
+msgstr ""
+
+# ../ui-hlp/menu.c:1023
+#: ../ui-hlp/render.c:276
+#, fuzzy
+msgid "Initializing"
+msgstr "Iterace"
+
+# ../ui/ui.c:812
+#: ../ui-hlp/render.c:284
+#, fuzzy
+msgid "Cannot create palette"
+msgstr "Paleta barev nelze vytvoøit"
+
+# ../ui/ui.c:820
+#: ../ui-hlp/render.c:295
+#, fuzzy
+msgid "Cannot create image\n"
+msgstr "Obraz nelze vytvoøit"
+
+# ../ui/ui.c:820
+#: ../ui-hlp/render.c:304
+#, fuzzy
+msgid "Cannot create checking buffer!"
+msgstr "Obraz nelze vytvoøit"
+
+# ../ui/ui.c:812
+#: ../ui-hlp/render.c:313 ../ui-hlp/render.c:596
+#, fuzzy
+msgid "Cannot create context\n"
+msgstr "Paleta barev nelze vytvoøit"
+
+# ../ui/ui.c:853 ../ui/ui.c:917
+#: ../ui-hlp/render.c:325
+#, fuzzy
+msgid "Cannot open animation file\n"
+msgstr "Není místo pro tabulky"
+
+#: ../ui-hlp/render.c:336 ../ui-hlp/render.c:605
+msgid "Loading catalogs"
+msgstr ""
+
+#: ../ui-hlp/render.c:366
+msgid "Processing command line options"
+msgstr ""
+
+# ../ui-hlp/menu.c:1039
+#: ../ui-hlp/render.c:389
+#, fuzzy
+msgid "Enabling animation replay\n"
+msgstr "Jenom bìhem animace"
+
+# ../ui/ui.c:853 ../ui/ui.c:917
+#: ../ui-hlp/render.c:396 ../ui-hlp/render.c:514
+#, fuzzy
+msgid "Cannot open image file"
+msgstr "Není místo pro tabulky"
+
+# ../ui/ui.c:853 ../ui/ui.c:917
+#: ../ui-hlp/render.c:410
+#, fuzzy
+msgid "Cannot open pattern file"
+msgstr "Není místo pro tabulky"
+
+#: ../ui-hlp/render.c:427 ../ui-hlp/render.c:429 ../ui-hlp/render.c:638
+msgid "Entering calculation loop!"
+msgstr ""
+
+#: ../ui-hlp/render.c:455
+#, c-format
+msgid "Frame %i skipped."
+msgstr ""
+
+#: ../ui-hlp/render.c:457
+#, c-format
+msgid "Frames %i - %i skipped."
+msgstr ""
+
+#: ../ui-hlp/render.c:461
+#, c-format
+msgid "Frame %4i: "
+msgstr ""
+
+#: ../ui-hlp/render.c:528
+msgid " done."
+msgstr ""
+
+#: ../ui-hlp/render.c:532
+msgid " skipping..."
+msgstr ""
+
+# ../ui-hlp/menu.c:926 ../ui-hlp/menu.c:1046
+#: ../ui-hlp/render.c:565 ../ui-hlp/render.c:657
+#, fuzzy
+msgid "Calculation interrupted"
+msgstr "Pøeru¹ení"
+
+# ../ui-hlp/menu.c:931
+#: ../ui-hlp/render.c:568 ../ui-hlp/render.c:570 ../ui-hlp/render.c:659
+#, fuzzy
+msgid "Calculation finished"
+msgstr "Poèítání"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1292 ../ui/ui-drv/cocoa/AppController.m:321
+msgid "Copy"
+msgstr ""
+
+# ../ui-hlp/menu.c:989
+#: ../ui/ui-drv/win32/ui_win32.c:1293 ../ui/ui-drv/cocoa/AppController.m:324
+#, fuzzy
+msgid "Paste"
+msgstr "Paleta barev"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1297
+msgid "About"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:197
+msgid "About XaoS"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:200
+msgid "Services"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:203
+msgid "Hide XaoS"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:206
+msgid "Hide Others"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:209
+msgid "Show All"
+msgstr ""
+
+# ../ui/ui.c:1146
+#: ../ui/ui-drv/cocoa/AppController.m:212
+#, fuzzy
+msgid "Quit XaoS"
+msgstr "Zavøít"
+
+#: ../ui/ui-drv/cocoa/AppController.m:318
+msgid "Cut"
+msgstr ""
+
+# ../ui-hlp/menu.c:989
+#: ../ui/ui-drv/cocoa/AppController.m:327
+#, fuzzy
+msgid "Delete"
+msgstr "Paleta barev"
+
+#: ../ui/ui-drv/cocoa/AppController.m:330
+msgid "Select All"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:340
+msgid "Minimize"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:348
+msgid "Bring All to Front"
+msgstr ""
+
+# ../ui-hlp/menu.c:952
+#: ../ui/ui-drv/cocoa/AppController.m:359
+#, fuzzy
+msgid "Close"
+msgstr "Barva"
+
+#: ../ui/ui-drv/cocoa/AppController.m:373
+msgid "Videator Output"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/CustomDialog.m:142
+msgid "Choose"
+msgstr ""
+
+# ../ui-hlp/menu.c:984
+#~ msgid "formulae"
+#~ msgstr "Vzorec"
+
+# ../ui/ui.c:812
+#, fuzzy
+#~ msgid "Can not create context\n"
+#~ msgstr "Paleta barev nelze vytvoøit"
+
+#~ msgid "Up"
+#~ msgstr "Nahoru"
+
+#~ msgid "Bottom"
+#~ msgstr "Dolù"
+
+#~ msgid "Left"
+#~ msgstr "Doleva"
diff --git a/src/i18n/de.po b/src/i18n/de.po
new file mode 100644
index 0000000..1454946
--- /dev/null
+++ b/src/i18n/de.po
@@ -0,0 +1,1481 @@
+# translation of de.po to
+# XaoS NLS file for German language.
+# Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+# Zoltan Kovacs <kovzol@math.u-szeged.hu>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: de\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-14 10:56+0100\n"
+"PO-Revision-Date: 2008-04-27 21:48+0200\n"
+"Last-Translator: \n"
+"Language-Team: <de@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 1.11.4\n"
+
+#: ../ui/ui.c:314
+msgid "XaoS is out of memory."
+msgstr "XaoS hat zu wenig Speicher"
+
+#: ../ui/ui.c:360
+#, c-format
+msgid "%s %.2f times (%.1fE) %2.2f frames/sec %c %i %i %i %i "
+msgstr "%s %.2f Fach (%.1fE) %2.2f Bilder/Sek %c %i %i %i %i "
+
+#: ../ui/ui.c:361
+msgid "unzoomed"
+msgstr "ungezoomt:"
+
+#: ../ui/ui.c:361
+msgid "zoomed"
+msgstr "gezoomt:"
+
+#: ../ui/ui.c:369
+#, c-format
+msgid "framerate:%f\n"
+msgstr "Bildfrequenz: %f\n"
+
+#: ../ui/ui.c:409
+#, c-format
+msgid "Enabling: %s. "
+msgstr "%s wird eingeschaltet."
+
+#: ../ui/ui.c:411
+#, c-format
+msgid "Disabling: %s. "
+msgstr "%s wird ausgeschaltet."
+
+#: ../ui/ui.c:441
+#, c-format
+msgid "Fractal name:%s"
+msgstr "Fraktalname:%s"
+
+#: ../ui/ui.c:446
+#, c-format
+msgid "Fractal type:%s"
+msgstr "Fraktaltyp:%s"
+
+#: ../ui/ui.c:448
+msgid "Mandelbrot"
+msgstr "Mandelbrot"
+
+#: ../ui/ui.c:449
+msgid "Julia"
+msgstr "Julia"
+
+#: ../ui/ui.c:452
+#, c-format
+msgid "Formula:%s"
+msgstr "Formel:%s"
+
+#: ../ui/ui.c:457
+#, c-format
+msgid "View:[%1.12f,%1.12f]"
+msgstr "Ausschnitt:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:461
+#, c-format
+msgid "size:[%1.12f,%1.12f]"
+msgstr "Grösse:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:465
+#, c-format
+msgid "Rotation:%4.2f Screen size:%i:%i"
+msgstr "Rotation:%4.2f Bildschirm Grösse:%i:%i"
+
+#: ../ui/ui.c:470
+#, c-format
+msgid "Iterations:%-4i Palette size:%i"
+msgstr "Iterationen:%-4i Grösse der Palette:%i"
+
+#: ../ui/ui.c:477
+#, c-format
+msgid "Autopilot:%-4s Plane:%s"
+msgstr "Autopilot:%-4s Ebene:%s"
+
+#: ../ui/ui.c:478
+msgid "On"
+msgstr "Ein"
+
+#: ../ui/ui.c:478
+msgid "Off"
+msgstr "Aus"
+
+#: ../ui/ui.c:482
+#, c-format
+msgid "incoloring:%s outcoloring:%s"
+msgstr "Innere Färbung:%s Äussere Färbung:%s"
+
+#: ../ui/ui.c:487
+#, c-format
+msgid "zoomspeed:%f"
+msgstr "Zoomgeschwindigkeit:%f"
+
+#: ../ui/ui.c:491
+msgid "Parameter:none"
+msgstr "Parameter:Keine"
+
+#: ../ui/ui.c:493
+#, c-format
+msgid "Parameter:[%f,%f]"
+msgstr "Parameter:[%f,%f]"
+
+#: ../ui/ui.c:585
+#, c-format
+msgid "Please wait while calculating %s"
+msgstr "Bitte warten, %s Fraktal wird berechnet "
+
+#: ../ui/ui.c:685
+#, c-format
+msgid "Letters per second %i "
+msgstr "Buchstaben pro Sekunde: %i "
+
+#: ../ui/ui.c:698 ../ui/ui.c:709
+#, c-format
+msgid "Rotation speed:%2.2f degrees per second "
+msgstr "Rotationsgeschwindigkeit:%2.2f Grad pro Sekunde "
+
+#: ../ui/ui.c:719
+#, c-format
+msgid "Iterations: %i "
+msgstr "Iterationen: %i "
+
+#: ../ui/ui.c:735
+#, c-format
+msgid "Cycling speed: %i "
+msgstr "Zirkulationsgeschwindigkeit: %i "
+
+#: ../ui/ui.c:748 ../ui/ui.c:762
+#, c-format
+msgid "speed:%2.2f "
+msgstr "Geschwindigkeit:%2.2f "
+
+#: ../ui/ui.c:854
+#, c-format
+msgid "Thank you for using XaoS\n"
+msgstr "Danke, dass Sie XaoS benutzt haben\n"
+
+#: ../ui/ui.c:891
+msgid "Skipping, please wait..."
+msgstr "Beim Überspringen, bitte warten..."
+
+#: ../ui/ui.c:983 ../ui/ui.c:985 ../ui/ui-drv/win32/ui_win32.c:1453
+msgid "Resize"
+msgstr "Anzeige"
+
+#: ../ui/ui.c:998
+msgid "Quit"
+msgstr "Beenden"
+
+#: ../ui/ui.c:999
+msgid "Exit now"
+msgstr "Jetzt beenden"
+
+#: ../ui/ui.c:1001
+msgid "Not yet"
+msgstr "Noch nicht beenden"
+
+#: ../ui/ui.c:1004 ../ui-hlp/menu.c:1055 ../ui-hlp/menu.c:1065
+#: ../ui/dialog.c:404 ../ui/dialog.c:1380
+msgid "Help"
+msgstr "Hilfe"
+
+#: ../ui/ui.c:1006
+msgid "Disable XaoS's builtin GUI"
+msgstr "XaoS's eingebautes GUI deaktivieren"
+
+#: ../ui/ui.c:1010 ../ui/ui.c:1016
+msgid "Status"
+msgstr "Status"
+
+#: ../ui/ui.c:1012 ../ui/ui.c:1018
+msgid "Ministatus"
+msgstr "Ministatus"
+
+#: ../ui/ui.c:1021 ../ui/ui.c:1022
+msgid "Driver"
+msgstr "Treiber"
+
+#: ../ui/ui.c:1413
+#, c-format
+msgid "Welcome to XaoS version %s"
+msgstr "Willkommen zu XaoS Version %s"
+
+#: ../ui/ui.c:1580
+msgid "Can not allocate buffers"
+msgstr "Kann Puffer nicht allozieren"
+
+#: ../ui/ui.c:1598
+msgid "Can not create palette"
+msgstr "Kann Palette nicht erzeugen"
+
+#: ../ui/ui.c:1610
+msgid "Can not create image"
+msgstr "Kann Bild nicht erzeugen"
+
+#: ../ui/ui.c:1641 ../ui/ui.c:1692
+msgid "Can not allocate tables"
+msgstr "Kann Tabellen nicht erzeugen"
+
+#: ../ui/ui.c:1678
+msgid "Can not initialize driver"
+msgstr "Kann Treiber nicht initialisieren"
+
+#: ../ui/ui.c:1681
+msgid "Can not return back to previous driver"
+msgstr "Kann nicht zu vorhergehendem Treiber zurückkehren"
+
+#: ../ui-hlp/menu.c:129
+msgid "Perturbation:"
+msgstr "Perturbation:"
+
+#: ../ui-hlp/menu.c:133
+msgid "Julia-seed:"
+msgstr "Julia-Anfangswert:"
+
+#: ../ui-hlp/menu.c:137
+msgid "Morphing type:"
+msgstr "Morphtyp:"
+
+#: ../ui-hlp/menu.c:138
+msgid "Startuptime:"
+msgstr "Startzeit:"
+
+#: ../ui-hlp/menu.c:139
+msgid "Stoptime:"
+msgstr "Stopzeit:"
+
+#: ../ui-hlp/menu.c:143
+msgid "File to render:"
+msgstr "Datei zum berechnen:"
+
+#: ../ui-hlp/menu.c:144
+msgid "Basename:"
+msgstr "Basisname:"
+
+#: ../ui-hlp/menu.c:145
+msgid "Width:"
+msgstr "Breite:"
+
+#: ../ui-hlp/menu.c:146
+msgid "Height:"
+msgstr "Höhe:"
+
+#: ../ui-hlp/menu.c:147
+msgid "Real width (cm):"
+msgstr "Tatsächliche Breite (cm):"
+
+#: ../ui-hlp/menu.c:148
+msgid "Real height (cm):"
+msgstr "Tatsächliche Höhe (cm):"
+
+#: ../ui-hlp/menu.c:149
+msgid "Framerate:"
+msgstr "Bildfrequenz:"
+
+#: ../ui-hlp/menu.c:150
+msgid "Image type:"
+msgstr "Bildtyp:"
+
+#: ../ui-hlp/menu.c:151
+msgid "Antialiasing:"
+msgstr "Antialiasing:"
+
+#: ../ui-hlp/menu.c:152
+msgid "Always recalculate:"
+msgstr "Immer neu berechnen:"
+
+#: ../ui-hlp/menu.c:153
+msgid "Calculate MPEG motion vectors:"
+msgstr "Berechne MPEG Bewegungsvektoren:"
+
+#: ../ui-hlp/menu.c:154
+msgid "Recommended I frame distance:"
+msgstr "Empfohlene I-Frame Distanz:"
+
+#: ../ui-hlp/menu.c:158
+msgid "Center:"
+msgstr "Zentrum:"
+
+#: ../ui-hlp/menu.c:159
+msgid "Radius:"
+msgstr "Radius:"
+
+#: ../ui-hlp/menu.c:160 ../ui-hlp/menu.c:225
+msgid "Angle:"
+msgstr "Winkel:"
+
+#: ../ui-hlp/menu.c:164
+msgid "Mode:"
+msgstr "Modus:"
+
+#: ../ui-hlp/menu.c:165
+msgid "Start:"
+msgstr "Start:"
+
+#: ../ui-hlp/menu.c:166
+msgid "End:"
+msgstr "Ende:"
+
+#: ../ui-hlp/menu.c:170
+msgid "Color:"
+msgstr "Farbe:"
+
+#: ../ui-hlp/menu.c:174
+msgid "Rotations per second:"
+msgstr "Rotationen pro Sekunde:"
+
+#: ../ui-hlp/menu.c:178
+msgid "Letters per second:"
+msgstr "Buchstaben pro Sekunde:"
+
+#: ../ui-hlp/menu.c:182
+msgid "Iterations:"
+msgstr "Iterationen:"
+
+#: ../ui-hlp/menu.c:186
+msgid "Text:"
+msgstr "Text:"
+
+#: ../ui-hlp/menu.c:190
+msgid "Your command:"
+msgstr "Ihr Befehl:"
+
+#: ../ui-hlp/menu.c:194 ../ui-hlp/menu.c:198 ../ui-hlp/menu.c:202
+#: ../ui-hlp/menu.c:206 ../ui-hlp/menu.c:258
+msgid "Filename:"
+msgstr "Dateiname:"
+
+#: ../ui-hlp/menu.c:210 ../ui-hlp/menu.c:298
+msgid "Formula:"
+msgstr "Formel:"
+
+#: ../ui-hlp/menu.c:214
+msgid "X center:"
+msgstr "X-Zentrum:"
+
+#: ../ui-hlp/menu.c:215
+msgid "Y center:"
+msgstr "Y-Zentrum:"
+
+#: ../ui-hlp/menu.c:216
+msgid "X Radius:"
+msgstr "X-Radius:"
+
+#: ../ui-hlp/menu.c:217
+msgid "Y Radius:"
+msgstr "Y-Radius:"
+
+#: ../ui-hlp/menu.c:221
+msgid "Coordinates:"
+msgstr "Koordinaten:"
+
+#: ../ui-hlp/menu.c:229
+msgid "continuous rotation"
+msgstr "Fortlaufende Rotation"
+
+#: ../ui-hlp/menu.c:233
+msgid "Fast rotation"
+msgstr "Schnelle Rotation"
+
+#: ../ui-hlp/menu.c:237
+msgid "filter"
+msgstr "Filter"
+
+#: ../ui-hlp/menu.c:238
+msgid "enable"
+msgstr "einschalten"
+
+#: ../ui-hlp/menu.c:242
+msgid "Amount:"
+msgstr "Schritte:"
+
+#: ../ui-hlp/menu.c:246
+msgid "Zooming speed:"
+msgstr "Zoomgeschwindigkeit:"
+
+#: ../ui-hlp/menu.c:250
+msgid "Name:"
+msgstr "Name:"
+
+#: ../ui-hlp/menu.c:254
+msgid "Bailout:"
+msgstr "Fluchtradius:"
+
+#: ../ui-hlp/menu.c:262
+msgid "Julia mode:"
+msgstr "Juliamodus:"
+
+#: ../ui-hlp/menu.c:266
+msgid "Horizontal position:"
+msgstr "Horizontale Position:"
+
+#: ../ui-hlp/menu.c:267
+msgid "Vertical position:"
+msgstr "Vertikale Position:"
+
+#: ../ui-hlp/menu.c:271
+msgid "Dynamic resolution:"
+msgstr "Dynamische Auflösung:"
+
+#: ../ui-hlp/menu.c:275
+msgid "Time:"
+msgstr "Zeit:"
+
+#: ../ui-hlp/menu.c:279 ../ui-hlp/menu.c:283
+msgid "Number:"
+msgstr "Anzahl:"
+
+#: ../ui-hlp/menu.c:287
+msgid "Algorithm number:"
+msgstr "Algorithmusnummer:"
+
+#: ../ui-hlp/menu.c:288
+msgid "Seed:"
+msgstr "Anfangswert:"
+
+#: ../ui-hlp/menu.c:289
+msgid "Shift:"
+msgstr "Verschiebung:"
+
+#: ../ui-hlp/menu.c:293
+msgid "Frames per second:"
+msgstr "Bilder pro Sekunde:"
+
+#: ../ui-hlp/menu.c:302
+msgid "Initialization:"
+msgstr "Initialisierung:"
+
+#: ../ui-hlp/menu.c:357
+msgid "renderanim: Must specify a valid absolute path for basename"
+msgstr "Animationsberechnung: Gültigen, absoluten Pfad für Basisname angeben"
+
+#: ../ui-hlp/menu.c:364
+msgid ""
+"renderanim: Width parameter must be positive integer in the range 0..4096"
+msgstr ""
+"Animationsberechnung: Breite muss einen positiven, ganzzahligen Wert "
+"zwischen 0 und 4096 haben"
+
+#: ../ui-hlp/menu.c:370
+msgid ""
+"renderanim: Height parameter must be positive integer in the range 0..4096"
+msgstr ""
+"Animationsberechnung: Höhe muss einen positiven, ganzzahligen Wert zwischen "
+"0 und 4096 haben"
+
+#: ../ui-hlp/menu.c:376
+msgid "renderanim: Invalid real width and height dimensions"
+msgstr "Animationsberechnung: Falsche tatsächliche Breite und Höhe"
+
+#: ../ui-hlp/menu.c:380
+msgid "renderanim: invalid framerate"
+msgstr "Animationsberechnung: Falsche Bildfrequenz"
+
+#: ../ui-hlp/menu.c:386
+msgid "renderanim: antialiasing not supported in 256 color mode"
+msgstr ""
+"Animationsberechnung: Antialiasing nicht unterstützt im 256-Farben-Modus"
+
+#: ../ui-hlp/menu.c:390
+msgid "renderanim: incorrect I frame distance"
+msgstr "Animationsberechnung: Falsche I-Frame Distanz"
+
+#: ../ui-hlp/menu.c:441 ../ui-hlp/menu.c:454
+msgid "animateview: Invalid viewpoint"
+msgstr "Animationsberechnung: Falscher Ausschnitt"
+
+#: ../ui-hlp/menu.c:467
+msgid "Invalid viewpoint"
+msgstr "Falscher Ausschnitt"
+
+#: ../ui-hlp/menu.c:696
+msgid "Unknown palette type"
+msgstr "Unbekannter Palettentyp"
+
+#: ../ui-hlp/menu.c:771 ../ui-hlp/menu.c:785
+msgid "Initialization of color cycling failed."
+msgstr "Initialisierung der Farbzirkulation fehlgeschlagen"
+
+#: ../ui-hlp/menu.c:773 ../ui-hlp/menu.c:787
+msgid "Try to enable palette emulation filter"
+msgstr "Versuche Palettenemulation einzuschalten"
+
+#: ../ui-hlp/menu.c:896
+#, c-format
+msgid "Algorithm:%i seed:%i size:%i"
+msgstr "Algorithmus:%i Anfangswert:%i Grösse:%i"
+
+#: ../ui-hlp/menu.c:947
+msgid "Root menu"
+msgstr "Hauptmenü"
+
+#: ../ui-hlp/menu.c:948
+msgid "Animation root menu"
+msgstr "Hauptmenü für Animationen"
+
+#: ../ui-hlp/menu.c:949
+msgid "Replay only commands"
+msgstr "Zeige nur Kommentare"
+
+#: ../ui-hlp/menu.c:950
+msgid "Command line options only"
+msgstr "Nur Kommandozeilenoptionen"
+
+#: ../ui-hlp/menu.c:953
+msgid "print menus specifications of all menus"
+msgstr "Zeige Menüspezifikationen für alle Menüs"
+
+#: ../ui-hlp/menu.c:958
+msgid "print menu specification"
+msgstr "Zeige Menüspezifikationen"
+
+#: ../ui-hlp/menu.c:961
+msgid "print menu specification in xshl format"
+msgstr "Zeige Menüspezifikationen im XSHL-Format"
+
+#: ../ui-hlp/menu.c:965
+msgid "print all menu specifications in xshl format"
+msgstr "Zeige alle Menüspezifikationen im XSHL-Format"
+
+#: ../ui-hlp/menu.c:967
+msgid "print dialog specification"
+msgstr "Zeige Dialogspezifikation"
+
+#: ../ui-hlp/menu.c:972
+msgid "Line drawing functions"
+msgstr "Funktionen zum zeichnen von Linien"
+
+#: ../ui-hlp/menu.c:973
+msgid "Line"
+msgstr "Linie"
+
+#: ../ui-hlp/menu.c:976
+msgid "Morph line"
+msgstr "Morphe Linie"
+
+#: ../ui-hlp/menu.c:978
+msgid "Morph last line"
+msgstr "Morphe letzte Linie"
+
+#: ../ui-hlp/menu.c:981
+msgid "Set line key"
+msgstr "Setze Linienschlüssel"
+
+#: ../ui-hlp/menu.c:983
+msgid "Clear line"
+msgstr "Lösche Linie"
+
+#: ../ui-hlp/menu.c:986
+msgid "Clear all lines"
+msgstr "Lösche alle Linien"
+
+#: ../ui-hlp/menu.c:988
+msgid "Animation functions"
+msgstr "Animationsfunktionen"
+
+#: ../ui-hlp/menu.c:989 ../ui-hlp/menu.c:1181 ../ui-hlp/menu.c:1190
+msgid "View"
+msgstr "Ausschnitt"
+
+#: ../ui-hlp/menu.c:993
+msgid "Morph view"
+msgstr "Morphe Ausschnitt"
+
+#: ../ui-hlp/menu.c:995
+msgid "Morph julia"
+msgstr "Morphe Julia"
+
+#: ../ui-hlp/menu.c:1000
+msgid "Move view"
+msgstr "Verschiebe Ausschnitt"
+
+#: ../ui-hlp/menu.c:1002
+msgid "Morph angle"
+msgstr "Morphe Winkel"
+
+#: ../ui-hlp/menu.c:1004
+msgid "Zoom center"
+msgstr "Zoomzentrum"
+
+#: ../ui-hlp/menu.c:1006 ../ui/ui-drv/cocoa/AppController.m:343
+msgid "Zoom"
+msgstr "Zoom"
+
+#: ../ui-hlp/menu.c:1007
+msgid "Un-zoom"
+msgstr "Unzoom"
+
+#: ../ui-hlp/menu.c:1010
+msgid "Stop zooming"
+msgstr "Zoomen anhalten"
+
+#: ../ui-hlp/menu.c:1011
+msgid "Smooth morphing parameters"
+msgstr "Smooth-Morphing-Parameter"
+
+#: ../ui-hlp/menu.c:1014
+msgid "Timing functions"
+msgstr "Timing-Funktionen"
+
+#: ../ui-hlp/menu.c:1015
+msgid "Usleep"
+msgstr "Usleep"
+
+#: ../ui-hlp/menu.c:1018
+msgid "Wait for text"
+msgstr "Warte auf Text"
+
+#: ../ui-hlp/menu.c:1020
+msgid "Wait for complete image"
+msgstr "Warte auf Bild"
+
+#: ../ui-hlp/menu.c:1022
+msgid "Include file"
+msgstr "Datei einbeziehen"
+
+#: ../ui-hlp/menu.c:1024 ../ui-hlp/menu.c:1222
+msgid "Default palette"
+msgstr "Standardpalette"
+
+#: ../ui-hlp/menu.c:1026
+msgid "Formula"
+msgstr "Formel"
+
+#: ../ui-hlp/menu.c:1028
+msgid "Maximal zooming step"
+msgstr "Maximal Zoomschritt"
+
+#: ../ui-hlp/menu.c:1030
+msgid "Zooming speedup"
+msgstr "Zoom-Speedup"
+
+#: ../ui-hlp/menu.c:1032
+msgid "Filter"
+msgstr "Filter"
+
+#: ../ui-hlp/menu.c:1036 ../ui-hlp/menu.c:1041
+msgid "Letters per second"
+msgstr "Buchstaben pro Sekunde"
+
+#: ../ui-hlp/menu.c:1043 ../ui-hlp/menu.c:1314
+msgid "Interrupt"
+msgstr "Unterbrechen"
+
+#: ../ui-hlp/menu.c:1045 ../ui-hlp/menu.c:1057
+msgid "File"
+msgstr "Datei"
+
+#: ../ui-hlp/menu.c:1046
+msgid "Edit"
+msgstr "Bearbeiten"
+
+#: ../ui-hlp/menu.c:1047
+msgid "Fractal"
+msgstr "Fraktal"
+
+#: ../ui-hlp/menu.c:1048
+msgid "Calculation"
+msgstr "Berechnung"
+
+#: ../ui-hlp/menu.c:1049 ../ui-hlp/menu.c:1391
+msgid "Filters"
+msgstr "Filter"
+
+#: ../ui-hlp/menu.c:1050 ../ui-hlp/menu.c:1064
+msgid "UI"
+msgstr "Interface"
+
+#: ../ui-hlp/menu.c:1051
+msgid "Misc"
+msgstr "Extras"
+
+#: ../ui-hlp/menu.c:1053
+msgid "Window"
+msgstr "Fenster"
+
+#: ../ui-hlp/menu.c:1056
+msgid "Tutorials"
+msgstr "Tutorials"
+
+#: ../ui-hlp/menu.c:1062
+msgid "Stop replay"
+msgstr "Anhalten"
+
+#: ../ui-hlp/menu.c:1066
+msgid "Command"
+msgstr "Kommando"
+
+#: ../ui-hlp/menu.c:1068
+msgid "Play string"
+msgstr "Zeige Satz"
+
+#: ../ui-hlp/menu.c:1070
+msgid "Render animation"
+msgstr "Berechne Animation"
+
+#: ../ui-hlp/menu.c:1073
+msgid "Clear screen"
+msgstr "Lösche Bildschirm"
+
+#: ../ui-hlp/menu.c:1075
+msgid "Display fractal"
+msgstr "Zeige Fraktal"
+
+#: ../ui-hlp/menu.c:1078
+msgid "Display text"
+msgstr "Zeige Text"
+
+#: ../ui-hlp/menu.c:1080
+msgid "Color"
+msgstr "Farbe"
+
+#: ../ui-hlp/menu.c:1082
+msgid "Horizontal text position"
+msgstr "Horizontale Textposition"
+
+#: ../ui-hlp/menu.c:1084
+msgid "Vertical text position"
+msgstr "Vertikale Textposition"
+
+#: ../ui-hlp/menu.c:1086
+msgid "Text position"
+msgstr "Textposition"
+
+#: ../ui-hlp/menu.c:1090
+msgid "Message"
+msgstr "Nachricht"
+
+#: ../ui-hlp/menu.c:1112
+msgid "Load"
+msgstr "Öffnen"
+
+#: ../ui-hlp/menu.c:1115
+msgid "Save"
+msgstr "Speichern"
+
+#: ../ui-hlp/menu.c:1117
+msgid "Record"
+msgstr "Aufzeichnen"
+
+#: ../ui-hlp/menu.c:1121
+msgid "Replay"
+msgstr "Wiedergeben"
+
+#: ../ui-hlp/menu.c:1128
+msgid "Save image"
+msgstr "Bild speichern"
+
+#: ../ui-hlp/menu.c:1130
+msgid "Load random example"
+msgstr "Zufälliges Beispiel öffnen"
+
+#: ../ui-hlp/menu.c:1132
+msgid "Save configuration"
+msgstr "Konfiguration speichern"
+
+#: ../ui-hlp/menu.c:1137
+msgid "Undo"
+msgstr "Rückgängig"
+
+#: ../ui-hlp/menu.c:1141
+msgid "Redo"
+msgstr "Wiederholen"
+
+#: ../ui-hlp/menu.c:1145
+msgid "Formulae"
+msgstr "Formeln"
+
+#: ../ui-hlp/menu.c:1146
+msgid "More formulae"
+msgstr "Mehr Formeln"
+
+#: ../ui-hlp/menu.c:1151
+msgid "User formula"
+msgstr "Benutzerformel"
+
+#: ../ui-hlp/menu.c:1153
+msgid "User initialization"
+msgstr "Benutzerinitialisierung"
+
+#: ../ui-hlp/menu.c:1158
+msgid "Incoloring mode"
+msgstr "Innere Färbung"
+
+#: ../ui-hlp/menu.c:1159
+msgid "Outcoloring mode"
+msgstr "Äussere Färbung"
+
+#: ../ui-hlp/menu.c:1160
+msgid "Plane"
+msgstr "Ebene"
+
+#: ../ui-hlp/menu.c:1161
+msgid "Palette"
+msgstr "Palette"
+
+#: ../ui-hlp/menu.c:1164
+msgid "Mandelbrot mode"
+msgstr "Mandelbrotmodus"
+
+#: ../ui-hlp/menu.c:1170 ../ui-hlp/menu.c:1174 ../ui-hlp/menu.c:1395
+msgid "Perturbation"
+msgstr "Perturbation"
+
+#: ../ui-hlp/menu.c:1185
+msgid "Reset to defaults"
+msgstr "Auf Standardwerte zurücksetzen"
+
+#: ../ui-hlp/menu.c:1186
+msgid "Julia mode"
+msgstr "Juliamodus"
+
+#: ../ui-hlp/menu.c:1193
+msgid "Set angle"
+msgstr "Winkel setzen"
+
+#: ../ui-hlp/menu.c:1197
+msgid "Set plane"
+msgstr "Ebene setzen"
+
+#: ../ui-hlp/menu.c:1201
+msgid "Inside coloring mode"
+msgstr "Innerer Farbmodus"
+
+#: ../ui-hlp/menu.c:1206
+msgid "Outside coloring mode"
+msgstr "Äusserer Farbmodus"
+
+#: ../ui-hlp/menu.c:1212
+msgid "Inside truecolor coloring mode"
+msgstr "Innerer Echt-Farbmodus"
+
+#: ../ui-hlp/menu.c:1216
+msgid "Outside truecolor coloring mode"
+msgstr "Äusserer Echt-Farbmodus"
+
+#: ../ui-hlp/menu.c:1219
+msgid "Julia seed"
+msgstr "Julia-Anfangswert"
+
+#: ../ui-hlp/menu.c:1224
+msgid "Random palette"
+msgstr "Zufallspalette"
+
+#: ../ui-hlp/menu.c:1226
+msgid "Custom palette"
+msgstr "Benutzerpalette"
+
+#: ../ui-hlp/menu.c:1230
+msgid "Color cycling"
+msgstr "Farbzirkulation"
+
+#: ../ui-hlp/menu.c:1232
+msgid "Reversed color cycling"
+msgstr "Rückwärts-Farbzirkulation "
+
+#: ../ui-hlp/menu.c:1237
+msgid "Color cycling speed"
+msgstr "Farbzirkulationsgeschwindigkeit"
+
+#: ../ui-hlp/menu.c:1241
+msgid "Shift palette"
+msgstr "Verschiebe Palette"
+
+#: ../ui-hlp/menu.c:1243
+msgid "Shift one forward"
+msgstr "Verschiebe eins vorwärts"
+
+#: ../ui-hlp/menu.c:1246
+msgid "Shift one backward"
+msgstr "Verschiebe eins rückwärts"
+
+#: ../ui-hlp/menu.c:1248 ../engine/zoom.c:1357
+msgid "Solid guessing"
+msgstr "Solid-Guessing"
+
+#: ../ui-hlp/menu.c:1249
+msgid "Dynamic resolution"
+msgstr "Dynamische Auflösung"
+
+#: ../ui-hlp/menu.c:1251
+msgid "Periodicity checking"
+msgstr "Periodizitätstest"
+
+#: ../ui-hlp/menu.c:1254
+msgid "Iterations"
+msgstr "Iterationen"
+
+#: ../ui-hlp/menu.c:1256
+msgid "Bailout"
+msgstr "Fluchtradius"
+
+#: ../ui-hlp/menu.c:1260
+msgid "Fast julia mode"
+msgstr "Schneller Juliamodus"
+
+#: ../ui-hlp/menu.c:1262
+msgid "Rotation"
+msgstr "Rotation"
+
+#: ../ui-hlp/menu.c:1263
+msgid "Solid guessing range"
+msgstr "Solid-Guessing Bereich"
+
+#: ../ui-hlp/menu.c:1266
+msgid "Disable rotation"
+msgstr "Rotation ausschalten"
+
+#: ../ui-hlp/menu.c:1270
+msgid "Continuous rotation"
+msgstr "Fortlaufende Rotation"
+
+#: ../ui-hlp/menu.c:1273
+msgid "Rotate by mouse"
+msgstr "Rotation mit Maus"
+
+#: ../ui-hlp/menu.c:1277
+msgid "Rotation speed"
+msgstr "Rotationsgeschwindigkeit"
+
+#: ../ui-hlp/menu.c:1280
+msgid "Automatic rotation"
+msgstr "Automatische Rotation"
+
+#: ../ui-hlp/menu.c:1285
+msgid "Fast rotation mode"
+msgstr "Schneller Rotationsmodus"
+
+#: ../ui-hlp/menu.c:1289
+msgid "Disable dynamic resolution"
+msgstr "Dynamische Auflösung ausschalten"
+
+#: ../ui-hlp/menu.c:1292
+msgid "Use only during animation"
+msgstr "Nur während Animation benutzen"
+
+#: ../ui-hlp/menu.c:1296
+msgid "Use also for new images"
+msgstr "Auch für neue Bilder benutzen"
+
+#: ../ui-hlp/menu.c:1298
+msgid "Dynamic resolution mode"
+msgstr "Modus der dynamischen Auflösung"
+
+#: ../ui-hlp/menu.c:1302
+msgid "Autopilot"
+msgstr "Autopilot"
+
+#: ../ui-hlp/menu.c:1306
+msgid "VJ mode"
+msgstr "Juliamodus"
+
+#: ../ui-hlp/menu.c:1310
+msgid "Recalculate"
+msgstr "Neu berechnen"
+
+#: ../ui-hlp/menu.c:1319
+msgid "Zooming speed"
+msgstr "Zoomgeschwindigkeit"
+
+#: ../ui-hlp/menu.c:1321
+msgid "Fixed step"
+msgstr "Gleiche Schritte"
+
+#: ../ui-hlp/menu.c:1325
+msgid "Disable solid guessing"
+msgstr "Solid-Guessing ausschalten"
+
+#: ../ui-hlp/menu.c:1329
+msgid "Guess 2x2 rectangles"
+msgstr "Rate 2x2 Quadrate"
+
+#: ../ui-hlp/menu.c:1331
+msgid "Guess 3x3 rectangles"
+msgstr "Rate 3x3 Quadrate"
+
+#: ../ui-hlp/menu.c:1335
+msgid "Guess 4x4 rectangles"
+msgstr "Rate 4x4 Quadrate"
+
+#: ../ui-hlp/menu.c:1337
+msgid "Guess 5x5 rectangles"
+msgstr "Rate 5x5 Quadrate"
+
+#: ../ui-hlp/menu.c:1341
+msgid "Guess 6x6 rectangles"
+msgstr "Rate 6x6 Quadrate"
+
+#: ../ui-hlp/menu.c:1343
+msgid "Guess 7x7 rectangles"
+msgstr "Rate 7x7 Quadrate"
+
+#: ../ui-hlp/menu.c:1347
+msgid "Guess 8x8 rectangles"
+msgstr "Rate 8x8 Quadrate"
+
+#: ../ui-hlp/menu.c:1349
+msgid "Guess unlimited rectangles"
+msgstr "Rate beliebig grosse Quadrate"
+
+#: ../ui-hlp/menu.c:1354
+msgid "Language"
+msgstr "Sprache"
+
+#: ../ui-hlp/menu.c:1357
+msgid "An introduction to fractals"
+msgstr "Fraktale - Eine Einführung"
+
+#: ../ui-hlp/menu.c:1359
+msgid "XaoS features overview"
+msgstr "XaoS - Eine Übersicht"
+
+#: ../ui-hlp/menu.c:1361
+msgid "Math behind fractals"
+msgstr "Die Mathematik hinter Fraktalen"
+
+#: ../ui-hlp/menu.c:1362 ../ui-hlp/menu.c:1403
+msgid "Other fractal types in XaoS"
+msgstr "Andere Fraktale in XaoS"
+
+#: ../ui-hlp/menu.c:1364
+msgid "What's new?"
+msgstr "Was ist neu?"
+
+#: ../ui-hlp/menu.c:1374 ../ui-hlp/menu.c:1398
+msgid "Whole story"
+msgstr "Die ganze Geschichte"
+
+#: ../ui-hlp/menu.c:1376
+msgid "Introduction"
+msgstr "Einführung"
+
+#: ../ui-hlp/menu.c:1377
+msgid "Mandelbrot set"
+msgstr "Mandelbrot-Menge"
+
+#: ../ui-hlp/menu.c:1378
+msgid "Julia set"
+msgstr "Julia-Menge"
+
+#: ../ui-hlp/menu.c:1379
+msgid "Higher power Mandelbrots"
+msgstr "Mandelbrot-Mengen höherer Ordnung"
+
+#: ../ui-hlp/menu.c:1380
+msgid "Newton's method"
+msgstr "Newtonsches Tangentenverfahren"
+
+#: ../ui-hlp/menu.c:1381
+msgid "Barnsley's formula"
+msgstr "Barnsley's Formel"
+
+#: ../ui-hlp/menu.c:1382
+msgid "Phoenix"
+msgstr "Phoenix"
+
+#: ../ui-hlp/menu.c:1383
+msgid "Octo"
+msgstr "Octo"
+
+#: ../ui-hlp/menu.c:1384
+msgid "Magnet"
+msgstr "Magnet"
+
+#: ../ui-hlp/menu.c:1385
+msgid "All features"
+msgstr "Alle Features"
+
+#: ../ui-hlp/menu.c:1387
+msgid "Outcoloring modes"
+msgstr "Äussere Färbungen"
+
+#: ../ui-hlp/menu.c:1388
+msgid "Incoloring modes"
+msgstr "Innere Färbungen"
+
+#: ../ui-hlp/menu.c:1389
+msgid "True-color coloring modes"
+msgstr "Echt-Farben Färbungsmodis"
+
+#: ../ui-hlp/menu.c:1392
+msgid "Planes"
+msgstr "Ebenen"
+
+#: ../ui-hlp/menu.c:1393
+msgid "Animations and position files"
+msgstr "Animations- und Positionsdateien"
+
+#: ../ui-hlp/menu.c:1396
+msgid "Random palettes"
+msgstr "Zufallspalette"
+
+#: ../ui-hlp/menu.c:1397
+msgid "Other noteworthy features"
+msgstr "Andere beachtenswerte Features"
+
+#: ../ui-hlp/menu.c:1400
+msgid "The definition and fractal dimension"
+msgstr "Definition und fraktale Dimension"
+
+#: ../ui-hlp/menu.c:1402
+msgid "Escape time fractals"
+msgstr "Fliehzeit-Fraktale"
+
+#: ../ui-hlp/menu.c:1406
+msgid "Triceratops and Catseye fractals"
+msgstr "Triceratops und Katzenaugen Fraktale"
+
+#: ../ui-hlp/menu.c:1408
+msgid "Mandelbar, Lambda, Manowar and Spider"
+msgstr "Mandelbar, Lambda, Manowar und Spider"
+
+#: ../ui-hlp/menu.c:1411
+msgid "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+msgstr "Sierpinski Dichtung, S. Teppich, Kochsche Schneeflocke"
+
+#: ../ui-hlp/menu.c:1413
+msgid "What's new in 3.0?"
+msgstr "Was ist neu in 3.0?"
+
+#: ../ui-hlp/play.c:74
+msgid "line available only in animation replay"
+msgstr "Linie nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:99
+msgid "Morphing non existing line!"
+msgstr "Morphe nicht existente Linie!"
+
+#: ../ui-hlp/play.c:121
+msgid "linekey not available in this context!"
+msgstr "Linienschlüssel nicht verfügbar in diesem Kontext!"
+
+#: ../ui-hlp/play.c:291
+msgid "clear_line available only in animation replay"
+msgstr "Linie löschen nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:300
+msgid "clear_lines available only in animation replay"
+msgstr "Linien löschen nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:359
+msgid "Catalog file not found"
+msgstr "Katalogdatei nicht gefunden"
+
+#: ../ui-hlp/play.c:405
+msgid "Replay is already active"
+msgstr "Bereits am Wiedergeben"
+
+#: ../ui-hlp/play.c:409
+msgid "File open failed"
+msgstr "Datei konnte nicht geöffnet werden"
+
+#: ../ui-hlp/play.c:414
+msgid "Out of memory"
+msgstr "Zu wenig Speicher"
+
+#: ../ui-hlp/play.c:526 ../ui-hlp/play.c:542 ../ui-hlp/play.c:566
+#: ../ui-hlp/play.c:595
+msgid "Missing parameter"
+msgstr "Fehlender Parameter"
+
+#: ../ui-hlp/play.c:528 ../ui-hlp/play.c:544 ../ui-hlp/play.c:568
+#: ../ui-hlp/play.c:597
+msgid "Unexpected end of file"
+msgstr "Unerwartetes Dateiende"
+
+#: ../ui-hlp/play.c:555 ../ui-hlp/play.c:574
+msgid "Token is too long"
+msgstr "Token ist zu lang"
+
+#: ../ui-hlp/play.c:629
+msgid "Unknown formula type"
+msgstr "Unbekannter Formeltyp"
+
+#: ../ui-hlp/play.c:635
+msgid "morph available only in animation replay"
+msgstr "Morphen nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:639
+msgid "morphview: Invalid viewpoint"
+msgstr "Morphansicht: Falscher Ausschnitt"
+
+#: ../ui-hlp/play.c:653
+msgid "move available only in animation replay"
+msgstr "Verschieben nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:667
+msgid "morphjulia available only in animation replay"
+msgstr "Morphjulia nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:680
+msgid "morphangle available only in animation replay"
+msgstr "Morphwinkel nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:712
+msgid "Unknown filter"
+msgstr "Unbekannter Filter"
+
+#: ../ui-hlp/play.c:753
+msgid "sleep available only in animation replay"
+msgstr "Pause nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:767
+#, c-format
+msgid "Internal program error #12 %i\n"
+msgstr "Interner Programmfehler Nr. 12 %i\n"
+
+#: ../ui-hlp/play.c:788
+msgid "wait available only in animation replay"
+msgstr "Warten nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:834
+msgid "No catalog file loaded"
+msgstr "Keine Katalogdatei geladen"
+
+#: ../ui-hlp/play.c:839
+msgid "Message not found in catalog file"
+msgstr "Nachricht in der Katalogdatei nicht gefunden"
+
+#: ../ui-hlp/play.c:850
+msgid "load available only in animation replay"
+msgstr "Öffnen nur im Wiedergabemodus verfügbar"
+
+#: ../ui-hlp/play.c:854
+msgid "Include level overflow"
+msgstr "Zu viele Dateien ineinander einbezogen"
+
+#: ../ui-hlp/play.c:863
+msgid "File not found"
+msgstr "Datei nicht gefunden"
+
+#: ../ui-hlp/play.c:881
+msgid "Too many parameters"
+msgstr "Zu viele Parameter"
+
+#: ../ui-hlp/play.c:916
+#, c-format
+msgid "Replay disabled at line %i"
+msgstr "Wiedergabe auf Zeile %i ausgeschaltet"
+
+#: ../ui-hlp/ui_helper.c:646
+msgid "Tutorial files not found. Reinstall XaoS"
+msgstr "Tutorial Dateien nicht gefunden. Installiere XaoS neu"
+
+#: ../ui-hlp/ui_helper.c:651
+msgid "Preparing first image"
+msgstr "Erstes Bild wird vorbereitet"
+
+#: ../ui-hlp/ui_helper.c:661
+msgid "Could not open examples"
+msgstr "Konnte Beispiele nicht öffnen"
+
+#: ../ui-hlp/ui_helper.c:667
+#, c-format
+msgid "File %s loaded."
+msgstr "Datei %s geöffnet."
+
+#: ../ui-hlp/ui_helper.c:676
+msgid "Saving image..."
+msgstr "Speichere Bild..."
+
+#: ../ui-hlp/ui_helper.c:684
+msgid "Save interrupted"
+msgstr "Speicher Vorgang unterbrochen"
+
+#: ../ui-hlp/ui_helper.c:693 ../ui-hlp/ui_helper.c:710
+#: ../ui-hlp/ui_helper.c:777
+#, c-format
+msgid "File %s saved."
+msgstr "Datei %s gespeichert."
+
+#: ../ui-hlp/ui_helper.c:704
+msgid "Can not open file"
+msgstr "Kann Datei nicht öffnen"
+
+#: ../ui-hlp/ui_helper.c:799
+#, c-format
+msgid "Recording to file %s enabled."
+msgstr "Aufzeichnung in Datei %s eingeschaltet"
+
+#: ../engine/zoom.c:1128
+msgid "Solid guessing 1"
+msgstr "Solid-Guessing 1"
+
+#: ../engine/btrace.c:292 ../engine/btrace.c:373
+msgid "Boundary trace"
+msgstr "Boundary-Trace"
+
+#: ../ui/dialog.c:312 ../ui/dialog.c:398 ../ui/dialog.c:1377
+#: ../ui/ui-drv/cocoa/CustomDialog.m:302
+msgid "OK"
+msgstr "OK"
+
+#: ../ui/dialog.c:313 ../ui/dialog.c:401 ../ui/dialog.c:1379
+#: ../ui/filesel.c:184 ../ui/ui-drv/cocoa/CustomDialog.m:312
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: ../ui-hlp/render.c:46
+#, c-format
+msgid "Error: %s"
+msgstr "Fehler: %s"
+
+#: ../ui-hlp/render.c:121
+msgid "Cannot open motion vector file!"
+msgstr "Kann Bewegungsvektoren-Datei nicht öffnen!"
+
+#: ../ui-hlp/render.c:270
+#, c-format
+msgid "Vectors: %i"
+msgstr "Vektoren: %i"
+
+#: ../ui-hlp/render.c:276
+msgid "Initializing"
+msgstr "Beim initialisieren"
+
+#: ../ui-hlp/render.c:284
+msgid "Cannot create palette"
+msgstr "Kann Palette nicht erstellen"
+
+#: ../ui-hlp/render.c:295
+msgid "Cannot create image\n"
+msgstr "Kann Bild nicht erstellen\n"
+
+#: ../ui-hlp/render.c:304
+msgid "Cannot create checking buffer!"
+msgstr "Kann Kontroll-Puffer nicht erstellen!"
+
+#: ../ui-hlp/render.c:313 ../ui-hlp/render.c:596
+msgid "Cannot create context\n"
+msgstr "Kann Kontext nicht erstellen\n"
+
+#: ../ui-hlp/render.c:325
+msgid "Cannot open animation file\n"
+msgstr "Kann Animationsdatei nicht öffnen\n"
+
+#: ../ui-hlp/render.c:336 ../ui-hlp/render.c:605
+msgid "Loading catalogs"
+msgstr "Öffne Kataloge"
+
+#: ../ui-hlp/render.c:366
+msgid "Processing command line options"
+msgstr "Verarbeite Kommandozeilenoptionen"
+
+#: ../ui-hlp/render.c:389
+msgid "Enabling animation replay\n"
+msgstr "Wiedergabe von Animation wird eingeschaltet\n"
+
+#: ../ui-hlp/render.c:396 ../ui-hlp/render.c:514
+msgid "Cannot open image file"
+msgstr "Kann Bilddatei nicht öffnen"
+
+#: ../ui-hlp/render.c:410
+msgid "Cannot open pattern file"
+msgstr "Kann Palettendatei nicht öffnen"
+
+#: ../ui-hlp/render.c:427 ../ui-hlp/render.c:429 ../ui-hlp/render.c:638
+msgid "Entering calculation loop!"
+msgstr "Trete in Berechnungsschlaufe ein!"
+
+#: ../ui-hlp/render.c:455
+#, c-format
+msgid "Frame %i skipped."
+msgstr "Bild %i übersprungen."
+
+#: ../ui-hlp/render.c:457
+#, c-format
+msgid "Frames %i - %i skipped."
+msgstr "Bilder %i bis %i übersprungen."
+
+#: ../ui-hlp/render.c:461
+#, c-format
+msgid "Frame %4i: "
+msgstr "Bild %4i: "
+
+#: ../ui-hlp/render.c:528
+msgid " done."
+msgstr " fertig."
+
+#: ../ui-hlp/render.c:532
+msgid " skipping..."
+msgstr " beim Überspringen..."
+
+#: ../ui-hlp/render.c:565 ../ui-hlp/render.c:657
+msgid "Calculation interrupted"
+msgstr "Berechnung unterbrochen"
+
+#: ../ui-hlp/render.c:568 ../ui-hlp/render.c:570 ../ui-hlp/render.c:659
+msgid "Calculation finished"
+msgstr "Berechnung beendet"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1292 ../ui/ui-drv/cocoa/AppController.m:321
+msgid "Copy"
+msgstr "Kopieren"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1293 ../ui/ui-drv/cocoa/AppController.m:324
+msgid "Paste"
+msgstr "Einfügen"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1297
+msgid "About"
+msgstr "Info"
+
+#: ../ui/ui-drv/cocoa/AppController.m:197
+msgid "About XaoS"
+msgstr "Über XaoS"
+
+#: ../ui/ui-drv/cocoa/AppController.m:200
+msgid "Services"
+msgstr "Dienste"
+
+#: ../ui/ui-drv/cocoa/AppController.m:203
+msgid "Hide XaoS"
+msgstr "XaoS ausblenden"
+
+#: ../ui/ui-drv/cocoa/AppController.m:206
+msgid "Hide Others"
+msgstr "Andere ausblenden"
+
+#: ../ui/ui-drv/cocoa/AppController.m:209
+msgid "Show All"
+msgstr "Alle einblenden"
+
+#: ../ui/ui-drv/cocoa/AppController.m:212
+msgid "Quit XaoS"
+msgstr "XaoS Beenden"
+
+#: ../ui/ui-drv/cocoa/AppController.m:318
+msgid "Cut"
+msgstr "Ausschneiden"
+
+#: ../ui/ui-drv/cocoa/AppController.m:327
+msgid "Delete"
+msgstr "Löschen"
+
+#: ../ui/ui-drv/cocoa/AppController.m:330
+msgid "Select All"
+msgstr "Alle auswählen"
+
+#: ../ui/ui-drv/cocoa/AppController.m:340
+msgid "Minimize"
+msgstr "Im Dock ablegen"
+
+#: ../ui/ui-drv/cocoa/AppController.m:348
+msgid "Bring All to Front"
+msgstr "Alle nach vorne bringen"
+
+#: ../ui/ui-drv/cocoa/AppController.m:359
+msgid "Close"
+msgstr "Schliessen"
+
+#: ../ui/ui-drv/cocoa/AppController.m:373
+msgid "Videator Output"
+msgstr "Videator Ausgabe"
+
+#: ../ui/ui-drv/cocoa/CustomDialog.m:142
+msgid "Choose"
+msgstr "Wählen"
diff --git a/src/i18n/es.po b/src/i18n/es.po
new file mode 100644
index 0000000..960bd50
--- /dev/null
+++ b/src/i18n/es.po
@@ -0,0 +1,1561 @@
+# XaoS NLS file for Spanish language.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Zoltan Kovacs <kovzol@math.u-szeged.hu>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XaoS 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-14 10:56+0100\n"
+"PO-Revision-Date: 2002-10-04 15:22+0200\n"
+"Last-Translator: César Pérez <oroz@users.sourceforge.net>\n"
+"Language-Team: Spanish <es@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: ../ui/ui.c:314
+msgid "XaoS is out of memory."
+msgstr "XaoS se quedó sin memoria"
+
+#: ../ui/ui.c:360
+#, c-format
+msgid "%s %.2f times (%.1fE) %2.2f frames/sec %c %i %i %i %i "
+msgstr "%s %.2f X (%.1fE) %2.2f imágenes/seg %c %i %i %i %i "
+
+#: ../ui/ui.c:361
+msgid "unzoomed"
+msgstr "alejado"
+
+#: ../ui/ui.c:361
+msgid "zoomed"
+msgstr "acercado"
+
+#: ../ui/ui.c:369
+#, c-format
+msgid "framerate:%f\n"
+msgstr "velocidad:%f\n"
+
+#: ../ui/ui.c:409
+#, c-format
+msgid "Enabling: %s. "
+msgstr "Habilitando: %s. "
+
+#: ../ui/ui.c:411
+#, c-format
+msgid "Disabling: %s. "
+msgstr "Deshabilitando: %s"
+
+#: ../ui/ui.c:441
+#, c-format
+msgid "Fractal name:%s"
+msgstr "Nombre del fractal: %s"
+
+#: ../ui/ui.c:446
+#, c-format
+msgid "Fractal type:%s"
+msgstr "Tipo de fractal: %s"
+
+#: ../ui/ui.c:448
+msgid "Mandelbrot"
+msgstr "Mandelbrot"
+
+#: ../ui/ui.c:449
+msgid "Julia"
+msgstr "Julia"
+
+#: ../ui/ui.c:452
+#, fuzzy, c-format
+msgid "Formula:%s"
+msgstr "Fórmula"
+
+#: ../ui/ui.c:457
+#, c-format
+msgid "View:[%1.12f,%1.12f]"
+msgstr "Vista:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:461
+#, c-format
+msgid "size:[%1.12f,%1.12f]"
+msgstr "Tamaño:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:465
+#, c-format
+msgid "Rotation:%4.2f Screen size:%i:%i"
+msgstr "Rotación:%4.2f Tamaño de la pantalla:%i:%i"
+
+#: ../ui/ui.c:470
+#, c-format
+msgid "Iterations:%-4i Palette size:%i"
+msgstr "Iteraciones:%-4i Tamaño de la paleta:%i"
+
+#: ../ui/ui.c:477
+#, c-format
+msgid "Autopilot:%-4s Plane:%s"
+msgstr "Piloto automático:%-4s Plano:%s"
+
+#: ../ui/ui.c:478
+msgid "On"
+msgstr "On"
+
+#: ../ui/ui.c:478
+msgid "Off"
+msgstr "Off"
+
+#: ../ui/ui.c:482
+#, c-format
+msgid "incoloring:%s outcoloring:%s"
+msgstr "Color interior:%s Color exterior:%s"
+
+#: ../ui/ui.c:487
+#, c-format
+msgid "zoomspeed:%f"
+msgstr "Velocidad zoom:%f"
+
+#: ../ui/ui.c:491
+msgid "Parameter:none"
+msgstr "Parámetro:ninguno"
+
+#: ../ui/ui.c:493
+#, c-format
+msgid "Parameter:[%f,%f]"
+msgstr "Parámetro:[%f,%f]"
+
+#: ../ui/ui.c:585
+#, c-format
+msgid "Please wait while calculating %s"
+msgstr "Por favor espere mientras se calcula %s"
+
+#: ../ui/ui.c:685
+#, c-format
+msgid "Letters per second %i "
+msgstr "Letras por segundo %i "
+
+#: ../ui/ui.c:698 ../ui/ui.c:709
+#, c-format
+msgid "Rotation speed:%2.2f degrees per second "
+msgstr "Velocidad de rotación:%2.2f grados por segundo "
+
+#: ../ui/ui.c:719
+#, fuzzy, c-format
+msgid "Iterations: %i "
+msgstr "Iteraciones: %i "
+
+#: ../ui/ui.c:735
+#, c-format
+msgid "Cycling speed: %i "
+msgstr "Velocidad de cambio de color: %i "
+
+#: ../ui/ui.c:748 ../ui/ui.c:762
+#, c-format
+msgid "speed:%2.2f "
+msgstr "velocidad: %2.2f "
+
+#: ../ui/ui.c:854
+#, c-format
+msgid "Thank you for using XaoS\n"
+msgstr "Gracias por usar XaoS\n"
+
+#: ../ui/ui.c:891
+msgid "Skipping, please wait..."
+msgstr "Saltando, por favor espere..."
+
+#: ../ui/ui.c:983 ../ui/ui.c:985 ../ui/ui-drv/win32/ui_win32.c:1453
+msgid "Resize"
+msgstr ""
+
+#: ../ui/ui.c:998
+#, fuzzy
+msgid "Quit"
+msgstr "Salir"
+
+#: ../ui/ui.c:999
+msgid "Exit now"
+msgstr "Salir ahora"
+
+#: ../ui/ui.c:1001
+msgid "Not yet"
+msgstr "Todavía no"
+
+#: ../ui/ui.c:1004 ../ui-hlp/menu.c:1055 ../ui-hlp/menu.c:1065
+#: ../ui/dialog.c:404 ../ui/dialog.c:1380
+msgid "Help"
+msgstr "Ayuda"
+
+#: ../ui/ui.c:1006
+msgid "Disable XaoS's builtin GUI"
+msgstr "Deshabilitar GUI incorporado en XaoS"
+
+#: ../ui/ui.c:1010 ../ui/ui.c:1016
+msgid "Status"
+msgstr "Estado"
+
+#: ../ui/ui.c:1012 ../ui/ui.c:1018
+msgid "Ministatus"
+msgstr "Miniestado"
+
+#: ../ui/ui.c:1021 ../ui/ui.c:1022
+msgid "Driver"
+msgstr "Driver"
+
+#: ../ui/ui.c:1413
+#, c-format
+msgid "Welcome to XaoS version %s"
+msgstr "Bienvenido a XaoS versión %s"
+
+#: ../ui/ui.c:1580
+msgid "Can not allocate buffers"
+msgstr "No se puede asignar búfer"
+
+#: ../ui/ui.c:1598
+msgid "Can not create palette"
+msgstr "No se puede crear la paleta"
+
+#: ../ui/ui.c:1610
+msgid "Can not create image"
+msgstr "No se puede crear la imagen"
+
+#: ../ui/ui.c:1641 ../ui/ui.c:1692
+msgid "Can not allocate tables"
+msgstr "No se asignar tablas"
+
+#: ../ui/ui.c:1678
+msgid "Can not initialize driver"
+msgstr "No se puede inicializar el driver"
+
+#: ../ui/ui.c:1681
+msgid "Can not return back to previous driver"
+msgstr "No se puede volver al driver anterior"
+
+#: ../ui-hlp/menu.c:129
+#, fuzzy
+msgid "Perturbation:"
+msgstr "Perturbación"
+
+#: ../ui-hlp/menu.c:133
+#, fuzzy
+msgid "Julia-seed:"
+msgstr "Semilla del Julia"
+
+#: ../ui-hlp/menu.c:137
+msgid "Morphing type:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:138
+#, fuzzy
+msgid "Startuptime:"
+msgstr "Estado"
+
+#: ../ui-hlp/menu.c:139
+#, fuzzy
+msgid "Stoptime:"
+msgstr "Estado"
+
+#: ../ui-hlp/menu.c:143
+msgid "File to render:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:144
+#, fuzzy
+msgid "Basename:"
+msgstr "Fichero"
+
+#: ../ui-hlp/menu.c:145
+msgid "Width:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:146
+msgid "Height:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:147
+msgid "Real width (cm):"
+msgstr ""
+
+#: ../ui-hlp/menu.c:148
+msgid "Real height (cm):"
+msgstr ""
+
+#: ../ui-hlp/menu.c:149
+#, fuzzy
+msgid "Framerate:"
+msgstr "velocidad:%f\n"
+
+#: ../ui-hlp/menu.c:150
+msgid "Image type:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:151
+#, fuzzy
+msgid "Antialiasing:"
+msgstr "Iteraciones"
+
+#: ../ui-hlp/menu.c:152
+#, fuzzy
+msgid "Always recalculate:"
+msgstr "Recalcular"
+
+#: ../ui-hlp/menu.c:153
+msgid "Calculate MPEG motion vectors:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:154
+msgid "Recommended I frame distance:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:158
+#, fuzzy
+msgid "Center:"
+msgstr "Centro del zoom"
+
+#: ../ui-hlp/menu.c:159
+msgid "Radius:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:160 ../ui-hlp/menu.c:225
+msgid "Angle:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:164
+msgid "Mode:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:165
+#, fuzzy
+msgid "Start:"
+msgstr "Estado"
+
+#: ../ui-hlp/menu.c:166
+msgid "End:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:170
+#, fuzzy
+msgid "Color:"
+msgstr "Color"
+
+#: ../ui-hlp/menu.c:174
+#, fuzzy
+msgid "Rotations per second:"
+msgstr "Velocidad de rotación"
+
+#: ../ui-hlp/menu.c:178
+#, fuzzy
+msgid "Letters per second:"
+msgstr "Letras por segundo"
+
+#: ../ui-hlp/menu.c:182
+#, fuzzy
+msgid "Iterations:"
+msgstr "Iteraciones"
+
+#: ../ui-hlp/menu.c:186
+msgid "Text:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:190
+#, fuzzy
+msgid "Your command:"
+msgstr "Instrucción"
+
+#: ../ui-hlp/menu.c:194 ../ui-hlp/menu.c:198 ../ui-hlp/menu.c:202
+#: ../ui-hlp/menu.c:206 ../ui-hlp/menu.c:258
+#, fuzzy
+msgid "Filename:"
+msgstr "Fichero"
+
+#: ../ui-hlp/menu.c:210 ../ui-hlp/menu.c:298
+#, fuzzy
+msgid "Formula:"
+msgstr "Fórmula"
+
+#: ../ui-hlp/menu.c:214
+#, fuzzy
+msgid "X center:"
+msgstr "Centro del zoom"
+
+#: ../ui-hlp/menu.c:215
+#, fuzzy
+msgid "Y center:"
+msgstr "Centro del zoom"
+
+#: ../ui-hlp/menu.c:216
+msgid "X Radius:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:217
+msgid "Y Radius:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:221
+msgid "Coordinates:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:229
+#, fuzzy
+msgid "continuous rotation"
+msgstr "Rotación continua"
+
+#: ../ui-hlp/menu.c:233
+#, fuzzy
+msgid "Fast rotation"
+msgstr "Modo de rotación rápido"
+
+#: ../ui-hlp/menu.c:237
+#, fuzzy
+msgid "filter"
+msgstr "Filtro"
+
+#: ../ui-hlp/menu.c:238
+msgid "enable"
+msgstr ""
+
+#: ../ui-hlp/menu.c:242
+msgid "Amount:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:246
+#, fuzzy
+msgid "Zooming speed:"
+msgstr "Velocidad del zoom"
+
+#: ../ui-hlp/menu.c:250
+msgid "Name:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:254
+msgid "Bailout:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:262
+#, fuzzy
+msgid "Julia mode:"
+msgstr "Modo Julia"
+
+#: ../ui-hlp/menu.c:266
+#, fuzzy
+msgid "Horizontal position:"
+msgstr "Posición horizontal del texto"
+
+#: ../ui-hlp/menu.c:267
+#, fuzzy
+msgid "Vertical position:"
+msgstr "Posición vertical del texto"
+
+#: ../ui-hlp/menu.c:271
+#, fuzzy
+msgid "Dynamic resolution:"
+msgstr "Resolución dinámica"
+
+#: ../ui-hlp/menu.c:275
+msgid "Time:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:279 ../ui-hlp/menu.c:283
+msgid "Number:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:287
+msgid "Algorithm number:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:288
+msgid "Seed:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:289
+msgid "Shift:"
+msgstr ""
+
+#: ../ui-hlp/menu.c:293
+#, fuzzy
+msgid "Frames per second:"
+msgstr "Letras por segundo"
+
+#: ../ui-hlp/menu.c:302
+#, fuzzy
+msgid "Initialization:"
+msgstr "Iteraciones"
+
+#: ../ui-hlp/menu.c:357
+msgid "renderanim: Must specify a valid absolute path for basename"
+msgstr ""
+
+#: ../ui-hlp/menu.c:364
+msgid ""
+"renderanim: Width parameter must be positive integer in the range 0..4096"
+msgstr ""
+
+#: ../ui-hlp/menu.c:370
+msgid ""
+"renderanim: Height parameter must be positive integer in the range 0..4096"
+msgstr ""
+
+#: ../ui-hlp/menu.c:376
+msgid "renderanim: Invalid real width and height dimensions"
+msgstr ""
+
+#: ../ui-hlp/menu.c:380
+msgid "renderanim: invalid framerate"
+msgstr ""
+
+#: ../ui-hlp/menu.c:386
+msgid "renderanim: antialiasing not supported in 256 color mode"
+msgstr ""
+
+#: ../ui-hlp/menu.c:390
+msgid "renderanim: incorrect I frame distance"
+msgstr ""
+
+#: ../ui-hlp/menu.c:441 ../ui-hlp/menu.c:454
+msgid "animateview: Invalid viewpoint"
+msgstr ""
+
+#: ../ui-hlp/menu.c:467
+msgid "Invalid viewpoint"
+msgstr ""
+
+#: ../ui-hlp/menu.c:696
+#, fuzzy
+msgid "Unknown palette type"
+msgstr "Filtro"
+
+#: ../ui-hlp/menu.c:771 ../ui-hlp/menu.c:785
+msgid "Initialization of color cycling failed."
+msgstr ""
+
+#: ../ui-hlp/menu.c:773 ../ui-hlp/menu.c:787
+msgid "Try to enable palette emulation filter"
+msgstr ""
+
+#: ../ui-hlp/menu.c:896
+#, c-format
+msgid "Algorithm:%i seed:%i size:%i"
+msgstr ""
+
+#: ../ui-hlp/menu.c:947
+msgid "Root menu"
+msgstr "Menú principal"
+
+#: ../ui-hlp/menu.c:948
+msgid "Animation root menu"
+msgstr "Animación menú principal"
+
+#: ../ui-hlp/menu.c:949
+msgid "Replay only commands"
+msgstr "Repetir sólo instrucciones"
+
+#: ../ui-hlp/menu.c:950
+msgid "Command line options only"
+msgstr "Sólo pciones de la línea de instrucciones"
+
+#: ../ui-hlp/menu.c:953
+msgid "print menus specifications of all menus"
+msgstr ""
+
+#: ../ui-hlp/menu.c:958
+msgid "print menu specification"
+msgstr ""
+
+#: ../ui-hlp/menu.c:961
+msgid "print menu specification in xshl format"
+msgstr ""
+
+#: ../ui-hlp/menu.c:965
+msgid "print all menu specifications in xshl format"
+msgstr ""
+
+#: ../ui-hlp/menu.c:967
+msgid "print dialog specification"
+msgstr ""
+
+#: ../ui-hlp/menu.c:972
+msgid "Line drawing functions"
+msgstr "Funciones para dibujar líneas"
+
+#: ../ui-hlp/menu.c:973
+msgid "Line"
+msgstr "Línea"
+
+#: ../ui-hlp/menu.c:976
+#, fuzzy
+msgid "Morph line"
+msgstr "Despejar línea"
+
+#: ../ui-hlp/menu.c:978
+msgid "Morph last line"
+msgstr ""
+
+#: ../ui-hlp/menu.c:981
+#, fuzzy
+msgid "Set line key"
+msgstr "Poner plano"
+
+#: ../ui-hlp/menu.c:983
+msgid "Clear line"
+msgstr "Despejar línea"
+
+#: ../ui-hlp/menu.c:986
+msgid "Clear all lines"
+msgstr "Despejar todas las líneas"
+
+#: ../ui-hlp/menu.c:988
+msgid "Animation functions"
+msgstr "Funciones de animación"
+
+#: ../ui-hlp/menu.c:989 ../ui-hlp/menu.c:1181 ../ui-hlp/menu.c:1190
+msgid "View"
+msgstr "Vista"
+
+#: ../ui-hlp/menu.c:993
+msgid "Morph view"
+msgstr ""
+
+#: ../ui-hlp/menu.c:995
+msgid "Morph julia"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1000
+msgid "Move view"
+msgstr "Vista de movimiento"
+
+#: ../ui-hlp/menu.c:1002
+#, fuzzy
+msgid "Morph angle"
+msgstr "Poner ángulo"
+
+#: ../ui-hlp/menu.c:1004
+msgid "Zoom center"
+msgstr "Centro del zoom"
+
+#: ../ui-hlp/menu.c:1006 ../ui/ui-drv/cocoa/AppController.m:343
+msgid "Zoom"
+msgstr "Zoom"
+
+#: ../ui-hlp/menu.c:1007
+msgid "Un-zoom"
+msgstr "Alejar"
+
+#: ../ui-hlp/menu.c:1010
+msgid "Stop zooming"
+msgstr "Parar zoom"
+
+#: ../ui-hlp/menu.c:1011
+msgid "Smooth morphing parameters"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1014
+msgid "Timing functions"
+msgstr "Funciones de tiempo"
+
+#: ../ui-hlp/menu.c:1015
+msgid "Usleep"
+msgstr "Usleep"
+
+#: ../ui-hlp/menu.c:1018
+msgid "Wait for text"
+msgstr "Esperar por el texto"
+
+#: ../ui-hlp/menu.c:1020
+msgid "Wait for complete image"
+msgstr "Esperar para completar la imagen"
+
+#: ../ui-hlp/menu.c:1022
+msgid "Include file"
+msgstr "Fichero incluido"
+
+#: ../ui-hlp/menu.c:1024 ../ui-hlp/menu.c:1222
+msgid "Default palette"
+msgstr "Paleta por defecto"
+
+#: ../ui-hlp/menu.c:1026
+msgid "Formula"
+msgstr "Fórmula"
+
+#: ../ui-hlp/menu.c:1028
+msgid "Maximal zooming step"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1030
+msgid "Zooming speedup"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1032
+msgid "Filter"
+msgstr "Filtro"
+
+#: ../ui-hlp/menu.c:1036 ../ui-hlp/menu.c:1041
+msgid "Letters per second"
+msgstr "Letras por segundo"
+
+#: ../ui-hlp/menu.c:1043 ../ui-hlp/menu.c:1314
+msgid "Interrupt"
+msgstr "Interrumpir"
+
+#: ../ui-hlp/menu.c:1045 ../ui-hlp/menu.c:1057
+msgid "File"
+msgstr "Fichero"
+
+#: ../ui-hlp/menu.c:1046
+msgid "Edit"
+msgstr "Editar"
+
+#: ../ui-hlp/menu.c:1047
+msgid "Fractal"
+msgstr "Fractal"
+
+#: ../ui-hlp/menu.c:1048
+msgid "Calculation"
+msgstr "Cálculo"
+
+#: ../ui-hlp/menu.c:1049 ../ui-hlp/menu.c:1391
+msgid "Filters"
+msgstr "Filtros"
+
+#: ../ui-hlp/menu.c:1050 ../ui-hlp/menu.c:1064
+msgid "UI"
+msgstr "UI"
+
+#: ../ui-hlp/menu.c:1051
+msgid "Misc"
+msgstr "Misc"
+
+#: ../ui-hlp/menu.c:1053
+#, fuzzy
+msgid "Window"
+msgstr "Deshacer"
+
+#: ../ui-hlp/menu.c:1056
+msgid "Tutorials"
+msgstr "Tutoriales"
+
+#: ../ui-hlp/menu.c:1062
+msgid "Stop replay"
+msgstr "Parar repetición"
+
+#: ../ui-hlp/menu.c:1066
+msgid "Command"
+msgstr "Instrucción"
+
+#: ../ui-hlp/menu.c:1068
+msgid "Play string"
+msgstr "Mostrar cadena"
+
+#: ../ui-hlp/menu.c:1070
+msgid "Render animation"
+msgstr "Renderizar animación"
+
+#: ../ui-hlp/menu.c:1073
+msgid "Clear screen"
+msgstr "Limpiar pantalla"
+
+#: ../ui-hlp/menu.c:1075
+msgid "Display fractal"
+msgstr "Mostrar fractal"
+
+#: ../ui-hlp/menu.c:1078
+msgid "Display text"
+msgstr "Mostrar texto"
+
+#: ../ui-hlp/menu.c:1080
+#, fuzzy
+msgid "Color"
+msgstr "Color"
+
+#: ../ui-hlp/menu.c:1082
+msgid "Horizontal text position"
+msgstr "Posición horizontal del texto"
+
+#: ../ui-hlp/menu.c:1084
+msgid "Vertical text position"
+msgstr "Posición vertical del texto"
+
+#: ../ui-hlp/menu.c:1086
+msgid "Text position"
+msgstr "Posición del texto"
+
+#: ../ui-hlp/menu.c:1090
+msgid "Message"
+msgstr "Mensaje"
+
+#: ../ui-hlp/menu.c:1112
+msgid "Load"
+msgstr "Cargar"
+
+#: ../ui-hlp/menu.c:1115
+msgid "Save"
+msgstr "Guardar"
+
+#: ../ui-hlp/menu.c:1117
+msgid "Record"
+msgstr "Grabar"
+
+#: ../ui-hlp/menu.c:1121
+msgid "Replay"
+msgstr "Repetir"
+
+#: ../ui-hlp/menu.c:1128
+msgid "Save image"
+msgstr "Guardar imagen"
+
+#: ../ui-hlp/menu.c:1130
+msgid "Load random example"
+msgstr "Cargar ejemplo aleatorio"
+
+#: ../ui-hlp/menu.c:1132
+msgid "Save configuration"
+msgstr "Guardar configuración"
+
+#: ../ui-hlp/menu.c:1137
+msgid "Undo"
+msgstr "Deshacer"
+
+#: ../ui-hlp/menu.c:1141
+msgid "Redo"
+msgstr "Rehacer"
+
+#: ../ui-hlp/menu.c:1145
+msgid "Formulae"
+msgstr "Formulae"
+
+#: ../ui-hlp/menu.c:1146
+#, fuzzy
+msgid "More formulae"
+msgstr "formulae"
+
+#: ../ui-hlp/menu.c:1151
+#, fuzzy
+msgid "User formula"
+msgstr "formulae"
+
+#: ../ui-hlp/menu.c:1153
+#, fuzzy
+msgid "User initialization"
+msgstr "Funciones para dibujar líneas"
+
+#: ../ui-hlp/menu.c:1158
+msgid "Incoloring mode"
+msgstr "Modo de color interior"
+
+#: ../ui-hlp/menu.c:1159
+msgid "Outcoloring mode"
+msgstr "Modo de color exterior"
+
+#: ../ui-hlp/menu.c:1160
+msgid "Plane"
+msgstr "Plano"
+
+#: ../ui-hlp/menu.c:1161
+#, fuzzy
+msgid "Palette"
+msgstr "Paleta"
+
+#: ../ui-hlp/menu.c:1164
+msgid "Mandelbrot mode"
+msgstr "Modo Mandelbrot"
+
+#: ../ui-hlp/menu.c:1170 ../ui-hlp/menu.c:1174 ../ui-hlp/menu.c:1395
+msgid "Perturbation"
+msgstr "Perturbación"
+
+#: ../ui-hlp/menu.c:1185
+msgid "Reset to defaults"
+msgstr "Valores por defecto"
+
+#: ../ui-hlp/menu.c:1186
+msgid "Julia mode"
+msgstr "Modo Julia"
+
+#: ../ui-hlp/menu.c:1193
+msgid "Set angle"
+msgstr "Poner ángulo"
+
+#: ../ui-hlp/menu.c:1197
+msgid "Set plane"
+msgstr "Poner plano"
+
+#: ../ui-hlp/menu.c:1201
+msgid "Inside coloring mode"
+msgstr "Modo de coloración interior"
+
+#: ../ui-hlp/menu.c:1206
+msgid "Outside coloring mode"
+msgstr "Modo de coloración exterior"
+
+#: ../ui-hlp/menu.c:1212
+msgid "Inside truecolor coloring mode"
+msgstr "Modo de coloración interior color verdadero"
+
+#: ../ui-hlp/menu.c:1216
+msgid "Outside truecolor coloring mode"
+msgstr "Modo de coloración exterior color verdadero"
+
+#: ../ui-hlp/menu.c:1219
+msgid "Julia seed"
+msgstr "Semilla del Julia"
+
+#: ../ui-hlp/menu.c:1224
+msgid "Random palette"
+msgstr "Paleta aleatoria"
+
+#: ../ui-hlp/menu.c:1226
+msgid "Custom palette"
+msgstr "Paleta de usuario"
+
+#: ../ui-hlp/menu.c:1230
+msgid "Color cycling"
+msgstr "Cambio del color:"
+
+#: ../ui-hlp/menu.c:1232
+msgid "Reversed color cycling"
+msgstr "Cambio del color (inverso):"
+
+#: ../ui-hlp/menu.c:1237
+msgid "Color cycling speed"
+msgstr "Velocidad del cambio de color"
+
+#: ../ui-hlp/menu.c:1241
+msgid "Shift palette"
+msgstr "Cambiar paleta"
+
+#: ../ui-hlp/menu.c:1243
+msgid "Shift one forward"
+msgstr "Uno hacia deltante"
+
+#: ../ui-hlp/menu.c:1246
+msgid "Shift one backward"
+msgstr "Uno hacia atrás"
+
+#: ../ui-hlp/menu.c:1248 ../engine/zoom.c:1357
+msgid "Solid guessing"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1249
+msgid "Dynamic resolution"
+msgstr "Resolución dinámica"
+
+#: ../ui-hlp/menu.c:1251
+msgid "Periodicity checking"
+msgstr "Chequeo de periodicidad"
+
+#: ../ui-hlp/menu.c:1254
+msgid "Iterations"
+msgstr "Iteraciones"
+
+#: ../ui-hlp/menu.c:1256
+msgid "Bailout"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1260
+msgid "Fast julia mode"
+msgstr "Modo de Julia rápido"
+
+#: ../ui-hlp/menu.c:1262
+msgid "Rotation"
+msgstr "Rotación"
+
+#: ../ui-hlp/menu.c:1263
+msgid "Solid guessing range"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1266
+msgid "Disable rotation"
+msgstr "Deshabilitar rotación"
+
+#: ../ui-hlp/menu.c:1270
+msgid "Continuous rotation"
+msgstr "Rotación continua"
+
+#: ../ui-hlp/menu.c:1273
+msgid "Rotate by mouse"
+msgstr "Rotación con el ratón"
+
+#: ../ui-hlp/menu.c:1277
+msgid "Rotation speed"
+msgstr "Velocidad de rotación"
+
+#: ../ui-hlp/menu.c:1280
+msgid "Automatic rotation"
+msgstr "Rotación automática"
+
+#: ../ui-hlp/menu.c:1285
+msgid "Fast rotation mode"
+msgstr "Modo de rotación rápido"
+
+#: ../ui-hlp/menu.c:1289
+msgid "Disable dynamic resolution"
+msgstr "Deshabilitar resolución dinámica"
+
+#: ../ui-hlp/menu.c:1292
+msgid "Use only during animation"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/menu.c:1296
+msgid "Use also for new images"
+msgstr "Usar también para imágenes nuevas"
+
+#: ../ui-hlp/menu.c:1298
+msgid "Dynamic resolution mode"
+msgstr "Mode de resolución dinámica"
+
+#: ../ui-hlp/menu.c:1302
+msgid "Autopilot"
+msgstr "Piloto automático"
+
+#: ../ui-hlp/menu.c:1306
+#, fuzzy
+msgid "VJ mode"
+msgstr "Modo Julia"
+
+#: ../ui-hlp/menu.c:1310
+msgid "Recalculate"
+msgstr "Recalcular"
+
+#: ../ui-hlp/menu.c:1319
+msgid "Zooming speed"
+msgstr "Velocidad del zoom"
+
+#: ../ui-hlp/menu.c:1321
+msgid "Fixed step"
+msgstr "Paso fijo"
+
+#: ../ui-hlp/menu.c:1325
+msgid "Disable solid guessing"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1329
+msgid "Guess 2x2 rectangles"
+msgstr "Adivinar rectángulos 2x2"
+
+#: ../ui-hlp/menu.c:1331
+msgid "Guess 3x3 rectangles"
+msgstr "Adivinar rectángulos 3x3"
+
+#: ../ui-hlp/menu.c:1335
+msgid "Guess 4x4 rectangles"
+msgstr "Adivinar rectángulos 4x4"
+
+#: ../ui-hlp/menu.c:1337
+msgid "Guess 5x5 rectangles"
+msgstr "Adivinar rectángulos 5x5"
+
+#: ../ui-hlp/menu.c:1341
+msgid "Guess 6x6 rectangles"
+msgstr "Adivinar rectángulos 6x6"
+
+#: ../ui-hlp/menu.c:1343
+msgid "Guess 7x7 rectangles"
+msgstr "Adivinar rectángulos 7x7"
+
+#: ../ui-hlp/menu.c:1347
+msgid "Guess 8x8 rectangles"
+msgstr "Adivinar rectángulos 8x8"
+
+#: ../ui-hlp/menu.c:1349
+msgid "Guess unlimited rectangles"
+msgstr "Adivinar rectángulos ilimitados"
+
+#: ../ui-hlp/menu.c:1354
+msgid "Language"
+msgstr "Idioma"
+
+#: ../ui-hlp/menu.c:1357
+msgid "An introduction to fractals"
+msgstr "Una introducción a los fractales"
+
+#: ../ui-hlp/menu.c:1359
+msgid "XaoS features overview"
+msgstr "Perspectiva general de las características de XaoS"
+
+#: ../ui-hlp/menu.c:1361
+msgid "Math behind fractals"
+msgstr "Matemáticas tras los fractales"
+
+#: ../ui-hlp/menu.c:1362 ../ui-hlp/menu.c:1403
+msgid "Other fractal types in XaoS"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1364
+msgid "What's new?"
+msgstr "¿Qué hay nuevo?"
+
+#: ../ui-hlp/menu.c:1374 ../ui-hlp/menu.c:1398
+msgid "Whole story"
+msgstr "La historia completa"
+
+#: ../ui-hlp/menu.c:1376
+msgid "Introduction"
+msgstr "Introducción"
+
+#: ../ui-hlp/menu.c:1377
+msgid "Mandelbrot set"
+msgstr "Conjunto Mandelbrot"
+
+#: ../ui-hlp/menu.c:1378
+msgid "Julia set"
+msgstr "Conjunto Julia"
+
+#: ../ui-hlp/menu.c:1379
+msgid "Higher power Mandelbrots"
+msgstr "Mandelbrots de potencias superiores"
+
+#: ../ui-hlp/menu.c:1380
+msgid "Newton's method"
+msgstr "Método de Newton"
+
+#: ../ui-hlp/menu.c:1381
+msgid "Barnsley's formula"
+msgstr "Fórmula de Barnsley"
+
+#: ../ui-hlp/menu.c:1382
+msgid "Phoenix"
+msgstr "Fénix"
+
+#: ../ui-hlp/menu.c:1383
+msgid "Octo"
+msgstr "Octo"
+
+#: ../ui-hlp/menu.c:1384
+msgid "Magnet"
+msgstr "Magnet"
+
+#: ../ui-hlp/menu.c:1385
+msgid "All features"
+msgstr "Todas las características"
+
+#: ../ui-hlp/menu.c:1387
+#, fuzzy
+msgid "Outcoloring modes"
+msgstr "Modo de color exterior"
+
+#: ../ui-hlp/menu.c:1388
+#, fuzzy
+msgid "Incoloring modes"
+msgstr "Modo de color interior"
+
+#: ../ui-hlp/menu.c:1389
+#, fuzzy
+msgid "True-color coloring modes"
+msgstr "Modo de coloración interior color verdadero"
+
+#: ../ui-hlp/menu.c:1392
+msgid "Planes"
+msgstr "Planos"
+
+#: ../ui-hlp/menu.c:1393
+msgid "Animations and position files"
+msgstr "Ficheros de animaciones y posición"
+
+#: ../ui-hlp/menu.c:1396
+msgid "Random palettes"
+msgstr "Paletas aleatorias"
+
+#: ../ui-hlp/menu.c:1397
+msgid "Other noteworthy features"
+msgstr "Otras características destacables"
+
+#: ../ui-hlp/menu.c:1400
+msgid "The definition and fractal dimension"
+msgstr "La definición y dimensión fractal"
+
+#: ../ui-hlp/menu.c:1402
+#, fuzzy
+msgid "Escape time fractals"
+msgstr "Matemáticas tras los fractales"
+
+#: ../ui-hlp/menu.c:1406
+msgid "Triceratops and Catseye fractals"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1408
+msgid "Mandelbar, Lambda, Manowar and Spider"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1411
+msgid "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1413
+msgid "What's new in 3.0?"
+msgstr "¿Qué hay nuevo en 3.0?"
+
+#: ../ui-hlp/play.c:74
+#, fuzzy
+msgid "line available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:99
+msgid "Morphing non existing line!"
+msgstr ""
+
+#: ../ui-hlp/play.c:121
+msgid "linekey not available in this context!"
+msgstr ""
+
+#: ../ui-hlp/play.c:291
+#, fuzzy
+msgid "clear_line available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:300
+#, fuzzy
+msgid "clear_lines available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:359
+msgid "Catalog file not found"
+msgstr ""
+
+#: ../ui-hlp/play.c:405
+msgid "Replay is already active"
+msgstr ""
+
+#: ../ui-hlp/play.c:409
+#, fuzzy
+msgid "File open failed"
+msgstr "No se asignar tablas"
+
+#: ../ui-hlp/play.c:414
+#, fuzzy
+msgid "Out of memory"
+msgstr "XaoS se quedó sin memoria"
+
+#: ../ui-hlp/play.c:526 ../ui-hlp/play.c:542 ../ui-hlp/play.c:566
+#: ../ui-hlp/play.c:595
+msgid "Missing parameter"
+msgstr ""
+
+#: ../ui-hlp/play.c:528 ../ui-hlp/play.c:544 ../ui-hlp/play.c:568
+#: ../ui-hlp/play.c:597
+msgid "Unexpected end of file"
+msgstr ""
+
+#: ../ui-hlp/play.c:555 ../ui-hlp/play.c:574
+msgid "Token is too long"
+msgstr ""
+
+#: ../ui-hlp/play.c:629
+#, fuzzy
+msgid "Unknown formula type"
+msgstr "Filtro"
+
+#: ../ui-hlp/play.c:635
+#, fuzzy
+msgid "morph available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:639
+msgid "morphview: Invalid viewpoint"
+msgstr ""
+
+#: ../ui-hlp/play.c:653
+#, fuzzy
+msgid "move available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:667
+#, fuzzy
+msgid "morphjulia available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:680
+#, fuzzy
+msgid "morphangle available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:712
+#, fuzzy
+msgid "Unknown filter"
+msgstr "Filtro"
+
+#: ../ui-hlp/play.c:753
+#, fuzzy
+msgid "sleep available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:767
+#, c-format
+msgid "Internal program error #12 %i\n"
+msgstr ""
+
+#: ../ui-hlp/play.c:788
+#, fuzzy
+msgid "wait available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:834
+msgid "No catalog file loaded"
+msgstr ""
+
+#: ../ui-hlp/play.c:839
+msgid "Message not found in catalog file"
+msgstr ""
+
+#: ../ui-hlp/play.c:850
+#, fuzzy
+msgid "load available only in animation replay"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/play.c:854
+msgid "Include level overflow"
+msgstr ""
+
+#: ../ui-hlp/play.c:863
+msgid "File not found"
+msgstr ""
+
+#: ../ui-hlp/play.c:881
+msgid "Too many parameters"
+msgstr ""
+
+#: ../ui-hlp/play.c:916
+#, c-format
+msgid "Replay disabled at line %i"
+msgstr ""
+
+#: ../ui-hlp/ui_helper.c:646
+msgid "Tutorial files not found. Reinstall XaoS"
+msgstr ""
+
+#: ../ui-hlp/ui_helper.c:651
+msgid "Preparing first image"
+msgstr ""
+
+#: ../ui-hlp/ui_helper.c:661
+#, fuzzy
+msgid "Could not open examples"
+msgstr "Cargar ejemplo aleatorio"
+
+#: ../ui-hlp/ui_helper.c:667
+#, c-format
+msgid "File %s loaded."
+msgstr ""
+
+#: ../ui-hlp/ui_helper.c:676
+#, fuzzy
+msgid "Saving image..."
+msgstr "Guardar imagen"
+
+#: ../ui-hlp/ui_helper.c:684
+#, fuzzy
+msgid "Save interrupted"
+msgstr "Interrumpir"
+
+#: ../ui-hlp/ui_helper.c:693 ../ui-hlp/ui_helper.c:710
+#: ../ui-hlp/ui_helper.c:777
+#, c-format
+msgid "File %s saved."
+msgstr ""
+
+#: ../ui-hlp/ui_helper.c:704
+#, fuzzy
+msgid "Can not open file"
+msgstr "No se asignar tablas"
+
+#: ../ui-hlp/ui_helper.c:799
+#, c-format
+msgid "Recording to file %s enabled."
+msgstr ""
+
+#: ../engine/zoom.c:1128
+msgid "Solid guessing 1"
+msgstr ""
+
+#: ../engine/btrace.c:292 ../engine/btrace.c:373
+msgid "Boundary trace"
+msgstr ""
+
+#: ../ui/dialog.c:312 ../ui/dialog.c:398 ../ui/dialog.c:1377
+#: ../ui/ui-drv/cocoa/CustomDialog.m:302
+msgid "OK"
+msgstr ""
+
+#: ../ui/dialog.c:313 ../ui/dialog.c:401 ../ui/dialog.c:1379
+#: ../ui/filesel.c:184 ../ui/ui-drv/cocoa/CustomDialog.m:312
+msgid "Cancel"
+msgstr ""
+
+#: ../ui-hlp/render.c:46
+#, c-format
+msgid "Error: %s"
+msgstr ""
+
+#: ../ui-hlp/render.c:121
+#, fuzzy
+msgid "Cannot open motion vector file!"
+msgstr "No se asignar tablas"
+
+#: ../ui-hlp/render.c:270
+#, c-format
+msgid "Vectors: %i"
+msgstr ""
+
+#: ../ui-hlp/render.c:276
+#, fuzzy
+msgid "Initializing"
+msgstr "Iteraciones"
+
+#: ../ui-hlp/render.c:284
+#, fuzzy
+msgid "Cannot create palette"
+msgstr "No se puede crear la paleta"
+
+#: ../ui-hlp/render.c:295
+#, fuzzy
+msgid "Cannot create image\n"
+msgstr "No se puede crear la imagen"
+
+#: ../ui-hlp/render.c:304
+#, fuzzy
+msgid "Cannot create checking buffer!"
+msgstr "No se puede crear la imagen"
+
+#: ../ui-hlp/render.c:313 ../ui-hlp/render.c:596
+#, fuzzy
+msgid "Cannot create context\n"
+msgstr "No se puede crear la paleta"
+
+#: ../ui-hlp/render.c:325
+#, fuzzy
+msgid "Cannot open animation file\n"
+msgstr "No se asignar tablas"
+
+#: ../ui-hlp/render.c:336 ../ui-hlp/render.c:605
+msgid "Loading catalogs"
+msgstr ""
+
+#: ../ui-hlp/render.c:366
+#, fuzzy
+msgid "Processing command line options"
+msgstr "Sólo pciones de la línea de instrucciones"
+
+#: ../ui-hlp/render.c:389
+#, fuzzy
+msgid "Enabling animation replay\n"
+msgstr "Usar sólo durante la animación"
+
+#: ../ui-hlp/render.c:396 ../ui-hlp/render.c:514
+#, fuzzy
+msgid "Cannot open image file"
+msgstr "No se asignar tablas"
+
+#: ../ui-hlp/render.c:410
+#, fuzzy
+msgid "Cannot open pattern file"
+msgstr "No se asignar tablas"
+
+#: ../ui-hlp/render.c:427 ../ui-hlp/render.c:429 ../ui-hlp/render.c:638
+msgid "Entering calculation loop!"
+msgstr ""
+
+#: ../ui-hlp/render.c:455
+#, c-format
+msgid "Frame %i skipped."
+msgstr ""
+
+#: ../ui-hlp/render.c:457
+#, c-format
+msgid "Frames %i - %i skipped."
+msgstr ""
+
+#: ../ui-hlp/render.c:461
+#, c-format
+msgid "Frame %4i: "
+msgstr ""
+
+#: ../ui-hlp/render.c:528
+msgid " done."
+msgstr ""
+
+#: ../ui-hlp/render.c:532
+msgid " skipping..."
+msgstr ""
+
+#: ../ui-hlp/render.c:565 ../ui-hlp/render.c:657
+#, fuzzy
+msgid "Calculation interrupted"
+msgstr "Interrumpir"
+
+#: ../ui-hlp/render.c:568 ../ui-hlp/render.c:570 ../ui-hlp/render.c:659
+#, fuzzy
+msgid "Calculation finished"
+msgstr "Cálculo"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1292 ../ui/ui-drv/cocoa/AppController.m:321
+msgid "Copy"
+msgstr ""
+
+#: ../ui/ui-drv/win32/ui_win32.c:1293 ../ui/ui-drv/cocoa/AppController.m:324
+#, fuzzy
+msgid "Paste"
+msgstr "Paleta"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1297
+msgid "About"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:197
+msgid "About XaoS"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:200
+msgid "Services"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:203
+msgid "Hide XaoS"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:206
+msgid "Hide Others"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:209
+msgid "Show All"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:212
+#, fuzzy
+msgid "Quit XaoS"
+msgstr "Salir"
+
+#: ../ui/ui-drv/cocoa/AppController.m:318
+msgid "Cut"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:327
+#, fuzzy
+msgid "Delete"
+msgstr "Paleta"
+
+#: ../ui/ui-drv/cocoa/AppController.m:330
+msgid "Select All"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:340
+msgid "Minimize"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:348
+msgid "Bring All to Front"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:359
+#, fuzzy
+msgid "Close"
+msgstr "Color"
+
+#: ../ui/ui-drv/cocoa/AppController.m:373
+msgid "Videator Output"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/CustomDialog.m:142
+msgid "Choose"
+msgstr ""
+
+#~ msgid "formulae"
+#~ msgstr "Formulae"
+
+#, fuzzy
+#~ msgid "Can not create context\n"
+#~ msgstr "No se puede crear la paleta"
diff --git a/src/i18n/fr.po b/src/i18n/fr.po
new file mode 100644
index 0000000..07eb24a
--- /dev/null
+++ b/src/i18n/fr.po
@@ -0,0 +1,1506 @@
+# XaoS NLS file for French language.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Zoltan Kovacs <kovzol@math.u-szeged.hu>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XaoS 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-14 10:56+0100\n"
+"PO-Revision-Date: 2006-02-05 17:35+0200\n"
+"Last-Translator: Philippe Wautelet <traduc _at_ fractalzone _dot_ be>\n"
+"Language-Team: French\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: ../ui/ui.c:314
+msgid "XaoS is out of memory."
+msgstr "Pas assez de mémoire."
+
+#: ../ui/ui.c:360
+#, c-format
+msgid "%s %.2f times (%.1fE) %2.2f frames/sec %c %i %i %i %i "
+msgstr "%s %.2f fois (%.1fE) %2.2f images/sec %c %i %i %i %i "
+
+#: ../ui/ui.c:361
+msgid "unzoomed"
+msgstr "Réduit"
+
+#: ../ui/ui.c:361
+msgid "zoomed"
+msgstr "Aggrandi"
+
+#: ../ui/ui.c:369
+#, c-format
+msgid "framerate:%f\n"
+msgstr "taux de rafraîchissement : %f\n"
+
+#: ../ui/ui.c:409
+#, c-format
+msgid "Enabling: %s. "
+msgstr "Activation : %s. "
+
+#: ../ui/ui.c:411
+#, c-format
+msgid "Disabling: %s. "
+msgstr "Désactivation : %s. "
+
+#: ../ui/ui.c:441
+#, c-format
+msgid "Fractal name:%s"
+msgstr "Nom du fractal : %s"
+
+#: ../ui/ui.c:446
+#, c-format
+msgid "Fractal type:%s"
+msgstr "Type de fractal : %s"
+
+#: ../ui/ui.c:448
+msgid "Mandelbrot"
+msgstr "Mandelbrot"
+
+#: ../ui/ui.c:449
+msgid "Julia"
+msgstr "Julia"
+
+#: ../ui/ui.c:452
+#, fuzzy, c-format
+msgid "Formula:%s"
+msgstr "Formule :"
+
+#: ../ui/ui.c:457
+#, c-format
+msgid "View:[%1.12f,%1.12f]"
+msgstr "Vue : [%1.12f,%1.12f]"
+
+#: ../ui/ui.c:461
+#, c-format
+msgid "size:[%1.12f,%1.12f]"
+msgstr "Taille : [%1.12f,%1.12f]"
+
+#: ../ui/ui.c:465
+#, c-format
+msgid "Rotation:%4.2f Screen size:%i:%i"
+msgstr "Rotation : %4.2f Taille d'écran : %i:%i"
+
+#: ../ui/ui.c:470
+#, c-format
+msgid "Iterations:%-4i Palette size:%i"
+msgstr "Itérations : %-4i Taille palette : %i"
+
+#: ../ui/ui.c:477
+#, c-format
+msgid "Autopilot:%-4s Plane:%s"
+msgstr "Pilote automatique : %-4s Plan : %s"
+
+#: ../ui/ui.c:478
+msgid "On"
+msgstr "Oui"
+
+#: ../ui/ui.c:478
+msgid "Off"
+msgstr "Non"
+
+#: ../ui/ui.c:482
+#, c-format
+msgid "incoloring:%s outcoloring:%s"
+msgstr "Coloration intérieure : %s extérieure : %s"
+
+#: ../ui/ui.c:487
+#, c-format
+msgid "zoomspeed:%f"
+msgstr "Vitesse de zoom : %f"
+
+#: ../ui/ui.c:491
+msgid "Parameter:none"
+msgstr "Paramètre : aucun"
+
+#: ../ui/ui.c:493
+#, c-format
+msgid "Parameter:[%f,%f]"
+msgstr "Paramètre : [%f,%f]"
+
+#: ../ui/ui.c:585
+#, c-format
+msgid "Please wait while calculating %s"
+msgstr "Patientez pendant le calcul de %s"
+
+#: ../ui/ui.c:685
+#, c-format
+msgid "Letters per second %i "
+msgstr "Lettres par seconde %i "
+
+#: ../ui/ui.c:698 ../ui/ui.c:709
+#, c-format
+msgid "Rotation speed:%2.2f degrees per second "
+msgstr "Vitesse de rotation : %2.2f degrés par seconde"
+
+#: ../ui/ui.c:719
+#, fuzzy, c-format
+msgid "Iterations: %i "
+msgstr "Itérations: %i "
+
+#: ../ui/ui.c:735
+#, c-format
+msgid "Cycling speed: %i "
+msgstr "Vitesse de circulation : %i "
+
+#: ../ui/ui.c:748 ../ui/ui.c:762
+#, c-format
+msgid "speed:%2.2f "
+msgstr "vitesse : %2.2f"
+
+#: ../ui/ui.c:854
+#, c-format
+msgid "Thank you for using XaoS\n"
+msgstr "Merci d'avoir utilisé XaoS\n"
+
+#: ../ui/ui.c:891
+msgid "Skipping, please wait..."
+msgstr "Saute image, patientez..."
+
+#: ../ui/ui.c:983 ../ui/ui.c:985 ../ui/ui-drv/win32/ui_win32.c:1453
+msgid "Resize"
+msgstr "Redimensionner"
+
+#: ../ui/ui.c:998
+#, fuzzy
+msgid "Quit"
+msgstr "Quitter"
+
+#: ../ui/ui.c:999
+msgid "Exit now"
+msgstr "Sortir maintenant"
+
+#: ../ui/ui.c:1001
+msgid "Not yet"
+msgstr "Pas encore"
+
+#: ../ui/ui.c:1004 ../ui-hlp/menu.c:1055 ../ui-hlp/menu.c:1065
+#: ../ui/dialog.c:404 ../ui/dialog.c:1380
+msgid "Help"
+msgstr "Aide"
+
+#: ../ui/ui.c:1006
+msgid "Disable XaoS's builtin GUI"
+msgstr "Désactiver interface graphique interne de XaoS"
+
+#: ../ui/ui.c:1010 ../ui/ui.c:1016
+msgid "Status"
+msgstr "Affichage état"
+
+#: ../ui/ui.c:1012 ../ui/ui.c:1018
+msgid "Ministatus"
+msgstr "Affichage mini-état"
+
+#: ../ui/ui.c:1021 ../ui/ui.c:1022
+msgid "Driver"
+msgstr "Pilote"
+
+#: ../ui/ui.c:1413
+#, c-format
+msgid "Welcome to XaoS version %s"
+msgstr "Bienvenue sur XaoS version %s"
+
+#: ../ui/ui.c:1580
+msgid "Can not allocate buffers"
+msgstr "Ne peut pas allouer les tampons"
+
+#: ../ui/ui.c:1598
+msgid "Can not create palette"
+msgstr "Ne peut pas créer la palette"
+
+#: ../ui/ui.c:1610
+msgid "Can not create image"
+msgstr "Ne peut pas créer l'image"
+
+#: ../ui/ui.c:1641 ../ui/ui.c:1692
+msgid "Can not allocate tables"
+msgstr "Ne peut pas allouer les tables"
+
+#: ../ui/ui.c:1678
+msgid "Can not initialize driver"
+msgstr "Ne peut pas initialiser le pilote"
+
+#: ../ui/ui.c:1681
+msgid "Can not return back to previous driver"
+msgstr "Ne peut pas retourner au pilote précédent"
+
+#: ../ui-hlp/menu.c:129
+msgid "Perturbation:"
+msgstr "Perturbation :"
+
+#: ../ui-hlp/menu.c:133
+msgid "Julia-seed:"
+msgstr "Initialisation de l'ensemble de Julia :"
+
+#: ../ui-hlp/menu.c:137
+msgid "Morphing type:"
+msgstr "Type de morphing :"
+
+#: ../ui-hlp/menu.c:138
+msgid "Startuptime:"
+msgstr "Instant de démarrage :"
+
+#: ../ui-hlp/menu.c:139
+msgid "Stoptime:"
+msgstr "Instant d'arrêt :"
+
+#: ../ui-hlp/menu.c:143
+msgid "File to render:"
+msgstr "Fichier à traiter :"
+
+#: ../ui-hlp/menu.c:144
+msgid "Basename:"
+msgstr "Nom de base :"
+
+#: ../ui-hlp/menu.c:145
+msgid "Width:"
+msgstr "Largeur :"
+
+#: ../ui-hlp/menu.c:146
+msgid "Height:"
+msgstr "Hauteur :"
+
+#: ../ui-hlp/menu.c:147
+msgid "Real width (cm):"
+msgstr "Largeur réelle (cm) :"
+
+#: ../ui-hlp/menu.c:148
+msgid "Real height (cm):"
+msgstr "Hauteur réelle (cm) :"
+
+#: ../ui-hlp/menu.c:149
+msgid "Framerate:"
+msgstr "Taux de rafraîchissement :"
+
+#: ../ui-hlp/menu.c:150
+msgid "Image type:"
+msgstr "Type d'image :"
+
+#: ../ui-hlp/menu.c:151
+msgid "Antialiasing:"
+msgstr "Anti-crénelage :"
+
+#: ../ui-hlp/menu.c:152
+msgid "Always recalculate:"
+msgstr "Toujours recalculer :"
+
+#: ../ui-hlp/menu.c:153
+msgid "Calculate MPEG motion vectors:"
+msgstr "Calculer les vecteurs de mouvement MPEG :"
+
+#: ../ui-hlp/menu.c:154
+msgid "Recommended I frame distance:"
+msgstr "Distance conseillée entre les I-frames :"
+
+#: ../ui-hlp/menu.c:158
+msgid "Center:"
+msgstr "Centre :"
+
+#: ../ui-hlp/menu.c:159
+msgid "Radius:"
+msgstr "Rayon :"
+
+#: ../ui-hlp/menu.c:160 ../ui-hlp/menu.c:225
+msgid "Angle:"
+msgstr "Angle :"
+
+#: ../ui-hlp/menu.c:164
+msgid "Mode:"
+msgstr "Mode :"
+
+#: ../ui-hlp/menu.c:165
+msgid "Start:"
+msgstr "Début :"
+
+#: ../ui-hlp/menu.c:166
+msgid "End:"
+msgstr "Fin :"
+
+#: ../ui-hlp/menu.c:170
+msgid "Color:"
+msgstr "Couleur :"
+
+#: ../ui-hlp/menu.c:174
+msgid "Rotations per second:"
+msgstr "Rotations par seconde :"
+
+#: ../ui-hlp/menu.c:178
+msgid "Letters per second:"
+msgstr "Lettres par seconde :"
+
+#: ../ui-hlp/menu.c:182
+msgid "Iterations:"
+msgstr "Itérations :"
+
+#: ../ui-hlp/menu.c:186
+msgid "Text:"
+msgstr "Texte :"
+
+#: ../ui-hlp/menu.c:190
+msgid "Your command:"
+msgstr "Votre commande :"
+
+#: ../ui-hlp/menu.c:194 ../ui-hlp/menu.c:198 ../ui-hlp/menu.c:202
+#: ../ui-hlp/menu.c:206 ../ui-hlp/menu.c:258
+msgid "Filename:"
+msgstr "Nom de fichier :"
+
+#: ../ui-hlp/menu.c:210 ../ui-hlp/menu.c:298
+msgid "Formula:"
+msgstr "Formule :"
+
+#: ../ui-hlp/menu.c:214
+msgid "X center:"
+msgstr "Position horizontale centre :"
+
+#: ../ui-hlp/menu.c:215
+msgid "Y center:"
+msgstr "Position verticale centre :"
+
+#: ../ui-hlp/menu.c:216
+msgid "X Radius:"
+msgstr "Rayon horizontal :"
+
+#: ../ui-hlp/menu.c:217
+msgid "Y Radius:"
+msgstr "Rayon vertical :"
+
+#: ../ui-hlp/menu.c:221
+msgid "Coordinates:"
+msgstr "Coordonnées :"
+
+#: ../ui-hlp/menu.c:229
+msgid "continuous rotation"
+msgstr "rotation continue"
+
+#: ../ui-hlp/menu.c:233
+msgid "Fast rotation"
+msgstr "Rotation rapide"
+
+#: ../ui-hlp/menu.c:237
+msgid "filter"
+msgstr "filtre"
+
+#: ../ui-hlp/menu.c:238
+msgid "enable"
+msgstr "activer"
+
+#: ../ui-hlp/menu.c:242
+msgid "Amount:"
+msgstr "Quantité :"
+
+#: ../ui-hlp/menu.c:246
+msgid "Zooming speed:"
+msgstr "Vitesse de zoom :"
+
+#: ../ui-hlp/menu.c:250
+msgid "Name:"
+msgstr "Nom :"
+
+#: ../ui-hlp/menu.c:254
+msgid "Bailout:"
+msgstr "Valeur d'échappement :"
+
+#: ../ui-hlp/menu.c:262
+msgid "Julia mode:"
+msgstr "Mode Julia :"
+
+#: ../ui-hlp/menu.c:266
+msgid "Horizontal position:"
+msgstr "Position horizontale :"
+
+#: ../ui-hlp/menu.c:267
+msgid "Vertical position:"
+msgstr "Position verticale :"
+
+#: ../ui-hlp/menu.c:271
+msgid "Dynamic resolution:"
+msgstr "Résolution dynamique :"
+
+#: ../ui-hlp/menu.c:275
+msgid "Time:"
+msgstr "Heure :"
+
+#: ../ui-hlp/menu.c:279 ../ui-hlp/menu.c:283
+msgid "Number:"
+msgstr "Nombre :"
+
+#: ../ui-hlp/menu.c:287
+msgid "Algorithm number:"
+msgstr "Numéro d'algorithme :"
+
+#: ../ui-hlp/menu.c:288
+msgid "Seed:"
+msgstr "Valeur initiale :"
+
+#: ../ui-hlp/menu.c:289
+msgid "Shift:"
+msgstr "Décalage :"
+
+#: ../ui-hlp/menu.c:293
+msgid "Frames per second:"
+msgstr "Images par seconde"
+
+#: ../ui-hlp/menu.c:302
+#, fuzzy
+msgid "Initialization:"
+msgstr "Initialisation"
+
+#: ../ui-hlp/menu.c:357
+msgid "renderanim: Must specify a valid absolute path for basename"
+msgstr ""
+
+#: ../ui-hlp/menu.c:364
+msgid ""
+"renderanim: Width parameter must be positive integer in the range 0..4096"
+msgstr ""
+"animation : le paramètre de largeur doit être un entier positif allant de 0 "
+"à 4096"
+
+#: ../ui-hlp/menu.c:370
+msgid ""
+"renderanim: Height parameter must be positive integer in the range 0..4096"
+msgstr ""
+"animation : le paramètre de hauteur doit être un entier positif allant de 0 "
+"à 4096"
+
+#: ../ui-hlp/menu.c:376
+msgid "renderanim: Invalid real width and height dimensions"
+msgstr "animation : dimension de hauteur ou de largeur réelle incorrecte"
+
+#: ../ui-hlp/menu.c:380
+msgid "renderanim: invalid framerate"
+msgstr "animation : taux de rafraîchissement incorrect"
+
+#: ../ui-hlp/menu.c:386
+msgid "renderanim: antialiasing not supported in 256 color mode"
+msgstr "animation : anti-crénelage non supporté en mode 256 couleurs"
+
+#: ../ui-hlp/menu.c:390
+msgid "renderanim: incorrect I frame distance"
+msgstr "animation : distance entre I-frames incorrecte"
+
+#: ../ui-hlp/menu.c:441 ../ui-hlp/menu.c:454
+msgid "animateview: Invalid viewpoint"
+msgstr "animation : point de vue incorrect"
+
+#: ../ui-hlp/menu.c:467
+msgid "Invalid viewpoint"
+msgstr "Point de vue incorrect"
+
+#: ../ui-hlp/menu.c:696
+msgid "Unknown palette type"
+msgstr "Type de palette inconnu"
+
+#: ../ui-hlp/menu.c:771 ../ui-hlp/menu.c:785
+msgid "Initialization of color cycling failed."
+msgstr "Echec de l'initialisation de la circulation des couleurs."
+
+#: ../ui-hlp/menu.c:773 ../ui-hlp/menu.c:787
+msgid "Try to enable palette emulation filter"
+msgstr "Essayez d'activer le filtre d'émulation de palette"
+
+#: ../ui-hlp/menu.c:896
+#, c-format
+msgid "Algorithm:%i seed:%i size:%i"
+msgstr "Algorithme : %i valeur initiale : %i taille : %i"
+
+#: ../ui-hlp/menu.c:947
+msgid "Root menu"
+msgstr "Menu principal"
+
+#: ../ui-hlp/menu.c:948
+msgid "Animation root menu"
+msgstr "Menu principal d'animation"
+
+#: ../ui-hlp/menu.c:949
+msgid "Replay only commands"
+msgstr "Commandes de répétition uniquement"
+
+#: ../ui-hlp/menu.c:950
+msgid "Command line options only"
+msgstr "Options en ligne de commande uniquement"
+
+#: ../ui-hlp/menu.c:953
+msgid "print menus specifications of all menus"
+msgstr "imprimer les caractéristiques de menu pour tous les menus"
+
+#: ../ui-hlp/menu.c:958
+msgid "print menu specification"
+msgstr "imprimer les caractéristiques de menu"
+
+#: ../ui-hlp/menu.c:961
+msgid "print menu specification in xshl format"
+msgstr "imprimer les caractéristiques de menu au format xshl"
+
+#: ../ui-hlp/menu.c:965
+msgid "print all menu specifications in xshl format"
+msgstr "imprimer toutes les caractéristiques de menu au format xshl"
+
+#: ../ui-hlp/menu.c:967
+msgid "print dialog specification"
+msgstr "imprimer les caractéristiques de dialogue"
+
+#: ../ui-hlp/menu.c:972
+msgid "Line drawing functions"
+msgstr "Fonctions de traçage de lignes"
+
+#: ../ui-hlp/menu.c:973
+msgid "Line"
+msgstr "Ligne"
+
+#: ../ui-hlp/menu.c:976
+msgid "Morph line"
+msgstr "Ligne de morphing"
+
+#: ../ui-hlp/menu.c:978
+msgid "Morph last line"
+msgstr "Dernière ligne de morphing"
+
+#: ../ui-hlp/menu.c:981
+msgid "Set line key"
+msgstr "Choisir ligne clé"
+
+#: ../ui-hlp/menu.c:983
+msgid "Clear line"
+msgstr "Effacer ligne"
+
+#: ../ui-hlp/menu.c:986
+msgid "Clear all lines"
+msgstr "Effacer toutes les lignes"
+
+#: ../ui-hlp/menu.c:988
+msgid "Animation functions"
+msgstr "Fonctions d'animation"
+
+#: ../ui-hlp/menu.c:989 ../ui-hlp/menu.c:1181 ../ui-hlp/menu.c:1190
+msgid "View"
+msgstr "Vue"
+
+#: ../ui-hlp/menu.c:993
+msgid "Morph view"
+msgstr "Vue de morphing"
+
+#: ../ui-hlp/menu.c:995
+msgid "Morph julia"
+msgstr "Morphing de Julia"
+
+#: ../ui-hlp/menu.c:1000
+msgid "Move view"
+msgstr "Déplacer vue"
+
+#: ../ui-hlp/menu.c:1002
+msgid "Morph angle"
+msgstr "Angle de morphing"
+
+#: ../ui-hlp/menu.c:1004
+msgid "Zoom center"
+msgstr "Centrer le zoom"
+
+#: ../ui-hlp/menu.c:1006 ../ui/ui-drv/cocoa/AppController.m:343
+msgid "Zoom"
+msgstr "Zoomer"
+
+#: ../ui-hlp/menu.c:1007
+msgid "Un-zoom"
+msgstr "Dézoomer"
+
+#: ../ui-hlp/menu.c:1010
+msgid "Stop zooming"
+msgstr "Arrêter de zoomer"
+
+#: ../ui-hlp/menu.c:1011
+msgid "Smooth morphing parameters"
+msgstr "Lisser les paramètres de morphing"
+
+#: ../ui-hlp/menu.c:1014
+msgid "Timing functions"
+msgstr "Fonctions de temps"
+
+#: ../ui-hlp/menu.c:1015
+msgid "Usleep"
+msgstr "Pause"
+
+#: ../ui-hlp/menu.c:1018
+msgid "Wait for text"
+msgstr "Attendre le texte"
+
+#: ../ui-hlp/menu.c:1020
+msgid "Wait for complete image"
+msgstr "Attendre l'image complète"
+
+#: ../ui-hlp/menu.c:1022
+msgid "Include file"
+msgstr "Inclure fichier"
+
+#: ../ui-hlp/menu.c:1024 ../ui-hlp/menu.c:1222
+msgid "Default palette"
+msgstr "Palette par défaut"
+
+#: ../ui-hlp/menu.c:1026
+msgid "Formula"
+msgstr "Formule"
+
+#: ../ui-hlp/menu.c:1028
+msgid "Maximal zooming step"
+msgstr "Pas maximum pour le zoom"
+
+#: ../ui-hlp/menu.c:1030
+msgid "Zooming speedup"
+msgstr "Accélération du zoom"
+
+#: ../ui-hlp/menu.c:1032
+msgid "Filter"
+msgstr "Filtre"
+
+#: ../ui-hlp/menu.c:1036 ../ui-hlp/menu.c:1041
+msgid "Letters per second"
+msgstr "Lettres par seconde"
+
+#: ../ui-hlp/menu.c:1043 ../ui-hlp/menu.c:1314
+msgid "Interrupt"
+msgstr "Interrompt"
+
+#: ../ui-hlp/menu.c:1045 ../ui-hlp/menu.c:1057
+msgid "File"
+msgstr "Fichier"
+
+#: ../ui-hlp/menu.c:1046
+msgid "Edit"
+msgstr "Edition"
+
+#: ../ui-hlp/menu.c:1047
+msgid "Fractal"
+msgstr "Fractal"
+
+#: ../ui-hlp/menu.c:1048
+msgid "Calculation"
+msgstr "Calcul"
+
+#: ../ui-hlp/menu.c:1049 ../ui-hlp/menu.c:1391
+msgid "Filters"
+msgstr "Filtres"
+
+#: ../ui-hlp/menu.c:1050 ../ui-hlp/menu.c:1064
+msgid "UI"
+msgstr "Interface"
+
+#: ../ui-hlp/menu.c:1051
+msgid "Misc"
+msgstr "Divers"
+
+#: ../ui-hlp/menu.c:1053
+#, fuzzy
+msgid "Window"
+msgstr "Annuler"
+
+#: ../ui-hlp/menu.c:1056
+msgid "Tutorials"
+msgstr "Didacticiels"
+
+#: ../ui-hlp/menu.c:1062
+msgid "Stop replay"
+msgstr "Arrêter la répétition"
+
+#: ../ui-hlp/menu.c:1066
+msgid "Command"
+msgstr "Commande"
+
+#: ../ui-hlp/menu.c:1068
+msgid "Play string"
+msgstr "Joue texte"
+
+#: ../ui-hlp/menu.c:1070
+msgid "Render animation"
+msgstr "Traiter l'animation"
+
+#: ../ui-hlp/menu.c:1073
+msgid "Clear screen"
+msgstr "Effacer écran"
+
+#: ../ui-hlp/menu.c:1075
+msgid "Display fractal"
+msgstr "Afficher fractal"
+
+#: ../ui-hlp/menu.c:1078
+msgid "Display text"
+msgstr "Afficher texte"
+
+#: ../ui-hlp/menu.c:1080
+#, fuzzy
+msgid "Color"
+msgstr "Couleur :"
+
+#: ../ui-hlp/menu.c:1082
+msgid "Horizontal text position"
+msgstr "Position horizontale du texte"
+
+#: ../ui-hlp/menu.c:1084
+msgid "Vertical text position"
+msgstr "Position verticale du texte"
+
+#: ../ui-hlp/menu.c:1086
+msgid "Text position"
+msgstr "Position du texte"
+
+#: ../ui-hlp/menu.c:1090
+msgid "Message"
+msgstr "Message"
+
+#: ../ui-hlp/menu.c:1112
+msgid "Load"
+msgstr "Ouvrir"
+
+#: ../ui-hlp/menu.c:1115
+msgid "Save"
+msgstr "Enregistrer"
+
+#: ../ui-hlp/menu.c:1117
+msgid "Record"
+msgstr "Enregistrer animation"
+
+#: ../ui-hlp/menu.c:1121
+msgid "Replay"
+msgstr "Rejouer animation"
+
+#: ../ui-hlp/menu.c:1128
+msgid "Save image"
+msgstr "Entregistrer image"
+
+#: ../ui-hlp/menu.c:1130
+msgid "Load random example"
+msgstr "Ouvrir un exemple aléatoire"
+
+#: ../ui-hlp/menu.c:1132
+msgid "Save configuration"
+msgstr "Enregistrer la configuration"
+
+#: ../ui-hlp/menu.c:1137
+msgid "Undo"
+msgstr "Annuler"
+
+#: ../ui-hlp/menu.c:1141
+msgid "Redo"
+msgstr "Refaire"
+
+#: ../ui-hlp/menu.c:1145
+msgid "Formulae"
+msgstr "Formule"
+
+#: ../ui-hlp/menu.c:1146
+msgid "More formulae"
+msgstr "Autres formules"
+
+#: ../ui-hlp/menu.c:1151
+#, fuzzy
+msgid "User formula"
+msgstr "Autres formules"
+
+#: ../ui-hlp/menu.c:1153
+#, fuzzy
+msgid "User initialization"
+msgstr "Initialisation"
+
+#: ../ui-hlp/menu.c:1158
+msgid "Incoloring mode"
+msgstr "Coloriage intérieur"
+
+#: ../ui-hlp/menu.c:1159
+msgid "Outcoloring mode"
+msgstr "Coloriage extérieur"
+
+#: ../ui-hlp/menu.c:1160
+msgid "Plane"
+msgstr "Plan"
+
+#: ../ui-hlp/menu.c:1161
+#, fuzzy
+msgid "Palette"
+msgstr "Coller"
+
+#: ../ui-hlp/menu.c:1164
+msgid "Mandelbrot mode"
+msgstr "Mode Mandelbrot"
+
+#: ../ui-hlp/menu.c:1170 ../ui-hlp/menu.c:1174 ../ui-hlp/menu.c:1395
+msgid "Perturbation"
+msgstr "Perturbation"
+
+#: ../ui-hlp/menu.c:1185
+msgid "Reset to defaults"
+msgstr "Valeurs par défaut"
+
+#: ../ui-hlp/menu.c:1186
+msgid "Julia mode"
+msgstr "Mode Julia"
+
+#: ../ui-hlp/menu.c:1193
+msgid "Set angle"
+msgstr "Choisir l'angle"
+
+#: ../ui-hlp/menu.c:1197
+msgid "Set plane"
+msgstr "Choisir le plan"
+
+# #: ../ui-hlp/menu.c:1167
+#: ../ui-hlp/menu.c:1201
+msgid "Inside coloring mode"
+msgstr "Coloriage intérieur"
+
+#: ../ui-hlp/menu.c:1206
+msgid "Outside coloring mode"
+msgstr "Coloriage extérieur"
+
+#: ../ui-hlp/menu.c:1212
+msgid "Inside truecolor coloring mode"
+msgstr "Coloriage intérieur en vraies couleurs"
+
+#: ../ui-hlp/menu.c:1216
+msgid "Outside truecolor coloring mode"
+msgstr "Coloriage extérieur en vraies couleurs"
+
+#: ../ui-hlp/menu.c:1219
+msgid "Julia seed"
+msgstr "Initialisation de Julia"
+
+#: ../ui-hlp/menu.c:1224
+msgid "Random palette"
+msgstr "Palette aléatoire"
+
+#: ../ui-hlp/menu.c:1226
+msgid "Custom palette"
+msgstr "Palette personnelle"
+
+#: ../ui-hlp/menu.c:1230
+msgid "Color cycling"
+msgstr "Circulation des couleurs"
+
+#: ../ui-hlp/menu.c:1232
+msgid "Reversed color cycling"
+msgstr "Circulation des couleurs inversée"
+
+#: ../ui-hlp/menu.c:1237
+msgid "Color cycling speed"
+msgstr "Vitesse de circulation des couleurs"
+
+#: ../ui-hlp/menu.c:1241
+msgid "Shift palette"
+msgstr "Décaler palette"
+
+#: ../ui-hlp/menu.c:1243
+msgid "Shift one forward"
+msgstr "Avancer d'une unité"
+
+#: ../ui-hlp/menu.c:1246
+msgid "Shift one backward"
+msgstr "Reculer d'une unité"
+
+#: ../ui-hlp/menu.c:1248 ../engine/zoom.c:1357
+msgid "Solid guessing"
+msgstr "Estimation solide"
+
+#: ../ui-hlp/menu.c:1249
+msgid "Dynamic resolution"
+msgstr "Résolution dynamique"
+
+#: ../ui-hlp/menu.c:1251
+msgid "Periodicity checking"
+msgstr "Vérification périodicité"
+
+#: ../ui-hlp/menu.c:1254
+msgid "Iterations"
+msgstr "Itérations"
+
+#: ../ui-hlp/menu.c:1256
+msgid "Bailout"
+msgstr "Valeur d'échappement"
+
+#: ../ui-hlp/menu.c:1260
+msgid "Fast julia mode"
+msgstr "Mode Julia rapide"
+
+#: ../ui-hlp/menu.c:1262
+msgid "Rotation"
+msgstr "Rotation"
+
+#: ../ui-hlp/menu.c:1263
+msgid "Solid guessing range"
+msgstr "Portée de l'estimation solide"
+
+#: ../ui-hlp/menu.c:1266
+msgid "Disable rotation"
+msgstr "Désactiver rotation"
+
+#: ../ui-hlp/menu.c:1270
+msgid "Continuous rotation"
+msgstr "Rotation continue"
+
+#: ../ui-hlp/menu.c:1273
+msgid "Rotate by mouse"
+msgstr "Rotation à la souris"
+
+#: ../ui-hlp/menu.c:1277
+msgid "Rotation speed"
+msgstr "Vitesse de rotation"
+
+#: ../ui-hlp/menu.c:1280
+msgid "Automatic rotation"
+msgstr "Rotation automatique"
+
+#: ../ui-hlp/menu.c:1285
+msgid "Fast rotation mode"
+msgstr "Mode de rotation rapide"
+
+#: ../ui-hlp/menu.c:1289
+msgid "Disable dynamic resolution"
+msgstr "Désactiver la résolution dynamique"
+
+#: ../ui-hlp/menu.c:1292
+msgid "Use only during animation"
+msgstr "Utiliser seulement pendant l'animation"
+
+#: ../ui-hlp/menu.c:1296
+msgid "Use also for new images"
+msgstr "Utiliser aussi pour les nouvelles images"
+
+#: ../ui-hlp/menu.c:1298
+msgid "Dynamic resolution mode"
+msgstr "Mode de résolution dynamique"
+
+#: ../ui-hlp/menu.c:1302
+msgid "Autopilot"
+msgstr "Pilote automatique"
+
+#: ../ui-hlp/menu.c:1306
+#, fuzzy
+msgid "VJ mode"
+msgstr "Mode Julia"
+
+#: ../ui-hlp/menu.c:1310
+msgid "Recalculate"
+msgstr "Recalculer"
+
+#: ../ui-hlp/menu.c:1319
+msgid "Zooming speed"
+msgstr "Vitesse de zoom"
+
+#: ../ui-hlp/menu.c:1321
+msgid "Fixed step"
+msgstr "Pas fixé"
+
+#: ../ui-hlp/menu.c:1325
+msgid "Disable solid guessing"
+msgstr "Désactiver l'estimation solide"
+
+#: ../ui-hlp/menu.c:1329
+msgid "Guess 2x2 rectangles"
+msgstr "Estimation en rectangles 2x2"
+
+#: ../ui-hlp/menu.c:1331
+msgid "Guess 3x3 rectangles"
+msgstr "Estimation en rectangles 3x3"
+
+#: ../ui-hlp/menu.c:1335
+msgid "Guess 4x4 rectangles"
+msgstr "Estimation en rectangles 4x4"
+
+#: ../ui-hlp/menu.c:1337
+msgid "Guess 5x5 rectangles"
+msgstr "Estimation en rectangles 5x5"
+
+#: ../ui-hlp/menu.c:1341
+msgid "Guess 6x6 rectangles"
+msgstr "Estimation en rectangles 6x6"
+
+#: ../ui-hlp/menu.c:1343
+msgid "Guess 7x7 rectangles"
+msgstr "Estimation en rectangles 7x7"
+
+#: ../ui-hlp/menu.c:1347
+msgid "Guess 8x8 rectangles"
+msgstr "Estimation en rectangles 8x8"
+
+#: ../ui-hlp/menu.c:1349
+msgid "Guess unlimited rectangles"
+msgstr "Estimation en rectangles illimités"
+
+#: ../ui-hlp/menu.c:1354
+msgid "Language"
+msgstr "Langue"
+
+#: ../ui-hlp/menu.c:1357
+msgid "An introduction to fractals"
+msgstr "Une introduction aux fractals"
+
+#: ../ui-hlp/menu.c:1359
+msgid "XaoS features overview"
+msgstr "Revue des caractéristiques de XaoS"
+
+#: ../ui-hlp/menu.c:1361
+msgid "Math behind fractals"
+msgstr "Les maths derrière les fractals"
+
+#: ../ui-hlp/menu.c:1362 ../ui-hlp/menu.c:1403
+msgid "Other fractal types in XaoS"
+msgstr "Autres types de fractals dans XaoS"
+
+#: ../ui-hlp/menu.c:1364
+msgid "What's new?"
+msgstr "Nouveautés"
+
+#: ../ui-hlp/menu.c:1374 ../ui-hlp/menu.c:1398
+msgid "Whole story"
+msgstr "Tous les détails"
+
+#: ../ui-hlp/menu.c:1376
+msgid "Introduction"
+msgstr "Introduction"
+
+#: ../ui-hlp/menu.c:1377
+msgid "Mandelbrot set"
+msgstr "Ensemble de Mandelbrot"
+
+#: ../ui-hlp/menu.c:1378
+msgid "Julia set"
+msgstr "Ensemble de Julia"
+
+#: ../ui-hlp/menu.c:1379
+msgid "Higher power Mandelbrots"
+msgstr "Puissances de Mandlebrot"
+
+#: ../ui-hlp/menu.c:1380
+msgid "Newton's method"
+msgstr "Méthode de Newton"
+
+#: ../ui-hlp/menu.c:1381
+msgid "Barnsley's formula"
+msgstr "Formule de Barnsley"
+
+#: ../ui-hlp/menu.c:1382
+msgid "Phoenix"
+msgstr "Phoenix"
+
+#: ../ui-hlp/menu.c:1383
+msgid "Octo"
+msgstr "Octo"
+
+#: ../ui-hlp/menu.c:1384
+msgid "Magnet"
+msgstr "Magnet"
+
+#: ../ui-hlp/menu.c:1385
+msgid "All features"
+msgstr "Toutes les caractéristiques"
+
+#: ../ui-hlp/menu.c:1387
+msgid "Outcoloring modes"
+msgstr "Coloration extérieure"
+
+#: ../ui-hlp/menu.c:1388
+msgid "Incoloring modes"
+msgstr "Coloration intérieure"
+
+#: ../ui-hlp/menu.c:1389
+msgid "True-color coloring modes"
+msgstr "Coloration en vraies couleurs"
+
+#: ../ui-hlp/menu.c:1392
+msgid "Planes"
+msgstr "Plans"
+
+#: ../ui-hlp/menu.c:1393
+msgid "Animations and position files"
+msgstr "Fichiers d'animation et de position"
+
+#: ../ui-hlp/menu.c:1396
+msgid "Random palettes"
+msgstr "Palettes aléatoires"
+
+#: ../ui-hlp/menu.c:1397
+msgid "Other noteworthy features"
+msgstr "Autres caractéristiques utiles"
+
+#: ../ui-hlp/menu.c:1400
+msgid "The definition and fractal dimension"
+msgstr "Définition et dimension fractale"
+
+#: ../ui-hlp/menu.c:1402
+msgid "Escape time fractals"
+msgstr "Fractals à temps d'échappement"
+
+#: ../ui-hlp/menu.c:1406
+msgid "Triceratops and Catseye fractals"
+msgstr "Fractals Triceratops et Oeil de chat"
+
+#: ../ui-hlp/menu.c:1408
+msgid "Mandelbar, Lambda, Manowar and Spider"
+msgstr "Mandelbar, Lambda, Manowar et Araignée"
+
+#: ../ui-hlp/menu.c:1411
+msgid "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+msgstr "Triangle de Sierpinski , Tapis de S., Flocon de Koch"
+
+#: ../ui-hlp/menu.c:1413
+msgid "What's new in 3.0?"
+msgstr "Nouveautés dans la version 3.0"
+
+#: ../ui-hlp/play.c:74
+msgid "line available only in animation replay"
+msgstr "ligne disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:99
+msgid "Morphing non existing line!"
+msgstr "Ligne de morphing non existante!"
+
+#: ../ui-hlp/play.c:121
+msgid "linekey not available in this context!"
+msgstr "ligne clé non disponible dans ce contexte!"
+
+#: ../ui-hlp/play.c:291
+msgid "clear_line available only in animation replay"
+msgstr "effaçage de ligne disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:300
+msgid "clear_lines available only in animation replay"
+msgstr "effaçage de lignes disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:359
+msgid "Catalog file not found"
+msgstr "Fichier catalogue non trouvé"
+
+#: ../ui-hlp/play.c:405
+msgid "Replay is already active"
+msgstr "Répétition déja active"
+
+#: ../ui-hlp/play.c:409
+msgid "File open failed"
+msgstr "Echec d'ouverture du fichier"
+
+#: ../ui-hlp/play.c:414
+msgid "Out of memory"
+msgstr "Pas assez de mémoire"
+
+#: ../ui-hlp/play.c:526 ../ui-hlp/play.c:542 ../ui-hlp/play.c:566
+#: ../ui-hlp/play.c:595
+msgid "Missing parameter"
+msgstr "Paramètre manquant"
+
+#: ../ui-hlp/play.c:528 ../ui-hlp/play.c:544 ../ui-hlp/play.c:568
+#: ../ui-hlp/play.c:597
+msgid "Unexpected end of file"
+msgstr "Fin inattendue de fichier"
+
+#: ../ui-hlp/play.c:555 ../ui-hlp/play.c:574
+#, fuzzy
+msgid "Token is too long"
+msgstr "Le \"token\" est trop long"
+
+#: ../ui-hlp/play.c:629
+msgid "Unknown formula type"
+msgstr "Type de formule inconnu"
+
+#: ../ui-hlp/play.c:635
+#, fuzzy
+msgid "morph available only in animation replay"
+msgstr "Morphing disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:639
+#, fuzzy
+msgid "morphview: Invalid viewpoint"
+msgstr "Vue morphing : point de vue incorrect"
+
+#: ../ui-hlp/play.c:653
+msgid "move available only in animation replay"
+msgstr "déplacement disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:667
+#, fuzzy
+msgid "morphjulia available only in animation replay"
+msgstr "Morphjulia disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:680
+#, fuzzy
+msgid "morphangle available only in animation replay"
+msgstr "Morphangle disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:712
+msgid "Unknown filter"
+msgstr "Filtre inconnu"
+
+#: ../ui-hlp/play.c:753
+msgid "sleep available only in animation replay"
+msgstr "pause disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:767
+#, c-format
+msgid "Internal program error #12 %i\n"
+msgstr "Erreur interne #12 %i\n"
+
+#: ../ui-hlp/play.c:788
+#, fuzzy
+msgid "wait available only in animation replay"
+msgstr "wait disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:834
+msgid "No catalog file loaded"
+msgstr "Pas de fichier catalogue chargé"
+
+#: ../ui-hlp/play.c:839
+msgid "Message not found in catalog file"
+msgstr "Message non trouvé dans fichier catalogue"
+
+#: ../ui-hlp/play.c:850
+#, fuzzy
+msgid "load available only in animation replay"
+msgstr "Load disponible seulement lors de répétition d'animation"
+
+#: ../ui-hlp/play.c:854
+msgid "Include level overflow"
+msgstr "Dépassement de niveau d'inclusion"
+
+#: ../ui-hlp/play.c:863
+msgid "File not found"
+msgstr "Fichier non trouvé"
+
+#: ../ui-hlp/play.c:881
+msgid "Too many parameters"
+msgstr "Trop de paramètres"
+
+#: ../ui-hlp/play.c:916
+#, c-format
+msgid "Replay disabled at line %i"
+msgstr "Répétition désactivée à la ligne %i"
+
+#: ../ui-hlp/ui_helper.c:646
+msgid "Tutorial files not found. Reinstall XaoS"
+msgstr "Fichiers didacticiels introuvables. Réinstallez XaoS"
+
+#: ../ui-hlp/ui_helper.c:651
+msgid "Preparing first image"
+msgstr "Préparation première image"
+
+#: ../ui-hlp/ui_helper.c:661
+msgid "Could not open examples"
+msgstr "Echec ouverture exemples"
+
+#: ../ui-hlp/ui_helper.c:667
+#, c-format
+msgid "File %s loaded."
+msgstr "Fichier %s chargé."
+
+#: ../ui-hlp/ui_helper.c:676
+msgid "Saving image..."
+msgstr "Enregistrement image..."
+
+#: ../ui-hlp/ui_helper.c:684
+msgid "Save interrupted"
+msgstr "Enregistrement interrompu"
+
+#: ../ui-hlp/ui_helper.c:693 ../ui-hlp/ui_helper.c:710
+#: ../ui-hlp/ui_helper.c:777
+#, c-format
+msgid "File %s saved."
+msgstr "Fichier %s enregistré"
+
+#: ../ui-hlp/ui_helper.c:704
+msgid "Can not open file"
+msgstr "Echec ouverture fichier"
+
+#: ../ui-hlp/ui_helper.c:799
+#, c-format
+msgid "Recording to file %s enabled."
+msgstr "Enregistrement vers le fichier %s activé."
+
+#: ../engine/zoom.c:1128
+msgid "Solid guessing 1"
+msgstr "Estimation solide 1"
+
+#: ../engine/btrace.c:292 ../engine/btrace.c:373
+msgid "Boundary trace"
+msgstr "Détection de frontière"
+
+#: ../ui/dialog.c:312 ../ui/dialog.c:398 ../ui/dialog.c:1377
+#: ../ui/ui-drv/cocoa/CustomDialog.m:302
+msgid "OK"
+msgstr "OK"
+
+#: ../ui/dialog.c:313 ../ui/dialog.c:401 ../ui/dialog.c:1379
+#: ../ui/filesel.c:184 ../ui/ui-drv/cocoa/CustomDialog.m:312
+msgid "Cancel"
+msgstr "Annuler"
+
+#: ../ui-hlp/render.c:46
+#, c-format
+msgid "Error: %s"
+msgstr "Erreur : %s"
+
+#: ../ui-hlp/render.c:121
+msgid "Cannot open motion vector file!"
+msgstr "Echec ouverture fichier vecteurs mouvement"
+
+#: ../ui-hlp/render.c:270
+#, c-format
+msgid "Vectors: %i"
+msgstr "Vecteurs : %i"
+
+#: ../ui-hlp/render.c:276
+msgid "Initializing"
+msgstr "Initialisation"
+
+#: ../ui-hlp/render.c:284
+msgid "Cannot create palette"
+msgstr "Echec création palette"
+
+#: ../ui-hlp/render.c:295
+msgid "Cannot create image\n"
+msgstr "Echec création image\n"
+
+#: ../ui-hlp/render.c:304
+msgid "Cannot create checking buffer!"
+msgstr "Echec création tampon de vérification!"
+
+#: ../ui-hlp/render.c:313 ../ui-hlp/render.c:596
+msgid "Cannot create context\n"
+msgstr "Echec création contexte\n"
+
+#: ../ui-hlp/render.c:325
+msgid "Cannot open animation file\n"
+msgstr "Echec ouverture fichier d'animation\n"
+
+#: ../ui-hlp/render.c:336 ../ui-hlp/render.c:605
+msgid "Loading catalogs"
+msgstr "Chargement catalogues"
+
+#: ../ui-hlp/render.c:366
+msgid "Processing command line options"
+msgstr "Traitement options ligne de commande"
+
+#: ../ui-hlp/render.c:389
+msgid "Enabling animation replay\n"
+msgstr "Activation de la répétition d'animation\n"
+
+#: ../ui-hlp/render.c:396 ../ui-hlp/render.c:514
+msgid "Cannot open image file"
+msgstr "Echec ouverture fichier image"
+
+#: ../ui-hlp/render.c:410
+#, fuzzy
+msgid "Cannot open pattern file"
+msgstr "Echec ouverture fichier de motif"
+
+#: ../ui-hlp/render.c:427 ../ui-hlp/render.c:429 ../ui-hlp/render.c:638
+msgid "Entering calculation loop!"
+msgstr "Commençant boucle de calcul!"
+
+#: ../ui-hlp/render.c:455
+#, c-format
+msgid "Frame %i skipped."
+msgstr "Image %i sautée."
+
+#: ../ui-hlp/render.c:457
+#, c-format
+msgid "Frames %i - %i skipped."
+msgstr "Images %i - %i sautées."
+
+#: ../ui-hlp/render.c:461
+#, c-format
+msgid "Frame %4i: "
+msgstr "Image %4i : "
+
+#: ../ui-hlp/render.c:528
+msgid " done."
+msgstr " terminé."
+
+#: ../ui-hlp/render.c:532
+msgid " skipping..."
+msgstr " saute..."
+
+#: ../ui-hlp/render.c:565 ../ui-hlp/render.c:657
+msgid "Calculation interrupted"
+msgstr "Calcul interrompu"
+
+#: ../ui-hlp/render.c:568 ../ui-hlp/render.c:570 ../ui-hlp/render.c:659
+msgid "Calculation finished"
+msgstr "Calcul terminé"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1292 ../ui/ui-drv/cocoa/AppController.m:321
+msgid "Copy"
+msgstr "Copier"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1293 ../ui/ui-drv/cocoa/AppController.m:324
+msgid "Paste"
+msgstr "Coller"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1297
+msgid "About"
+msgstr "A propos"
+
+#: ../ui/ui-drv/cocoa/AppController.m:197
+#, fuzzy
+msgid "About XaoS"
+msgstr "A propos"
+
+#: ../ui/ui-drv/cocoa/AppController.m:200
+msgid "Services"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:203
+msgid "Hide XaoS"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:206
+msgid "Hide Others"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:209
+msgid "Show All"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:212
+#, fuzzy
+msgid "Quit XaoS"
+msgstr "Quitter"
+
+#: ../ui/ui-drv/cocoa/AppController.m:318
+msgid "Cut"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:327
+#, fuzzy
+msgid "Delete"
+msgstr "Palette"
+
+#: ../ui/ui-drv/cocoa/AppController.m:330
+msgid "Select All"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:340
+msgid "Minimize"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:348
+msgid "Bring All to Front"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:359
+#, fuzzy
+msgid "Close"
+msgstr "Couleur"
+
+#: ../ui/ui-drv/cocoa/AppController.m:373
+msgid "Videator Output"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/CustomDialog.m:142
+msgid "Choose"
+msgstr ""
+
+#, fuzzy
+#~ msgid "User function"
+#~ msgstr "Fonctions de traçage de lignes"
+
+#~ msgid "formulae"
+#~ msgstr "Formule"
diff --git a/src/i18n/hu.po b/src/i18n/hu.po
new file mode 100644
index 0000000..e10f6ad
--- /dev/null
+++ b/src/i18n/hu.po
@@ -0,0 +1,1477 @@
+# XaoS NLS file for Hungarian language.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Zoltan Kovacs <kovzol@math.u-szeged.hu>, 2002, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XaoS 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-14 10:56+0100\n"
+"PO-Revision-Date: 2002-08-17 21:44+0200\n"
+"Last-Translator: Zoltan Kovacs <kovzol@math.u-szeged.hu>\n"
+"Language-Team: Hungarian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-2\n"
+"Content-Transfer-Encoding: 8-bit\n"
+
+#: ../ui/ui.c:314
+msgid "XaoS is out of memory."
+msgstr "Elfogyott a memória."
+
+#: ../ui/ui.c:360
+#, c-format
+msgid "%s %.2f times (%.1fE) %2.2f frames/sec %c %i %i %i %i "
+msgstr "%s %.2f-szoros (%.1fE) %2.2f kép/mp %c %i %i %i %i "
+
+#: ../ui/ui.c:361
+msgid "unzoomed"
+msgstr "kicsinyítés"
+
+#: ../ui/ui.c:361
+msgid "zoomed"
+msgstr "nagyítás"
+
+#: ../ui/ui.c:369
+#, c-format
+msgid "framerate:%f\n"
+msgstr "képfrissítés:%f\n"
+
+#: ../ui/ui.c:409
+#, c-format
+msgid "Enabling: %s. "
+msgstr "%s bekapcsolva."
+
+#: ../ui/ui.c:411
+#, c-format
+msgid "Disabling: %s. "
+msgstr "%s kikapcsolva."
+
+#: ../ui/ui.c:441
+#, c-format
+msgid "Fractal name:%s"
+msgstr "Fraktál neve:%s"
+
+#: ../ui/ui.c:446
+#, c-format
+msgid "Fractal type:%s"
+msgstr "Fraktál típusa:%s"
+
+#: ../ui/ui.c:448
+msgid "Mandelbrot"
+msgstr "Mandelbrot"
+
+#: ../ui/ui.c:449
+msgid "Julia"
+msgstr "Julia"
+
+#: ../ui/ui.c:452
+#, c-format
+msgid "Formula:%s"
+msgstr "Képlet:%s"
+
+#: ../ui/ui.c:457
+#, c-format
+msgid "View:[%1.12f,%1.12f]"
+msgstr "Nézet:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:461
+#, c-format
+msgid "size:[%1.12f,%1.12f]"
+msgstr "Méret:[%1.12fx%1.12f]"
+
+#: ../ui/ui.c:465
+#, c-format
+msgid "Rotation:%4.2f Screen size:%i:%i"
+msgstr "Forgatás:%4.2f Képernyõméret:%i:%i"
+
+#: ../ui/ui.c:470
+#, c-format
+msgid "Iterations:%-4i Palette size:%i"
+msgstr "Iterációk száma:%-4i Színpaletta-méret:%i"
+
+#: ../ui/ui.c:477
+#, c-format
+msgid "Autopilot:%-4s Plane:%s"
+msgstr "Robotpilóta:%-4s Sík:%s"
+
+#: ../ui/ui.c:478
+msgid "On"
+msgstr "be"
+
+#: ../ui/ui.c:478
+msgid "Off"
+msgstr "ki"
+
+#: ../ui/ui.c:482
+#, c-format
+msgid "incoloring:%s outcoloring:%s"
+msgstr "belsõ színezés:%s külsõ színezés:%s"
+
+#: ../ui/ui.c:487
+#, c-format
+msgid "zoomspeed:%f"
+msgstr "nagyítási sebesség:%f"
+
+#: ../ui/ui.c:491
+msgid "Parameter:none"
+msgstr "Paraméter:nincs"
+
+#: ../ui/ui.c:493
+#, c-format
+msgid "Parameter:[%f,%f]"
+msgstr "Paraméter:[%f,%f]"
+
+#: ../ui/ui.c:585
+#, c-format
+msgid "Please wait while calculating %s"
+msgstr "Kérem várjon, a %s fraktál elõállítása folyamatban..."
+
+#: ../ui/ui.c:685
+#, c-format
+msgid "Letters per second %i "
+msgstr "Másodpercenként %i betû"
+
+#: ../ui/ui.c:698 ../ui/ui.c:709
+#, c-format
+msgid "Rotation speed:%2.2f degrees per second "
+msgstr "Forgatási sebesség:%2.2f fok másodpercenként "
+
+#: ../ui/ui.c:719
+#, c-format
+msgid "Iterations: %i "
+msgstr "Iterációk száma: %i "
+
+#: ../ui/ui.c:735
+#, c-format
+msgid "Cycling speed: %i "
+msgstr "Színforgatási sebesség: %i "
+
+#: ../ui/ui.c:748 ../ui/ui.c:762
+#, c-format
+msgid "speed:%2.2f "
+msgstr "sebesség:%2.2f "
+
+#: ../ui/ui.c:854
+#, c-format
+msgid "Thank you for using XaoS\n"
+msgstr "Köszönjük, hogy a XaoS programot használta!\n"
+
+#: ../ui/ui.c:891
+msgid "Skipping, please wait..."
+msgstr "Továbblépés, kérem várjon..."
+
+#: ../ui/ui.c:983 ../ui/ui.c:985 ../ui/ui-drv/win32/ui_win32.c:1453
+msgid "Resize"
+msgstr "Átméretez"
+
+#: ../ui/ui.c:998
+msgid "Quit"
+msgstr "Kilépés"
+
+#: ../ui/ui.c:999
+msgid "Exit now"
+msgstr "Azonnali kilépés"
+
+#: ../ui/ui.c:1001
+msgid "Not yet"
+msgstr "Inkább még ne"
+
+#: ../ui/ui.c:1004 ../ui-hlp/menu.c:1055 ../ui-hlp/menu.c:1065
+#: ../ui/dialog.c:404 ../ui/dialog.c:1380
+msgid "Help"
+msgstr "Segítség"
+
+#: ../ui/ui.c:1006
+msgid "Disable XaoS's builtin GUI"
+msgstr "A bépített felület kikapcsolása"
+
+#: ../ui/ui.c:1010 ../ui/ui.c:1016
+msgid "Status"
+msgstr "Jellemzõk"
+
+#: ../ui/ui.c:1012 ../ui/ui.c:1018
+msgid "Ministatus"
+msgstr "Fõbb jellemzõk"
+
+#: ../ui/ui.c:1021 ../ui/ui.c:1022
+msgid "Driver"
+msgstr "Grafikus meghajtó"
+
+#: ../ui/ui.c:1413
+#, c-format
+msgid "Welcome to XaoS version %s"
+msgstr "Köszöntjük a XaoS %s verziójában!"
+
+#: ../ui/ui.c:1580
+msgid "Can not allocate buffers"
+msgstr "Nincs elegendõ puffer"
+
+#: ../ui/ui.c:1598
+msgid "Can not create palette"
+msgstr "A színpaletta nem hozható létre"
+
+#: ../ui/ui.c:1610
+msgid "Can not create image"
+msgstr "A kép nem hozható létre"
+
+#: ../ui/ui.c:1641 ../ui/ui.c:1692
+msgid "Can not allocate tables"
+msgstr "Nincs hely a tábláknak"
+
+#: ../ui/ui.c:1678
+msgid "Can not initialize driver"
+msgstr "A grafikus meghajtó nem inicializálható"
+
+#: ../ui/ui.c:1681
+msgid "Can not return back to previous driver"
+msgstr "Az elõzõ grafikus meghajtó nem tölthetõ be"
+
+#: ../ui-hlp/menu.c:129
+msgid "Perturbation:"
+msgstr "Perturbáció:"
+
+#: ../ui-hlp/menu.c:133
+msgid "Julia-seed:"
+msgstr "Julia-mag:"
+
+#: ../ui-hlp/menu.c:137
+msgid "Morphing type:"
+msgstr "Átalakítás típusa:"
+
+#: ../ui-hlp/menu.c:138
+msgid "Startuptime:"
+msgstr "Indítási idõ:"
+
+#: ../ui-hlp/menu.c:139
+msgid "Stoptime:"
+msgstr "Leállítási idõ:"
+
+#: ../ui-hlp/menu.c:143
+msgid "File to render:"
+msgstr "Feldolgozandó fájl:"
+
+#: ../ui-hlp/menu.c:144
+msgid "Basename:"
+msgstr "Bázisnév:"
+
+#: ../ui-hlp/menu.c:145
+msgid "Width:"
+msgstr "Szélesség:"
+
+#: ../ui-hlp/menu.c:146
+msgid "Height:"
+msgstr "Magasság:"
+
+#: ../ui-hlp/menu.c:147
+msgid "Real width (cm):"
+msgstr "Valódi szélesség (cm):"
+
+#: ../ui-hlp/menu.c:148
+msgid "Real height (cm):"
+msgstr "Valódi magasság (cm):"
+
+#: ../ui-hlp/menu.c:149
+msgid "Framerate:"
+msgstr "Képfrissítés:"
+
+#: ../ui-hlp/menu.c:150
+msgid "Image type:"
+msgstr "Kép típusa:"
+
+#: ../ui-hlp/menu.c:151
+msgid "Antialiasing:"
+msgstr "Élsimítás:"
+
+#: ../ui-hlp/menu.c:152
+msgid "Always recalculate:"
+msgstr "Mindig újraszámolás:"
+
+#: ../ui-hlp/menu.c:153
+msgid "Calculate MPEG motion vectors:"
+msgstr "MPEG mozgásvektorok számítása:"
+
+#: ../ui-hlp/menu.c:154
+msgid "Recommended I frame distance:"
+msgstr "Javasolt I képkocka-távolság:"
+
+#: ../ui-hlp/menu.c:158
+msgid "Center:"
+msgstr "Középpont:"
+
+#: ../ui-hlp/menu.c:159
+msgid "Radius:"
+msgstr "Sugár:"
+
+#: ../ui-hlp/menu.c:160 ../ui-hlp/menu.c:225
+msgid "Angle:"
+msgstr "Szög:"
+
+#: ../ui-hlp/menu.c:164
+msgid "Mode:"
+msgstr "Mód:"
+
+#: ../ui-hlp/menu.c:165
+msgid "Start:"
+msgstr "Kezdet:"
+
+#: ../ui-hlp/menu.c:166
+msgid "End:"
+msgstr "Vég:"
+
+#: ../ui-hlp/menu.c:170
+msgid "Color:"
+msgstr "Szín:"
+
+#: ../ui-hlp/menu.c:174
+msgid "Rotations per second:"
+msgstr "Forgatások száma másodpercenként:"
+
+#: ../ui-hlp/menu.c:178
+msgid "Letters per second:"
+msgstr "Másodpercenkénti betûszám:"
+
+#: ../ui-hlp/menu.c:182
+msgid "Iterations:"
+msgstr "Iterációk:"
+
+#: ../ui-hlp/menu.c:186
+msgid "Text:"
+msgstr "Szöveg:"
+
+#: ../ui-hlp/menu.c:190
+msgid "Your command:"
+msgstr "Parancs:"
+
+#: ../ui-hlp/menu.c:194 ../ui-hlp/menu.c:198 ../ui-hlp/menu.c:202
+#: ../ui-hlp/menu.c:206 ../ui-hlp/menu.c:258
+msgid "Filename:"
+msgstr "Fájlnév:"
+
+#: ../ui-hlp/menu.c:210 ../ui-hlp/menu.c:298
+msgid "Formula:"
+msgstr "Képlet:"
+
+#: ../ui-hlp/menu.c:214
+msgid "X center:"
+msgstr "X középpont:"
+
+#: ../ui-hlp/menu.c:215
+msgid "Y center:"
+msgstr "Y középpont:"
+
+#: ../ui-hlp/menu.c:216
+msgid "X Radius:"
+msgstr "X sugár:"
+
+#: ../ui-hlp/menu.c:217
+msgid "Y Radius:"
+msgstr "Y sugár:"
+
+#: ../ui-hlp/menu.c:221
+msgid "Coordinates:"
+msgstr "Koordináták:"
+
+#: ../ui-hlp/menu.c:229
+msgid "continuous rotation"
+msgstr "folyamatos forgatás"
+
+#: ../ui-hlp/menu.c:233
+msgid "Fast rotation"
+msgstr "Gyors forgatás"
+
+#: ../ui-hlp/menu.c:237
+msgid "filter"
+msgstr "szûrõ"
+
+#: ../ui-hlp/menu.c:238
+msgid "enable"
+msgstr "bekapcsolva"
+
+#: ../ui-hlp/menu.c:242
+msgid "Amount:"
+msgstr "Mennyiség:"
+
+#: ../ui-hlp/menu.c:246
+msgid "Zooming speed:"
+msgstr "Belenagyítás gyorsasága:"
+
+#: ../ui-hlp/menu.c:250
+msgid "Name:"
+msgstr "Név:"
+
+#: ../ui-hlp/menu.c:254
+msgid "Bailout:"
+msgstr "Kilépés:"
+
+#: ../ui-hlp/menu.c:262
+msgid "Julia mode:"
+msgstr "Julia-mód:"
+
+#: ../ui-hlp/menu.c:266
+msgid "Horizontal position:"
+msgstr "Vízszintes pozíció:"
+
+#: ../ui-hlp/menu.c:267
+msgid "Vertical position:"
+msgstr "Függõleges pozíció:"
+
+#: ../ui-hlp/menu.c:271
+msgid "Dynamic resolution:"
+msgstr "Dinamikus felbontás:"
+
+#: ../ui-hlp/menu.c:275
+msgid "Time:"
+msgstr "Idõ:"
+
+#: ../ui-hlp/menu.c:279 ../ui-hlp/menu.c:283
+msgid "Number:"
+msgstr "Szám:"
+
+#: ../ui-hlp/menu.c:287
+msgid "Algorithm number:"
+msgstr "Algoritmus száma:"
+
+#: ../ui-hlp/menu.c:288
+msgid "Seed:"
+msgstr "Mag:"
+
+#: ../ui-hlp/menu.c:289
+msgid "Shift:"
+msgstr "Eltolás:"
+
+#: ../ui-hlp/menu.c:293
+msgid "Frames per second:"
+msgstr "Másodpercenkénti képkockaszám:"
+
+#: ../ui-hlp/menu.c:302
+msgid "Initialization:"
+msgstr "Alapérték:"
+
+#: ../ui-hlp/menu.c:357
+msgid "renderanim: Must specify a valid absolute path for basename"
+msgstr ""
+
+#: ../ui-hlp/menu.c:364
+msgid ""
+"renderanim: Width parameter must be positive integer in the range 0..4096"
+msgstr ""
+
+#: ../ui-hlp/menu.c:370
+msgid ""
+"renderanim: Height parameter must be positive integer in the range 0..4096"
+msgstr ""
+
+#: ../ui-hlp/menu.c:376
+msgid "renderanim: Invalid real width and height dimensions"
+msgstr ""
+
+#: ../ui-hlp/menu.c:380
+msgid "renderanim: invalid framerate"
+msgstr "renderanim: hibás képkocka-ráta"
+
+#: ../ui-hlp/menu.c:386
+msgid "renderanim: antialiasing not supported in 256 color mode"
+msgstr ""
+
+#: ../ui-hlp/menu.c:390
+msgid "renderanim: incorrect I frame distance"
+msgstr "renderanim: hibás I képkocka-távolság:"
+
+#: ../ui-hlp/menu.c:441 ../ui-hlp/menu.c:454
+msgid "animateview: Invalid viewpoint"
+msgstr "animateview: Érvénytelen nézõpont"
+
+#: ../ui-hlp/menu.c:467
+msgid "Invalid viewpoint"
+msgstr "Érvénytelen nézõpont"
+
+#: ../ui-hlp/menu.c:696
+msgid "Unknown palette type"
+msgstr "Ismeretlen paletta típus"
+
+#: ../ui-hlp/menu.c:771 ../ui-hlp/menu.c:785
+msgid "Initialization of color cycling failed."
+msgstr "A színforgatás nem inicializálható."
+
+#: ../ui-hlp/menu.c:773 ../ui-hlp/menu.c:787
+msgid "Try to enable palette emulation filter"
+msgstr "Próbáld bekapcsolni a paletta emulációs szûrõt"
+
+#: ../ui-hlp/menu.c:896
+#, c-format
+msgid "Algorithm:%i seed:%i size:%i"
+msgstr "Algoritmus:%i mag:%i méret:%i"
+
+#: ../ui-hlp/menu.c:947
+msgid "Root menu"
+msgstr "Fõmenü"
+
+#: ../ui-hlp/menu.c:948
+msgid "Animation root menu"
+msgstr "Animáció fõmenü"
+
+#: ../ui-hlp/menu.c:949
+msgid "Replay only commands"
+msgstr "Csak visszajátszó parancsok"
+
+#: ../ui-hlp/menu.c:950
+msgid "Command line options only"
+msgstr "Csak parancssori opciók"
+
+#: ../ui-hlp/menu.c:953
+msgid "print menus specifications of all menus"
+msgstr "minden menü specifikációjának kiírása"
+
+#: ../ui-hlp/menu.c:958
+msgid "print menu specification"
+msgstr "a menü specifikáció kiírása"
+
+#: ../ui-hlp/menu.c:961
+msgid "print menu specification in xshl format"
+msgstr ""
+
+#: ../ui-hlp/menu.c:965
+msgid "print all menu specifications in xshl format"
+msgstr ""
+
+#: ../ui-hlp/menu.c:967
+msgid "print dialog specification"
+msgstr ""
+
+#: ../ui-hlp/menu.c:972
+msgid "Line drawing functions"
+msgstr "Vonalrajzoló függvények"
+
+#: ../ui-hlp/menu.c:973
+msgid "Line"
+msgstr "Vonal"
+
+#: ../ui-hlp/menu.c:976
+msgid "Morph line"
+msgstr "Átalakuló vonal"
+
+#: ../ui-hlp/menu.c:978
+msgid "Morph last line"
+msgstr "Az utolsó vonal átalakítása"
+
+#: ../ui-hlp/menu.c:981
+msgid "Set line key"
+msgstr "Vonalkulcs beállítása"
+
+#: ../ui-hlp/menu.c:983
+msgid "Clear line"
+msgstr "Vonal törlése"
+
+#: ../ui-hlp/menu.c:986
+msgid "Clear all lines"
+msgstr "Minden vonal törlése"
+
+#: ../ui-hlp/menu.c:988
+msgid "Animation functions"
+msgstr "Animáció"
+
+#: ../ui-hlp/menu.c:989 ../ui-hlp/menu.c:1181 ../ui-hlp/menu.c:1190
+msgid "View"
+msgstr "Nézet"
+
+#: ../ui-hlp/menu.c:993
+msgid "Morph view"
+msgstr ""
+
+#: ../ui-hlp/menu.c:995
+msgid "Morph julia"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1000
+msgid "Move view"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1002
+msgid "Morph angle"
+msgstr ""
+
+#: ../ui-hlp/menu.c:1004
+msgid "Zoom center"
+msgstr "Nagyítási centrum"
+
+#: ../ui-hlp/menu.c:1006 ../ui/ui-drv/cocoa/AppController.m:343
+msgid "Zoom"
+msgstr "Nagyítás"
+
+#: ../ui-hlp/menu.c:1007
+msgid "Un-zoom"
+msgstr "Kicsinyítés"
+
+#: ../ui-hlp/menu.c:1010
+msgid "Stop zooming"
+msgstr "Belenagyítás leállítása"
+
+#: ../ui-hlp/menu.c:1011
+msgid "Smooth morphing parameters"
+msgstr "Simítási paraméterek"
+
+#: ../ui-hlp/menu.c:1014
+msgid "Timing functions"
+msgstr "Idõzítés"
+
+#: ../ui-hlp/menu.c:1015
+msgid "Usleep"
+msgstr "Várakozás"
+
+#: ../ui-hlp/menu.c:1018
+msgid "Wait for text"
+msgstr "Szövegre várakozás"
+
+#: ../ui-hlp/menu.c:1020
+msgid "Wait for complete image"
+msgstr "A kép kirajzolása folyamatban"
+
+#: ../ui-hlp/menu.c:1022
+msgid "Include file"
+msgstr "Fájl befûzése"
+
+#: ../ui-hlp/menu.c:1024 ../ui-hlp/menu.c:1222
+msgid "Default palette"
+msgstr "Alapértelmezett színek"
+
+#: ../ui-hlp/menu.c:1026
+msgid "Formula"
+msgstr "Képlet"
+
+#: ../ui-hlp/menu.c:1028
+msgid "Maximal zooming step"
+msgstr "Maximális nagyítási lépték"
+
+#: ../ui-hlp/menu.c:1030
+msgid "Zooming speedup"
+msgstr "Belenagyítás gyorsasága"
+
+#: ../ui-hlp/menu.c:1032
+msgid "Filter"
+msgstr "Szûrõ"
+
+#: ../ui-hlp/menu.c:1036 ../ui-hlp/menu.c:1041
+msgid "Letters per second"
+msgstr "Másodpercenkénti betûszám"
+
+#: ../ui-hlp/menu.c:1043 ../ui-hlp/menu.c:1314
+msgid "Interrupt"
+msgstr "Megszakítás"
+
+#: ../ui-hlp/menu.c:1045 ../ui-hlp/menu.c:1057
+msgid "File"
+msgstr "Fájl"
+
+#: ../ui-hlp/menu.c:1046
+msgid "Edit"
+msgstr "Szerkesztés"
+
+#: ../ui-hlp/menu.c:1047
+msgid "Fractal"
+msgstr "Fraktál"
+
+#: ../ui-hlp/menu.c:1048
+msgid "Calculation"
+msgstr "Számítás"
+
+#: ../ui-hlp/menu.c:1049 ../ui-hlp/menu.c:1391
+msgid "Filters"
+msgstr "Szûrõk"
+
+#: ../ui-hlp/menu.c:1050 ../ui-hlp/menu.c:1064
+msgid "UI"
+msgstr "Kezelõfelület"
+
+#: ../ui-hlp/menu.c:1051
+msgid "Misc"
+msgstr "Egyéb"
+
+#: ../ui-hlp/menu.c:1053
+msgid "Window"
+msgstr "Ablak"
+
+#: ../ui-hlp/menu.c:1056
+msgid "Tutorials"
+msgstr "Útmutatók"
+
+#: ../ui-hlp/menu.c:1062
+msgid "Stop replay"
+msgstr "Visszajátszás leállítása"
+
+#: ../ui-hlp/menu.c:1066
+msgid "Command"
+msgstr "Parancs"
+
+#: ../ui-hlp/menu.c:1068
+msgid "Play string"
+msgstr "Karakterlánc lejátszása"
+
+#: ../ui-hlp/menu.c:1070
+msgid "Render animation"
+msgstr "Film készítése"
+
+#: ../ui-hlp/menu.c:1073
+msgid "Clear screen"
+msgstr "Képernyõtörlés"
+
+#: ../ui-hlp/menu.c:1075
+msgid "Display fractal"
+msgstr "Fraktál megjelenítése"
+
+#: ../ui-hlp/menu.c:1078
+msgid "Display text"
+msgstr "Szöveg megjelenítése"
+
+#: ../ui-hlp/menu.c:1080
+msgid "Color"
+msgstr "Szín"
+
+#: ../ui-hlp/menu.c:1082
+msgid "Horizontal text position"
+msgstr "Szöveg vízszintes pozíciója"
+
+#: ../ui-hlp/menu.c:1084
+msgid "Vertical text position"
+msgstr "Szöveg függõleges pozíciója"
+
+#: ../ui-hlp/menu.c:1086
+msgid "Text position"
+msgstr "Szöveg pozíciója"
+
+#: ../ui-hlp/menu.c:1090
+msgid "Message"
+msgstr "Felirat"
+
+#: ../ui-hlp/menu.c:1112
+msgid "Load"
+msgstr "Megnyitás"
+
+#: ../ui-hlp/menu.c:1115
+msgid "Save"
+msgstr "Mentés"
+
+#: ../ui-hlp/menu.c:1117
+msgid "Record"
+msgstr "Felvétel"
+
+#: ../ui-hlp/menu.c:1121
+msgid "Replay"
+msgstr "Visszajátszás"
+
+#: ../ui-hlp/menu.c:1128
+msgid "Save image"
+msgstr "Kép mentése"
+
+#: ../ui-hlp/menu.c:1130
+msgid "Load random example"
+msgstr "Egy mintapélda betöltése"
+
+#: ../ui-hlp/menu.c:1132
+msgid "Save configuration"
+msgstr "Beállítások mentése"
+
+#: ../ui-hlp/menu.c:1137
+msgid "Undo"
+msgstr "Mégse"
+
+#: ../ui-hlp/menu.c:1141
+msgid "Redo"
+msgstr "Mégis"
+
+#: ../ui-hlp/menu.c:1145
+msgid "Formulae"
+msgstr "Képlet"
+
+#: ../ui-hlp/menu.c:1146
+msgid "More formulae"
+msgstr "További képletek"
+
+#: ../ui-hlp/menu.c:1151
+msgid "User formula"
+msgstr "Egyedi képlet"
+
+#: ../ui-hlp/menu.c:1153
+msgid "User initialization"
+msgstr "Egyedi képlet alapérték"
+
+#: ../ui-hlp/menu.c:1158
+msgid "Incoloring mode"
+msgstr "Belsõ színezési mód"
+
+#: ../ui-hlp/menu.c:1159
+msgid "Outcoloring mode"
+msgstr "Külsõ színezési mód"
+
+#: ../ui-hlp/menu.c:1160
+msgid "Plane"
+msgstr "Sík"
+
+#: ../ui-hlp/menu.c:1161
+msgid "Palette"
+msgstr "Paletta"
+
+#: ../ui-hlp/menu.c:1164
+msgid "Mandelbrot mode"
+msgstr "Mandelbrot-mód"
+
+#: ../ui-hlp/menu.c:1170 ../ui-hlp/menu.c:1174 ../ui-hlp/menu.c:1395
+msgid "Perturbation"
+msgstr "Perturbáció"
+
+#: ../ui-hlp/menu.c:1185
+msgid "Reset to defaults"
+msgstr "Alapértékek visszaállítása"
+
+#: ../ui-hlp/menu.c:1186
+msgid "Julia mode"
+msgstr "Julia-mód"
+
+#: ../ui-hlp/menu.c:1193
+msgid "Set angle"
+msgstr "Szög beállítása"
+
+#: ../ui-hlp/menu.c:1197
+msgid "Set plane"
+msgstr "Sík beállítása"
+
+#: ../ui-hlp/menu.c:1201
+msgid "Inside coloring mode"
+msgstr "Belsõ színezési módok"
+
+#: ../ui-hlp/menu.c:1206
+msgid "Outside coloring mode"
+msgstr "Külsõ színezési módok"
+
+#: ../ui-hlp/menu.c:1212
+msgid "Inside truecolor coloring mode"
+msgstr "Belsõ truecolor színezési mód"
+
+#: ../ui-hlp/menu.c:1216
+msgid "Outside truecolor coloring mode"
+msgstr "Külsõ truecolor színezési mód"
+
+#: ../ui-hlp/menu.c:1219
+msgid "Julia seed"
+msgstr "Julia-sebesség"
+
+#: ../ui-hlp/menu.c:1224
+msgid "Random palette"
+msgstr "Véletlen színek"
+
+#: ../ui-hlp/menu.c:1226
+msgid "Custom palette"
+msgstr "Felhasználói színek"
+
+#: ../ui-hlp/menu.c:1230
+msgid "Color cycling"
+msgstr "Színforgatás"
+
+#: ../ui-hlp/menu.c:1232
+msgid "Reversed color cycling"
+msgstr "Színforgatás visszafelé"
+
+#: ../ui-hlp/menu.c:1237
+msgid "Color cycling speed"
+msgstr "Színforgatási sebesség"
+
+#: ../ui-hlp/menu.c:1241
+msgid "Shift palette"
+msgstr "Színpaletta eltolása"
+
+#: ../ui-hlp/menu.c:1243
+msgid "Shift one forward"
+msgstr "Eggyel elõreléptetés"
+
+#: ../ui-hlp/menu.c:1246
+msgid "Shift one backward"
+msgstr "Eggyel visszaléptetés"
+
+#: ../ui-hlp/menu.c:1248 ../engine/zoom.c:1357
+msgid "Solid guessing"
+msgstr "Egyszerû találgatás"
+
+#: ../ui-hlp/menu.c:1249
+msgid "Dynamic resolution"
+msgstr "Dinamikus felbontás"
+
+#: ../ui-hlp/menu.c:1251
+msgid "Periodicity checking"
+msgstr "Periodicitás vizsgálata"
+
+#: ../ui-hlp/menu.c:1254
+msgid "Iterations"
+msgstr "Iterációk"
+
+#: ../ui-hlp/menu.c:1256
+msgid "Bailout"
+msgstr "Kilépés"
+
+#: ../ui-hlp/menu.c:1260
+msgid "Fast julia mode"
+msgstr "Gyors Julia-mód"
+
+#: ../ui-hlp/menu.c:1262
+msgid "Rotation"
+msgstr "Forgatás"
+
+#: ../ui-hlp/menu.c:1263
+msgid "Solid guessing range"
+msgstr "Találgatási intervallum"
+
+#: ../ui-hlp/menu.c:1266
+msgid "Disable rotation"
+msgstr "Forgatás kikapcsolva"
+
+#: ../ui-hlp/menu.c:1270
+msgid "Continuous rotation"
+msgstr "Folyamatos forgatás"
+
+#: ../ui-hlp/menu.c:1273
+msgid "Rotate by mouse"
+msgstr "Forgatás egérrel"
+
+#: ../ui-hlp/menu.c:1277
+msgid "Rotation speed"
+msgstr "Forgatás gyorsasága"
+
+#: ../ui-hlp/menu.c:1280
+msgid "Automatic rotation"
+msgstr "Automatikus forgatás"
+
+#: ../ui-hlp/menu.c:1285
+msgid "Fast rotation mode"
+msgstr "Gyors forgatási mód"
+
+#: ../ui-hlp/menu.c:1289
+msgid "Disable dynamic resolution"
+msgstr "Dinamikus felbontás kikapcsolva"
+
+#: ../ui-hlp/menu.c:1292
+msgid "Use only during animation"
+msgstr "Csak az animáció alatt"
+
+#: ../ui-hlp/menu.c:1296
+msgid "Use also for new images"
+msgstr "Új képeknél is így legyen"
+
+#: ../ui-hlp/menu.c:1298
+msgid "Dynamic resolution mode"
+msgstr "Dinamikus felbontási mód"
+
+#: ../ui-hlp/menu.c:1302
+msgid "Autopilot"
+msgstr "Robotpilóta"
+
+#: ../ui-hlp/menu.c:1306
+msgid "VJ mode"
+msgstr "VJ mód"
+
+#: ../ui-hlp/menu.c:1310
+msgid "Recalculate"
+msgstr "Számítás"
+
+#: ../ui-hlp/menu.c:1319
+msgid "Zooming speed"
+msgstr "Belenagyítás gyorsasága"
+
+#: ../ui-hlp/menu.c:1321
+msgid "Fixed step"
+msgstr "Rögzített lépték"
+
+#: ../ui-hlp/menu.c:1325
+msgid "Disable solid guessing"
+msgstr "Egyszerû találgatás kikapcsolva"
+
+#: ../ui-hlp/menu.c:1329
+msgid "Guess 2x2 rectangles"
+msgstr "2x2 téglalap"
+
+#: ../ui-hlp/menu.c:1331
+msgid "Guess 3x3 rectangles"
+msgstr "3x3 téglalap"
+
+#: ../ui-hlp/menu.c:1335
+msgid "Guess 4x4 rectangles"
+msgstr "4x4 téglalap"
+
+#: ../ui-hlp/menu.c:1337
+msgid "Guess 5x5 rectangles"
+msgstr "5x5 téglalap"
+
+#: ../ui-hlp/menu.c:1341
+msgid "Guess 6x6 rectangles"
+msgstr "6x6 téglalap"
+
+#: ../ui-hlp/menu.c:1343
+msgid "Guess 7x7 rectangles"
+msgstr "7x7 téglalap"
+
+#: ../ui-hlp/menu.c:1347
+msgid "Guess 8x8 rectangles"
+msgstr "8x8 téglalap"
+
+#: ../ui-hlp/menu.c:1349
+msgid "Guess unlimited rectangles"
+msgstr "Korlátlan téglalapszám"
+
+#: ../ui-hlp/menu.c:1354
+msgid "Language"
+msgstr "Nyelv"
+
+#: ../ui-hlp/menu.c:1357
+msgid "An introduction to fractals"
+msgstr "Bevezetés a fraktálok világába"
+
+#: ../ui-hlp/menu.c:1359
+msgid "XaoS features overview"
+msgstr "Tippek és trükkök"
+
+#: ../ui-hlp/menu.c:1361
+msgid "Math behind fractals"
+msgstr "A fraktálok matematikája"
+
+#: ../ui-hlp/menu.c:1362 ../ui-hlp/menu.c:1403
+msgid "Other fractal types in XaoS"
+msgstr "A XaoS további fraktáltípusai"
+
+#: ../ui-hlp/menu.c:1364
+msgid "What's new?"
+msgstr "Újdonságok"
+
+#: ../ui-hlp/menu.c:1374 ../ui-hlp/menu.c:1398
+msgid "Whole story"
+msgstr "Minden fejezet"
+
+#: ../ui-hlp/menu.c:1376
+msgid "Introduction"
+msgstr "Bevezetés"
+
+#: ../ui-hlp/menu.c:1377
+msgid "Mandelbrot set"
+msgstr "Mandelbrot-halmaz"
+
+#: ../ui-hlp/menu.c:1378
+msgid "Julia set"
+msgstr "Julia-halmaz"
+
+#: ../ui-hlp/menu.c:1379
+msgid "Higher power Mandelbrots"
+msgstr "Magasabb rendû Mandelbrotok"
+
+#: ../ui-hlp/menu.c:1380
+msgid "Newton's method"
+msgstr "Newton eljárása"
+
+#: ../ui-hlp/menu.c:1381
+msgid "Barnsley's formula"
+msgstr "A Barnsley-formula"
+
+#: ../ui-hlp/menu.c:1382
+msgid "Phoenix"
+msgstr "Fõnix"
+
+#: ../ui-hlp/menu.c:1383
+msgid "Octo"
+msgstr "Octo"
+
+#: ../ui-hlp/menu.c:1384
+msgid "Magnet"
+msgstr "Mágnes"
+
+#: ../ui-hlp/menu.c:1385
+msgid "All features"
+msgstr "Az összes jellemzõ"
+
+#: ../ui-hlp/menu.c:1387
+msgid "Outcoloring modes"
+msgstr "Külsõ színezési módok"
+
+#: ../ui-hlp/menu.c:1388
+msgid "Incoloring modes"
+msgstr "Belsõ színezési módok"
+
+#: ../ui-hlp/menu.c:1389
+msgid "True-color coloring modes"
+msgstr "True-color színezési módok"
+
+#: ../ui-hlp/menu.c:1392
+msgid "Planes"
+msgstr "Síkok"
+
+#: ../ui-hlp/menu.c:1393
+msgid "Animations and position files"
+msgstr "Animációk és pozíciófájlok"
+
+#: ../ui-hlp/menu.c:1396
+msgid "Random palettes"
+msgstr "Véletlen színpaletták"
+
+#: ../ui-hlp/menu.c:1397
+msgid "Other noteworthy features"
+msgstr "További apróságok"
+
+#: ../ui-hlp/menu.c:1400
+msgid "The definition and fractal dimension"
+msgstr "Definíció és fraktáldimenzió"
+
+#: ../ui-hlp/menu.c:1402
+msgid "Escape time fractals"
+msgstr "Szökési idõn alapuló fraktálok"
+
+#: ../ui-hlp/menu.c:1406
+msgid "Triceratops and Catseye fractals"
+msgstr "A Triceratops és a Catseye fraktálok"
+
+#: ../ui-hlp/menu.c:1408
+msgid "Mandelbar, Lambda, Manowar and Spider"
+msgstr "Mandelbar, Lambda, Manowar és Spider"
+
+#: ../ui-hlp/menu.c:1411
+msgid "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+msgstr "Sierpinski-háromszög, -szõnyeg, Koch-hópehely"
+
+#: ../ui-hlp/menu.c:1413
+msgid "What's new in 3.0?"
+msgstr "Újdonságok a 3.0-s verzióban"
+
+#: ../ui-hlp/play.c:74
+msgid "line available only in animation replay"
+msgstr "a \"line\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:99
+msgid "Morphing non existing line!"
+msgstr "Nem létezõ vonal nem alakítható!"
+
+#: ../ui-hlp/play.c:121
+msgid "linekey not available in this context!"
+msgstr ""
+
+#: ../ui-hlp/play.c:291
+msgid "clear_line available only in animation replay"
+msgstr "a \"clear_line\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:300
+msgid "clear_lines available only in animation replay"
+msgstr "a \"clear_lines\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:359
+msgid "Catalog file not found"
+msgstr "A katalógus fájl nem található"
+
+#: ../ui-hlp/play.c:405
+msgid "Replay is already active"
+msgstr "A visszajátszás már aktív"
+
+#: ../ui-hlp/play.c:409
+msgid "File open failed"
+msgstr "Sikertelen fájl megnyitás"
+
+#: ../ui-hlp/play.c:414
+msgid "Out of memory"
+msgstr "Elfogyott a memória"
+
+#: ../ui-hlp/play.c:526 ../ui-hlp/play.c:542 ../ui-hlp/play.c:566
+#: ../ui-hlp/play.c:595
+msgid "Missing parameter"
+msgstr "Hiányzó paraméter"
+
+#: ../ui-hlp/play.c:528 ../ui-hlp/play.c:544 ../ui-hlp/play.c:568
+#: ../ui-hlp/play.c:597
+msgid "Unexpected end of file"
+msgstr "A fájl nincs lezárva"
+
+#: ../ui-hlp/play.c:555 ../ui-hlp/play.c:574
+msgid "Token is too long"
+msgstr "Túl hosszú kulcsszó"
+
+#: ../ui-hlp/play.c:629
+msgid "Unknown formula type"
+msgstr "Ismeretlen képlettípus"
+
+#: ../ui-hlp/play.c:635
+msgid "morph available only in animation replay"
+msgstr "a \"morph\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:639
+msgid "morphview: Invalid viewpoint"
+msgstr "morphview: Érvénytelen nézõpont"
+
+#: ../ui-hlp/play.c:653
+msgid "move available only in animation replay"
+msgstr "a \"move\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:667
+msgid "morphjulia available only in animation replay"
+msgstr "a \"morphjulia\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:680
+msgid "morphangle available only in animation replay"
+msgstr "a \"morphangle\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:712
+msgid "Unknown filter"
+msgstr "Ismeretlen szûrõ"
+
+#: ../ui-hlp/play.c:753
+msgid "sleep available only in animation replay"
+msgstr "a \"sleep\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:767
+#, c-format
+msgid "Internal program error #12 %i\n"
+msgstr "12-es számú belsõ hiba %i\n"
+
+#: ../ui-hlp/play.c:788
+#, fuzzy
+msgid "wait available only in animation replay"
+msgstr "a \"sleep\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:834
+msgid "No catalog file loaded"
+msgstr "Nincs betöltött katalógus fájl"
+
+#: ../ui-hlp/play.c:839
+msgid "Message not found in catalog file"
+msgstr "A katalógus fájlban hiányzik a szöveg"
+
+#: ../ui-hlp/play.c:850
+#, fuzzy
+msgid "load available only in animation replay"
+msgstr "a \"sleep\" csak animáció visszajátszásakor használható"
+
+#: ../ui-hlp/play.c:854
+msgid "Include level overflow"
+msgstr ""
+
+#: ../ui-hlp/play.c:863
+msgid "File not found"
+msgstr "Hiányzó fájl"
+
+#: ../ui-hlp/play.c:881
+msgid "Too many parameters"
+msgstr "Túl sok paraméter"
+
+#: ../ui-hlp/play.c:916
+#, c-format
+msgid "Replay disabled at line %i"
+msgstr "A lejátszás a(z) %i sorszámú sornál megszakadt"
+
+#: ../ui-hlp/ui_helper.c:646
+msgid "Tutorial files not found. Reinstall XaoS"
+msgstr ""
+"A tankönyv fájlok nem találhatók. A XaoS programot újra kell telepíteni"
+
+#: ../ui-hlp/ui_helper.c:651
+msgid "Preparing first image"
+msgstr "Az elsõ kép elkészítése"
+
+#: ../ui-hlp/ui_helper.c:661
+msgid "Could not open examples"
+msgstr "A példák nem nyithatók meg"
+
+#: ../ui-hlp/ui_helper.c:667
+#, c-format
+msgid "File %s loaded."
+msgstr "A(z) %s fájl betöltõdött."
+
+#: ../ui-hlp/ui_helper.c:676
+msgid "Saving image..."
+msgstr "Kép mentése..."
+
+#: ../ui-hlp/ui_helper.c:684
+msgid "Save interrupted"
+msgstr "A mentés félbeszakadt"
+
+#: ../ui-hlp/ui_helper.c:693 ../ui-hlp/ui_helper.c:710
+#: ../ui-hlp/ui_helper.c:777
+#, c-format
+msgid "File %s saved."
+msgstr "A(z) %s fájl elmentve."
+
+#: ../ui-hlp/ui_helper.c:704
+msgid "Can not open file"
+msgstr "A fájl nem nyitható meg"
+
+#: ../ui-hlp/ui_helper.c:799
+#, c-format
+msgid "Recording to file %s enabled."
+msgstr "A(z) %s fájlba történõ felvétel elindítva."
+
+#: ../engine/zoom.c:1128
+msgid "Solid guessing 1"
+msgstr "Egyszerû találgatás 1"
+
+#: ../engine/btrace.c:292 ../engine/btrace.c:373
+msgid "Boundary trace"
+msgstr "Határkövetés"
+
+#: ../ui/dialog.c:312 ../ui/dialog.c:398 ../ui/dialog.c:1377
+#: ../ui/ui-drv/cocoa/CustomDialog.m:302
+msgid "OK"
+msgstr ""
+
+#: ../ui/dialog.c:313 ../ui/dialog.c:401 ../ui/dialog.c:1379
+#: ../ui/filesel.c:184 ../ui/ui-drv/cocoa/CustomDialog.m:312
+msgid "Cancel"
+msgstr "Mégsem"
+
+#: ../ui-hlp/render.c:46
+#, c-format
+msgid "Error: %s"
+msgstr "Hiba: %s"
+
+#: ../ui-hlp/render.c:121
+msgid "Cannot open motion vector file!"
+msgstr "A mozgásvektor fájl nem nyitható meg!"
+
+#: ../ui-hlp/render.c:270
+#, c-format
+msgid "Vectors: %i"
+msgstr "Vektorok: %i"
+
+#: ../ui-hlp/render.c:276
+msgid "Initializing"
+msgstr "Inicializálás"
+
+#: ../ui-hlp/render.c:284
+msgid "Cannot create palette"
+msgstr "A színpaletta nem hozható létre"
+
+#: ../ui-hlp/render.c:295
+msgid "Cannot create image\n"
+msgstr "A kép nem hozható létre\n"
+
+#: ../ui-hlp/render.c:304
+msgid "Cannot create checking buffer!"
+msgstr "Az ellenõrzõ puffer nem hozható létre!"
+
+#: ../ui-hlp/render.c:313 ../ui-hlp/render.c:596
+msgid "Cannot create context\n"
+msgstr "A kontextus nem hozható létre\n"
+
+#: ../ui-hlp/render.c:325
+msgid "Cannot open animation file\n"
+msgstr "Az animációs fájl nem nyitható meg\n"
+
+#: ../ui-hlp/render.c:336 ../ui-hlp/render.c:605
+msgid "Loading catalogs"
+msgstr "Filmfájlok szövegeinek betöltése"
+
+#: ../ui-hlp/render.c:366
+msgid "Processing command line options"
+msgstr "Parancssori opciók feldolgozása"
+
+#: ../ui-hlp/render.c:389
+msgid "Enabling animation replay\n"
+msgstr "Animáció-visszajátszás bekapcsolva\n"
+
+#: ../ui-hlp/render.c:396 ../ui-hlp/render.c:514
+msgid "Cannot open image file"
+msgstr "A képfájl nem nyitható meg"
+
+#: ../ui-hlp/render.c:410
+msgid "Cannot open pattern file"
+msgstr "A mintát tartalmazó fájl nem nyitható meg"
+
+#: ../ui-hlp/render.c:427 ../ui-hlp/render.c:429 ../ui-hlp/render.c:638
+msgid "Entering calculation loop!"
+msgstr "A számítási ciklus kezdete!"
+
+#: ../ui-hlp/render.c:455
+#, c-format
+msgid "Frame %i skipped."
+msgstr "A(z) %i. képkocka kihagyva."
+
+#: ../ui-hlp/render.c:457
+#, c-format
+msgid "Frames %i - %i skipped."
+msgstr "A(z) %i-%i. képkockák kihagyva."
+
+#: ../ui-hlp/render.c:461
+#, c-format
+msgid "Frame %4i: "
+msgstr "%4i. képkocka: "
+
+#: ../ui-hlp/render.c:528
+msgid " done."
+msgstr " kész."
+
+#: ../ui-hlp/render.c:532
+msgid " skipping..."
+msgstr " kihagyva..."
+
+#: ../ui-hlp/render.c:565 ../ui-hlp/render.c:657
+msgid "Calculation interrupted"
+msgstr "A számítás félbeszakadt"
+
+#: ../ui-hlp/render.c:568 ../ui-hlp/render.c:570 ../ui-hlp/render.c:659
+msgid "Calculation finished"
+msgstr "A számítás véget ért"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1292 ../ui/ui-drv/cocoa/AppController.m:321
+msgid "Copy"
+msgstr "Másol"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1293 ../ui/ui-drv/cocoa/AppController.m:324
+msgid "Paste"
+msgstr "Beilleszt"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1297
+msgid "About"
+msgstr "Névjegy"
+
+#: ../ui/ui-drv/cocoa/AppController.m:197
+msgid "About XaoS"
+msgstr "A XaoS névjegye"
+
+#: ../ui/ui-drv/cocoa/AppController.m:200
+msgid "Services"
+msgstr "Szolgáltatások"
+
+#: ../ui/ui-drv/cocoa/AppController.m:203
+msgid "Hide XaoS"
+msgstr "A XaoS elrejtése"
+
+#: ../ui/ui-drv/cocoa/AppController.m:206
+msgid "Hide Others"
+msgstr "A többi elrejtése"
+
+#: ../ui/ui-drv/cocoa/AppController.m:209
+msgid "Show All"
+msgstr "Mindent mutat"
+
+#: ../ui/ui-drv/cocoa/AppController.m:212
+msgid "Quit XaoS"
+msgstr "Kilépés a XaoS-ból"
+
+#: ../ui/ui-drv/cocoa/AppController.m:318
+msgid "Cut"
+msgstr "Kivágás"
+
+#: ../ui/ui-drv/cocoa/AppController.m:327
+msgid "Delete"
+msgstr "Törlés"
+
+#: ../ui/ui-drv/cocoa/AppController.m:330
+msgid "Select All"
+msgstr "Mindent kijelöl"
+
+#: ../ui/ui-drv/cocoa/AppController.m:340
+msgid "Minimize"
+msgstr "Minimalizálás"
+
+#: ../ui/ui-drv/cocoa/AppController.m:348
+msgid "Bring All to Front"
+msgstr "Mindent felülre"
+
+#: ../ui/ui-drv/cocoa/AppController.m:359
+msgid "Close"
+msgstr "Bezár"
+
+#: ../ui/ui-drv/cocoa/AppController.m:373
+msgid "Videator Output"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/CustomDialog.m:142
+msgid "Choose"
+msgstr "Kiválaszt"
diff --git a/src/i18n/it.po b/src/i18n/it.po
new file mode 100644
index 0000000..6322334
--- /dev/null
+++ b/src/i18n/it.po
@@ -0,0 +1,1483 @@
+# Italian translation for xaos
+# Copyright (c) 2007 Rosetta Contributors and Canonical Ltd 2007
+# This file is distributed under the same license as the xaos package.
+# FIRST AUTHOR <EMAIL@ADDRESS>, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: xaos\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-14 10:56+0100\n"
+"PO-Revision-Date: 2008-04-08 10:10+0000\n"
+"Last-Translator: Sergio Zanchetta <Unknown>\n"
+"Language-Team: Italian <it@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Launchpad-Export-Date: 2008-04-08 15:44+0000\n"
+"X-Generator: Launchpad (build Unknown)\n"
+
+#: ../ui/ui.c:314
+msgid "XaoS is out of memory."
+msgstr "XaoS ha esaurito la memoria."
+
+#: ../ui/ui.c:360
+#, c-format
+msgid "%s %.2f times (%.1fE) %2.2f frames/sec %c %i %i %i %i "
+msgstr "%s %.2f volte (%.1fE) %2.2f fotogrammi/sec %c %i %i %i %i "
+
+#: ../ui/ui.c:361
+msgid "unzoomed"
+msgstr "rimpicciolito"
+
+#: ../ui/ui.c:361
+msgid "zoomed"
+msgstr "ingrandito"
+
+#: ../ui/ui.c:369
+#, c-format
+msgid "framerate:%f\n"
+msgstr "frequenza fotogrammi:%f\n"
+
+#: ../ui/ui.c:409
+#, c-format
+msgid "Enabling: %s. "
+msgstr "Abilitazione: %s. "
+
+#: ../ui/ui.c:411
+#, c-format
+msgid "Disabling: %s. "
+msgstr "Disabilitazione: %s "
+
+#: ../ui/ui.c:441
+#, c-format
+msgid "Fractal name:%s"
+msgstr "Nome del frattale:%s"
+
+#: ../ui/ui.c:446
+#, c-format
+msgid "Fractal type:%s"
+msgstr "Tipo di frattale:%s"
+
+#: ../ui/ui.c:448
+msgid "Mandelbrot"
+msgstr "Mandelbrot"
+
+#: ../ui/ui.c:449
+msgid "Julia"
+msgstr "Julia"
+
+#: ../ui/ui.c:452
+#, c-format
+msgid "Formula:%s"
+msgstr "Formula:%s"
+
+#: ../ui/ui.c:457
+#, c-format
+msgid "View:[%1.12f,%1.12f]"
+msgstr "Vista:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:461
+#, c-format
+msgid "size:[%1.12f,%1.12f]"
+msgstr "dimensione:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:465
+#, c-format
+msgid "Rotation:%4.2f Screen size:%i:%i"
+msgstr "Rotazione:%4.2f Dimensione schermo:%i:%i"
+
+#: ../ui/ui.c:470
+#, c-format
+msgid "Iterations:%-4i Palette size:%i"
+msgstr "Iterazioni:%-4i Dimensione tavolozza:%i"
+
+#: ../ui/ui.c:477
+#, c-format
+msgid "Autopilot:%-4s Plane:%s"
+msgstr "Pilota automatico:%-4s Piano:%s"
+
+#: ../ui/ui.c:478
+msgid "On"
+msgstr "Attivo"
+
+#: ../ui/ui.c:478
+msgid "Off"
+msgstr "Disattivo"
+
+#: ../ui/ui.c:482
+#, c-format
+msgid "incoloring:%s outcoloring:%s"
+msgstr "colorazione interna:%s colorazione esterna:%s"
+
+#: ../ui/ui.c:487
+#, c-format
+msgid "zoomspeed:%f"
+msgstr "velocità di ingrandimento:%f"
+
+#: ../ui/ui.c:491
+msgid "Parameter:none"
+msgstr "Parametro:nessuno"
+
+#: ../ui/ui.c:493
+#, c-format
+msgid "Parameter:[%f,%f]"
+msgstr "Parametro:[%f,%f]"
+
+#: ../ui/ui.c:585
+#, c-format
+msgid "Please wait while calculating %s"
+msgstr "Attendere, calcolo di %s in corso..."
+
+#: ../ui/ui.c:685
+#, c-format
+msgid "Letters per second %i "
+msgstr "Lettere al secondo %i "
+
+#: ../ui/ui.c:698 ../ui/ui.c:709
+#, c-format
+msgid "Rotation speed:%2.2f degrees per second "
+msgstr "Velocità di rotazione:%2.2f gradi al secondo "
+
+#: ../ui/ui.c:719
+#, c-format
+msgid "Iterations: %i "
+msgstr "Iterazioni: %i "
+
+#: ../ui/ui.c:735
+#, c-format
+msgid "Cycling speed: %i "
+msgstr "Velocità di ciclo: %i "
+
+#: ../ui/ui.c:748 ../ui/ui.c:762
+#, c-format
+msgid "speed:%2.2f "
+msgstr "velocità:%2.2f "
+
+#: ../ui/ui.c:854
+#, c-format
+msgid "Thank you for using XaoS\n"
+msgstr "Grazie di utilizzare XaoS\n"
+
+#: ../ui/ui.c:891
+msgid "Skipping, please wait..."
+msgstr "Passaggio al successivo, attendere..."
+
+#: ../ui/ui.c:983 ../ui/ui.c:985 ../ui/ui-drv/win32/ui_win32.c:1453
+msgid "Resize"
+msgstr "Ridimensiona"
+
+#: ../ui/ui.c:998
+msgid "Quit"
+msgstr "Esci"
+
+#: ../ui/ui.c:999
+msgid "Exit now"
+msgstr "Esci adesso"
+
+#: ../ui/ui.c:1001
+msgid "Not yet"
+msgstr "Non ancora"
+
+#: ../ui/ui.c:1004 ../ui-hlp/menu.c:1055 ../ui-hlp/menu.c:1065
+#: ../ui/dialog.c:404 ../ui/dialog.c:1380
+msgid "Help"
+msgstr "Aiuto"
+
+#: ../ui/ui.c:1006
+msgid "Disable XaoS's builtin GUI"
+msgstr "Disabilita l'interfaccia utente incorporata di XaoS"
+
+#: ../ui/ui.c:1010 ../ui/ui.c:1016
+msgid "Status"
+msgstr "Stato"
+
+#: ../ui/ui.c:1012 ../ui/ui.c:1018
+msgid "Ministatus"
+msgstr "Stato ridotto"
+
+#: ../ui/ui.c:1021 ../ui/ui.c:1022
+msgid "Driver"
+msgstr "Driver"
+
+#: ../ui/ui.c:1413
+#, c-format
+msgid "Welcome to XaoS version %s"
+msgstr "Benvenuto a XaoS versione %s"
+
+#: ../ui/ui.c:1580
+msgid "Can not allocate buffers"
+msgstr "Non è possibile allocare i buffer"
+
+#: ../ui/ui.c:1598
+msgid "Can not create palette"
+msgstr "Non è possibile creare la tavolozza"
+
+#: ../ui/ui.c:1610
+msgid "Can not create image"
+msgstr "Non è possibile creare l'immagine"
+
+#: ../ui/ui.c:1641 ../ui/ui.c:1692
+msgid "Can not allocate tables"
+msgstr "Non è possibile allocare le tabelle"
+
+#: ../ui/ui.c:1678
+msgid "Can not initialize driver"
+msgstr "Non è possibile inizializzare il driver"
+
+#: ../ui/ui.c:1681
+msgid "Can not return back to previous driver"
+msgstr "Non è possibile tornare al driver precedente"
+
+#: ../ui-hlp/menu.c:129
+msgid "Perturbation:"
+msgstr "Perturbazione:"
+
+#: ../ui-hlp/menu.c:133
+msgid "Julia-seed:"
+msgstr "Seme di Julia:"
+
+#: ../ui-hlp/menu.c:137
+msgid "Morphing type:"
+msgstr "Tipo di trasformazione:"
+
+#: ../ui-hlp/menu.c:138
+msgid "Startuptime:"
+msgstr "Tempo di avvio:"
+
+#: ../ui-hlp/menu.c:139
+msgid "Stoptime:"
+msgstr "Tempo di arresto:"
+
+#: ../ui-hlp/menu.c:143
+msgid "File to render:"
+msgstr "File di rendering:"
+
+#: ../ui-hlp/menu.c:144
+msgid "Basename:"
+msgstr "Nome base:"
+
+#: ../ui-hlp/menu.c:145
+msgid "Width:"
+msgstr "Larghezza:"
+
+#: ../ui-hlp/menu.c:146
+msgid "Height:"
+msgstr "Altezza:"
+
+#: ../ui-hlp/menu.c:147
+msgid "Real width (cm):"
+msgstr "Larghezza reale (cm):"
+
+#: ../ui-hlp/menu.c:148
+msgid "Real height (cm):"
+msgstr "Altezza reale (cm):"
+
+#: ../ui-hlp/menu.c:149
+msgid "Framerate:"
+msgstr "Frequenza fotogrammi:"
+
+#: ../ui-hlp/menu.c:150
+msgid "Image type:"
+msgstr "Tipo di immagine:"
+
+#: ../ui-hlp/menu.c:151
+msgid "Antialiasing:"
+msgstr "Antialiasing:"
+
+#: ../ui-hlp/menu.c:152
+msgid "Always recalculate:"
+msgstr "Ricalcola sempre:"
+
+#: ../ui-hlp/menu.c:153
+msgid "Calculate MPEG motion vectors:"
+msgstr "Calcola vettori di movimento MPEG:"
+
+#: ../ui-hlp/menu.c:154
+msgid "Recommended I frame distance:"
+msgstr "Distanza consigliata fotogramma I:"
+
+#: ../ui-hlp/menu.c:158
+msgid "Center:"
+msgstr "Centro:"
+
+#: ../ui-hlp/menu.c:159
+msgid "Radius:"
+msgstr "Raggio:"
+
+#: ../ui-hlp/menu.c:160 ../ui-hlp/menu.c:225
+msgid "Angle:"
+msgstr "Angolo:"
+
+#: ../ui-hlp/menu.c:164
+msgid "Mode:"
+msgstr "Modalità:"
+
+#: ../ui-hlp/menu.c:165
+msgid "Start:"
+msgstr "Inizio:"
+
+#: ../ui-hlp/menu.c:166
+msgid "End:"
+msgstr "Fine:"
+
+#: ../ui-hlp/menu.c:170
+msgid "Color:"
+msgstr "Colore:"
+
+#: ../ui-hlp/menu.c:174
+msgid "Rotations per second:"
+msgstr "Rotazioni al secondo:"
+
+#: ../ui-hlp/menu.c:178
+msgid "Letters per second:"
+msgstr "Lettere al secondo:"
+
+#: ../ui-hlp/menu.c:182
+msgid "Iterations:"
+msgstr "Iterazioni:"
+
+#: ../ui-hlp/menu.c:186
+msgid "Text:"
+msgstr "Testo:"
+
+#: ../ui-hlp/menu.c:190
+msgid "Your command:"
+msgstr "Comando:"
+
+#: ../ui-hlp/menu.c:194 ../ui-hlp/menu.c:198 ../ui-hlp/menu.c:202
+#: ../ui-hlp/menu.c:206 ../ui-hlp/menu.c:258
+msgid "Filename:"
+msgstr "Nome file:"
+
+#: ../ui-hlp/menu.c:210 ../ui-hlp/menu.c:298
+msgid "Formula:"
+msgstr "Formula:"
+
+#: ../ui-hlp/menu.c:214
+msgid "X center:"
+msgstr "Centro X:"
+
+#: ../ui-hlp/menu.c:215
+msgid "Y center:"
+msgstr "Centro Y:"
+
+#: ../ui-hlp/menu.c:216
+msgid "X Radius:"
+msgstr "Raggio X:"
+
+#: ../ui-hlp/menu.c:217
+msgid "Y Radius:"
+msgstr "Raggio Y:"
+
+#: ../ui-hlp/menu.c:221
+msgid "Coordinates:"
+msgstr "Coordinate:"
+
+#: ../ui-hlp/menu.c:229
+msgid "continuous rotation"
+msgstr "rotazione continua"
+
+#: ../ui-hlp/menu.c:233
+msgid "Fast rotation"
+msgstr "Rotazione veloce"
+
+#: ../ui-hlp/menu.c:237
+msgid "filter"
+msgstr "filtra"
+
+#: ../ui-hlp/menu.c:238
+msgid "enable"
+msgstr "abilita"
+
+#: ../ui-hlp/menu.c:242
+msgid "Amount:"
+msgstr "Quantità:"
+
+#: ../ui-hlp/menu.c:246
+msgid "Zooming speed:"
+msgstr "Velocità di ingrandimento:"
+
+#: ../ui-hlp/menu.c:250
+msgid "Name:"
+msgstr "Nome:"
+
+#: ../ui-hlp/menu.c:254
+msgid "Bailout:"
+msgstr "Bailout:"
+
+#: ../ui-hlp/menu.c:262
+msgid "Julia mode:"
+msgstr "Modalità Julia:"
+
+#: ../ui-hlp/menu.c:266
+msgid "Horizontal position:"
+msgstr "Posizione orizzontale:"
+
+#: ../ui-hlp/menu.c:267
+msgid "Vertical position:"
+msgstr "Posizione verticale:"
+
+#: ../ui-hlp/menu.c:271
+msgid "Dynamic resolution:"
+msgstr "Risoluzione dinamica:"
+
+#: ../ui-hlp/menu.c:275
+msgid "Time:"
+msgstr "Tempo:"
+
+#: ../ui-hlp/menu.c:279 ../ui-hlp/menu.c:283
+msgid "Number:"
+msgstr "Numero:"
+
+#: ../ui-hlp/menu.c:287
+msgid "Algorithm number:"
+msgstr "Numero dell'algoritmo:"
+
+#: ../ui-hlp/menu.c:288
+msgid "Seed:"
+msgstr "Seme:"
+
+#: ../ui-hlp/menu.c:289
+msgid "Shift:"
+msgstr "Spostamento:"
+
+#: ../ui-hlp/menu.c:293
+msgid "Frames per second:"
+msgstr "Fotogrammi al secondo:"
+
+#: ../ui-hlp/menu.c:302
+msgid "Initialization:"
+msgstr "Inizializzazione:"
+
+#: ../ui-hlp/menu.c:357
+msgid "renderanim: Must specify a valid absolute path for basename"
+msgstr ""
+"renderanim: deve essere specificato un percorso assoluto valido per il nome "
+"base"
+
+#: ../ui-hlp/menu.c:364
+msgid ""
+"renderanim: Width parameter must be positive integer in the range 0..4096"
+msgstr ""
+"renderanim: il parametro larghezza deve essere un intero positivo "
+"nell'intervallo 0..4096"
+
+#: ../ui-hlp/menu.c:370
+msgid ""
+"renderanim: Height parameter must be positive integer in the range 0..4096"
+msgstr ""
+"renderanim: il parametro altezza deve essere un intero positivo "
+"nell'intervallo 0..4096"
+
+#: ../ui-hlp/menu.c:376
+msgid "renderanim: Invalid real width and height dimensions"
+msgstr "renderanim: dimensioni di larghezza e altezza reali non valide"
+
+#: ../ui-hlp/menu.c:380
+msgid "renderanim: invalid framerate"
+msgstr "renderanim: frequenza di aggiornamento non valida"
+
+#: ../ui-hlp/menu.c:386
+msgid "renderanim: antialiasing not supported in 256 color mode"
+msgstr "renderanim: antialiasing non supportato nella modalità a 256 colori"
+
+#: ../ui-hlp/menu.c:390
+msgid "renderanim: incorrect I frame distance"
+msgstr "renderanim: distanza fotogramma I non corretta"
+
+#: ../ui-hlp/menu.c:441 ../ui-hlp/menu.c:454
+msgid "animateview: Invalid viewpoint"
+msgstr "animateview: punto di osservazione non valido"
+
+#: ../ui-hlp/menu.c:467
+msgid "Invalid viewpoint"
+msgstr "Punto di osservazione non valido"
+
+#: ../ui-hlp/menu.c:696
+msgid "Unknown palette type"
+msgstr "Tipo di tavolozza sconosciuto"
+
+#: ../ui-hlp/menu.c:771 ../ui-hlp/menu.c:785
+msgid "Initialization of color cycling failed."
+msgstr "Inizializzazione del ciclo colori fallita."
+
+#: ../ui-hlp/menu.c:773 ../ui-hlp/menu.c:787
+msgid "Try to enable palette emulation filter"
+msgstr "Provare ad abilitare il filtro di emulazione tavolozza"
+
+#: ../ui-hlp/menu.c:896
+#, c-format
+msgid "Algorithm:%i seed:%i size:%i"
+msgstr "Algoritmo:%i seme: %i dimensione:%i"
+
+#: ../ui-hlp/menu.c:947
+msgid "Root menu"
+msgstr "Menù radice"
+
+#: ../ui-hlp/menu.c:948
+msgid "Animation root menu"
+msgstr "Menù radice dell'animazione"
+
+#: ../ui-hlp/menu.c:949
+msgid "Replay only commands"
+msgstr "Riproduci solo i comandi"
+
+#: ../ui-hlp/menu.c:950
+msgid "Command line options only"
+msgstr "Solo opzioni da linea di comando"
+
+#: ../ui-hlp/menu.c:953
+msgid "print menus specifications of all menus"
+msgstr "stampa le specifiche di tutti i menù"
+
+#: ../ui-hlp/menu.c:958
+msgid "print menu specification"
+msgstr "stampa la specifica del menù"
+
+#: ../ui-hlp/menu.c:961
+msgid "print menu specification in xshl format"
+msgstr "stampa la specifica del menù in formato xshl"
+
+#: ../ui-hlp/menu.c:965
+msgid "print all menu specifications in xshl format"
+msgstr "stampa tutte le specifiche del menù in formato xshl"
+
+#: ../ui-hlp/menu.c:967
+msgid "print dialog specification"
+msgstr "stampa le specifiche di dialogo"
+
+#: ../ui-hlp/menu.c:972
+msgid "Line drawing functions"
+msgstr "Funzioni di disegno linea"
+
+#: ../ui-hlp/menu.c:973
+msgid "Line"
+msgstr "Linea"
+
+#: ../ui-hlp/menu.c:976
+msgid "Morph line"
+msgstr "Trasforma linea"
+
+#: ../ui-hlp/menu.c:978
+msgid "Morph last line"
+msgstr "Trasforma l'ultima linea"
+
+#: ../ui-hlp/menu.c:981
+msgid "Set line key"
+msgstr "Imposta la chiave di linea"
+
+#: ../ui-hlp/menu.c:983
+msgid "Clear line"
+msgstr "Cancella linea"
+
+#: ../ui-hlp/menu.c:986
+msgid "Clear all lines"
+msgstr "Cancella tutte le linee"
+
+#: ../ui-hlp/menu.c:988
+msgid "Animation functions"
+msgstr "Funzioni di animazione"
+
+#: ../ui-hlp/menu.c:989 ../ui-hlp/menu.c:1181 ../ui-hlp/menu.c:1190
+msgid "View"
+msgstr "Vista"
+
+#: ../ui-hlp/menu.c:993
+msgid "Morph view"
+msgstr "Trasforma vista"
+
+#: ../ui-hlp/menu.c:995
+msgid "Morph julia"
+msgstr "Trasforma Julia"
+
+#: ../ui-hlp/menu.c:1000
+msgid "Move view"
+msgstr "Muovi vista"
+
+#: ../ui-hlp/menu.c:1002
+msgid "Morph angle"
+msgstr "Trasforma angolo"
+
+#: ../ui-hlp/menu.c:1004
+msgid "Zoom center"
+msgstr "Ingrandisci al centro"
+
+#: ../ui-hlp/menu.c:1006 ../ui/ui-drv/cocoa/AppController.m:343
+msgid "Zoom"
+msgstr "Ingrandimento"
+
+#: ../ui-hlp/menu.c:1007
+msgid "Un-zoom"
+msgstr "Rimpicciolimento"
+
+#: ../ui-hlp/menu.c:1010
+msgid "Stop zooming"
+msgstr "Ferma l'ingrandimento"
+
+#: ../ui-hlp/menu.c:1011
+msgid "Smooth morphing parameters"
+msgstr "Raffina i parametri di trasformazione"
+
+#: ../ui-hlp/menu.c:1014
+msgid "Timing functions"
+msgstr "Funzioni di temporizzazione"
+
+#: ../ui-hlp/menu.c:1015
+msgid "Usleep"
+msgstr "Usleep"
+
+#: ../ui-hlp/menu.c:1018
+msgid "Wait for text"
+msgstr "Attendere il testo"
+
+#: ../ui-hlp/menu.c:1020
+msgid "Wait for complete image"
+msgstr "Attendere l'immagine completa"
+
+#: ../ui-hlp/menu.c:1022
+msgid "Include file"
+msgstr "Includere il file"
+
+#: ../ui-hlp/menu.c:1024 ../ui-hlp/menu.c:1222
+msgid "Default palette"
+msgstr "Tavolozza predefinita"
+
+#: ../ui-hlp/menu.c:1026
+msgid "Formula"
+msgstr "Formula"
+
+#: ../ui-hlp/menu.c:1028
+msgid "Maximal zooming step"
+msgstr "Passo di ingrandimento massimo"
+
+#: ../ui-hlp/menu.c:1030
+msgid "Zooming speedup"
+msgstr "Accelerazione ingrandimento"
+
+#: ../ui-hlp/menu.c:1032
+msgid "Filter"
+msgstr "Filtro"
+
+#: ../ui-hlp/menu.c:1036 ../ui-hlp/menu.c:1041
+msgid "Letters per second"
+msgstr "Lettere al secondo"
+
+#: ../ui-hlp/menu.c:1043 ../ui-hlp/menu.c:1314
+msgid "Interrupt"
+msgstr "Interrompi"
+
+#: ../ui-hlp/menu.c:1045 ../ui-hlp/menu.c:1057
+msgid "File"
+msgstr "File"
+
+#: ../ui-hlp/menu.c:1046
+msgid "Edit"
+msgstr "Modifica"
+
+#: ../ui-hlp/menu.c:1047
+msgid "Fractal"
+msgstr "Frattale"
+
+#: ../ui-hlp/menu.c:1048
+msgid "Calculation"
+msgstr "Calcolo"
+
+#: ../ui-hlp/menu.c:1049 ../ui-hlp/menu.c:1391
+msgid "Filters"
+msgstr "Filtri"
+
+#: ../ui-hlp/menu.c:1050 ../ui-hlp/menu.c:1064
+msgid "UI"
+msgstr "IU"
+
+#: ../ui-hlp/menu.c:1051
+msgid "Misc"
+msgstr "Varie"
+
+#: ../ui-hlp/menu.c:1053
+msgid "Window"
+msgstr "Finestra"
+
+#: ../ui-hlp/menu.c:1056
+msgid "Tutorials"
+msgstr "Guide"
+
+#: ../ui-hlp/menu.c:1062
+msgid "Stop replay"
+msgstr "Interrompi la riproduzione"
+
+#: ../ui-hlp/menu.c:1066
+msgid "Command"
+msgstr "Comando"
+
+#: ../ui-hlp/menu.c:1068
+msgid "Play string"
+msgstr "Riproduci stringa"
+
+#: ../ui-hlp/menu.c:1070
+msgid "Render animation"
+msgstr "Rendering animazione"
+
+#: ../ui-hlp/menu.c:1073
+msgid "Clear screen"
+msgstr "Pulisci schermo"
+
+#: ../ui-hlp/menu.c:1075
+msgid "Display fractal"
+msgstr "Mostra frattale"
+
+#: ../ui-hlp/menu.c:1078
+msgid "Display text"
+msgstr "Mostra testo"
+
+#: ../ui-hlp/menu.c:1080
+msgid "Color"
+msgstr "Colore"
+
+#: ../ui-hlp/menu.c:1082
+msgid "Horizontal text position"
+msgstr "Posizione orizzontale testo"
+
+#: ../ui-hlp/menu.c:1084
+msgid "Vertical text position"
+msgstr "Posizione verticale testo"
+
+#: ../ui-hlp/menu.c:1086
+msgid "Text position"
+msgstr "Posizione testo"
+
+#: ../ui-hlp/menu.c:1090
+msgid "Message"
+msgstr "Messaggio"
+
+#: ../ui-hlp/menu.c:1112
+msgid "Load"
+msgstr "Carica"
+
+#: ../ui-hlp/menu.c:1115
+msgid "Save"
+msgstr "Salva"
+
+#: ../ui-hlp/menu.c:1117
+msgid "Record"
+msgstr "Registra"
+
+#: ../ui-hlp/menu.c:1121
+msgid "Replay"
+msgstr "Riproduci"
+
+#: ../ui-hlp/menu.c:1128
+msgid "Save image"
+msgstr "Salva immagine"
+
+#: ../ui-hlp/menu.c:1130
+msgid "Load random example"
+msgstr "Carica esempio casuale"
+
+#: ../ui-hlp/menu.c:1132
+msgid "Save configuration"
+msgstr "Salva configurazione"
+
+#: ../ui-hlp/menu.c:1137
+msgid "Undo"
+msgstr "Annulla"
+
+#: ../ui-hlp/menu.c:1141
+msgid "Redo"
+msgstr "Ripeti"
+
+#: ../ui-hlp/menu.c:1145
+msgid "Formulae"
+msgstr "Formule"
+
+#: ../ui-hlp/menu.c:1146
+msgid "More formulae"
+msgstr "Altre formule"
+
+#: ../ui-hlp/menu.c:1151
+msgid "User formula"
+msgstr "Formula utente"
+
+#: ../ui-hlp/menu.c:1153
+msgid "User initialization"
+msgstr "Inizializzazione utente"
+
+#: ../ui-hlp/menu.c:1158
+msgid "Incoloring mode"
+msgstr "Modo colorazione interna"
+
+#: ../ui-hlp/menu.c:1159
+msgid "Outcoloring mode"
+msgstr "Modo colorazione esterna"
+
+#: ../ui-hlp/menu.c:1160
+msgid "Plane"
+msgstr "Piano"
+
+#: ../ui-hlp/menu.c:1161
+msgid "Palette"
+msgstr "Tavolozza"
+
+#: ../ui-hlp/menu.c:1164
+msgid "Mandelbrot mode"
+msgstr "Modalità Mandelbrot"
+
+#: ../ui-hlp/menu.c:1170 ../ui-hlp/menu.c:1174 ../ui-hlp/menu.c:1395
+msgid "Perturbation"
+msgstr "Perturbazione"
+
+#: ../ui-hlp/menu.c:1185
+msgid "Reset to defaults"
+msgstr "Reimposta valori predefiniti"
+
+#: ../ui-hlp/menu.c:1186
+msgid "Julia mode"
+msgstr "Modalità Julia"
+
+#: ../ui-hlp/menu.c:1193
+msgid "Set angle"
+msgstr "Imposta angolo"
+
+#: ../ui-hlp/menu.c:1197
+msgid "Set plane"
+msgstr "Imposta piano"
+
+#: ../ui-hlp/menu.c:1201
+msgid "Inside coloring mode"
+msgstr "Modalità di colorazione interna"
+
+#: ../ui-hlp/menu.c:1206
+msgid "Outside coloring mode"
+msgstr "Modalità di colorazione esterna"
+
+#: ../ui-hlp/menu.c:1212
+msgid "Inside truecolor coloring mode"
+msgstr "Modalità di colorazione interna truecolor"
+
+#: ../ui-hlp/menu.c:1216
+msgid "Outside truecolor coloring mode"
+msgstr "Modalità di colorazione esterna truecolor"
+
+#: ../ui-hlp/menu.c:1219
+msgid "Julia seed"
+msgstr "Seme di Julia"
+
+#: ../ui-hlp/menu.c:1224
+msgid "Random palette"
+msgstr "Tavolozza casuale"
+
+#: ../ui-hlp/menu.c:1226
+msgid "Custom palette"
+msgstr "Tavolozza personalizzata"
+
+#: ../ui-hlp/menu.c:1230
+msgid "Color cycling"
+msgstr "Ciclo dei colori"
+
+#: ../ui-hlp/menu.c:1232
+msgid "Reversed color cycling"
+msgstr "Ciclo dei colori inverso"
+
+#: ../ui-hlp/menu.c:1237
+msgid "Color cycling speed"
+msgstr "Velocità di ciclo dei colori"
+
+#: ../ui-hlp/menu.c:1241
+msgid "Shift palette"
+msgstr "Sposta tavolozza"
+
+#: ../ui-hlp/menu.c:1243
+msgid "Shift one forward"
+msgstr "Sposta avanti di uno"
+
+#: ../ui-hlp/menu.c:1246
+msgid "Shift one backward"
+msgstr "Sposta indietro di uno"
+
+#: ../ui-hlp/menu.c:1248 ../engine/zoom.c:1357
+msgid "Solid guessing"
+msgstr "Stima di uniformità colore"
+
+#: ../ui-hlp/menu.c:1249
+msgid "Dynamic resolution"
+msgstr "Risoluzione dinamica"
+
+#: ../ui-hlp/menu.c:1251
+msgid "Periodicity checking"
+msgstr "Controllo di periodicità"
+
+#: ../ui-hlp/menu.c:1254
+msgid "Iterations"
+msgstr "Iterazioni"
+
+#: ../ui-hlp/menu.c:1256
+msgid "Bailout"
+msgstr "Bailout"
+
+#: ../ui-hlp/menu.c:1260
+msgid "Fast julia mode"
+msgstr "Modalità julia veloce"
+
+#: ../ui-hlp/menu.c:1262
+msgid "Rotation"
+msgstr "Rotazione"
+
+#: ../ui-hlp/menu.c:1263
+msgid "Solid guessing range"
+msgstr "Area di stima di uniformità"
+
+#: ../ui-hlp/menu.c:1266
+msgid "Disable rotation"
+msgstr "Disabilita rotazione"
+
+#: ../ui-hlp/menu.c:1270
+msgid "Continuous rotation"
+msgstr "Rotazione continua"
+
+#: ../ui-hlp/menu.c:1273
+msgid "Rotate by mouse"
+msgstr "Ruota tramite mouse"
+
+#: ../ui-hlp/menu.c:1277
+msgid "Rotation speed"
+msgstr "Velocità di rotazione"
+
+#: ../ui-hlp/menu.c:1280
+msgid "Automatic rotation"
+msgstr "Rotazione automatica"
+
+#: ../ui-hlp/menu.c:1285
+msgid "Fast rotation mode"
+msgstr "Modalità di rotazione rapida"
+
+#: ../ui-hlp/menu.c:1289
+msgid "Disable dynamic resolution"
+msgstr "Disabilita la risoluzione dinamica"
+
+#: ../ui-hlp/menu.c:1292
+msgid "Use only during animation"
+msgstr "Usa solo durante l'animazione"
+
+#: ../ui-hlp/menu.c:1296
+msgid "Use also for new images"
+msgstr "Usa anche per nuove immagini"
+
+#: ../ui-hlp/menu.c:1298
+msgid "Dynamic resolution mode"
+msgstr "Modalità a risoluzione dinamica"
+
+#: ../ui-hlp/menu.c:1302
+msgid "Autopilot"
+msgstr "Pilota automatico"
+
+#: ../ui-hlp/menu.c:1306
+msgid "VJ mode"
+msgstr "Modalità VJ"
+
+#: ../ui-hlp/menu.c:1310
+msgid "Recalculate"
+msgstr "Ricalcola"
+
+#: ../ui-hlp/menu.c:1319
+msgid "Zooming speed"
+msgstr "Velocità di ingrandimento"
+
+#: ../ui-hlp/menu.c:1321
+msgid "Fixed step"
+msgstr "Passo fisso"
+
+#: ../ui-hlp/menu.c:1325
+msgid "Disable solid guessing"
+msgstr "Disabilita la stima di uniformità"
+
+#: ../ui-hlp/menu.c:1329
+msgid "Guess 2x2 rectangles"
+msgstr "Stima rettangoli 2x2"
+
+#: ../ui-hlp/menu.c:1331
+msgid "Guess 3x3 rectangles"
+msgstr "Stima rettangoli 3x3"
+
+#: ../ui-hlp/menu.c:1335
+msgid "Guess 4x4 rectangles"
+msgstr "Stima rettangoli 4x4"
+
+#: ../ui-hlp/menu.c:1337
+msgid "Guess 5x5 rectangles"
+msgstr "Stima rettangoli 5x5"
+
+#: ../ui-hlp/menu.c:1341
+msgid "Guess 6x6 rectangles"
+msgstr "Stima rettangoli 6x6"
+
+#: ../ui-hlp/menu.c:1343
+msgid "Guess 7x7 rectangles"
+msgstr "Stima rettangoli 7x7"
+
+#: ../ui-hlp/menu.c:1347
+msgid "Guess 8x8 rectangles"
+msgstr "Stima rettangoli 8x8"
+
+#: ../ui-hlp/menu.c:1349
+msgid "Guess unlimited rectangles"
+msgstr "Stima rettangoli illimitati"
+
+#: ../ui-hlp/menu.c:1354
+msgid "Language"
+msgstr "Lingua"
+
+#: ../ui-hlp/menu.c:1357
+msgid "An introduction to fractals"
+msgstr "Una introduzione ai frattali"
+
+#: ../ui-hlp/menu.c:1359
+msgid "XaoS features overview"
+msgstr "Panoramica delle caratteristiche di XaoS"
+
+#: ../ui-hlp/menu.c:1361
+msgid "Math behind fractals"
+msgstr "La matematica che sta dietro ai frattali"
+
+#: ../ui-hlp/menu.c:1362 ../ui-hlp/menu.c:1403
+msgid "Other fractal types in XaoS"
+msgstr "Altri tipi di frattali in XaoS"
+
+#: ../ui-hlp/menu.c:1364
+msgid "What's new?"
+msgstr "Novità"
+
+#: ../ui-hlp/menu.c:1374 ../ui-hlp/menu.c:1398
+msgid "Whole story"
+msgstr "Racconto completo"
+
+#: ../ui-hlp/menu.c:1376
+msgid "Introduction"
+msgstr "Introduzione"
+
+#: ../ui-hlp/menu.c:1377
+msgid "Mandelbrot set"
+msgstr "Insieme di Mandelbrot"
+
+#: ../ui-hlp/menu.c:1378
+msgid "Julia set"
+msgstr "Insieme di Julia"
+
+#: ../ui-hlp/menu.c:1379
+msgid "Higher power Mandelbrots"
+msgstr "Mandelbrot a potenze superiori"
+
+#: ../ui-hlp/menu.c:1380
+msgid "Newton's method"
+msgstr "Metodo di Newton"
+
+#: ../ui-hlp/menu.c:1381
+msgid "Barnsley's formula"
+msgstr "Formula di Barnsley"
+
+#: ../ui-hlp/menu.c:1382
+msgid "Phoenix"
+msgstr "Phoenix"
+
+#: ../ui-hlp/menu.c:1383
+msgid "Octo"
+msgstr "Octo"
+
+#: ../ui-hlp/menu.c:1384
+msgid "Magnet"
+msgstr "Magnet"
+
+#: ../ui-hlp/menu.c:1385
+msgid "All features"
+msgstr "Tutte le caratteristiche"
+
+#: ../ui-hlp/menu.c:1387
+msgid "Outcoloring modes"
+msgstr "Modi di colorazione esterna"
+
+#: ../ui-hlp/menu.c:1388
+msgid "Incoloring modes"
+msgstr "Modi di colorazione interna"
+
+#: ../ui-hlp/menu.c:1389
+msgid "True-color coloring modes"
+msgstr "Modi di colorazione truecolor"
+
+#: ../ui-hlp/menu.c:1392
+msgid "Planes"
+msgstr "Piani"
+
+#: ../ui-hlp/menu.c:1393
+msgid "Animations and position files"
+msgstr "Animazioni e file di posizione"
+
+#: ../ui-hlp/menu.c:1396
+msgid "Random palettes"
+msgstr "Tavolozze casuali"
+
+#: ../ui-hlp/menu.c:1397
+msgid "Other noteworthy features"
+msgstr "Altre caratteristiche degne di nota"
+
+#: ../ui-hlp/menu.c:1400
+msgid "The definition and fractal dimension"
+msgstr "La definizione di frattale e la sua dimensione"
+
+#: ../ui-hlp/menu.c:1402
+msgid "Escape time fractals"
+msgstr "Frattali con tempo di fuga"
+
+#: ../ui-hlp/menu.c:1406
+msgid "Triceratops and Catseye fractals"
+msgstr "Frattali Triceratopo e Occhi di gatto"
+
+#: ../ui-hlp/menu.c:1408
+msgid "Mandelbar, Lambda, Manowar and Spider"
+msgstr "Mandelbar, Lambda, Manowar e Spider"
+
+#: ../ui-hlp/menu.c:1411
+msgid "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+msgstr "Triangolo e tappeto-Sierpinski,fiocco di neve-Koch"
+
+#: ../ui-hlp/menu.c:1413
+msgid "What's new in 3.0?"
+msgstr "Novità della versione 3.0"
+
+#: ../ui-hlp/play.c:74
+msgid "line available only in animation replay"
+msgstr "linea disponibile solo nella riproduzione animazione"
+
+#: ../ui-hlp/play.c:99
+msgid "Morphing non existing line!"
+msgstr "Trasformazione di una linea inesistente!"
+
+#: ../ui-hlp/play.c:121
+msgid "linekey not available in this context!"
+msgstr "linekey non disponibile in questo contesto!"
+
+#: ../ui-hlp/play.c:291
+msgid "clear_line available only in animation replay"
+msgstr "clear_line disponibile solo nella riproduzione animazione"
+
+#: ../ui-hlp/play.c:300
+msgid "clear_lines available only in animation replay"
+msgstr "clear_lines disponibile solo nella riproduzione animazione"
+
+#: ../ui-hlp/play.c:359
+msgid "Catalog file not found"
+msgstr "File del catalogo non trovato"
+
+#: ../ui-hlp/play.c:405
+msgid "Replay is already active"
+msgstr "La riproduzione è già attiva"
+
+#: ../ui-hlp/play.c:409
+msgid "File open failed"
+msgstr "Apertura del file fallita"
+
+#: ../ui-hlp/play.c:414
+msgid "Out of memory"
+msgstr "Memoria esaurita"
+
+#: ../ui-hlp/play.c:526 ../ui-hlp/play.c:542 ../ui-hlp/play.c:566
+#: ../ui-hlp/play.c:595
+msgid "Missing parameter"
+msgstr "Parametro mancante"
+
+#: ../ui-hlp/play.c:528 ../ui-hlp/play.c:544 ../ui-hlp/play.c:568
+#: ../ui-hlp/play.c:597
+msgid "Unexpected end of file"
+msgstr "Fine file inattesa"
+
+#: ../ui-hlp/play.c:555 ../ui-hlp/play.c:574
+msgid "Token is too long"
+msgstr "Il token è troppo lungo"
+
+#: ../ui-hlp/play.c:629
+msgid "Unknown formula type"
+msgstr "Tipo di formula sconosciuto"
+
+#: ../ui-hlp/play.c:635
+msgid "morph available only in animation replay"
+msgstr "morph disponibile solo nella riproduzione di animazione"
+
+#: ../ui-hlp/play.c:639
+msgid "morphview: Invalid viewpoint"
+msgstr "morphview: punto di osservazione non valido"
+
+#: ../ui-hlp/play.c:653
+msgid "move available only in animation replay"
+msgstr "move disponibile solo in riproduzione animazione"
+
+#: ../ui-hlp/play.c:667
+msgid "morphjulia available only in animation replay"
+msgstr "morphjulia disponibile solo in riproduzione animazione"
+
+#: ../ui-hlp/play.c:680
+msgid "morphangle available only in animation replay"
+msgstr "morphangle disponibile solo in riproduzione animazione"
+
+#: ../ui-hlp/play.c:712
+msgid "Unknown filter"
+msgstr "Filtro sconosciuto"
+
+#: ../ui-hlp/play.c:753
+msgid "sleep available only in animation replay"
+msgstr "sleep disponibile solo in riproduzione animazione"
+
+#: ../ui-hlp/play.c:767
+#, c-format
+msgid "Internal program error #12 %i\n"
+msgstr "Errore interno del programma #12 %i\n"
+
+#: ../ui-hlp/play.c:788
+msgid "wait available only in animation replay"
+msgstr "wait disponibile solo nella riproduzione di animazione"
+
+#: ../ui-hlp/play.c:834
+msgid "No catalog file loaded"
+msgstr "Nessun file del catalogo caricato"
+
+#: ../ui-hlp/play.c:839
+msgid "Message not found in catalog file"
+msgstr "Messaggio non trovato nel file del catalogo"
+
+#: ../ui-hlp/play.c:850
+msgid "load available only in animation replay"
+msgstr "load disponibile solo nella riproduzione di animazione"
+
+#: ../ui-hlp/play.c:854
+msgid "Include level overflow"
+msgstr "Includi overflow di livello"
+
+#: ../ui-hlp/play.c:863
+msgid "File not found"
+msgstr "File non trovato"
+
+#: ../ui-hlp/play.c:881
+msgid "Too many parameters"
+msgstr "Troppi parametri"
+
+#: ../ui-hlp/play.c:916
+#, c-format
+msgid "Replay disabled at line %i"
+msgstr "Riproduzione disabilitata alla linea %i"
+
+#: ../ui-hlp/ui_helper.c:646
+msgid "Tutorial files not found. Reinstall XaoS"
+msgstr "File della guida non trovati. Reinstallare XaoS"
+
+#: ../ui-hlp/ui_helper.c:651
+msgid "Preparing first image"
+msgstr "Preparazione della prima immagine"
+
+#: ../ui-hlp/ui_helper.c:661
+msgid "Could not open examples"
+msgstr "Impossibile aprire gli esempi"
+
+#: ../ui-hlp/ui_helper.c:667
+#, c-format
+msgid "File %s loaded."
+msgstr "File %s caricato."
+
+#: ../ui-hlp/ui_helper.c:676
+msgid "Saving image..."
+msgstr "Salvataggio dell'immagine..."
+
+#: ../ui-hlp/ui_helper.c:684
+msgid "Save interrupted"
+msgstr "Salvataggio interrotto"
+
+#: ../ui-hlp/ui_helper.c:693 ../ui-hlp/ui_helper.c:710
+#: ../ui-hlp/ui_helper.c:777
+#, c-format
+msgid "File %s saved."
+msgstr "File %s salvato."
+
+#: ../ui-hlp/ui_helper.c:704
+msgid "Can not open file"
+msgstr "Impossibile aprire il file"
+
+#: ../ui-hlp/ui_helper.c:799
+#, c-format
+msgid "Recording to file %s enabled."
+msgstr "Registrazione nel file %s abilitata."
+
+#: ../engine/zoom.c:1128
+msgid "Solid guessing 1"
+msgstr "Stima di uniformità colore 1"
+
+#: ../engine/btrace.c:292 ../engine/btrace.c:373
+msgid "Boundary trace"
+msgstr "Traccia dei contorni"
+
+#: ../ui/dialog.c:312 ../ui/dialog.c:398 ../ui/dialog.c:1377
+#: ../ui/ui-drv/cocoa/CustomDialog.m:302
+msgid "OK"
+msgstr "OK"
+
+#: ../ui/dialog.c:313 ../ui/dialog.c:401 ../ui/dialog.c:1379
+#: ../ui/filesel.c:184 ../ui/ui-drv/cocoa/CustomDialog.m:312
+msgid "Cancel"
+msgstr "Annulla"
+
+#: ../ui-hlp/render.c:46
+#, c-format
+msgid "Error: %s"
+msgstr "Errore: %s"
+
+#: ../ui-hlp/render.c:121
+msgid "Cannot open motion vector file!"
+msgstr "Impossibile aprire il file dei vettori di movimento!"
+
+#: ../ui-hlp/render.c:270
+#, c-format
+msgid "Vectors: %i"
+msgstr "Vettori: %i"
+
+#: ../ui-hlp/render.c:276
+msgid "Initializing"
+msgstr "Inizializzazione"
+
+#: ../ui-hlp/render.c:284
+msgid "Cannot create palette"
+msgstr "Impossibile creare la tavolozza"
+
+#: ../ui-hlp/render.c:295
+msgid "Cannot create image\n"
+msgstr "Impossibile creare l'immagine\n"
+
+#: ../ui-hlp/render.c:304
+msgid "Cannot create checking buffer!"
+msgstr "Impossibile creare il buffer di controllo!"
+
+#: ../ui-hlp/render.c:313 ../ui-hlp/render.c:596
+msgid "Cannot create context\n"
+msgstr "Impossibile creare il contesto\n"
+
+#: ../ui-hlp/render.c:325
+msgid "Cannot open animation file\n"
+msgstr "Impossibile aprire il file di animazione\n"
+
+#: ../ui-hlp/render.c:336 ../ui-hlp/render.c:605
+msgid "Loading catalogs"
+msgstr "Carimento dei cataloghi"
+
+#: ../ui-hlp/render.c:366
+msgid "Processing command line options"
+msgstr "Elaborazione delle opzioni da linea di comando"
+
+#: ../ui-hlp/render.c:389
+msgid "Enabling animation replay\n"
+msgstr "Abilitazione della riproduzione animazione\n"
+
+#: ../ui-hlp/render.c:396 ../ui-hlp/render.c:514
+msgid "Cannot open image file"
+msgstr "Impossibile aprire il file dell'immagine"
+
+#: ../ui-hlp/render.c:410
+msgid "Cannot open pattern file"
+msgstr "Impossibile aprire il file della trama"
+
+#: ../ui-hlp/render.c:427 ../ui-hlp/render.c:429 ../ui-hlp/render.c:638
+msgid "Entering calculation loop!"
+msgstr "Ingresso in un loop di calcolo!"
+
+#: ../ui-hlp/render.c:455
+#, c-format
+msgid "Frame %i skipped."
+msgstr "Fotogramma %i saltato."
+
+#: ../ui-hlp/render.c:457
+#, c-format
+msgid "Frames %i - %i skipped."
+msgstr "Fotogrammi %i - %i saltati."
+
+#: ../ui-hlp/render.c:461
+#, c-format
+msgid "Frame %4i: "
+msgstr "Fotogramma %4i: "
+
+#: ../ui-hlp/render.c:528
+msgid " done."
+msgstr " fatto."
+
+#: ../ui-hlp/render.c:532
+msgid " skipping..."
+msgstr " passaggio al successivo..."
+
+#: ../ui-hlp/render.c:565 ../ui-hlp/render.c:657
+msgid "Calculation interrupted"
+msgstr "Calcolo interrotto"
+
+#: ../ui-hlp/render.c:568 ../ui-hlp/render.c:570 ../ui-hlp/render.c:659
+msgid "Calculation finished"
+msgstr "Calcolo concluso"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1292 ../ui/ui-drv/cocoa/AppController.m:321
+msgid "Copy"
+msgstr "Copia"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1293 ../ui/ui-drv/cocoa/AppController.m:324
+msgid "Paste"
+msgstr "Incolla"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1297
+msgid "About"
+msgstr "Informazioni su..."
+
+#: ../ui/ui-drv/cocoa/AppController.m:197
+msgid "About XaoS"
+msgstr "Informazioni su XaoS"
+
+#: ../ui/ui-drv/cocoa/AppController.m:200
+msgid "Services"
+msgstr "Servizi"
+
+#: ../ui/ui-drv/cocoa/AppController.m:203
+msgid "Hide XaoS"
+msgstr "Nascondi XaoS"
+
+#: ../ui/ui-drv/cocoa/AppController.m:206
+msgid "Hide Others"
+msgstr "Nascondi le altre"
+
+#: ../ui/ui-drv/cocoa/AppController.m:209
+msgid "Show All"
+msgstr "Mostra tutte"
+
+#: ../ui/ui-drv/cocoa/AppController.m:212
+msgid "Quit XaoS"
+msgstr "Esci da XaoS"
+
+#: ../ui/ui-drv/cocoa/AppController.m:318
+msgid "Cut"
+msgstr "Taglia"
+
+#: ../ui/ui-drv/cocoa/AppController.m:327
+msgid "Delete"
+msgstr "Elimina"
+
+#: ../ui/ui-drv/cocoa/AppController.m:330
+msgid "Select All"
+msgstr "Seleziona tutto"
+
+#: ../ui/ui-drv/cocoa/AppController.m:340
+msgid "Minimize"
+msgstr "Minimizza"
+
+#: ../ui/ui-drv/cocoa/AppController.m:348
+msgid "Bring All to Front"
+msgstr "Porta tutto in primo piano"
+
+#: ../ui/ui-drv/cocoa/AppController.m:359
+msgid "Close"
+msgstr "Chiudi"
+
+#: ../ui/ui-drv/cocoa/AppController.m:373
+msgid "Videator Output"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/CustomDialog.m:142
+msgid "Choose"
+msgstr "Scegli"
diff --git a/src/i18n/pt.po b/src/i18n/pt.po
new file mode 100644
index 0000000..d7c33d9
--- /dev/null
+++ b/src/i18n/pt.po
@@ -0,0 +1,1570 @@
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Zoltan Kovacs <kovzol@math.u-szeged.hu>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XaoS 3.2\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-14 10:56+0100\n"
+"PO-Revision-Date: 2009-06-01 14:07-0300\n"
+"Last-Translator: Lucio de Araujo <lucio.matema@gmail.com>\n"
+"Language-Team: Portuguese <zeliagarcia@seed.pr.gov.br>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=ISO-8859-1\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Portuguese\n"
+"X-Poedit-Country: BRAZIL\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#: ../ui/ui.c:314
+#, fuzzy
+msgid "XaoS is out of memory."
+msgstr "Sem memória"
+
+#: ../ui/ui.c:360
+#, c-format
+msgid "%s %.2f times (%.1fE) %2.2f frames/sec %c %i %i %i %i "
+msgstr "%s %.2f vezes (%.1fE) %2.2f quadros/seg %c %i %i %i %i "
+
+#: ../ui/ui.c:361
+msgid "unzoomed"
+msgstr "reduzido"
+
+#: ../ui/ui.c:361
+msgid "zoomed"
+msgstr "ampliado"
+
+#: ../ui/ui.c:369
+#, c-format
+msgid "framerate:%f\n"
+msgstr "velocidade do quadro:%f\n"
+
+#: ../ui/ui.c:409
+#, c-format
+msgid "Enabling: %s. "
+msgstr "Habilitando: %s. "
+
+#: ../ui/ui.c:411
+#, c-format
+msgid "Disabling: %s. "
+msgstr "Desabilitando: %s"
+
+#: ../ui/ui.c:441
+#, c-format
+msgid "Fractal name:%s"
+msgstr "Nome do fractal: %s"
+
+#: ../ui/ui.c:446
+#, c-format
+msgid "Fractal type:%s"
+msgstr "Tipo do fractal: %s"
+
+#: ../ui/ui.c:448
+msgid "Mandelbrot"
+msgstr "Mandelbrot"
+
+#: ../ui/ui.c:449
+msgid "Julia"
+msgstr "Julia"
+
+#: ../ui/ui.c:452
+#, fuzzy, c-format
+msgid "Formula:%s"
+msgstr "Fórmula"
+
+#: ../ui/ui.c:457
+#, c-format
+msgid "View:[%1.12f,%1.12f]"
+msgstr "Visualização:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:461
+#, c-format
+msgid "size:[%1.12f,%1.12f]"
+msgstr "Tamanho:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:465
+#, c-format
+msgid "Rotation:%4.2f Screen size:%i:%i"
+msgstr "Rotação:%4.2f Tamanho da tela:%i:%i"
+
+#: ../ui/ui.c:470
+#, c-format
+msgid "Iterations:%-4i Palette size:%i"
+msgstr "Iteracões:%-4i Tamanho da paleta:%i"
+
+#: ../ui/ui.c:477
+#, c-format
+msgid "Autopilot:%-4s Plane:%s"
+msgstr "Piloto automático:%-4s Plano:%s"
+
+#: ../ui/ui.c:478
+msgid "On"
+msgstr "Ligado"
+
+#: ../ui/ui.c:478
+msgid "Off"
+msgstr "Desligado"
+
+#: ../ui/ui.c:482
+#, c-format
+msgid "incoloring:%s outcoloring:%s"
+msgstr "Cor interna:%s Cor externa:%s"
+
+#: ../ui/ui.c:487
+#, c-format
+msgid "zoomspeed:%f"
+msgstr "Velocidade da ampliação:%f"
+
+#: ../ui/ui.c:491
+msgid "Parameter:none"
+msgstr "Parâmetro:nenhum"
+
+#: ../ui/ui.c:493
+#, c-format
+msgid "Parameter:[%f,%f]"
+msgstr "Parâmetro:[%f,%f]"
+
+#: ../ui/ui.c:585
+#, c-format
+msgid "Please wait while calculating %s"
+msgstr "Por favor, espere o cálculo %s"
+
+#: ../ui/ui.c:685
+#, c-format
+msgid "Letters per second %i "
+msgstr "Letras por segundo %i "
+
+#: ../ui/ui.c:698 ../ui/ui.c:709
+#, c-format
+msgid "Rotation speed:%2.2f degrees per second "
+msgstr "Velocidade de rotação:%2.2f graus por segundo "
+
+#: ../ui/ui.c:719
+#, fuzzy, c-format
+msgid "Iterations: %i "
+msgstr "Iterações: %i "
+
+#: ../ui/ui.c:735
+#, c-format
+msgid "Cycling speed: %i "
+msgstr "Velocidade da troca de cor: %i "
+
+#: ../ui/ui.c:748 ../ui/ui.c:762
+#, c-format
+msgid "speed:%2.2f "
+msgstr "velocidade: %2.2f "
+
+#: ../ui/ui.c:854
+#, c-format
+msgid "Thank you for using XaoS\n"
+msgstr "Obrigado(a) por usar o XaoS\n"
+
+#: ../ui/ui.c:891
+msgid "Skipping, please wait..."
+msgstr "Pulando, por favor espere..."
+
+#: ../ui/ui.c:983 ../ui/ui.c:985 ../ui/ui-drv/win32/ui_win32.c:1453
+msgid "Resize"
+msgstr "Redimensionar"
+
+#: ../ui/ui.c:998
+#, fuzzy
+msgid "Quit"
+msgstr "Sair"
+
+#: ../ui/ui.c:999
+msgid "Exit now"
+msgstr "Sair agora"
+
+#: ../ui/ui.c:1001
+msgid "Not yet"
+msgstr "Ainda não"
+
+#: ../ui/ui.c:1004 ../ui-hlp/menu.c:1055 ../ui-hlp/menu.c:1065
+#: ../ui/dialog.c:404 ../ui/dialog.c:1380
+msgid "Help"
+msgstr "Ajuda"
+
+#: ../ui/ui.c:1006
+msgid "Disable XaoS's builtin GUI"
+msgstr "Desabilitar GUI integrado ao XaoS"
+
+#: ../ui/ui.c:1010 ../ui/ui.c:1016
+msgid "Status"
+msgstr "Estado"
+
+#: ../ui/ui.c:1012 ../ui/ui.c:1018
+msgid "Ministatus"
+msgstr "Miniestado"
+
+#: ../ui/ui.c:1021 ../ui/ui.c:1022
+msgid "Driver"
+msgstr "Navegador"
+
+#: ../ui/ui.c:1413
+#, c-format
+msgid "Welcome to XaoS version %s"
+msgstr "Bem-vindo ao XaoS versão %s"
+
+#: ../ui/ui.c:1580
+msgid "Can not allocate buffers"
+msgstr "Não pode partilhar buffers (memórias temporárias)"
+
+#: ../ui/ui.c:1598
+msgid "Can not create palette"
+msgstr "Não pode criar paleta"
+
+#: ../ui/ui.c:1610
+msgid "Can not create image"
+msgstr "Não pode criar imagem"
+
+#: ../ui/ui.c:1641 ../ui/ui.c:1692
+msgid "Can not allocate tables"
+msgstr "Não pode partilhar tabelas"
+
+#: ../ui/ui.c:1678
+msgid "Can not initialize driver"
+msgstr "Não pode inicializar o navegador"
+
+#: ../ui/ui.c:1681
+msgid "Can not return back to previous driver"
+msgstr "Não pode retornar ao navegador anterior"
+
+#: ../ui-hlp/menu.c:129
+#, fuzzy
+msgid "Perturbation:"
+msgstr "Distorção"
+
+#: ../ui-hlp/menu.c:133
+#, fuzzy
+msgid "Julia-seed:"
+msgstr "Semente de Julia"
+
+#: ../ui-hlp/menu.c:137
+msgid "Morphing type:"
+msgstr "Tipo de alteração na imagem (metamorfose)"
+
+#: ../ui-hlp/menu.c:138
+#, fuzzy
+msgid "Startuptime:"
+msgstr "Período de inicialização"
+
+#: ../ui-hlp/menu.c:139
+#, fuzzy
+msgid "Stoptime:"
+msgstr "Tempo de parada"
+
+#: ../ui-hlp/menu.c:143
+msgid "File to render:"
+msgstr "Arquivo para processar (renderizar)"
+
+#: ../ui-hlp/menu.c:144
+#, fuzzy
+msgid "Basename:"
+msgstr "Nome base"
+
+#: ../ui-hlp/menu.c:145
+msgid "Width:"
+msgstr "Comprimento"
+
+#: ../ui-hlp/menu.c:146
+msgid "Height:"
+msgstr "Altura"
+
+#: ../ui-hlp/menu.c:147
+msgid "Real width (cm):"
+msgstr "Comprimento real (cm)"
+
+#: ../ui-hlp/menu.c:148
+msgid "Real height (cm):"
+msgstr "Altura real (cm)"
+
+#: ../ui-hlp/menu.c:149
+#, fuzzy
+msgid "Framerate:"
+msgstr "velocidade do quadro:%f\n"
+
+#: ../ui-hlp/menu.c:150
+msgid "Image type:"
+msgstr "Tipo de imagem"
+
+#: ../ui-hlp/menu.c:151
+#, fuzzy
+msgid "Antialiasing:"
+msgstr "Suavização das bordas"
+
+#: ../ui-hlp/menu.c:152
+#, fuzzy
+msgid "Always recalculate:"
+msgstr "Recalcular sempre"
+
+#: ../ui-hlp/menu.c:153
+msgid "Calculate MPEG motion vectors:"
+msgstr "Calcular a transição dos vetores do MPEG"
+
+#: ../ui-hlp/menu.c:154
+msgid "Recommended I frame distance:"
+msgstr "Distância recomendada do frame I"
+
+#: ../ui-hlp/menu.c:158
+#, fuzzy
+msgid "Center:"
+msgstr "Centro"
+
+#: ../ui-hlp/menu.c:159
+msgid "Radius:"
+msgstr "Raio"
+
+#: ../ui-hlp/menu.c:160 ../ui-hlp/menu.c:225
+msgid "Angle:"
+msgstr "Ângulo"
+
+#: ../ui-hlp/menu.c:164
+msgid "Mode:"
+msgstr "Modo"
+
+#: ../ui-hlp/menu.c:165
+#, fuzzy
+msgid "Start:"
+msgstr "Iniciar"
+
+#: ../ui-hlp/menu.c:166
+msgid "End:"
+msgstr "Finalizar"
+
+#: ../ui-hlp/menu.c:170
+#, fuzzy
+msgid "Color:"
+msgstr "Cor"
+
+#: ../ui-hlp/menu.c:174
+#, fuzzy
+msgid "Rotations per second:"
+msgstr "Rotações por segundo"
+
+#: ../ui-hlp/menu.c:178
+#, fuzzy
+msgid "Letters per second:"
+msgstr "Letras por segundo"
+
+#: ../ui-hlp/menu.c:182
+#, fuzzy
+msgid "Iterations:"
+msgstr "Iterações"
+
+#: ../ui-hlp/menu.c:186
+msgid "Text:"
+msgstr "Texto"
+
+#: ../ui-hlp/menu.c:190
+#, fuzzy
+msgid "Your command:"
+msgstr "Seu comando"
+
+#: ../ui-hlp/menu.c:194 ../ui-hlp/menu.c:198 ../ui-hlp/menu.c:202
+#: ../ui-hlp/menu.c:206 ../ui-hlp/menu.c:258
+#, fuzzy
+msgid "Filename:"
+msgstr "Nome do arquivo"
+
+#: ../ui-hlp/menu.c:210 ../ui-hlp/menu.c:298
+#, fuzzy
+msgid "Formula:"
+msgstr "Fórmula"
+
+#: ../ui-hlp/menu.c:214
+#, fuzzy
+msgid "X center:"
+msgstr "Centro X"
+
+#: ../ui-hlp/menu.c:215
+#, fuzzy
+msgid "Y center:"
+msgstr "Centro Y"
+
+#: ../ui-hlp/menu.c:216
+msgid "X Radius:"
+msgstr "Raio X"
+
+#: ../ui-hlp/menu.c:217
+msgid "Y Radius:"
+msgstr "Raio Y"
+
+#: ../ui-hlp/menu.c:221
+msgid "Coordinates:"
+msgstr "Coordenadas"
+
+#: ../ui-hlp/menu.c:229
+#, fuzzy
+msgid "continuous rotation"
+msgstr "Rotação continua"
+
+#: ../ui-hlp/menu.c:233
+#, fuzzy
+msgid "Fast rotation"
+msgstr "Rotação rápida"
+
+#: ../ui-hlp/menu.c:237
+#, fuzzy
+msgid "filter"
+msgstr "Filtro"
+
+#: ../ui-hlp/menu.c:238
+msgid "enable"
+msgstr "Habilitar"
+
+#: ../ui-hlp/menu.c:242
+msgid "Amount:"
+msgstr "Quantia"
+
+#: ../ui-hlp/menu.c:246
+#, fuzzy
+msgid "Zooming speed:"
+msgstr "Velocidade da ampliação"
+
+#: ../ui-hlp/menu.c:250
+msgid "Name:"
+msgstr "Nome"
+
+#: ../ui-hlp/menu.c:254
+msgid "Bailout:"
+msgstr "Bailout"
+
+#: ../ui-hlp/menu.c:262
+#, fuzzy
+msgid "Julia mode:"
+msgstr "Modo Julia"
+
+#: ../ui-hlp/menu.c:266
+#, fuzzy
+msgid "Horizontal position:"
+msgstr "Posição horizontal"
+
+#: ../ui-hlp/menu.c:267
+#, fuzzy
+msgid "Vertical position:"
+msgstr "Posição vertical"
+
+#: ../ui-hlp/menu.c:271
+#, fuzzy
+msgid "Dynamic resolution:"
+msgstr "Resolução dinâmica"
+
+#: ../ui-hlp/menu.c:275
+msgid "Time:"
+msgstr "Tempo"
+
+#: ../ui-hlp/menu.c:279 ../ui-hlp/menu.c:283
+msgid "Number:"
+msgstr "Número"
+
+#: ../ui-hlp/menu.c:287
+msgid "Algorithm number:"
+msgstr "Número algoritmo"
+
+#: ../ui-hlp/menu.c:288
+msgid "Seed:"
+msgstr "Semente"
+
+#: ../ui-hlp/menu.c:289
+msgid "Shift:"
+msgstr "Trocar"
+
+#: ../ui-hlp/menu.c:293
+#, fuzzy
+msgid "Frames per second:"
+msgstr "Quadros por segundo"
+
+#: ../ui-hlp/menu.c:302
+#, fuzzy
+msgid "Initialization:"
+msgstr "Inicialização"
+
+#: ../ui-hlp/menu.c:357
+msgid "renderanim: Must specify a valid absolute path for basename"
+msgstr ""
+"Processar animação: especificar um caminho absolutamente válido para o nome "
+"base"
+
+#: ../ui-hlp/menu.c:364
+msgid ""
+"renderanim: Width parameter must be positive integer in the range 0..4096"
+msgstr ""
+"Processar animação: o valor da extensão deve ser um número inteiro positivo "
+"no intervalo 0 .. 4096"
+
+#: ../ui-hlp/menu.c:370
+msgid ""
+"renderanim: Height parameter must be positive integer in the range 0..4096"
+msgstr ""
+"Processar animação: o valor da altura deve ser um número inteiro positivo no "
+"intervalo 0 .. 4096"
+
+#: ../ui-hlp/menu.c:376
+msgid "renderanim: Invalid real width and height dimensions"
+msgstr "processar animação: Extensão e altura reais inválidas"
+
+#: ../ui-hlp/menu.c:380
+msgid "renderanim: invalid framerate"
+msgstr "processar animação: velocidade de quadro inválida"
+
+#: ../ui-hlp/menu.c:386
+msgid "renderanim: antialiasing not supported in 256 color mode"
+msgstr ""
+"processar animação: anti-serrilhamento não suportado no modo de 256 cores"
+
+#: ../ui-hlp/menu.c:390
+msgid "renderanim: incorrect I frame distance"
+msgstr "processar animação: distância incorreta do quadro I"
+
+#: ../ui-hlp/menu.c:441 ../ui-hlp/menu.c:454
+msgid "animateview: Invalid viewpoint"
+msgstr "visualizar animação: paradigma inválido"
+
+#: ../ui-hlp/menu.c:467
+msgid "Invalid viewpoint"
+msgstr "Paradigma inválido"
+
+#: ../ui-hlp/menu.c:696
+#, fuzzy
+msgid "Unknown palette type"
+msgstr "Tipo de paleta desconhecida"
+
+#: ../ui-hlp/menu.c:771 ../ui-hlp/menu.c:785
+msgid "Initialization of color cycling failed."
+msgstr "Falha na inicialização de troca de cor"
+
+#: ../ui-hlp/menu.c:773 ../ui-hlp/menu.c:787
+msgid "Try to enable palette emulation filter"
+msgstr "Tente habilitar a paleta de simulação"
+
+#: ../ui-hlp/menu.c:896
+#, c-format
+msgid "Algorithm:%i seed:%i size:%i"
+msgstr "Algoritmo:%i semente:%i tamanho:%i"
+
+#: ../ui-hlp/menu.c:947
+msgid "Root menu"
+msgstr "Menu da raiz"
+
+#: ../ui-hlp/menu.c:948
+msgid "Animation root menu"
+msgstr "Menu da raiz da animação"
+
+#: ../ui-hlp/menu.c:949
+msgid "Replay only commands"
+msgstr "Repetir somente instruções"
+
+#: ../ui-hlp/menu.c:950
+msgid "Command line options only"
+msgstr "Somente opções da linha de instruções"
+
+#: ../ui-hlp/menu.c:953
+msgid "print menus specifications of all menus"
+msgstr "imprima os menus de especificações de todos os menus"
+
+#: ../ui-hlp/menu.c:958
+msgid "print menu specification"
+msgstr "Imprima a especificação do menu"
+
+#: ../ui-hlp/menu.c:961
+msgid "print menu specification in xshl format"
+msgstr "imprima a especificação do menu em formato xshl"
+
+#: ../ui-hlp/menu.c:965
+msgid "print all menu specifications in xshl format"
+msgstr "imprima todas as especificações do menu em formato xshl"
+
+#: ../ui-hlp/menu.c:967
+msgid "print dialog specification"
+msgstr "imprima a especificação do diálogo"
+
+#: ../ui-hlp/menu.c:972
+msgid "Line drawing functions"
+msgstr "Funções para desenhar linhas"
+
+#: ../ui-hlp/menu.c:973
+msgid "Line"
+msgstr "Linha"
+
+#: ../ui-hlp/menu.c:976
+#, fuzzy
+msgid "Morph line"
+msgstr "Trocar a linha"
+
+#: ../ui-hlp/menu.c:978
+msgid "Morph last line"
+msgstr "Trocar a última linha"
+
+#: ../ui-hlp/menu.c:981
+#, fuzzy
+msgid "Set line key"
+msgstr "Estabelecer a linha chave"
+
+#: ../ui-hlp/menu.c:983
+msgid "Clear line"
+msgstr "Limpar a linha"
+
+#: ../ui-hlp/menu.c:986
+msgid "Clear all lines"
+msgstr "Limpar todas as linhas"
+
+#: ../ui-hlp/menu.c:988
+msgid "Animation functions"
+msgstr "Funções de animação"
+
+#: ../ui-hlp/menu.c:989 ../ui-hlp/menu.c:1181 ../ui-hlp/menu.c:1190
+msgid "View"
+msgstr "Visualizar"
+
+#: ../ui-hlp/menu.c:993
+msgid "Morph view"
+msgstr "Trocar a visualização"
+
+#: ../ui-hlp/menu.c:995
+msgid "Morph julia"
+msgstr "Trocar para o modo Julia"
+
+#: ../ui-hlp/menu.c:1000
+msgid "Move view"
+msgstr "Mover a visualização"
+
+#: ../ui-hlp/menu.c:1002
+#, fuzzy
+msgid "Morph angle"
+msgstr "Trocar o ângulo"
+
+#: ../ui-hlp/menu.c:1004
+msgid "Zoom center"
+msgstr "Centro de ampliação"
+
+#: ../ui-hlp/menu.c:1006 ../ui/ui-drv/cocoa/AppController.m:343
+msgid "Zoom"
+msgstr "Ampliar"
+
+#: ../ui-hlp/menu.c:1007
+msgid "Un-zoom"
+msgstr "Reduzir"
+
+#: ../ui-hlp/menu.c:1010
+msgid "Stop zooming"
+msgstr "Pare a ampliação"
+
+#: ../ui-hlp/menu.c:1011
+msgid "Smooth morphing parameters"
+msgstr "Trocar suavemente os parâmetros"
+
+#: ../ui-hlp/menu.c:1014
+msgid "Timing functions"
+msgstr "Funções de tempo"
+
+#: ../ui-hlp/menu.c:1015
+msgid "Usleep"
+msgstr "Atrasar"
+
+#: ../ui-hlp/menu.c:1018
+msgid "Wait for text"
+msgstr "Espere pelo texto"
+
+#: ../ui-hlp/menu.c:1020
+msgid "Wait for complete image"
+msgstr "Espere pela imagem completa"
+
+#: ../ui-hlp/menu.c:1022
+msgid "Include file"
+msgstr "Incluir arquivo"
+
+#: ../ui-hlp/menu.c:1024 ../ui-hlp/menu.c:1222
+msgid "Default palette"
+msgstr "Paleta padrão"
+
+#: ../ui-hlp/menu.c:1026
+msgid "Formula"
+msgstr "Fórmula"
+
+#: ../ui-hlp/menu.c:1028
+msgid "Maximal zooming step"
+msgstr "Ampliação máxima"
+
+#: ../ui-hlp/menu.c:1030
+msgid "Zooming speedup"
+msgstr "Ampliação acelerada"
+
+#: ../ui-hlp/menu.c:1032
+msgid "Filter"
+msgstr "Filtro"
+
+#: ../ui-hlp/menu.c:1036 ../ui-hlp/menu.c:1041
+msgid "Letters per second"
+msgstr "Letras por segundo"
+
+#: ../ui-hlp/menu.c:1043 ../ui-hlp/menu.c:1314
+msgid "Interrupt"
+msgstr "Interromper"
+
+#: ../ui-hlp/menu.c:1045 ../ui-hlp/menu.c:1057
+msgid "File"
+msgstr "Arquivo"
+
+#: ../ui-hlp/menu.c:1046
+msgid "Edit"
+msgstr "Editar"
+
+#: ../ui-hlp/menu.c:1047
+msgid "Fractal"
+msgstr "Fractal"
+
+#: ../ui-hlp/menu.c:1048
+msgid "Calculation"
+msgstr "Cálculo"
+
+#: ../ui-hlp/menu.c:1049 ../ui-hlp/menu.c:1391
+msgid "Filters"
+msgstr "Filtros"
+
+#: ../ui-hlp/menu.c:1050 ../ui-hlp/menu.c:1064
+msgid "UI"
+msgstr "UI"
+
+#: ../ui-hlp/menu.c:1051
+msgid "Misc"
+msgstr "Misc"
+
+#: ../ui-hlp/menu.c:1053
+#, fuzzy
+msgid "Window"
+msgstr "Janela"
+
+#: ../ui-hlp/menu.c:1056
+msgid "Tutorials"
+msgstr "Tutoriais"
+
+#: ../ui-hlp/menu.c:1062
+msgid "Stop replay"
+msgstr "Parar a repetição"
+
+#: ../ui-hlp/menu.c:1066
+msgid "Command"
+msgstr "Instrução"
+
+#: ../ui-hlp/menu.c:1068
+msgid "Play string"
+msgstr "Mostrar a série"
+
+#: ../ui-hlp/menu.c:1070
+msgid "Render animation"
+msgstr "Processar animação"
+
+#: ../ui-hlp/menu.c:1073
+msgid "Clear screen"
+msgstr "Limpar a tela"
+
+#: ../ui-hlp/menu.c:1075
+msgid "Display fractal"
+msgstr "Exibir o fractal"
+
+#: ../ui-hlp/menu.c:1078
+msgid "Display text"
+msgstr "Exibir o texto"
+
+#: ../ui-hlp/menu.c:1080
+#, fuzzy
+msgid "Color"
+msgstr "Cor"
+
+#: ../ui-hlp/menu.c:1082
+msgid "Horizontal text position"
+msgstr "Posição de texto horizontal"
+
+#: ../ui-hlp/menu.c:1084
+msgid "Vertical text position"
+msgstr "Posição de texto vertical "
+
+#: ../ui-hlp/menu.c:1086
+msgid "Text position"
+msgstr "Posição do texto"
+
+#: ../ui-hlp/menu.c:1090
+msgid "Message"
+msgstr "Mensagem"
+
+#: ../ui-hlp/menu.c:1112
+msgid "Load"
+msgstr "Carregar"
+
+#: ../ui-hlp/menu.c:1115
+msgid "Save"
+msgstr "Salvar"
+
+#: ../ui-hlp/menu.c:1117
+msgid "Record"
+msgstr "Gravar"
+
+#: ../ui-hlp/menu.c:1121
+msgid "Replay"
+msgstr "Repetir"
+
+#: ../ui-hlp/menu.c:1128
+msgid "Save image"
+msgstr "Salvar a imagem"
+
+#: ../ui-hlp/menu.c:1130
+msgid "Load random example"
+msgstr "Carregar exemplo aleatório"
+
+#: ../ui-hlp/menu.c:1132
+msgid "Save configuration"
+msgstr "Salvar configuração"
+
+#: ../ui-hlp/menu.c:1137
+msgid "Undo"
+msgstr "Desfazer"
+
+#: ../ui-hlp/menu.c:1141
+msgid "Redo"
+msgstr "Refazer"
+
+#: ../ui-hlp/menu.c:1145
+msgid "Formulae"
+msgstr "Fórmulas"
+
+#: ../ui-hlp/menu.c:1146
+#, fuzzy
+msgid "More formulae"
+msgstr "Mais fórmulas"
+
+#: ../ui-hlp/menu.c:1151
+#, fuzzy
+msgid "User formula"
+msgstr "Fórmula usuário"
+
+#: ../ui-hlp/menu.c:1153
+#, fuzzy
+msgid "User initialization"
+msgstr "Inicialização usuário"
+
+#: ../ui-hlp/menu.c:1158
+msgid "Incoloring mode"
+msgstr "Modo de cor interna"
+
+#: ../ui-hlp/menu.c:1159
+msgid "Outcoloring mode"
+msgstr "Modo de cor externa"
+
+#: ../ui-hlp/menu.c:1160
+msgid "Plane"
+msgstr "Plano"
+
+#: ../ui-hlp/menu.c:1161
+#, fuzzy
+msgid "Palette"
+msgstr "Paleta"
+
+#: ../ui-hlp/menu.c:1164
+msgid "Mandelbrot mode"
+msgstr "Modo Mandelbrot"
+
+#: ../ui-hlp/menu.c:1170 ../ui-hlp/menu.c:1174 ../ui-hlp/menu.c:1395
+msgid "Perturbation"
+msgstr "Distorção"
+
+#: ../ui-hlp/menu.c:1185
+msgid "Reset to defaults"
+msgstr "Restabelecer valores padrão"
+
+#: ../ui-hlp/menu.c:1186
+msgid "Julia mode"
+msgstr "Modo Julia"
+
+#: ../ui-hlp/menu.c:1193
+msgid "Set angle"
+msgstr "Estabelecer o ângulo"
+
+#: ../ui-hlp/menu.c:1197
+msgid "Set plane"
+msgstr "Estabelecer o plano"
+
+#: ../ui-hlp/menu.c:1201
+msgid "Inside coloring mode"
+msgstr "Modo de cor interna"
+
+#: ../ui-hlp/menu.c:1206
+msgid "Outside coloring mode"
+msgstr "Modo de cor externa"
+
+#: ../ui-hlp/menu.c:1212
+msgid "Inside truecolor coloring mode"
+msgstr "Modo truecolor de cor interna"
+
+#: ../ui-hlp/menu.c:1216
+msgid "Outside truecolor coloring mode"
+msgstr "Modo truecolor de cor externa"
+
+#: ../ui-hlp/menu.c:1219
+msgid "Julia seed"
+msgstr "Semente de Julia"
+
+#: ../ui-hlp/menu.c:1224
+msgid "Random palette"
+msgstr "Paleta aleatória"
+
+#: ../ui-hlp/menu.c:1226
+msgid "Custom palette"
+msgstr "Paleta regular"
+
+#: ../ui-hlp/menu.c:1230
+msgid "Color cycling"
+msgstr "Trocar a cor:"
+
+#: ../ui-hlp/menu.c:1232
+msgid "Reversed color cycling"
+msgstr "Reverter a troca de cor"
+
+#: ../ui-hlp/menu.c:1237
+msgid "Color cycling speed"
+msgstr "Velocidade da troca de cor"
+
+#: ../ui-hlp/menu.c:1241
+msgid "Shift palette"
+msgstr "Trocar paleta"
+
+#: ../ui-hlp/menu.c:1243
+msgid "Shift one forward"
+msgstr "Avançar um"
+
+#: ../ui-hlp/menu.c:1246
+msgid "Shift one backward"
+msgstr "Voltar um"
+
+#: ../ui-hlp/menu.c:1248 ../engine/zoom.c:1357
+msgid "Solid guessing"
+msgstr "Simulação tridimensional"
+
+#: ../ui-hlp/menu.c:1249
+msgid "Dynamic resolution"
+msgstr "Resolução dinâmica"
+
+#: ../ui-hlp/menu.c:1251
+msgid "Periodicity checking"
+msgstr "Periodicidade de verificação"
+
+#: ../ui-hlp/menu.c:1254
+msgid "Iterations"
+msgstr "Iterações"
+
+#: ../ui-hlp/menu.c:1256
+msgid "Bailout"
+msgstr "Bailout"
+
+#: ../ui-hlp/menu.c:1260
+msgid "Fast julia mode"
+msgstr "Modo rápido de Julia"
+
+#: ../ui-hlp/menu.c:1262
+msgid "Rotation"
+msgstr "Rotação"
+
+#: ../ui-hlp/menu.c:1263
+msgid "Solid guessing range"
+msgstr " Cadeia de simulação tridimensional"
+
+#: ../ui-hlp/menu.c:1266
+msgid "Disable rotation"
+msgstr "Desabilitar rotação"
+
+#: ../ui-hlp/menu.c:1270
+msgid "Continuous rotation"
+msgstr "Rotação continua"
+
+#: ../ui-hlp/menu.c:1273
+msgid "Rotate by mouse"
+msgstr "Gire com o mouse"
+
+#: ../ui-hlp/menu.c:1277
+msgid "Rotation speed"
+msgstr "Velocidade de rotação"
+
+#: ../ui-hlp/menu.c:1280
+msgid "Automatic rotation"
+msgstr "Rotação automática"
+
+#: ../ui-hlp/menu.c:1285
+msgid "Fast rotation mode"
+msgstr "Modo rápido de rotação"
+
+#: ../ui-hlp/menu.c:1289
+msgid "Disable dynamic resolution"
+msgstr "Desabilitar resolução dinâmica"
+
+#: ../ui-hlp/menu.c:1292
+msgid "Use only during animation"
+msgstr "Utilizar somente durante a animação"
+
+#: ../ui-hlp/menu.c:1296
+msgid "Use also for new images"
+msgstr "Utilizar também para novas imagens"
+
+#: ../ui-hlp/menu.c:1298
+msgid "Dynamic resolution mode"
+msgstr "Modo de resolução dinâmica"
+
+#: ../ui-hlp/menu.c:1302
+msgid "Autopilot"
+msgstr "Piloto automático"
+
+#: ../ui-hlp/menu.c:1306
+#, fuzzy
+msgid "VJ mode"
+msgstr "Modo VJ"
+
+#: ../ui-hlp/menu.c:1310
+msgid "Recalculate"
+msgstr "Recalcular"
+
+#: ../ui-hlp/menu.c:1319
+msgid "Zooming speed"
+msgstr "Velocidade da ampliação"
+
+#: ../ui-hlp/menu.c:1321
+msgid "Fixed step"
+msgstr "Passo fixo"
+
+#: ../ui-hlp/menu.c:1325
+msgid "Disable solid guessing"
+msgstr "Desabilitar simulação tridimensional"
+
+#: ../ui-hlp/menu.c:1329
+msgid "Guess 2x2 rectangles"
+msgstr "Simular retângulos 2x2"
+
+#: ../ui-hlp/menu.c:1331
+msgid "Guess 3x3 rectangles"
+msgstr "Simular retângulos 3x3"
+
+#: ../ui-hlp/menu.c:1335
+msgid "Guess 4x4 rectangles"
+msgstr "Simular retângulos 4x4"
+
+#: ../ui-hlp/menu.c:1337
+msgid "Guess 5x5 rectangles"
+msgstr "Simular retângulos 5x5"
+
+#: ../ui-hlp/menu.c:1341
+msgid "Guess 6x6 rectangles"
+msgstr "Simular retângulos 6x6"
+
+#: ../ui-hlp/menu.c:1343
+msgid "Guess 7x7 rectangles"
+msgstr "Simular retângulos 7x7"
+
+#: ../ui-hlp/menu.c:1347
+msgid "Guess 8x8 rectangles"
+msgstr "Simular retângulos 8x8"
+
+#: ../ui-hlp/menu.c:1349
+msgid "Guess unlimited rectangles"
+msgstr "Simular retângulos ilimitados"
+
+#: ../ui-hlp/menu.c:1354
+msgid "Language"
+msgstr "Idioma"
+
+#: ../ui-hlp/menu.c:1357
+msgid "An introduction to fractals"
+msgstr "Uma introdução aos fractais"
+
+#: ../ui-hlp/menu.c:1359
+msgid "XaoS features overview"
+msgstr "Resumo das características do XaoS"
+
+#: ../ui-hlp/menu.c:1361
+msgid "Math behind fractals"
+msgstr "Matemática por trás dos fractais"
+
+#: ../ui-hlp/menu.c:1362 ../ui-hlp/menu.c:1403
+msgid "Other fractal types in XaoS"
+msgstr "Outros tipos de fractais do Xaos"
+
+#: ../ui-hlp/menu.c:1364
+msgid "What's new?"
+msgstr "Novidades?"
+
+#: ../ui-hlp/menu.c:1374 ../ui-hlp/menu.c:1398
+msgid "Whole story"
+msgstr "A história completa"
+
+#: ../ui-hlp/menu.c:1376
+msgid "Introduction"
+msgstr "Introdução"
+
+#: ../ui-hlp/menu.c:1377
+msgid "Mandelbrot set"
+msgstr "Conjunto Mandelbrot"
+
+#: ../ui-hlp/menu.c:1378
+msgid "Julia set"
+msgstr "Conjunto Julia"
+
+#: ../ui-hlp/menu.c:1379
+msgid "Higher power Mandelbrots"
+msgstr "Mandelbrots de maiores potências"
+
+#: ../ui-hlp/menu.c:1380
+msgid "Newton's method"
+msgstr "Método de Newton"
+
+#: ../ui-hlp/menu.c:1381
+msgid "Barnsley's formula"
+msgstr "Fórmula de Barnsley"
+
+#: ../ui-hlp/menu.c:1382
+msgid "Phoenix"
+msgstr "Phoenix"
+
+#: ../ui-hlp/menu.c:1383
+msgid "Octo"
+msgstr "Octo"
+
+#: ../ui-hlp/menu.c:1384
+msgid "Magnet"
+msgstr "Magnet"
+
+#: ../ui-hlp/menu.c:1385
+msgid "All features"
+msgstr "Todas as características"
+
+#: ../ui-hlp/menu.c:1387
+#, fuzzy
+msgid "Outcoloring modes"
+msgstr "Modo de cor externa"
+
+#: ../ui-hlp/menu.c:1388
+#, fuzzy
+msgid "Incoloring modes"
+msgstr "Modo de cor interna"
+
+#: ../ui-hlp/menu.c:1389
+#, fuzzy
+msgid "True-color coloring modes"
+msgstr "Modo de cor interna true-color"
+
+#: ../ui-hlp/menu.c:1392
+msgid "Planes"
+msgstr "Planos"
+
+#: ../ui-hlp/menu.c:1393
+msgid "Animations and position files"
+msgstr "Arquivos de animações e posição"
+
+#: ../ui-hlp/menu.c:1396
+msgid "Random palettes"
+msgstr "Paletas aleatórias"
+
+#: ../ui-hlp/menu.c:1397
+msgid "Other noteworthy features"
+msgstr "Outras características relevantes"
+
+#: ../ui-hlp/menu.c:1400
+msgid "The definition and fractal dimension"
+msgstr "A definição e dimensão do fractal"
+
+#: ../ui-hlp/menu.c:1402
+#, fuzzy
+msgid "Escape time fractals"
+msgstr "Fractais escape time"
+
+#: ../ui-hlp/menu.c:1406
+msgid "Triceratops and Catseye fractals"
+msgstr "Fractal Triceratops e Catseye"
+
+#: ../ui-hlp/menu.c:1408
+msgid "Mandelbar, Lambda, Manowar and Spider"
+msgstr "Mandelbar, Lambda, Manowar e Spider"
+
+#: ../ui-hlp/menu.c:1411
+msgid "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+msgstr "Sierpinski Gasket, S. Carpet e Floco de Neve de Koch"
+
+#: ../ui-hlp/menu.c:1413
+msgid "What's new in 3.0?"
+msgstr "Quais são as novidades da versão 3.0?"
+
+#: ../ui-hlp/play.c:74
+#, fuzzy
+msgid "line available only in animation replay"
+msgstr "Linha disponível somente na repetição da animação"
+
+#: ../ui-hlp/play.c:99
+msgid "Morphing non existing line!"
+msgstr "Alterando linha não existente"
+
+#: ../ui-hlp/play.c:121
+msgid "linekey not available in this context!"
+msgstr "Linha chave não disponível neste contexto"
+
+#: ../ui-hlp/play.c:291
+#, fuzzy
+msgid "clear_line available only in animation replay"
+msgstr "Limpar _ linha disponível apenas na repetição da animação"
+
+#: ../ui-hlp/play.c:300
+#, fuzzy
+msgid "clear_lines available only in animation replay"
+msgstr "Limpar _ linhas disponíveis apenas na repetição da animação"
+
+#: ../ui-hlp/play.c:359
+msgid "Catalog file not found"
+msgstr "Arquivo de catálogo não encontrado"
+
+#: ../ui-hlp/play.c:405
+msgid "Replay is already active"
+msgstr "Repetição já está ligada"
+
+#: ../ui-hlp/play.c:409
+#, fuzzy
+msgid "File open failed"
+msgstr "Falha ao abrir arquivo"
+
+#: ../ui-hlp/play.c:414
+#, fuzzy
+msgid "Out of memory"
+msgstr "Sem memória"
+
+#: ../ui-hlp/play.c:526 ../ui-hlp/play.c:542 ../ui-hlp/play.c:566
+#: ../ui-hlp/play.c:595
+msgid "Missing parameter"
+msgstr "Perdendo parâmetro"
+
+#: ../ui-hlp/play.c:528 ../ui-hlp/play.c:544 ../ui-hlp/play.c:568
+#: ../ui-hlp/play.c:597
+msgid "Unexpected end of file"
+msgstr "Finalização de arquivo inesperada"
+
+#: ../ui-hlp/play.c:555 ../ui-hlp/play.c:574
+msgid "Token is too long"
+msgstr "O sinal é muito longo"
+
+#: ../ui-hlp/play.c:629
+#, fuzzy
+msgid "Unknown formula type"
+msgstr "Tipo de fórmula desconhecida"
+
+#: ../ui-hlp/play.c:635
+#, fuzzy
+msgid "morph available only in animation replay"
+msgstr "transformação disponível apenas na repetição da animação"
+
+#: ../ui-hlp/play.c:639
+msgid "morphview: Invalid viewpoint"
+msgstr "visualização da transformação: paradigma inválido"
+
+#: ../ui-hlp/play.c:653
+#, fuzzy
+msgid "move available only in animation replay"
+msgstr "Movimento disponível apenas na repetição da animação"
+
+#: ../ui-hlp/play.c:667
+#, fuzzy
+msgid "morphjulia available only in animation replay"
+msgstr "Transformação para Julia disponível somente na repetição da animação"
+
+#: ../ui-hlp/play.c:680
+#, fuzzy
+msgid "morphangle available only in animation replay"
+msgstr "Mudança de ângulo disponível somente na repetição da animação"
+
+#: ../ui-hlp/play.c:712
+#, fuzzy
+msgid "Unknown filter"
+msgstr "Filtro desconhecido"
+
+#: ../ui-hlp/play.c:753
+#, fuzzy
+msgid "sleep available only in animation replay"
+msgstr "Descanso disponível somente na repetição da animação"
+
+#: ../ui-hlp/play.c:767
+#, c-format
+msgid "Internal program error #12 %i\n"
+msgstr "Erro de programa interno #12 %i\n"
+
+#: ../ui-hlp/play.c:788
+#, fuzzy
+msgid "wait available only in animation replay"
+msgstr "Espera disponível somente na repetição da animação"
+
+#: ../ui-hlp/play.c:834
+msgid "No catalog file loaded"
+msgstr "Nenhum arquivo do catálogo carregado"
+
+#: ../ui-hlp/play.c:839
+msgid "Message not found in catalog file"
+msgstr ""
+
+#: ../ui-hlp/play.c:850
+#, fuzzy
+msgid "load available only in animation replay"
+msgstr "Carregar disponível somente na repetição da animação"
+
+#: ../ui-hlp/play.c:854
+msgid "Include level overflow"
+msgstr "Incluir superávit"
+
+#: ../ui-hlp/play.c:863
+msgid "File not found"
+msgstr "Arquivo não encontrado"
+
+#: ../ui-hlp/play.c:881
+msgid "Too many parameters"
+msgstr "Excesso de parâmetros"
+
+#: ../ui-hlp/play.c:916
+#, c-format
+msgid "Replay disabled at line %i"
+msgstr "Repetição desabilitada na linha %i"
+
+#: ../ui-hlp/ui_helper.c:646
+msgid "Tutorial files not found. Reinstall XaoS"
+msgstr "Arquivos de tutoriais não encontrados. Reinstale o Xaos"
+
+#: ../ui-hlp/ui_helper.c:651
+msgid "Preparing first image"
+msgstr "Preparando a primeira imagem"
+
+#: ../ui-hlp/ui_helper.c:661
+#, fuzzy
+msgid "Could not open examples"
+msgstr "Não pode abrir os exemplos"
+
+#: ../ui-hlp/ui_helper.c:667
+#, c-format
+msgid "File %s loaded."
+msgstr "Arquivo %s carregado"
+
+#: ../ui-hlp/ui_helper.c:676
+#, fuzzy
+msgid "Saving image..."
+msgstr "Salvando imagem"
+
+#: ../ui-hlp/ui_helper.c:684
+#, fuzzy
+msgid "Save interrupted"
+msgstr "Interrupção na ação de salvar"
+
+#: ../ui-hlp/ui_helper.c:693 ../ui-hlp/ui_helper.c:710
+#: ../ui-hlp/ui_helper.c:777
+#, c-format
+msgid "File %s saved."
+msgstr "Arquivo %s salvo"
+
+#: ../ui-hlp/ui_helper.c:704
+#, fuzzy
+msgid "Can not open file"
+msgstr "Não pode abrir o arquivo"
+
+#: ../ui-hlp/ui_helper.c:799
+#, c-format
+msgid "Recording to file %s enabled."
+msgstr "Gravando para arquivar %s habilitada"
+
+#: ../engine/zoom.c:1128
+msgid "Solid guessing 1"
+msgstr "Simulação tridimensional"
+
+#: ../engine/btrace.c:292 ../engine/btrace.c:373
+msgid "Boundary trace"
+msgstr "Sinal do perímetro"
+
+#: ../ui/dialog.c:312 ../ui/dialog.c:398 ../ui/dialog.c:1377
+#: ../ui/ui-drv/cocoa/CustomDialog.m:302
+msgid "OK"
+msgstr "Certo"
+
+#: ../ui/dialog.c:313 ../ui/dialog.c:401 ../ui/dialog.c:1379
+#: ../ui/filesel.c:184 ../ui/ui-drv/cocoa/CustomDialog.m:312
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ../ui-hlp/render.c:46
+#, c-format
+msgid "Error: %s"
+msgstr "Erro: %s"
+
+#: ../ui-hlp/render.c:121
+#, fuzzy
+msgid "Cannot open motion vector file!"
+msgstr "Não pode abrir o arquivo vetor de movimento"
+
+#: ../ui-hlp/render.c:270
+#, c-format
+msgid "Vectors: %i"
+msgstr "Vetores: %i"
+
+#: ../ui-hlp/render.c:276
+#, fuzzy
+msgid "Initializing"
+msgstr "Inicializando"
+
+#: ../ui-hlp/render.c:284
+#, fuzzy
+msgid "Cannot create palette"
+msgstr "Não pode criar a paleta"
+
+#: ../ui-hlp/render.c:295
+#, fuzzy
+msgid "Cannot create image\n"
+msgstr "Não pode criar a imagem\n"
+
+#: ../ui-hlp/render.c:304
+#, fuzzy
+msgid "Cannot create checking buffer!"
+msgstr "Não pode criar verifcação de buffer"
+
+#: ../ui-hlp/render.c:313 ../ui-hlp/render.c:596
+#, fuzzy
+msgid "Cannot create context\n"
+msgstr "Não pode criar o contexto"
+
+#: ../ui-hlp/render.c:325
+#, fuzzy
+msgid "Cannot open animation file\n"
+msgstr "Não pode abrir o arquivo de animação\n"
+
+#: ../ui-hlp/render.c:336 ../ui-hlp/render.c:605
+msgid "Loading catalogs"
+msgstr "Carregando catálogos"
+
+#: ../ui-hlp/render.c:366
+#, fuzzy
+msgid "Processing command line options"
+msgstr "Processando as opções de linha de instruções"
+
+#: ../ui-hlp/render.c:389
+#, fuzzy
+msgid "Enabling animation replay\n"
+msgstr "Habilitando a repetição da animação"
+
+#: ../ui-hlp/render.c:396 ../ui-hlp/render.c:514
+#, fuzzy
+msgid "Cannot open image file"
+msgstr "Não pode abrir o arquivo de imagem"
+
+#: ../ui-hlp/render.c:410
+#, fuzzy
+msgid "Cannot open pattern file"
+msgstr "Não pode abrir o arquivo padrão "
+
+#: ../ui-hlp/render.c:427 ../ui-hlp/render.c:429 ../ui-hlp/render.c:638
+msgid "Entering calculation loop!"
+msgstr "Entrada de cálculo"
+
+#: ../ui-hlp/render.c:455
+#, c-format
+msgid "Frame %i skipped."
+msgstr "O quadro %i foi pulado"
+
+#: ../ui-hlp/render.c:457
+#, c-format
+msgid "Frames %i - %i skipped."
+msgstr "Os quadros %i - %i foram pulados"
+
+#: ../ui-hlp/render.c:461
+#, c-format
+msgid "Frame %4i: "
+msgstr "Quadro %4i"
+
+#: ../ui-hlp/render.c:528
+msgid " done."
+msgstr "Pronto"
+
+#: ../ui-hlp/render.c:532
+msgid " skipping..."
+msgstr "Pulando..."
+
+#: ../ui-hlp/render.c:565 ../ui-hlp/render.c:657
+#, fuzzy
+msgid "Calculation interrupted"
+msgstr "Cálculo interrompido"
+
+#: ../ui-hlp/render.c:568 ../ui-hlp/render.c:570 ../ui-hlp/render.c:659
+#, fuzzy
+msgid "Calculation finished"
+msgstr "Cálculo finalizado"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1292 ../ui/ui-drv/cocoa/AppController.m:321
+msgid "Copy"
+msgstr "Copiar"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1293 ../ui/ui-drv/cocoa/AppController.m:324
+#, fuzzy
+msgid "Paste"
+msgstr "Colar"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1297
+msgid "About"
+msgstr "Sobre"
+
+#: ../ui/ui-drv/cocoa/AppController.m:197
+msgid "About XaoS"
+msgstr "Sobre o Xaos"
+
+#: ../ui/ui-drv/cocoa/AppController.m:200
+msgid "Services"
+msgstr "Utilidades"
+
+#: ../ui/ui-drv/cocoa/AppController.m:203
+msgid "Hide XaoS"
+msgstr "Ocultar o Xaos"
+
+#: ../ui/ui-drv/cocoa/AppController.m:206
+msgid "Hide Others"
+msgstr "Ocultar outros"
+
+#: ../ui/ui-drv/cocoa/AppController.m:209
+msgid "Show All"
+msgstr "Mostrar tudo"
+
+#: ../ui/ui-drv/cocoa/AppController.m:212
+#, fuzzy
+msgid "Quit XaoS"
+msgstr "Sair do Xaos"
+
+#: ../ui/ui-drv/cocoa/AppController.m:318
+msgid "Cut"
+msgstr "Cortar"
+
+#: ../ui/ui-drv/cocoa/AppController.m:327
+#, fuzzy
+msgid "Delete"
+msgstr "Apagar"
+
+#: ../ui/ui-drv/cocoa/AppController.m:330
+msgid "Select All"
+msgstr "Selecionar tudo"
+
+#: ../ui/ui-drv/cocoa/AppController.m:340
+msgid "Minimize"
+msgstr "Minimizar"
+
+#: ../ui/ui-drv/cocoa/AppController.m:348
+msgid "Bring All to Front"
+msgstr "Traga tudo para a frente"
+
+#: ../ui/ui-drv/cocoa/AppController.m:359
+#, fuzzy
+msgid "Close"
+msgstr "Aproximar"
+
+#: ../ui/ui-drv/cocoa/AppController.m:373
+msgid "Videator Output"
+msgstr "Saída de videator"
+
+#: ../ui/ui-drv/cocoa/CustomDialog.m:142
+msgid "Choose"
+msgstr "Selecionar"
+
+#~ msgid "formulae"
+#~ msgstr "Fórmulas"
+
+#~ msgid "Can not create context\n"
+#~ msgstr "Não pode criar o contexto\n"
diff --git a/src/i18n/ro.po b/src/i18n/ro.po
new file mode 100644
index 0000000..ef45c43
--- /dev/null
+++ b/src/i18n/ro.po
@@ -0,0 +1,1504 @@
+# XaoS NLS file for German language.
+# Copyright (C) 2002 Free Software Foundation, Inc.
+# Zoltan Kovacs <kovzol@math.u-szeged.hu>, 2002.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: XaoS 3.4\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2009-11-14 10:56+0100\n"
+"PO-Revision-Date: 2008-04-28 11:21+0100\n"
+"Last-Translator: Zoltan Kovacs <kovzol@matek.hu>\n"
+"Language-Team: The XaoS Development Team <xaos-devel@lists.sf.net>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: KBabel 0.7\n"
+"X-Poedit-Language: Romanian\n"
+"X-Poedit-Country: ROMANIA\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#: ../ui/ui.c:314
+msgid "XaoS is out of memory."
+msgstr "XaoS nu are suficienta memorie"
+
+#: ../ui/ui.c:360
+#, c-format
+msgid "%s %.2f times (%.1fE) %2.2f frames/sec %c %i %i %i %i "
+msgstr "%s %.2f ori (%.1fE) %2.2f cadre/sec %c %i %i %i %i "
+
+#: ../ui/ui.c:361
+msgid "unzoomed"
+msgstr "nemarit (unzoomed):"
+
+#: ../ui/ui.c:361
+msgid "zoomed"
+msgstr "marit (zoomed):"
+
+#: ../ui/ui.c:369
+#, c-format
+msgid "framerate:%f\n"
+msgstr "frecventa cadrelor: %f\n"
+
+#: ../ui/ui.c:409
+#, c-format
+msgid "Enabling: %s. "
+msgstr "%s se activeaza."
+
+#: ../ui/ui.c:411
+#, c-format
+msgid "Disabling: %s. "
+msgstr "%s se dezactiveaza."
+
+#: ../ui/ui.c:441
+#, c-format
+msgid "Fractal name:%s"
+msgstr "Numele fractalului:%s"
+
+#: ../ui/ui.c:446
+#, c-format
+msgid "Fractal type:%s"
+msgstr "Tipul fractalului:%s"
+
+#: ../ui/ui.c:448
+msgid "Mandelbrot"
+msgstr "Mandelbrot"
+
+#: ../ui/ui.c:449
+msgid "Julia"
+msgstr "Julia"
+
+#: ../ui/ui.c:452
+#, fuzzy, c-format
+msgid "Formula:%s"
+msgstr "Formula:"
+
+#: ../ui/ui.c:457
+#, c-format
+msgid "View:[%1.12f,%1.12f]"
+msgstr "Vedere:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:461
+#, c-format
+msgid "size:[%1.12f,%1.12f]"
+msgstr "Dimensiune:[%1.12f,%1.12f]"
+
+#: ../ui/ui.c:465
+#, c-format
+msgid "Rotation:%4.2f Screen size:%i:%i"
+msgstr "Rotatie:%4.2f Dimensiunea ecranului:%i:%i"
+
+#: ../ui/ui.c:470
+#, c-format
+msgid "Iterations:%-4i Palette size:%i"
+msgstr "Iteratii:%-4i Dimensiunea paletei:%i"
+
+#: ../ui/ui.c:477
+#, c-format
+msgid "Autopilot:%-4s Plane:%s"
+msgstr "Pilot automat:%-4s Plan:%s"
+
+#: ../ui/ui.c:478
+msgid "On"
+msgstr "Pornit"
+
+#: ../ui/ui.c:478
+msgid "Off"
+msgstr "Oprit"
+
+#: ../ui/ui.c:482
+#, c-format
+msgid "incoloring:%s outcoloring:%s"
+msgstr "Culoare interioara:%s Culoare exterioara:%s"
+
+#: ../ui/ui.c:487
+#, c-format
+msgid "zoomspeed:%f"
+msgstr "viteza de marire (zoomspeed):%f"
+
+#: ../ui/ui.c:491
+msgid "Parameter:none"
+msgstr "Parametri:nici unul"
+
+#: ../ui/ui.c:493
+#, c-format
+msgid "Parameter:[%f,%f]"
+msgstr "Parametri:[%f,%f]"
+
+#: ../ui/ui.c:585
+#, c-format
+msgid "Please wait while calculating %s"
+msgstr "Asteptati va rog, fractalul %s se calculeaza "
+
+#: ../ui/ui.c:685
+#, c-format
+msgid "Letters per second %i "
+msgstr "Litere pe secunda: %i "
+
+#: ../ui/ui.c:698 ../ui/ui.c:709
+#, c-format
+msgid "Rotation speed:%2.2f degrees per second "
+msgstr "Viteza de rotatie:%2.2f grade pe secunda "
+
+#: ../ui/ui.c:719
+#, fuzzy, c-format
+msgid "Iterations: %i "
+msgstr "Iteratii: %i "
+
+#: ../ui/ui.c:735
+#, c-format
+msgid "Cycling speed: %i "
+msgstr "Viteaza de ciclare: %i "
+
+#: ../ui/ui.c:748 ../ui/ui.c:762
+#, c-format
+msgid "speed:%2.2f "
+msgstr "Viteza:%2.2f "
+
+#: ../ui/ui.c:854
+#, c-format
+msgid "Thank you for using XaoS\n"
+msgstr "Va multumim ca ati folosit XaoS\n"
+
+#: ../ui/ui.c:891
+msgid "Skipping, please wait..."
+msgstr "Se omite, va rugam asteptati..."
+
+#: ../ui/ui.c:983 ../ui/ui.c:985 ../ui/ui-drv/win32/ui_win32.c:1453
+msgid "Resize"
+msgstr "Redimensionare"
+
+#: ../ui/ui.c:998
+#, fuzzy
+msgid "Quit"
+msgstr "Terminare"
+
+#: ../ui/ui.c:999
+msgid "Exit now"
+msgstr "Iesire acum"
+
+#: ../ui/ui.c:1001
+msgid "Not yet"
+msgstr "Inca nu"
+
+#: ../ui/ui.c:1004 ../ui-hlp/menu.c:1055 ../ui-hlp/menu.c:1065
+#: ../ui/dialog.c:404 ../ui/dialog.c:1380
+msgid "Help"
+msgstr "Ajutor"
+
+#: ../ui/ui.c:1006
+msgid "Disable XaoS's builtin GUI"
+msgstr "Dezactivare GUI implementat in XaoS"
+
+#: ../ui/ui.c:1010 ../ui/ui.c:1016
+msgid "Status"
+msgstr "Status"
+
+#: ../ui/ui.c:1012 ../ui/ui.c:1018
+msgid "Ministatus"
+msgstr "Ministatus"
+
+#: ../ui/ui.c:1021 ../ui/ui.c:1022
+msgid "Driver"
+msgstr "Driver"
+
+#: ../ui/ui.c:1413
+#, c-format
+msgid "Welcome to XaoS version %s"
+msgstr "Bine ati venit la XaoS Versiunea %s"
+
+#: ../ui/ui.c:1580
+msgid "Can not allocate buffers"
+msgstr "Nu se pot aloca bufferele"
+
+#: ../ui/ui.c:1598
+msgid "Can not create palette"
+msgstr "Nu se poate crea paleta"
+
+#: ../ui/ui.c:1610
+msgid "Can not create image"
+msgstr "Nu se poate crea imaginea"
+
+#: ../ui/ui.c:1641 ../ui/ui.c:1692
+msgid "Can not allocate tables"
+msgstr "Nu se pot aloca tabelele"
+
+#: ../ui/ui.c:1678
+msgid "Can not initialize driver"
+msgstr "Nu se poate initializa driverul"
+
+#: ../ui/ui.c:1681
+msgid "Can not return back to previous driver"
+msgstr "Nu se poate intoarce la driverul precedent"
+
+#: ../ui-hlp/menu.c:129
+msgid "Perturbation:"
+msgstr "Perturbare:"
+
+#: ../ui-hlp/menu.c:133
+msgid "Julia-seed:"
+msgstr "Julia-samanta(valoare initiala):"
+
+#: ../ui-hlp/menu.c:137
+msgid "Morphing type:"
+msgstr "Tipul de morphing:"
+
+#: ../ui-hlp/menu.c:138
+msgid "Startuptime:"
+msgstr "Timp de pornire:"
+
+#: ../ui-hlp/menu.c:139
+msgid "Stoptime:"
+msgstr "Timp de oprire:"
+
+#: ../ui-hlp/menu.c:143
+msgid "File to render:"
+msgstr "Fisierul de procesat:"
+
+#: ../ui-hlp/menu.c:144
+msgid "Basename:"
+msgstr "Nume de baza:"
+
+#: ../ui-hlp/menu.c:145
+msgid "Width:"
+msgstr "Latime:"
+
+#: ../ui-hlp/menu.c:146
+msgid "Height:"
+msgstr "Inaltime:"
+
+#: ../ui-hlp/menu.c:147
+msgid "Real width (cm):"
+msgstr "Latime reala (cm):"
+
+#: ../ui-hlp/menu.c:148
+msgid "Real height (cm):"
+msgstr "Inaltime reala (cm):"
+
+#: ../ui-hlp/menu.c:149
+msgid "Framerate:"
+msgstr "Frecventa cadrelor:"
+
+#: ../ui-hlp/menu.c:150
+msgid "Image type:"
+msgstr "Tipul imaginii:"
+
+#: ../ui-hlp/menu.c:151
+msgid "Antialiasing:"
+msgstr "Antialiasing:"
+
+#: ../ui-hlp/menu.c:152
+msgid "Always recalculate:"
+msgstr "Intotdeauna recalculeaza:"
+
+#: ../ui-hlp/menu.c:153
+msgid "Calculate MPEG motion vectors:"
+msgstr "Calculeaza vectorii de miscare MPEG:"
+
+#: ../ui-hlp/menu.c:154
+msgid "Recommended I frame distance:"
+msgstr "Distanta I-Frame recomandata:"
+
+#: ../ui-hlp/menu.c:158
+msgid "Center:"
+msgstr "Centru:"
+
+#: ../ui-hlp/menu.c:159
+msgid "Radius:"
+msgstr "Raza:"
+
+#: ../ui-hlp/menu.c:160 ../ui-hlp/menu.c:225
+msgid "Angle:"
+msgstr "Unghi:"
+
+#: ../ui-hlp/menu.c:164
+msgid "Mode:"
+msgstr "Mod:"
+
+#: ../ui-hlp/menu.c:165
+msgid "Start:"
+msgstr "Start:"
+
+#: ../ui-hlp/menu.c:166
+msgid "End:"
+msgstr "sfarsit:"
+
+#: ../ui-hlp/menu.c:170
+msgid "Color:"
+msgstr "Culoare:"
+
+#: ../ui-hlp/menu.c:174
+msgid "Rotations per second:"
+msgstr "Rotatii pe secunda:"
+
+#: ../ui-hlp/menu.c:178
+msgid "Letters per second:"
+msgstr "Litere pe secunda:"
+
+#: ../ui-hlp/menu.c:182
+msgid "Iterations:"
+msgstr "Iteratii:"
+
+#: ../ui-hlp/menu.c:186
+msgid "Text:"
+msgstr "Text:"
+
+#: ../ui-hlp/menu.c:190
+msgid "Your command:"
+msgstr "Comanda dumneavoastra:"
+
+#: ../ui-hlp/menu.c:194 ../ui-hlp/menu.c:198 ../ui-hlp/menu.c:202
+#: ../ui-hlp/menu.c:206 ../ui-hlp/menu.c:258
+msgid "Filename:"
+msgstr "Numele fisierului:"
+
+#: ../ui-hlp/menu.c:210 ../ui-hlp/menu.c:298
+msgid "Formula:"
+msgstr "Formula:"
+
+#: ../ui-hlp/menu.c:214
+msgid "X center:"
+msgstr "X-centru:"
+
+#: ../ui-hlp/menu.c:215
+msgid "Y center:"
+msgstr "Y-centru:"
+
+#: ../ui-hlp/menu.c:216
+msgid "X Radius:"
+msgstr "X-Raza:"
+
+#: ../ui-hlp/menu.c:217
+msgid "Y Radius:"
+msgstr "Y-Raza:"
+
+#: ../ui-hlp/menu.c:221
+msgid "Coordinates:"
+msgstr "Coordonate:"
+
+#: ../ui-hlp/menu.c:229
+msgid "continuous rotation"
+msgstr "Rotatie continua"
+
+#: ../ui-hlp/menu.c:233
+msgid "Fast rotation"
+msgstr "Rotatie rapida"
+
+#: ../ui-hlp/menu.c:237
+msgid "filter"
+msgstr "Filtru"
+
+#: ../ui-hlp/menu.c:238
+msgid "enable"
+msgstr "activare"
+
+#: ../ui-hlp/menu.c:242
+msgid "Amount:"
+msgstr "Cantitate:"
+
+#: ../ui-hlp/menu.c:246
+msgid "Zooming speed:"
+msgstr "Viteza de marire (zoom):"
+
+#: ../ui-hlp/menu.c:250
+msgid "Name:"
+msgstr "Nume:"
+
+#: ../ui-hlp/menu.c:254
+msgid "Bailout:"
+msgstr "Bailout (valoare de salvare):"
+
+#: ../ui-hlp/menu.c:262
+msgid "Julia mode:"
+msgstr "Mod Julia:"
+
+#: ../ui-hlp/menu.c:266
+msgid "Horizontal position:"
+msgstr "Pozitia orizontala:"
+
+#: ../ui-hlp/menu.c:267
+msgid "Vertical position:"
+msgstr "Pozitia verticala:"
+
+#: ../ui-hlp/menu.c:271
+msgid "Dynamic resolution:"
+msgstr "Rezolutie dinamica :"
+
+#: ../ui-hlp/menu.c:275
+msgid "Time:"
+msgstr "Timp:"
+
+#: ../ui-hlp/menu.c:279 ../ui-hlp/menu.c:283
+msgid "Number:"
+msgstr "Numar:"
+
+#: ../ui-hlp/menu.c:287
+msgid "Algorithm number:"
+msgstr "Numarul algoritmului:"
+
+#: ../ui-hlp/menu.c:288
+msgid "Seed:"
+msgstr "Samanta (valoare initiala):"
+
+#: ../ui-hlp/menu.c:289
+msgid "Shift:"
+msgstr "Deplasare:"
+
+#: ../ui-hlp/menu.c:293
+msgid "Frames per second:"
+msgstr "Cadre pe secunda:"
+
+#: ../ui-hlp/menu.c:302
+#, fuzzy
+msgid "Initialization:"
+msgstr "Initializare"
+
+#: ../ui-hlp/menu.c:357
+msgid "renderanim: Must specify a valid absolute path for basename"
+msgstr ""
+
+#: ../ui-hlp/menu.c:364
+msgid ""
+"renderanim: Width parameter must be positive integer in the range 0..4096"
+msgstr ""
+"procesarea animatiei: Latimea trebuie sa fie o valoare pozitva, intreaga "
+"intre 0 si 4096"
+
+#: ../ui-hlp/menu.c:370
+msgid ""
+"renderanim: Height parameter must be positive integer in the range 0..4096"
+msgstr ""
+"procesarea animatiei: Inaltimea trebuie sa fie o valoare pozitva, intreaga "
+"intre 0 si 4096"
+
+#: ../ui-hlp/menu.c:376
+msgid "renderanim: Invalid real width and height dimensions"
+msgstr "procesarea animatiei: latime si inaltime reala incorecte"
+
+#: ../ui-hlp/menu.c:380
+msgid "renderanim: invalid framerate"
+msgstr "procesarea animatiei: frecventa cadrelor incorecta"
+
+#: ../ui-hlp/menu.c:386
+msgid "renderanim: antialiasing not supported in 256 color mode"
+msgstr ""
+"procesarea animatiei: Antialiasing nicht unterstützt im 256-Farben-Modus"
+
+#: ../ui-hlp/menu.c:390
+msgid "renderanim: incorrect I frame distance"
+msgstr "procesarea animatiei: Distanta I-Frame incorecta"
+
+#: ../ui-hlp/menu.c:441 ../ui-hlp/menu.c:454
+msgid "animateview: Invalid viewpoint"
+msgstr "vederea animatiei: punct de vedere incorect"
+
+#: ../ui-hlp/menu.c:467
+msgid "Invalid viewpoint"
+msgstr "Punct de vedere incorect"
+
+#: ../ui-hlp/menu.c:696
+msgid "Unknown palette type"
+msgstr "Tip de paleta necunoscut"
+
+#: ../ui-hlp/menu.c:771 ../ui-hlp/menu.c:785
+msgid "Initialization of color cycling failed."
+msgstr "Initializare ciclarii culorilor a esuat"
+
+#: ../ui-hlp/menu.c:773 ../ui-hlp/menu.c:787
+msgid "Try to enable palette emulation filter"
+msgstr "Incercare de activare a filtrului de emulare a paletei"
+
+#: ../ui-hlp/menu.c:896
+#, c-format
+msgid "Algorithm:%i seed:%i size:%i"
+msgstr "Algoritm:%i Valoare initiala:%i dimensiune:%i"
+
+#: ../ui-hlp/menu.c:947
+msgid "Root menu"
+msgstr "Meniu principal"
+
+#: ../ui-hlp/menu.c:948
+msgid "Animation root menu"
+msgstr "Meniu principal pentru animatii"
+
+#: ../ui-hlp/menu.c:949
+msgid "Replay only commands"
+msgstr "Comenzi numai pentru redare"
+
+#: ../ui-hlp/menu.c:950
+msgid "Command line options only"
+msgstr "Numai optiuni de la linia de comanda"
+
+#: ../ui-hlp/menu.c:953
+msgid "print menus specifications of all menus"
+msgstr "tipareste specificatiile de meniu pentru toate meniurile"
+
+#: ../ui-hlp/menu.c:958
+msgid "print menu specification"
+msgstr "tipareste specificatiile meniului"
+
+#: ../ui-hlp/menu.c:961
+msgid "print menu specification in xshl format"
+msgstr "tipareste specificatiile meniului in format xshl"
+
+#: ../ui-hlp/menu.c:965
+msgid "print all menu specifications in xshl format"
+msgstr "tipareste toate specificatiile meniului in format xshl"
+
+#: ../ui-hlp/menu.c:967
+msgid "print dialog specification"
+msgstr "tipareste specificatiile dialogului"
+
+#: ../ui-hlp/menu.c:972
+msgid "Line drawing functions"
+msgstr "Functii pentru desenarea liniilor"
+
+#: ../ui-hlp/menu.c:973
+msgid "Line"
+msgstr "Linie"
+
+#: ../ui-hlp/menu.c:976
+msgid "Morph line"
+msgstr "Linie Morph"
+
+#: ../ui-hlp/menu.c:978
+msgid "Morph last line"
+msgstr "Ultima linie Morph"
+
+#: ../ui-hlp/menu.c:981
+msgid "Set line key"
+msgstr "Seteaza cheia liniei"
+
+#: ../ui-hlp/menu.c:983
+msgid "Clear line"
+msgstr "Sterge linia"
+
+#: ../ui-hlp/menu.c:986
+msgid "Clear all lines"
+msgstr "sterge toate liniile"
+
+#: ../ui-hlp/menu.c:988
+msgid "Animation functions"
+msgstr "Functii pentru animatii"
+
+#: ../ui-hlp/menu.c:989 ../ui-hlp/menu.c:1181 ../ui-hlp/menu.c:1190
+msgid "View"
+msgstr "Vedere"
+
+#: ../ui-hlp/menu.c:993
+msgid "Morph view"
+msgstr "vedere Morph"
+
+#: ../ui-hlp/menu.c:995
+msgid "Morph julia"
+msgstr "Morph Julia"
+
+#: ../ui-hlp/menu.c:1000
+msgid "Move view"
+msgstr "Deplaseaza vederea"
+
+#: ../ui-hlp/menu.c:1002
+msgid "Morph angle"
+msgstr "Unghiul de Morph"
+
+#: ../ui-hlp/menu.c:1004
+msgid "Zoom center"
+msgstr "Centrul maririi (zoom) "
+
+#: ../ui-hlp/menu.c:1006 ../ui/ui-drv/cocoa/AppController.m:343
+msgid "Zoom"
+msgstr "Marire (Zoom)"
+
+#: ../ui-hlp/menu.c:1007
+msgid "Un-zoom"
+msgstr "Un-zoom"
+
+#: ../ui-hlp/menu.c:1010
+msgid "Stop zooming"
+msgstr "Opreste marirea(zoom)"
+
+#: ../ui-hlp/menu.c:1011
+msgid "Smooth morphing parameters"
+msgstr "Parametrul de morphing neted"
+
+#: ../ui-hlp/menu.c:1014
+msgid "Timing functions"
+msgstr "Functii de timp"
+
+#: ../ui-hlp/menu.c:1015
+msgid "Usleep"
+msgstr "Usleep"
+
+#: ../ui-hlp/menu.c:1018
+msgid "Wait for text"
+msgstr "Asteapta textul"
+
+#: ../ui-hlp/menu.c:1020
+msgid "Wait for complete image"
+msgstr "Asteapta imaginea completa"
+
+#: ../ui-hlp/menu.c:1022
+msgid "Include file"
+msgstr "Include fisierul"
+
+#: ../ui-hlp/menu.c:1024 ../ui-hlp/menu.c:1222
+msgid "Default palette"
+msgstr "Paleta implicita"
+
+#: ../ui-hlp/menu.c:1026
+msgid "Formula"
+msgstr "Formula"
+
+#: ../ui-hlp/menu.c:1028
+msgid "Maximal zooming step"
+msgstr "Pasul maxim de marire (zoom)"
+
+#: ../ui-hlp/menu.c:1030
+msgid "Zooming speedup"
+msgstr "Cresterea vitezei de marire (zoom)"
+
+#: ../ui-hlp/menu.c:1032
+msgid "Filter"
+msgstr "Filru"
+
+#: ../ui-hlp/menu.c:1036 ../ui-hlp/menu.c:1041
+msgid "Letters per second"
+msgstr "Litere pe secunda"
+
+#: ../ui-hlp/menu.c:1043 ../ui-hlp/menu.c:1314
+msgid "Interrupt"
+msgstr "Intrerupe"
+
+#: ../ui-hlp/menu.c:1045 ../ui-hlp/menu.c:1057
+msgid "File"
+msgstr "Fisier ºfirsãt"
+
+#: ../ui-hlp/menu.c:1046
+msgid "Edit"
+msgstr "Editare"
+
+#: ../ui-hlp/menu.c:1047
+msgid "Fractal"
+msgstr "Fractal"
+
+#: ../ui-hlp/menu.c:1048
+msgid "Calculation"
+msgstr "Calculare"
+
+#: ../ui-hlp/menu.c:1049 ../ui-hlp/menu.c:1391
+msgid "Filters"
+msgstr "Filtre"
+
+#: ../ui-hlp/menu.c:1050 ../ui-hlp/menu.c:1064
+msgid "UI"
+msgstr "Interfata utilizator (UI)"
+
+#: ../ui-hlp/menu.c:1051
+msgid "Misc"
+msgstr "Extra"
+
+#: ../ui-hlp/menu.c:1053
+#, fuzzy
+msgid "Window"
+msgstr "Refa"
+
+#: ../ui-hlp/menu.c:1056
+msgid "Tutorials"
+msgstr "Tutoriale"
+
+#: ../ui-hlp/menu.c:1062
+msgid "Stop replay"
+msgstr "Opreste redarea"
+
+#: ../ui-hlp/menu.c:1066
+msgid "Command"
+msgstr "Comanda"
+
+#: ../ui-hlp/menu.c:1068
+msgid "Play string"
+msgstr "Arata sirul"
+
+#: ../ui-hlp/menu.c:1070
+msgid "Render animation"
+msgstr "Proceseaza animatia"
+
+#: ../ui-hlp/menu.c:1073
+msgid "Clear screen"
+msgstr "Sterge ecranul"
+
+#: ../ui-hlp/menu.c:1075
+msgid "Display fractal"
+msgstr "Arata fractalul"
+
+#: ../ui-hlp/menu.c:1078
+msgid "Display text"
+msgstr "Arata textul"
+
+#: ../ui-hlp/menu.c:1080
+#, fuzzy
+msgid "Color"
+msgstr "Culoare:"
+
+#: ../ui-hlp/menu.c:1082
+msgid "Horizontal text position"
+msgstr "Pozitia textului orizontal"
+
+#: ../ui-hlp/menu.c:1084
+msgid "Vertical text position"
+msgstr "Pozitia textului vertical"
+
+#: ../ui-hlp/menu.c:1086
+msgid "Text position"
+msgstr "Pozitiile textului"
+
+#: ../ui-hlp/menu.c:1090
+msgid "Message"
+msgstr "Mesaj"
+
+#: ../ui-hlp/menu.c:1112
+msgid "Load"
+msgstr "Incarca"
+
+#: ../ui-hlp/menu.c:1115
+msgid "Save"
+msgstr "Salveaza"
+
+#: ../ui-hlp/menu.c:1117
+msgid "Record"
+msgstr "Inregistreaza"
+
+#: ../ui-hlp/menu.c:1121
+msgid "Replay"
+msgstr "Reda"
+
+#: ../ui-hlp/menu.c:1128
+msgid "Save image"
+msgstr "Salveaza imaginea"
+
+#: ../ui-hlp/menu.c:1130
+msgid "Load random example"
+msgstr "Incarca un exemplu aleator"
+
+#: ../ui-hlp/menu.c:1132
+msgid "Save configuration"
+msgstr "Salveaza configuratia"
+
+#: ../ui-hlp/menu.c:1137
+msgid "Undo"
+msgstr "Refa"
+
+#: ../ui-hlp/menu.c:1141
+msgid "Redo"
+msgstr "Fa inapoi"
+
+#: ../ui-hlp/menu.c:1145
+msgid "Formulae"
+msgstr "Formule"
+
+#: ../ui-hlp/menu.c:1146
+#, fuzzy
+msgid "More formulae"
+msgstr "Alte formule"
+
+#: ../ui-hlp/menu.c:1151
+#, fuzzy
+msgid "User formula"
+msgstr "Alte formule"
+
+#: ../ui-hlp/menu.c:1153
+#, fuzzy
+msgid "User initialization"
+msgstr "Initializare"
+
+#: ../ui-hlp/menu.c:1158
+msgid "Incoloring mode"
+msgstr "Mod de colorare interioara"
+
+#: ../ui-hlp/menu.c:1159
+msgid "Outcoloring mode"
+msgstr "Mod de colorare exterioara"
+
+#: ../ui-hlp/menu.c:1160
+msgid "Plane"
+msgstr "Plan"
+
+#: ../ui-hlp/menu.c:1161
+#, fuzzy
+msgid "Palette"
+msgstr "Redare (paste)"
+
+#: ../ui-hlp/menu.c:1164
+msgid "Mandelbrot mode"
+msgstr "Modul Mandelbrot"
+
+#: ../ui-hlp/menu.c:1170 ../ui-hlp/menu.c:1174 ../ui-hlp/menu.c:1395
+msgid "Perturbation"
+msgstr "Perturbare"
+
+#: ../ui-hlp/menu.c:1185
+msgid "Reset to defaults"
+msgstr "Inapoi la setarile implicite"
+
+#: ../ui-hlp/menu.c:1186
+msgid "Julia mode"
+msgstr "Modul Julia"
+
+#: ../ui-hlp/menu.c:1193
+msgid "Set angle"
+msgstr "Seteaza unghiul"
+
+#: ../ui-hlp/menu.c:1197
+msgid "Set plane"
+msgstr "Seteaza planul"
+
+#: ../ui-hlp/menu.c:1201
+msgid "Inside coloring mode"
+msgstr "Modul de colorare interioara"
+
+#: ../ui-hlp/menu.c:1206
+msgid "Outside coloring mode"
+msgstr "Modul de colorare exterioara"
+
+#: ../ui-hlp/menu.c:1212
+msgid "Inside truecolor coloring mode"
+msgstr "Modul de colorare interioara true-color"
+
+#: ../ui-hlp/menu.c:1216
+msgid "Outside truecolor coloring mode"
+msgstr "Modul de colorare exterioara true-color"
+
+#: ../ui-hlp/menu.c:1219
+msgid "Julia seed"
+msgstr "Samanta (valoare initiala) Julia"
+
+#: ../ui-hlp/menu.c:1224
+msgid "Random palette"
+msgstr "Paleta aleatoare"
+
+#: ../ui-hlp/menu.c:1226
+msgid "Custom palette"
+msgstr "Paleta obisnuita"
+
+#: ../ui-hlp/menu.c:1230
+msgid "Color cycling"
+msgstr "Ciclarea culorilor"
+
+#: ../ui-hlp/menu.c:1232
+msgid "Reversed color cycling"
+msgstr "Ciclare inversata a culorilor "
+
+#: ../ui-hlp/menu.c:1237
+msgid "Color cycling speed"
+msgstr "Viteza de ciclare a culorilor"
+
+#: ../ui-hlp/menu.c:1241
+msgid "Shift palette"
+msgstr "Deplaseaza paleta"
+
+#: ../ui-hlp/menu.c:1243
+msgid "Shift one forward"
+msgstr "Deplaseaza cu un pas inainte"
+
+#: ../ui-hlp/menu.c:1246
+msgid "Shift one backward"
+msgstr "Deplaseaza cu un pas inapoi"
+
+#: ../ui-hlp/menu.c:1248 ../engine/zoom.c:1357
+msgid "Solid guessing"
+msgstr "Solid-Guessing"
+
+#: ../ui-hlp/menu.c:1249
+msgid "Dynamic resolution"
+msgstr "Rezolutie dinamica"
+
+#: ../ui-hlp/menu.c:1251
+msgid "Periodicity checking"
+msgstr "Verificarea periodicitatii"
+
+#: ../ui-hlp/menu.c:1254
+msgid "Iterations"
+msgstr "Iteratii"
+
+#: ../ui-hlp/menu.c:1256
+msgid "Bailout"
+msgstr "Valoare de salvare (bailout)"
+
+#: ../ui-hlp/menu.c:1260
+msgid "Fast julia mode"
+msgstr "Modul Julia rapid"
+
+#: ../ui-hlp/menu.c:1262
+msgid "Rotation"
+msgstr "Rotatie"
+
+#: ../ui-hlp/menu.c:1263
+msgid "Solid guessing range"
+msgstr "Intrevalul Solid-Guessing"
+
+#: ../ui-hlp/menu.c:1266
+msgid "Disable rotation"
+msgstr "Dezactiveaza rotatia"
+
+#: ../ui-hlp/menu.c:1270
+msgid "Continuous rotation"
+msgstr "Rotatie continua"
+
+#: ../ui-hlp/menu.c:1273
+msgid "Rotate by mouse"
+msgstr "Roteste cu mouse-ul"
+
+#: ../ui-hlp/menu.c:1277
+msgid "Rotation speed"
+msgstr "Viteza de rotatie"
+
+#: ../ui-hlp/menu.c:1280
+msgid "Automatic rotation"
+msgstr "Rotatie automata"
+
+#: ../ui-hlp/menu.c:1285
+msgid "Fast rotation mode"
+msgstr "Modul rapid de rotatie"
+
+#: ../ui-hlp/menu.c:1289
+msgid "Disable dynamic resolution"
+msgstr "Dezactiveaza rezolutia dinamica"
+
+#: ../ui-hlp/menu.c:1292
+msgid "Use only during animation"
+msgstr "A se folosi numai in timpul animatiilor"
+
+#: ../ui-hlp/menu.c:1296
+msgid "Use also for new images"
+msgstr "A se folosi si pentru imagini noi"
+
+#: ../ui-hlp/menu.c:1298
+msgid "Dynamic resolution mode"
+msgstr "Modul de rezolutie dinamica"
+
+#: ../ui-hlp/menu.c:1302
+msgid "Autopilot"
+msgstr "Pilot automat"
+
+#: ../ui-hlp/menu.c:1306
+#, fuzzy
+msgid "VJ mode"
+msgstr "Modul Julia"
+
+#: ../ui-hlp/menu.c:1310
+msgid "Recalculate"
+msgstr "Recalulare"
+
+#: ../ui-hlp/menu.c:1319
+msgid "Zooming speed"
+msgstr "Viteza de marire (zoom)"
+
+#: ../ui-hlp/menu.c:1321
+msgid "Fixed step"
+msgstr "Pas fixat"
+
+#: ../ui-hlp/menu.c:1325
+msgid "Disable solid guessing"
+msgstr "Dezactiveaza solid-guessing"
+
+#: ../ui-hlp/menu.c:1329
+msgid "Guess 2x2 rectangles"
+msgstr "Guess 2x2 dreptunghiuri"
+
+#: ../ui-hlp/menu.c:1331
+msgid "Guess 3x3 rectangles"
+msgstr "Guess 3x3 dreptunghiuri"
+
+#: ../ui-hlp/menu.c:1335
+msgid "Guess 4x4 rectangles"
+msgstr "Guess 4x4 dreptunghiuri"
+
+#: ../ui-hlp/menu.c:1337
+msgid "Guess 5x5 rectangles"
+msgstr "Guess 5x5 dreptunghiuri"
+
+#: ../ui-hlp/menu.c:1341
+msgid "Guess 6x6 rectangles"
+msgstr "Guess 6x6 dreptunghiuri"
+
+#: ../ui-hlp/menu.c:1343
+msgid "Guess 7x7 rectangles"
+msgstr "Guess 7x7 dreptunghiuri"
+
+#: ../ui-hlp/menu.c:1347
+msgid "Guess 8x8 rectangles"
+msgstr "Guess 8x8 dreptunghiuri"
+
+#: ../ui-hlp/menu.c:1349
+msgid "Guess unlimited rectangles"
+msgstr "Guess un numar nelimitat de dreptunghiuri"
+
+#: ../ui-hlp/menu.c:1354
+msgid "Language"
+msgstr "Limba"
+
+#: ../ui-hlp/menu.c:1357
+msgid "An introduction to fractals"
+msgstr "Fractali - O introducere"
+
+#: ../ui-hlp/menu.c:1359
+msgid "XaoS features overview"
+msgstr "XaoS - Eine Ãœbersicht"
+
+#: ../ui-hlp/menu.c:1361
+msgid "Math behind fractals"
+msgstr "Matematica de la baza fractalilor"
+
+#: ../ui-hlp/menu.c:1362 ../ui-hlp/menu.c:1403
+msgid "Other fractal types in XaoS"
+msgstr "Alte tipuri de fractali in XaoS"
+
+#: ../ui-hlp/menu.c:1364
+msgid "What's new?"
+msgstr "Ce este nou?"
+
+#: ../ui-hlp/menu.c:1374 ../ui-hlp/menu.c:1398
+msgid "Whole story"
+msgstr "Toata povestea"
+
+#: ../ui-hlp/menu.c:1376
+msgid "Introduction"
+msgstr "Introducere"
+
+#: ../ui-hlp/menu.c:1377
+msgid "Mandelbrot set"
+msgstr "Multimea Mandelbrot"
+
+#: ../ui-hlp/menu.c:1378
+msgid "Julia set"
+msgstr "Multimea Julia"
+
+#: ../ui-hlp/menu.c:1379
+msgid "Higher power Mandelbrots"
+msgstr "Multimi Mandelbrot de ordin superior"
+
+#: ../ui-hlp/menu.c:1380
+msgid "Newton's method"
+msgstr "Metoda lui Newton"
+
+#: ../ui-hlp/menu.c:1381
+msgid "Barnsley's formula"
+msgstr "Formula lui Barnsley"
+
+#: ../ui-hlp/menu.c:1382
+msgid "Phoenix"
+msgstr "Phoenix"
+
+#: ../ui-hlp/menu.c:1383
+msgid "Octo"
+msgstr "Octo"
+
+#: ../ui-hlp/menu.c:1384
+msgid "Magnet"
+msgstr "Magnet"
+
+#: ../ui-hlp/menu.c:1385
+msgid "All features"
+msgstr "Toate Features"
+
+#: ../ui-hlp/menu.c:1387
+msgid "Outcoloring modes"
+msgstr "Moduri de colorare exterioara"
+
+#: ../ui-hlp/menu.c:1388
+msgid "Incoloring modes"
+msgstr "Moduri de colorare interioara"
+
+#: ../ui-hlp/menu.c:1389
+msgid "True-color coloring modes"
+msgstr "Moduri de colorare true-color"
+
+#: ../ui-hlp/menu.c:1392
+msgid "Planes"
+msgstr "Planuri"
+
+#: ../ui-hlp/menu.c:1393
+msgid "Animations and position files"
+msgstr "Fisierele de animatii si pozitie"
+
+#: ../ui-hlp/menu.c:1396
+msgid "Random palettes"
+msgstr "Palete aleatoare"
+
+#: ../ui-hlp/menu.c:1397
+msgid "Other noteworthy features"
+msgstr "Alte detalii (features) remarcabile"
+
+#: ../ui-hlp/menu.c:1400
+msgid "The definition and fractal dimension"
+msgstr "Definitia si dimensiunea fractalului"
+
+#: ../ui-hlp/menu.c:1402
+msgid "Escape time fractals"
+msgstr "Fractali escape-time"
+
+#: ../ui-hlp/menu.c:1406
+msgid "Triceratops and Catseye fractals"
+msgstr "Fractalii Triceratops si Catseye (ochi de pisica)"
+
+#: ../ui-hlp/menu.c:1408
+msgid "Mandelbar, Lambda, Manowar and Spider"
+msgstr "Mandelbar, Lambda, Manowar si Spider"
+
+#: ../ui-hlp/menu.c:1411
+msgid "Sierpinski Gasket, S.Carpet, Koch Snowflake"
+msgstr ""
+"Sierpinski Gasket, S.Carpet, Koch Snowflake (fulgul de zapada al lui Koch)"
+
+#: ../ui-hlp/menu.c:1413
+msgid "What's new in 3.0?"
+msgstr "Ce este nou in versiunea 3.0?"
+
+#: ../ui-hlp/play.c:74
+msgid "line available only in animation replay"
+msgstr "Linie disponibila numai in animation replay"
+
+#: ../ui-hlp/play.c:99
+msgid "Morphing non existing line!"
+msgstr "Morphing o linie inexistenta!"
+
+#: ../ui-hlp/play.c:121
+msgid "linekey not available in this context!"
+msgstr "Cheia liniei nu este disponibila in acest context!"
+
+#: ../ui-hlp/play.c:291
+msgid "clear_line available only in animation replay"
+msgstr "Stergerea_liniei (clear_line) disponibila numai in animation replay"
+
+#: ../ui-hlp/play.c:300
+msgid "clear_lines available only in animation replay"
+msgstr "Stergerea_liniilor (clear_lines) disponibila numai in animation replay"
+
+#: ../ui-hlp/play.c:359
+msgid "Catalog file not found"
+msgstr "Nu s-a gasit fisierul catalog"
+
+#: ../ui-hlp/play.c:405
+msgid "Replay is already active"
+msgstr "Replay este deja activ"
+
+#: ../ui-hlp/play.c:409
+msgid "File open failed"
+msgstr "Fiserul nu a putut fi deschis"
+
+#: ../ui-hlp/play.c:414
+msgid "Out of memory"
+msgstr "Memorie insuficienta"
+
+#: ../ui-hlp/play.c:526 ../ui-hlp/play.c:542 ../ui-hlp/play.c:566
+#: ../ui-hlp/play.c:595
+msgid "Missing parameter"
+msgstr "Parametru lipsa"
+
+#: ../ui-hlp/play.c:528 ../ui-hlp/play.c:544 ../ui-hlp/play.c:568
+#: ../ui-hlp/play.c:597
+msgid "Unexpected end of file"
+msgstr "Sfarsit de fisier neasteptat"
+
+#: ../ui-hlp/play.c:555 ../ui-hlp/play.c:574
+msgid "Token is too long"
+msgstr "Token-ul este prea lung"
+
+#: ../ui-hlp/play.c:629
+msgid "Unknown formula type"
+msgstr "Tip de formula necunoscut"
+
+#: ../ui-hlp/play.c:635
+msgid "morph available only in animation replay"
+msgstr "Morph disponibil numai in animation replay"
+
+#: ../ui-hlp/play.c:639
+msgid "morphview: Invalid viewpoint"
+msgstr "vederea Morph (morphview): Punct de vedere eronat"
+
+#: ../ui-hlp/play.c:653
+msgid "move available only in animation replay"
+msgstr "Deplasare dispnibila numai in animation replay"
+
+#: ../ui-hlp/play.c:667
+msgid "morphjulia available only in animation replay"
+msgstr "Morphjulia dispnibila numai in animation replay"
+
+#: ../ui-hlp/play.c:680
+msgid "morphangle available only in animation replay"
+msgstr "Unghiul de Morph dispnibil numai in animation replay"
+
+#: ../ui-hlp/play.c:712
+msgid "Unknown filter"
+msgstr "Filtru necunoscut"
+
+#: ../ui-hlp/play.c:753
+msgid "sleep available only in animation replay"
+msgstr "Pause (sleep) disponibila numai in animation replay"
+
+#: ../ui-hlp/play.c:767
+#, c-format
+msgid "Internal program error #12 %i\n"
+msgstr "Eroare interna #12 %i\n"
+
+#: ../ui-hlp/play.c:788
+msgid "wait available only in animation replay"
+msgstr "Asteptare(wait) disponibil numi in animation replay"
+
+#: ../ui-hlp/play.c:834
+msgid "No catalog file loaded"
+msgstr "Nu s-a incarcat fisierul catalog"
+
+#: ../ui-hlp/play.c:839
+msgid "Message not found in catalog file"
+msgstr "Mesajul nu a fost gasit in fisierul catalog"
+
+#: ../ui-hlp/play.c:850
+msgid "load available only in animation replay"
+msgstr "Incarcare (load) disponibila numai in animation replay"
+
+#: ../ui-hlp/play.c:854
+msgid "Include level overflow"
+msgstr "Zu viele Dateien ineinander einbezogen"
+
+#: ../ui-hlp/play.c:863
+msgid "File not found"
+msgstr "Nu s-a gasit fisierul"
+
+#: ../ui-hlp/play.c:881
+msgid "Too many parameters"
+msgstr "Prea multi parametri"
+
+#: ../ui-hlp/play.c:916
+#, c-format
+msgid "Replay disabled at line %i"
+msgstr "Replay dezactivat pe linia %i"
+
+#: ../ui-hlp/ui_helper.c:646
+msgid "Tutorial files not found. Reinstall XaoS"
+msgstr "Fisierele cu tutoriale nu au fost gasite. Reinstalati XaoS"
+
+#: ../ui-hlp/ui_helper.c:651
+msgid "Preparing first image"
+msgstr "Se pregateste prima imagine"
+
+#: ../ui-hlp/ui_helper.c:661
+msgid "Could not open examples"
+msgstr "Exemplele nu s-au putut deschide"
+
+#: ../ui-hlp/ui_helper.c:667
+#, c-format
+msgid "File %s loaded."
+msgstr "S-a incarcat fisierul %s."
+
+#: ../ui-hlp/ui_helper.c:676
+msgid "Saving image..."
+msgstr "Imginea se salveaza..."
+
+#: ../ui-hlp/ui_helper.c:684
+msgid "Save interrupted"
+msgstr "Salvare intrerupta"
+
+#: ../ui-hlp/ui_helper.c:693 ../ui-hlp/ui_helper.c:710
+#: ../ui-hlp/ui_helper.c:777
+#, c-format
+msgid "File %s saved."
+msgstr "Fisierul %s salvat."
+
+#: ../ui-hlp/ui_helper.c:704
+msgid "Can not open file"
+msgstr "Nu se poate deschide fisierul"
+
+#: ../ui-hlp/ui_helper.c:799
+#, c-format
+msgid "Recording to file %s enabled."
+msgstr "S-a activat inregistrearea in fisierul %s "
+
+#: ../engine/zoom.c:1128
+msgid "Solid guessing 1"
+msgstr "Solid-Guessing 1"
+
+#: ../engine/btrace.c:292 ../engine/btrace.c:373
+msgid "Boundary trace"
+msgstr "Boundary-Trace"
+
+#: ../ui/dialog.c:312 ../ui/dialog.c:398 ../ui/dialog.c:1377
+#: ../ui/ui-drv/cocoa/CustomDialog.m:302
+msgid "OK"
+msgstr "OK"
+
+#: ../ui/dialog.c:313 ../ui/dialog.c:401 ../ui/dialog.c:1379
+#: ../ui/filesel.c:184 ../ui/ui-drv/cocoa/CustomDialog.m:312
+msgid "Cancel"
+msgstr "Anulare"
+
+#: ../ui-hlp/render.c:46
+#, c-format
+msgid "Error: %s"
+msgstr "Eroare: %s"
+
+#: ../ui-hlp/render.c:121
+msgid "Cannot open motion vector file!"
+msgstr "Nu se poate deschide fisierul cu vectorii de miscare!"
+
+#: ../ui-hlp/render.c:270
+#, c-format
+msgid "Vectors: %i"
+msgstr "Vectori: %i"
+
+#: ../ui-hlp/render.c:276
+msgid "Initializing"
+msgstr "Initializare"
+
+#: ../ui-hlp/render.c:284
+msgid "Cannot create palette"
+msgstr "Nu se poate crea paleta"
+
+#: ../ui-hlp/render.c:295
+msgid "Cannot create image\n"
+msgstr "Nu se poate crea imaginea\n"
+
+#: ../ui-hlp/render.c:304
+msgid "Cannot create checking buffer!"
+msgstr "Nu se poate crea bufferul de control!"
+
+#: ../ui-hlp/render.c:313 ../ui-hlp/render.c:596
+msgid "Cannot create context\n"
+msgstr "Nu se poate crea contextul\n"
+
+#: ../ui-hlp/render.c:325
+msgid "Cannot open animation file\n"
+msgstr "Nu se poate deschide fisierul cu animatii\n"
+
+#: ../ui-hlp/render.c:336 ../ui-hlp/render.c:605
+msgid "Loading catalogs"
+msgstr "Cataloagele se incarca"
+
+#: ../ui-hlp/render.c:366
+msgid "Processing command line options"
+msgstr "Se prelucreaza optiunile de la linia de comanda"
+
+#: ../ui-hlp/render.c:389
+msgid "Enabling animation replay\n"
+msgstr "Se activeaza animation replay\n"
+
+#: ../ui-hlp/render.c:396 ../ui-hlp/render.c:514
+msgid "Cannot open image file"
+msgstr "Nu se poate deschide fisierul cu imaginea"
+
+#: ../ui-hlp/render.c:410
+msgid "Cannot open pattern file"
+msgstr "Nu se poate deschide fiserul de sabloane"
+
+#: ../ui-hlp/render.c:427 ../ui-hlp/render.c:429 ../ui-hlp/render.c:638
+msgid "Entering calculation loop!"
+msgstr "Intrare in bucla de calcul!"
+
+#: ../ui-hlp/render.c:455
+#, c-format
+msgid "Frame %i skipped."
+msgstr "cadrul %i a fost omis."
+
+#: ../ui-hlp/render.c:457
+#, c-format
+msgid "Frames %i - %i skipped."
+msgstr "S-au omis cadrele %i - %i."
+
+#: ../ui-hlp/render.c:461
+#, c-format
+msgid "Frame %4i: "
+msgstr "Cadru %4i: "
+
+#: ../ui-hlp/render.c:528
+msgid " done."
+msgstr " terminat."
+
+#: ../ui-hlp/render.c:532
+msgid " skipping..."
+msgstr " se omite..."
+
+#: ../ui-hlp/render.c:565 ../ui-hlp/render.c:657
+msgid "Calculation interrupted"
+msgstr "Calculare intrerupta"
+
+#: ../ui-hlp/render.c:568 ../ui-hlp/render.c:570 ../ui-hlp/render.c:659
+msgid "Calculation finished"
+msgstr "Calculare terminata"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1292 ../ui/ui-drv/cocoa/AppController.m:321
+msgid "Copy"
+msgstr "Copiere"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1293 ../ui/ui-drv/cocoa/AppController.m:324
+msgid "Paste"
+msgstr "Redare (paste)"
+
+#: ../ui/ui-drv/win32/ui_win32.c:1297
+msgid "About"
+msgstr "Despre"
+
+#: ../ui/ui-drv/cocoa/AppController.m:197
+#, fuzzy
+msgid "About XaoS"
+msgstr "Despre"
+
+#: ../ui/ui-drv/cocoa/AppController.m:200
+msgid "Services"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:203
+msgid "Hide XaoS"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:206
+msgid "Hide Others"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:209
+msgid "Show All"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:212
+#, fuzzy
+msgid "Quit XaoS"
+msgstr "Terminare"
+
+#: ../ui/ui-drv/cocoa/AppController.m:318
+msgid "Cut"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:327
+#, fuzzy
+msgid "Delete"
+msgstr "Paleta"
+
+#: ../ui/ui-drv/cocoa/AppController.m:330
+msgid "Select All"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:340
+msgid "Minimize"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:348
+msgid "Bring All to Front"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/AppController.m:359
+#, fuzzy
+msgid "Close"
+msgstr "Culoare"
+
+#: ../ui/ui-drv/cocoa/AppController.m:373
+msgid "Videator Output"
+msgstr ""
+
+#: ../ui/ui-drv/cocoa/CustomDialog.m:142
+msgid "Choose"
+msgstr ""
+
+#, fuzzy
+#~ msgid "User function"
+#~ msgstr "Functii pentru desenarea liniilor"
+
+#~ msgid "formulae"
+#~ msgstr "Formule"
diff --git a/src/include/aconfig.h.in b/src/include/aconfig.h.in
new file mode 100644
index 0000000..40d0f7e
--- /dev/null
+++ b/src/include/aconfig.h.in
@@ -0,0 +1,60 @@
+#ifndef ACONFIG_H
+#define ACONFIG_H
+#undef HAVE_PTHREAD_SIGHANDLER
+#undef DATAPATH
+#undef C_ALLOCA
+#undef const
+#undef USE_PTHREAD
+/*Avoid stack frame explosion on Windoze*/
+#ifndef _WIN32
+/*BeOS crashes badly when large amounts of stack are consumed */
+#ifndef __BEOS__
+#undef HAVE_ALLOCA
+#undef HAVE_ALLOCA_H
+#endif
+#endif
+#undef HAVE_FABSL
+#undef HAVE__FABSL
+#undef HAVE___FABSL
+#undef HAVE_FTIME
+#undef USE_PNG
+#undef HAVE_FINITE
+#undef HAVE_SELECT
+#undef HAVE_LONG_DOUBLE
+#undef HAVE_REDRAWWIN
+#undef HAVE_WREDRAWLN
+#undef USE_NCURSES
+#undef inline
+#undef _POSIX_SOURCE
+#undef STDC_HEADERS
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#undef TIME_WITH_SYS_TIME
+#undef HAVE_GETTIMEOFDAY
+#undef HAVE_USLEEP
+#undef HAVE_TERMATTRS
+#undef HAVE_MOUSEMASK
+#undef HAVE_SETITIMER
+/* Define if you have the <limits.h> header file. */
+#undef HAVE_LIMITS_H
+/* Define if you have the <sys/time.h> header file. */
+#undef HAVE_SYS_TIME_H
+/* Define if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+#undef MITSHM
+#undef CURSES_DRIVER
+#undef BEOS_DRIVER
+#undef AA_DRIVER
+#undef GTK_DRIVER
+#undef GGI_DRIVER
+#undef X11_DRIVER
+#undef DGA_DRIVER
+#undef SVGA_DRIVER
+#undef WIN32_DRIVER
+#undef DDRAW_DRIVER
+#undef HTML_HELP
+#undef SIZEOF_SHORT
+#undef SIZEOF_INT
+#undef SIZEOF_LONG
+#undef HAVE_GETTEXT
+#undef NO_MALLOC_H
+#endif
diff --git a/src/include/archaccel.h b/src/include/archaccel.h
new file mode 100644
index 0000000..498f028
--- /dev/null
+++ b/src/include/archaccel.h
@@ -0,0 +1,14 @@
+#ifndef ACCEL_H
+#define ACCEL_H
+#ifdef __GNUC__
+#ifdef __i386__
+#ifdef __OPTIMIZE__
+#include <i386/sstring.h>
+#endif
+#endif
+#endif
+#endif
+
+#ifndef memset_long
+#define memset_long(x,y,z) memset(x,y,z)
+#endif
diff --git a/src/include/btrace.h b/src/include/btrace.h
new file mode 100644
index 0000000..a014934
--- /dev/null
+++ b/src/include/btrace.h
@@ -0,0 +1,12 @@
+#ifndef BTRACE_H
+#define BTRACE_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+ int boundarytrace(int x1, int y1, int x2, int y2, number_t * xpos,
+ number_t * ypos);
+ int boundarytraceall(number_t * xpos, number_t * ypos);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/c256.h b/src/include/c256.h
new file mode 100644
index 0000000..5854ba1
--- /dev/null
+++ b/src/include/c256.h
@@ -0,0 +1,12 @@
+#ifdef cpixel_t
+#undef cpixel_t
+#undef cpixeldata_t
+#undef cppixel_t
+#undef bpp
+#endif
+#define cpixel_t pixel8_t
+#define cppixel_t ppixel8_t
+#define cpixeldata_t pixel8_t
+#define bpp 1
+#include <generic.h>
+#define bpp1
diff --git a/src/include/catalog.h b/src/include/catalog.h
new file mode 100644
index 0000000..ba33f84
--- /dev/null
+++ b/src/include/catalog.h
@@ -0,0 +1,27 @@
+/* Small library to handle catalog files
+ */
+#ifndef CATALOG_H
+#define CATALOG_H
+#define CHASHMAX 31 /*Just small hash table. Should be OK */
+#include <xio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+ struct varnames {
+ struct varnames *left, *right;
+ char *name;
+ char *value;
+ };
+ typedef struct catalog {
+ struct varnames *root[CHASHMAX];
+ } catalog_t;
+/*Find text in catalog */
+ extern char *find_text(catalog_t * catalog, CONST char *name);
+/*Load catalog from file */
+ extern catalog_t *load_catalog(xio_file f, CONST char **error);
+/*Free memory used by catalog */
+ extern void free_catalog(catalog_t *);
+#ifdef __cplusplus
+}
+#endif
+#endif /*VARIABLE_H */
diff --git a/src/include/complex.h b/src/include/complex.h
new file mode 100644
index 0000000..75b31e6
--- /dev/null
+++ b/src/include/complex.h
@@ -0,0 +1,63 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/* Simplified version. See XaoS2.2 for full version of this library.
+ * It caused problems (overflows) at certain preprocesors
+ */
+#ifndef COMPLEX_H
+#define COMPLEX_H
+#include <config.h>
+
+#define c_add(ar,ai,br,bi,or,oi) ((or)=(ar)+(br),(oi)=(ai)+(bi))
+#define c_mul(ar,ai,br,bi,or,oi) ((or)=(ar)*(br)-(ai)*(bi),(oi)=((ar)*(bi))+((ai)*(br)))
+
+#define c_sub(ar,ai,br,bi,or,oi) ((or)=(ar)-(br),(oi)=(ai)-(bi))
+
+#define c_div_rp(ar,ai,br,bi) (((ar) * (br) + (ai) * (bi))/ ((bi) * (bi) + (br) * (br)))
+#define c_div_ip(ar,ai,br,bi) ((-(ar) * (bi) + (ai) * (br)) / ((br) * (br) + (bi) * (bi)))
+#define c_div(ar,ai,br,bi,or,oi) ((or)=c_div_rp(ar,ai,br,bi),(oi)=c_div_ip(ar,ai,br,bi))
+
+#define c_pow2_rp(ar,ai) ((ar)*(ar)-(ai)*(ai))
+#define c_pow2_ip(ar,ai) (2*(ar)*(ai))
+#define c_pow2(ar,ai,or,oi) ((or)=c_pow2_rp(ar,ai),(oi)=c_pow2_ip(ar,ai))
+
+
+#define c_pow3_rp(ar,ai) ((ar)*(ar)*(ar)-3*(ar)*(ai)*(ai))
+#define c_pow3_ip(ar,ai) (3*(ar)*(ar)*(ai)-(ai)*(ai)*(ai))
+#define c_pow3(ar,ai,or,oi) ((or)=c_pow3_rp(ar,ai),(oi)=c_pow3_ip(ar,ai))
+
+#define c_pow4_rp(ar,ai) ((ar)*(ar)*(ar)*(ar)-6*(ar)*(ar)*(ai)*(ai)+(ai)*(ai)*(ai)*(ai))
+#define c_pow4_ip(ar,ai) (4*(ar)*(ar)*(ar)*(ai)-4*(ar)*(ai)*(ai)*(ai))
+#define c_pow4(ar,ai,or,oi) ((or)=c_pow4_rp(ar,ai),(oi)=c_pow4_ip(ar,ai))
+
+
+#ifndef __GNUC__
+#ifdef INLINEFABS
+#define myabs(x) INLINEFABS(x)
+#else
+#define myabs(x) ((x)>0?(x):-(x))
+#endif
+#else
+#include <gccbuild.h>
+#endif
+
+#endif /* COMPLEX_H */
diff --git a/src/include/config/aconfig.std b/src/include/config/aconfig.std
new file mode 100644
index 0000000..9c10eed
--- /dev/null
+++ b/src/include/config/aconfig.std
@@ -0,0 +1,28 @@
+/* aconfig.h. Generated automatically by configure. */
+#ifndef ACONFIG_H
+#define DATAPATH "./"
+#define ACONFIG_H
+#define HAVE_LONG_DOUBLE 1
+#define USE_PNG
+#define SIZEOF_INT 4
+#define HAVE_FINITE
+#define USE_STDIO
+#define SIZEOF_SHORT 2
+#define SIZEOF_LONG 4
+/* #undef inline */
+/* #undef _POSIX_SOURCE */
+#define STDC_HEADERS 1
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+#define HAVE_GETTIMEOFDAY 1
+#define HAVE_MOUSEMASK 1
+#define HAVE_USLEEP 1
+#define USE_ALLEGRO 1
+#define HAVE_UCLOCK 1
+#define HAVE_TERMATTRS 1
+#define HAVE_SETITIMER 1
+#define HAVE_LIMITS_H 1
+#define HAVE_SYS_TIME_H 1
+#define HAVE_UNISTD_H 1
+#define AA_DRIVER 1
+#endif
diff --git a/src/include/config/config.autoconf b/src/include/config/config.autoconf
new file mode 100644
index 0000000..8553574
--- /dev/null
+++ b/src/include/config/config.autoconf
@@ -0,0 +1,141 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+#define HOMEDIR
+
+#ifdef __BEOS__
+#define MAIN_FUNCTION be_main
+#ifdef __POWERPC__
+# define SLOWCACHESYNC
+# ifdef __MWERKS__
+# define INLINEFABS(x) __fabs(x)
+# endif
+#endif
+#endif
+
+#ifdef _WIN32
+#define CONFIGFILE "XaoS.cfg"
+#else
+#define CONFIGFILE ".XaoSrc"
+#endif
+
+/*For compilers that don't support nameless unions, do a
+#define NONAMELESSUNION
+before #include <ddraw.h>*/
+#ifdef _WIN32
+#define NONAMELESSUNION
+#endif
+
+/*#define I_WAS_HERE */ /*uncoment this to disable changing of parameters by atoconf */
+
+#define FPOINT_TYPE long double
+ /*floating point math type on computers
+ with medium speed floating point math should
+ use float instead */
+#include <aconfig.h>
+#define USE_STDIO
+#if !defined(HAVE_LONG_DOUBLE)&&!defined(I_WAS_HERE)
+#undef FPOINT_TYPE
+#define FPOINT_TYPE double
+#endif
+#define CONST const
+#define INLINE inline
+
+/* BeOS have broken long double IO routines on i386. Use our replacements */
+#ifdef __BEOS__
+#ifdef __i386__
+#define USE_XLDIO
+#endif
+#endif
+
+/* Win32 don't support long double IO. Use our replacements if possible */
+#ifdef _WIN32
+#ifndef __GNUC__
+1
+/* You need to solve long double IO problems to compile XaoS on non-gcc
+ * compiler */
+#endif
+#define USE_XLDIO
+#endif
+
+#include "gccaccel.h"
+#ifdef HAVE_MOUSEMASK
+#define NCURSESMOUSE
+#endif
+#ifndef HAVE_LIMITS_H
+#define INT_MAX 2127423647
+#endif
+#ifdef SVGA_DRIVER
+#define DESTICKY
+#endif
+#ifdef COCOA_DRIVER
+#define SFIXEDCOLOR
+#define STRUECOLOR
+#define STRUECOLOR16
+#define STRUECOLOR24
+#define SMBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef GTK_DRIVER
+#define SFIXEDCOLOR
+#define STRUECOLOR
+#define STRUECOLOR16
+#define STRUECOLOR24
+#define SMBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef X11_DRIVER
+#define SFIXEDCOLOR
+#define STRUECOLOR
+#define STRUECOLOR16
+#define STRUECOLOR24
+#define SMBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef SVGA_DRIVER
+#undef STRUECOLOR16
+#define STRUECOLOR16
+#undef STRUECOLOR24
+#define STRUECOLOR24
+#endif
+#ifdef GGI_DRIVER
+#undef STRUECOLOR16
+#define STRUECOLOR16
+#undef STRUECOLOR24
+#define STRUECOLOR24
+#undef SLBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef BEOS_DRIVER
+#ifdef __cplusplus
+extern "C" {
+#endif
+#ifdef __GNUC__
+void be_exit_xaos(int i) __attribute__ ((__noreturn__));
+#else
+void be_exit_xaos(int i);
+#endif
+#ifdef __cplusplus
+}
+#endif
+#define exit_xaos(i) be_exit_xaos(i)
+#undef STRUECOLOR16
+#define STRUECOLOR16
+#undef SFIXEDCOLOR
+#define SFIXEDCOLOR
+#undef SMBITMAPS
+#define SMBITMAPS
+#undef SLBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef WIN32_DRIVER
+#define MAIN_FUNCTION XaoS_main
+#undef STRUECOLOR16
+#define STRUECOLOR16
+#undef STRUECOLOR24
+#define STRUECOLOR24
+#endif
+#ifdef HAVE_SELECT
+#define COMPILE_PIPE
+#endif
+#endif /*CONFIG_H */
+
diff --git a/src/include/config/config.std b/src/include/config/config.std
new file mode 100644
index 0000000..c5313e9
--- /dev/null
+++ b/src/include/config/config.std
@@ -0,0 +1,28 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+#define CONFIGFILE "xaos.cfg"
+#define FPOINT_TYPE long double
+ /*floating point math type on computers
+ with medium speed floating point math should
+ use float instead */
+#define USE_LONG /*for autoconf..undefine if
+ fpoint_type is set to other than
+ long_double */
+/*#define MITSHM */
+ /*undefine this if you system does not
+ support shared memory */
+/* You don't need to change these lines unless you now what you are doing */
+
+#include <aconfig.h>
+#define USE_STDIO
+#include <gccaccel.h>
+#define HAVE_GETTIMEOFDAY
+#define TIME_WITH_SYS_TIME
+#define HAVE_LIMITS_H
+#define HAVE_UNISTH_H
+#define HAVE_SYS_TIME_H
+#define
+#define STRUECOLOR24
+#define STRUECOLOR
+#define STRUECOLOR16
+#endif /*CONFIG_H */
diff --git a/src/include/cursor.h b/src/include/cursor.h
new file mode 100644
index 0000000..45859fc
--- /dev/null
+++ b/src/include/cursor.h
@@ -0,0 +1,56 @@
+CONST static unsigned char wait_pointer_data[256]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 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+};
diff --git a/src/include/fconfig.h b/src/include/fconfig.h
new file mode 100644
index 0000000..bd007b3
--- /dev/null
+++ b/src/include/fconfig.h
@@ -0,0 +1,63 @@
+#ifndef FCONFIG_H
+#define FCONFIG_H
+#include <config.h>
+#define TUTORIALPATH DATAPATH"/tutorial/"
+#define EXAMPLESPATH DATAPATH"/examples/"
+#define CATALOGSPATH DATAPATH"/catalogs/"
+#define HELPPATH DATAPATH"/help/xaos.hlp"
+
+#define DEFAULT_MAX_ITER 170
+ /*default number of iterations should be set
+ lower for slow computers */
+#define DEFAULT_BAILOUT 4
+#define MAXSTEP (0.008*3)
+ /*zooming step. For slow computer should
+ be set lower. Longer steps takes more time
+ and invoke yet longer ones etc.. */
+#define STEP (0.0006*3)
+ /*speedup */
+#define XSIZE 640
+ /*default sizes of window */
+#define YSIZE 480
+#define ROTATIONSPEED 30
+
+
+
+ /*some constatnts used by various parts of XaoS */
+#ifndef DEBUG
+#define NDEBUG
+#endif
+#ifndef FRAMERATE /*plan9 seems to require this */
+#define FRAMERATE 20
+#define LOOKSIZE 2
+ /*size explored by autopilot */
+#define RANGE1 30
+#define NGUESSES (RANGE1*RANGE1/2)
+#define MAXTIME 10
+ /*maximum zooming time to one direction */
+#define NGUESSES1 10
+ /*maximum number of guesses using first
+ method */
+#define NGUESSES2 1000
+ /*maximum number of guesses using second
+ method */
+#define SPEEDUP 1.05
+ /*speedup of speedup */
+#endif
+/*#define SLOWFUNCPTR*/
+
+#ifdef _plan9_
+#undef number_t
+#define number_t double
+#else
+typedef FPOINT_TYPE number_t;
+#endif
+
+#undef STAT
+#ifdef STATISTICS
+#define STAT(x) x
+#else
+#define STAT(x)
+#endif
+#define NUMBER_BIG ((number_t)INT_MAX)
+#endif /*FCONFIG_H */
diff --git a/src/include/filter.h b/src/include/filter.h
new file mode 100644
index 0000000..be27bd5
--- /dev/null
+++ b/src/include/filter.h
@@ -0,0 +1,335 @@
+#ifndef IMAGE_H
+#define IMAGE_H
+#include "fconfig.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ typedef unsigned char pixel_t;
+ typedef unsigned char rgb_t[4]; /*4 is better than 3 - makes multiplying easier */
+ struct truec {
+ int rshift, gshift, bshift; /*the shift ammounts */
+ int rprec, gprec, bprec; /*precisity - 0=8bit, 1=7bit, -1=9bit etc... */
+ unsigned int rmask, gmask, bmask; /*masks */
+ unsigned int mask1, mask2, allmask; /*Mask1 and mask2 are distinc color masks
+ allmask are mask for all colors */
+ int byteexact; /*When every colors is at one byte */
+ int missingbyte; /*for 32bit truecolor and exact byte places one byte is
+ unused... */
+ };
+ union paletteinfo {
+ struct truec truec;
+ };
+ struct palette {
+ int start;
+ int end;
+ int maxentries;
+ int version;
+ int type;
+ unsigned int *pixels;
+ int npreallocated;
+ rgb_t *rgb;
+ int flags;
+ int (*alloccolor) (struct palette * pal, int init, int r, int g,
+ int b);
+ void (*setpalette) (struct palette * pal, int start, int end,
+ rgb_t * rgb);
+ void (*allocfinished) (struct palette * pal);
+ void (*cyclecolors) (struct palette * pal, int direction);
+ int size; /*number of allocated color entries */
+ void *data; /*userdata */
+ /*Preallocated palette cells */
+ int ncells;
+ unsigned int *index;
+ CONST rgb_t *prergb;
+ union paletteinfo info;
+ };
+ struct image {
+ float pixelwidth, pixelheight;
+ pixel_t **oldlines;
+ pixel_t **currlines;
+ void (*flip) (struct image * img);
+ int width, height, nimages;
+ int bytesperpixel;
+ int currimage;
+ int flags;
+ int scanline;
+ int version;
+ struct palette *palette;
+ void *data; /*userdata */
+ };
+#define interpol1(i1,i2,n,mask) ((((i1)&(mask))*(n)+((i2)&(mask))*(256-(n)))&((mask)<<8))
+#define interpol(i1,i2,n,mr,mg,mb) ((interpol1(i1,i2,n,mr)+interpol1(i1,i2,n,mg)+interpol1(i1,i2,n,mb))>>8)
+#define intergray(i1,i2,n) (((i1)*n+(i2)*(256-(n)))>>8)
+ /*
+ * J.B. Langston 3/13/2008
+ *
+ * The Mac OS X driver requires a 32-bit rgb mask where the most significant
+ * byte is on (e.g., 0xffffff00). This exposed a bug in the interpol macro
+ * that resulted in distorted colors for the smooth coloring modes.
+ * If the interpol macro is applied to such a mask, it causes an overflow
+ * of the 32-bit int, and the left-most color byte is lost.
+ *
+ * I added shiftinterpol macro to handle such masks. It shifts everything 1
+ * byte to the right, performs the calculation, and then shifts everything
+ * back 1 byte to the left when it is done.
+ *
+ * I also created the safeinterpol macro which detects if the most
+ * signficant byte in the mask is on, and uses the shiftinterpol macro if
+ * so, or the orignal interpol macro if not.
+ *
+ * I then modified the interpoltype macro to use the safeinterpol macro
+ * instead of the interpol macro directly.
+ */
+#define shiftinterpol(i1,i2,n,mr,mg,mb) (interpol((i1)>>8,(i2)>>8,n,(mr)>>8,(mg)>>8,(mb)>>8)<<8)
+#define safeinterpol(i1,i2,n,mr,mg,mb) ((((mr)|(mg)|(mb))&0xff000000)?shiftinterpol(i1,i2,n,mr,mg,mb):interpol(i1,i2,n,mr,mg,mb))
+#define interpoltype(palette,i1,i2,n) ((palette).type==GRAYSCALE || (palette).type == LARGEITER?intergray(i1,i2,n):safeinterpol(i1,i2,n,(palette).info.truec.rmask,(palette).info.truec.gmask,(palette).info.truec.bmask))
+/*palette flags */
+#define UNKNOWNENTRIES 1
+#define DONOTCHANGE 2
+#define FINISHLATER 4
+#define UNFINISHED 8
+/*image flags */
+#define FREELINES 1
+#define FREEDATA 2
+#define AAIMAGE 4
+#define PROTECTBUFFERS 8
+/*palette types supported by most of engine*/
+#define C256 1
+#define GRAYSCALE 2
+#define TRUECOLOR16 4
+#define TRUECOLOR24 8
+#define TRUECOLOR 16
+/*special mage types used internaly by XaoS */
+#define LARGEITER 32
+#define SMALLITER 64
+
+/*palette types handled by the dithering filter*/
+#define LBITMAP 256
+#define MBITMAP 512
+#define LIBITMAP 1024
+#define MIBITMAP 2048
+#define FIXEDCOLOR 4096
+
+#define ALLMASK (C256|TRUECOLOR16|TRUECOLOR24|LARGEITER|GRAYSCALE)
+#define BITMAPS (LBITMAP|MBITMAP|LIBITMAP|MIBITMAP)
+#define MASK1BPP (SMALLITER|C256|GRAYSCALE)
+#define MASK2BPP (TRUECOLOR16|LARGEITER)
+#define MASK3BPP (TRUECOLOR24)
+#define MASK4BPP (TRUECOLOR)
+
+/*flags for requirements */
+#define IMAGEDATA 1
+#define TOUCHIMAGE 2
+#define NEWIMAGE 4
+/*flags for initdata */
+#define DATALOST 1
+/*flags for doit */
+#define INTERRUPTIBLE 1
+#define PALETTEONLY 2
+/*return flags */
+#define INEXACT 1
+#define CHANGED 2
+#define ANIMATION 4
+#define UNCOMPLETTE (1<<29)
+/*flags for filters */
+#define ALLOCEDIMAGE 1 /*used by inherimage mechanizm */
+#define SHAREDDATA 2
+
+#define PALGORITHMS 3
+#ifdef _plan9_
+#undef pixel32_t
+#undef pixel8_t
+#undef pixel16_t
+#define pixel32_t unsigned int
+#define pixel16_t unsigned short
+#define pixel8_t unsigned char
+#undef ppixel8_t
+#undef ppixel16_t
+#undef ppixel24_t
+#undef ppixel32_t
+#define ppixel8_t pixel8_t *
+#define ppixel16_t pixel16_t *
+#define ppixel24_t unsigned char *
+#define ppixel32_t pixel32_t *
+#else
+#include <pixel_t.h> /*avoid problems with plan9-it ignores #if
+ So code must be separated into another file */
+#endif
+#define imgetpixel(image,x,y) ((image)->bytesperpixel==1?(image)->currlines[y][x]:((image)->bytesperpixel==4?((pixel32_t*)(image)->currlines[y])[x]:(image)->bytesperpixel==3?(((pixel16_t *)(image)->currlines[y])[x]+((image)->currlines[y][3*(x)+2]<<16)):(((pixel16_t*)(image)->currlines[y])[x])))
+ struct requirements {
+ int nimages;
+ int supportedmask;
+ int flags;
+ };
+ struct filter {
+ struct filter *next, *previous;
+ struct queue *queue;
+ CONST struct filteraction *action;
+ struct image *image, *childimage;
+ struct requirements req;
+ struct fractal_context *fractalc;
+ void *data;
+ CONST char *name;
+ int flags;
+ int imageversion; /*For detection whether image changed or not */
+ void (*wait_function) (struct filter * f);
+ /*stuff for wait_function */
+ int pos, max, incalculation, readyforinterrupt, interrupt;
+ CONST char *pass;
+ };
+ struct initdata {
+ void (*wait_function) (struct filter * f);
+ struct image *image;
+ struct fractal_context *fractalc;
+ int flags;
+ };
+ struct filteraction {
+ CONST char *name;
+ CONST char *shortname;
+ int flags;
+ struct filter *(*getinstance) (CONST struct filteraction * a);
+ void (*destroyinstance) (struct filter * f);
+ int (*doit) (struct filter * f, int flags, int time);
+ int (*requirement) (struct filter * f, struct requirements * r);
+ int (*initialize) (struct filter * f, struct initdata * i);
+ void (*convertup) (struct filter * f, int *x, int *y);
+ void (*convertdown) (struct filter * f, int *x, int *y);
+ void (*removefilter) (struct filter * f);
+ };
+ struct queue {
+ struct filter *first, *last;
+ int isinitialized;
+ struct filter *palettechg;
+ struct image *saveimage;
+ };
+
+
+#define datalost(f,i) (((i)->flags&DATALOST)||((f)->imageversion&&(f)->imageversion!=(i)->image->version))
+/*filter actions */
+
+ extern unsigned int col_diff[3][512];
+ struct filter *createfilter(CONST struct filteraction *fa);
+ struct queue *create_queue(struct filter *f);
+ void insertfilter(struct filter *f1, struct filter *f2);
+ void removefilter(struct filter *f);
+ void addfilter(struct filter *f1, struct filter *f2);
+ int initqueue(struct queue *q);
+
+/*Filter utility functions */
+ int reqimage(struct filter *f, struct requirements *req,
+ int supportedmask, int flags);
+ int inherimage(struct filter *f, struct initdata *data, int flags,
+ int width, int height, struct palette *palette,
+ float pixelwidth, float pixelheight);
+ void destroyinheredimage(struct filter *f);
+ void updateinheredimage(struct filter *f);
+
+ void inhermisc(struct filter *f, CONST struct initdata *i);
+
+/*image actions */
+
+ void flipgeneric(struct image *img);
+ struct image *create_image_lines(int width, int height,
+ int nimages, pixel_t ** lines1,
+ pixel_t ** lines2,
+ struct palette *palette,
+ void (*flip) (struct image * img),
+ int flags, float pixelwidth,
+ float pixelheight);
+ struct image *create_image_cont(int width, int height,
+ int scanlinesize, int nimages,
+ pixel_t * buf1, pixel_t * buf2,
+ struct palette *palette,
+ void (*flip) (struct image * img),
+ int flags, float pixelwidth,
+ float pixelheight);
+ struct image *create_image_mem(int width, int height, int nimages,
+ struct palette *palette,
+ float pixelwidth, float pixelheight);
+ struct image *create_subimage(struct image *simg, int width,
+ int height, int nimages,
+ struct palette *palette,
+ float pixelwidth, float pixelheight);
+
+ void destroy_image(struct image *img);
+ void clear_image(struct image *img);
+
+/*palette */
+
+ int bytesperpixel(int type) CONSTF;
+ void bestfit_init(void);
+ struct palette *createpalette(int start, int end, int type, int flags,
+ int maxentries,
+ int (*alloccolor) (struct palette * pal,
+ int init, int r,
+ int g, int b),
+ void (*setcolor) (struct palette * pal,
+ int start, int end,
+ rgb_t * rgb),
+ void (*allocfinished) (struct palette *
+ pal),
+ void (*cyclecolors) (struct palette *
+ pal, int direction),
+ union paletteinfo *info);
+ void destroypalette(struct palette *palette);
+ int mkdefaultpalette(struct palette *palette);
+ int mkstereogrampalette(struct palette *palette);
+ int mkstarfieldpalette(struct palette *palette);
+ int mkblurpalette(struct palette *palette);
+ int mkgraypalette(struct palette *palette);
+ int mkrgb(struct palette *palette);
+ int mkpalette(struct palette *palette, int seed, int algorithm);
+ int shiftpalette(struct palette *palette, int n);
+ void preallocpalette(struct palette *pal);
+ struct palette *clonepalette(struct palette *palette);
+ void restorepalette(struct palette *dest, struct palette *src);
+ void convertupgeneric(struct filter *f, int *x, int *y);
+ void convertdowngeneric(struct filter *f, int *x, int *y);
+ int fixedalloccolor(struct palette *palette, int init, int r, int g,
+ int b) CONSTF;
+
+#define setfractalpalette(f,p) if((f)->fractalc->palette==(f)->image->palette) (f)->fractalc->palette=(p)
+
+#ifdef STRUECOLOR24
+#define TRUECOLOR24CASE(x) case 3:x;break;
+#else
+#define TRUECOLOR24CASE(x)
+#endif
+
+#ifdef STRUECOLOR16
+#define SUPPORT16
+#endif
+#ifdef SUPPORT16
+#define TRUECOLOR16CASE(x) case 2:x;break;
+#else
+#define TRUECOLOR16CASE(x)
+#endif
+
+#define drivercall(i,x1,x2,x3,x4) switch((i).bytesperpixel) { \
+ TRUECOLOR24CASE(x3); \
+ TRUECOLOR16CASE(x2); \
+ case 1:x1;break; \
+ case 4:x4; \
+}
+#ifdef SMBITMAPS
+#define SBITMAPS
+#else
+#ifdef SLBITMAPS
+#define SBITMAPS
+#endif
+#endif
+
+#ifdef SBITMAPS
+#define SCONVERTORS
+#else
+#ifdef SFIXEDCOLOR
+#define SCONVERTORS
+#endif
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#include "formulas.h"
+#endif
diff --git a/src/include/formulas.h b/src/include/formulas.h
new file mode 100644
index 0000000..4a061cc
--- /dev/null
+++ b/src/include/formulas.h
@@ -0,0 +1,64 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef FORMULAS_H
+#define FORMULAS_H
+
+#include <config.h>
+#include <fractal.h>
+
+#ifdef SFFE_USING
+#include "sffe.h"
+#ifdef SFFE_CMPLX_ASM
+#include "sffe_cmplx_asm.h"
+#elif SFFE_CMPLX_GSL
+#include "sffe_cmplx_gsl.h"
+#endif
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#ifdef SFFE_USING
+ /*extern sffe* parser;
+ extern sffe* pinit; */
+ extern cmplx Z;
+ extern cmplx pZ;
+ extern cmplx C;
+#endif
+
+#define MAX_LAMBDA 2
+
+
+#define FORMULAMAGIC 1121
+
+ extern CONST char *CONST incolorname[];
+ extern CONST struct formula formulas[];
+ extern CONST char *CONST outcolorname[];
+ extern CONST char *CONST tcolorname[];
+ extern CONST int nformulas;
+ extern CONST int nmformulas;
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* FORMULAS_H */
diff --git a/src/include/fractal.h b/src/include/fractal.h
new file mode 100644
index 0000000..188ac8d
--- /dev/null
+++ b/src/include/fractal.h
@@ -0,0 +1,170 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef FRACTAL1_H
+#define FRACTAL1_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "config.h"
+#include "fconfig.h"
+#define INCOLORING 11
+#define OUTCOLORING 11
+#define TCOLOR 15
+
+ typedef struct {
+ number_t y0, k;
+ } symetrytype;
+
+ struct symetryinfo {
+ number_t xsym, ysym;
+ int nsymetries;
+ CONST symetrytype *symetry;
+ };
+ typedef struct {
+ number_t mc, nc;
+ number_t mi, ni;
+ } vrect;
+ typedef struct {
+ number_t cr, ci;
+ number_t rr, ri;
+ } vinfo;
+ typedef unsigned int (*iterationfunc) (number_t, number_t, number_t,
+ number_t) CONSTF REGISTERS(3);
+ struct formula {
+ int magic;
+#ifndef SLOWFUNCPTR
+ iterationfunc calculate, calculate_periodicity, smooth_calculate,
+ smooth_calculate_periodicity;
+#endif
+ void (*calculate_julia) (struct image * img, register number_t pre,
+ register number_t pim);
+ CONST char *name[2];
+ CONST char *shortname;
+ vinfo v;
+ int hasperiodicity;
+ int mandelbrot;
+ number_t pre, pim;
+ struct symetryinfo (out[OUTCOLORING + 1]);
+ struct symetryinfo (in[INCOLORING + 1]);
+ int flags;
+ };
+
+ struct fractal_context {
+ number_t pre, pim;
+ number_t bre, bim;
+ CONST struct formula *currentformula;
+ number_t angle;
+ int periodicity;
+ unsigned int maxiter;
+ number_t bailout;
+ int coloringmode, incoloringmode;
+ int intcolor, outtcolor;
+ int mandelbrot;
+ int plane;
+ int version;
+ int range;
+ float windowwidth, windowheight;
+ vinfo s;
+ vrect rs;
+ number_t sin, cos;
+ int slowmode; /* 1 in case we want to be exact, not fast */
+ /*values temporary filled by set_fractal_context */
+ iterationfunc calculate[2];
+ number_t periodicity_limit;
+ struct palette *palette; /*fractal's palette */
+ };
+ typedef struct fractal_context fractal_context;
+ typedef struct {
+ double y0, k, kk, y0k;
+ } symetry2;
+
+ struct symetryinfo2 {
+ number_t xsym, ysym;
+ int nsymetries;
+ symetry2 *symetry;
+ number_t xmul, ymul, xdist, ydist;
+ };
+#define STARTZERO 1
+#define JULIA_BTRACE 2
+#define MANDEL_BTRACE 4
+
+#ifdef SFFE_USING
+#define SFFE_FRACTAL 8
+#endif
+
+#define BTRACEOK ((cformula.flags&(2<<cfractalc.mandelbrot))&&!cfractalc.incoloringmode&&cfractalc.coloringmode!=7)
+#define rotate(f,x,y) { \
+ number_t tmp; \
+ tmp=(x)*(f).cos-(y)*(f).sin; \
+ y=(x)*(f).sin+(y)*(f).cos; \
+ x=tmp; \
+}
+#define rotateback(f,x,y) { \
+ number_t tmp; \
+ tmp=(x)*(f).cos+(y)*(f).sin; \
+ y=-(x)*(f).sin+(y)*(f).cos; \
+ x=tmp; \
+}
+
+ extern struct symetryinfo2 cursymetry;
+ extern struct fractal_context cfractalc;
+ extern struct formula cformula;
+ extern struct palette cpalette;
+ extern struct image cimage;
+
+#ifdef STATISTICS
+/*This is an statistics variables printed from various parts
+ *of XaoS.
+ */
+ extern int nadded2, nsymetry2, nskipped2;
+ extern int tocalculate2, avoided2, frames2;
+ extern int ncalculated2, ninside2;
+ extern int niter2, niter1;
+ extern int nperi;
+
+
+ extern int iters2, guessed2, unguessed2, total2;
+
+#endif
+
+ void set_formula(fractal_context *, int);
+ void set_fractalc(fractal_context *, struct image *img);
+ void fractalc_resize_to(fractal_context *, float, float);
+ void update_view(fractal_context *);
+ void free_fractalc(fractal_context *);
+ fractal_context *make_fractalc(CONST int, float, float);
+ void speed_test(fractal_context *, struct image *img);
+ unsigned int calculateswitch(register number_t x1,
+ register number_t y1,
+ register number_t x2,
+ register number_t y2,
+ int periodicity) REGISTERS(3);
+
+/* needs struct formula */
+#include <formulas.h>
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* FRACTAL_H */
diff --git a/src/include/gccaccel.h b/src/include/gccaccel.h
new file mode 100644
index 0000000..cd08fb4
--- /dev/null
+++ b/src/include/gccaccel.h
@@ -0,0 +1,40 @@
+/* GNU C accelerators */
+#if defined (__GNUC__)
+#define myfabs(x) fabs(x)
+#if __GNUC__ >= 2 && (__GNUC__ > 2 || __GNUC_MINOR__ >= 95)
+#define __GNUC__EGCS
+#endif
+#if __GNUC__ >= 2 && (__GNUC__ > 2 || __GNUC_MINOR__ > 7)
+#if __GNUC__ >= 2 && (__GNUC__ > 2 || __GNUC_MINOR__ >= 95)
+#define RESTRICT __restrict__
+#endif
+#define CONSTF __attribute__ ((__const__))
+#if __GNUC__ >= 3
+#define PUREF __attribute__ ((__pure__))
+#endif
+#define NORETURN __attribute__ ((__noreturn__))
+#ifdef __i386__
+#ifndef NOREGISTERS
+#define REGISTERS(n) __attribute__ ((__regparm__(n)))
+#endif /*NOREGISTERS*/
+#endif /*__i386__ */
+#endif /*version */
+#endif /*__GNUC__*/
+#ifndef RESTRICT
+#define RESTRICT
+#endif
+#ifndef CONSTF
+#define CONSTF
+#endif
+#ifndef PUREF
+#define PUREF
+#endif
+#ifndef NORETURN
+#define NORETURN
+#endif
+#ifndef REGISTERS
+#define REGISTERS(n)
+#endif
+#ifndef myfabs
+#define myfabs(x) ((x)>0?(x):-(x))
+#endif
diff --git a/src/include/gccbuild.h b/src/include/gccbuild.h
new file mode 100644
index 0000000..11601c9
--- /dev/null
+++ b/src/include/gccbuild.h
@@ -0,0 +1,65 @@
+/* BUGS:
+ * bellow gcc 2.7.2 builtins are not supported
+ * gcc 2.7.2.x don't inline long doubles
+ * egcc 1.0.1 crash in constant propagation when certain builtins are enabled
+ */
+
+
+#ifndef __GCCBUILD
+#define __GCCBUILD
+#if defined(__GLIBC__)
+#include "math.h"
+#else
+#if defined(__GNUC__) && defined(__i386__) && defined(__OPTIMIZE__)
+#if 0
+#include "i386/__math.h"
+#endif
+#endif
+#endif
+
+/* We really want to use builtins. Avoid any defines */
+#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 7))
+#define __HAVE_FABSL
+#define __fabsl(x) __builtin_fabsl(x)
+#define __fabs(x) __builtin_fabsl(x)
+#define __fabsf(x) __builtin_fabsf(x)
+#define sin(x) __builtin_sin(x)
+#define cos(x) __builtin_cos(x)
+#endif
+
+
+#include "aconfig.h"
+
+#ifndef __HAVE_FABSL
+#ifdef HAVE_FABSL
+#define __fabsl fabsl
+#define __HAVE_FABSL
+#else
+#ifdef HAVE__FABSL
+#define __fabsl _fabsl
+#define __HAVE_FABSL
+#else
+#ifdef HAVE___FABSL
+#define __HAVE___FABSL
+#endif
+#endif
+#endif
+#endif
+
+/* GCC 2.7.x have problems with long double inlines. Disable them! */
+#if defined __GNUC__ && (__GNUC__ == 2 && __GNUC_MINOR__ <= 7)
+#undef __HAVE_FABSL
+#endif
+
+#ifdef HAVE_LONG_DOUBLE
+#ifndef __HAVE_FABSL
+#define myabs(x) ((x)>0?(x):-(x))
+#else
+#define myabs(x) __fabsl((number_t)(x))
+#endif
+#else
+#define myabs(x) fabs((number_t)(x))
+#endif
+
+
+#endif /*gccbuild */
diff --git a/src/include/generic.h b/src/include/generic.h
new file mode 100644
index 0000000..b4f1cee
--- /dev/null
+++ b/src/include/generic.h
@@ -0,0 +1,15 @@
+#undef p_set
+#undef p_get
+#undef p_setp
+#undef bpp1
+#undef p_getp
+#undef p_add
+#undef p_inc
+#undef p_copy
+#define p_set(ptr,val) (*(ptr)=(val))
+#define p_get(ptr) (*(ptr))
+#define p_setp(ptr,pos,val) ((ptr)[(pos)]=(val))
+#define p_getp(ptr,pos) ((ptr)[(pos)])
+#define p_add(ptr,val) ((ptr)+(val))
+#define p_inc(ptr,val) ((ptr)+=(val))
+#define p_copy(ptr1,val1,ptr2,val2) ((ptr1)[val1]=(ptr2)[val2])
diff --git a/src/include/grlib.h b/src/include/grlib.h
new file mode 100644
index 0000000..288b0dd
--- /dev/null
+++ b/src/include/grlib.h
@@ -0,0 +1,40 @@
+#ifndef _TEXT_H
+#define _TEXT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+ extern CONST struct xfont {
+ CONST unsigned char *data;
+ int width, height, realwidth, encoding;
+ } xsmallfont, xbigfont, xbigfont2, xaafont, xsmallfontil1, xbigfontil1,
+ xmedfontil1, xbigfont3;
+ int xiconv(int encoding, char *out, int *outlen, const char *in,
+ int *inlen);
+ int xprint(struct image *image, CONST struct xfont *current, int x,
+ int y, CONST char *text, int fgcolor,
+ int bgcolor, int mode);
+#define TEXT_PRESSED 1
+/*
+#define xtextheight(font) ((font)->height+1)
+#define xtextcharw(font,c) ((font)->width)
+ */
+ int xtextwidth(CONST struct xfont *font, CONST char *text);
+ int xtextheight(CONST struct xfont *font);
+ int xtextcharw(CONST struct xfont *font, CONST char c);
+ void xrectangle(struct image *image, int x, int y, int width,
+ int height, int fgcolor);
+ void xvline(struct image *image, int x, int y, int height,
+ int fgcolor);
+ void xhline(struct image *image, int x, int y, int width, int fgcolor);
+ char *xsaveline(struct image *img, int x1, int y1, int x2, int y2);
+ void xrestoreline(struct image *img, char *data, int x1, int y1,
+ int x2, int y2);
+ void xline(struct image *img, int x1, int y1, int x2, int y2,
+ int color);
+ void xprepareimage(struct image *img);
+ void xdrawcursor(struct image *img, int x, int y, int color,
+ int height);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/hicolor.h b/src/include/hicolor.h
new file mode 100644
index 0000000..4807190
--- /dev/null
+++ b/src/include/hicolor.h
@@ -0,0 +1,16 @@
+#ifdef cpixel_t
+#undef cpixel_t
+#undef cpixeldata_t
+#undef cppixel_t
+#undef bpp
+#undef UNSUPPORTED
+#undef bpp1
+#endif
+#ifndef SUPPORT16
+#define UNSUPPORTED
+#endif
+#define cpixel_t pixel16_t
+#define cpixeldata_t pixel16_t
+#define cppixel_t ppixel16_t
+#define bpp 4
+#include <generic.h>
diff --git a/src/include/i386/__math.h b/src/include/i386/__math.h
new file mode 100644
index 0000000..0274d52
--- /dev/null
+++ b/src/include/i386/__math.h
@@ -0,0 +1,586 @@
+/* Inline math functions for i387.
+ Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by John C. Bowman <bowman@math.ualberta.ca>, 1995.
+
+ The GNU C Library 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 2 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public
+ License along with the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+
+#ifndef __GLIBC__
+#ifdef __cplusplus
+# define __MATH_INLINE __inline
+#else
+# define __MATH_INLINE extern __inline
+#endif
+
+#ifndef ____MATH_H
+#define ____MATH_H
+
+
+#if defined __USE_ISOC9X && defined __GNUC__ && __GNUC__ >= 2
+/* ISO C 9X defines some macros to perform unordered comparisons. The
+ ix87 FPU supports this with special opcodes and we should use them.
+ These must not be inline functions since we have to be able to handle
+ all floating-point types. */
+# ifdef __i686__
+/* For the PentiumPro and more recent processors we can provide
+ better code. */
+# define isgreater(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucomip %%st(1), %%st; seta %%al" \
+ : "=a" (__result) : "u" (y), "t" (x) : "cc", "st"); \
+ __result; })
+# define isgreaterequal(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucomip %%st(1), %%st; setae %%al" \
+ : "=a" (__result) : "u" (y), "t" (x) : "cc", "st"); \
+ __result; })
+
+# define isless(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucomip %%st(1), %%st; seta %%al" \
+ : "=a" (__result) : "u" (x), "t" (y) : "cc", "st"); \
+ __result; })
+
+# define islessequal(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucomip %%st(1), %%st; setae %%al" \
+ : "=a" (__result) : "u" (x), "t" (y) : "cc", "st"); \
+ __result; })
+
+# define islessgreater(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucomip %%st(1), %%st; setne %%al" \
+ : "=a" (__result) : "u" (y), "t" (x) : "cc", "st"); \
+ __result; })
+
+# define isunordered(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucomip %%st(1), %%st; setp %%al" \
+ : "=a" (__result) : "u" (y), "t" (x) : "cc", "st"); \
+ __result; })
+# else
+/* This is the dumb, portable code for i386 and above. */
+# define isgreater(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucompp; fnstsw; testb $0x45, %%ah; setz %%al" \
+ : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
+ __result; })
+
+# define isgreaterequal(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucompp; fnstsw; testb $0x05, %%ah; setz %%al" \
+ : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
+ __result; })
+
+# define isless(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucompp; fnstsw; testb $0x45, %%ah; setz %%al" \
+ : "=a" (__result) : "u" (x), "t" (y) : "cc", "st", "st(1)"); \
+ __result; })
+
+# define islessequal(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucompp; fnstsw; testb $0x05, %%ah; setz %%al" \
+ : "=a" (__result) : "u" (x), "t" (y) : "cc", "st", "st(1)"); \
+ __result; })
+
+# define islessgreater(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucompp; fnstsw; testb $0x44, %%ah; setz %%al" \
+ : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
+ __result; })
+
+# define isunordered(x, y) \
+ ({ register char __result; \
+ __asm__ ("fucompp; fnstsw; sahf; setp %%al" \
+ : "=a" (__result) : "u" (y), "t" (x) : "cc", "st", "st(1)"); \
+ __result; })
+# endif /* __i686__ */
+
+/* Test for negative number. Used in the signbit() macro. */
+__MATH_INLINE int __signbitf(float __x)
+{
+ union {
+ float __f;
+ int __i;
+ } __u = {
+ __f:__x};
+ return __u.__i < 0;
+}
+
+__MATH_INLINE int __signbit(double __x)
+{
+ union {
+ double __d;
+ int __i[2];
+ } __u = {
+ __d:__x};
+ return __u.__i[1] < 0;
+}
+
+__MATH_INLINE int __signbitl(long double __x)
+{
+ union {
+ long double __l;
+ int __i[3];
+ } __u = {
+ __l:__x};
+ return (__u.__i[2] & 0x8000) != 0;
+}
+#endif
+
+
+/* The gcc, version 2.7 or below, has problems with all this inlining
+ code. So disable it for this version of the compiler. */
+#if defined __GNUC__ && (__GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 7))
+
+#if ((!defined __NO_MATH_INLINES || defined __LIBC_INTERNAL_MATH_INLINES) \
+ && defined __OPTIMIZE__)
+
+/* A macro to define float, double, and long double versions of various
+ math functions for the ix87 FPU. FUNC is the function name (which will
+ be suffixed with f and l for the float and long double version,
+ respectively). OP is the name of the FPU operation. */
+
+#if defined __USE_MISC || defined __USE_ISOC9X
+# define __inline_mathop(func, op) \
+ __inline_mathop_ (double, func, op) \
+ __inline_mathop_ (float, __CONCAT(func,f), op) \
+ __inline_mathop_ (long double, __CONCAT(func,l), op)
+#else
+# define __inline_mathop(func, op) \
+ __inline_mathop_ (double, func, op)
+#endif
+
+#define __inline_mathop_(float_type, func, op) \
+ __inline_mathop_decl_ (float_type, func, op, "0" (__x))
+
+
+#if defined __USE_MISC || defined __USE_ISOC9X
+# define __inline_mathop_decl(func, op, params...) \
+ __inline_mathop_decl_ (double, func, op, params) \
+ __inline_mathop_decl_ (float, __CONCAT(func,f), op, params) \
+ __inline_mathop_decl_ (long double, __CONCAT(func,l), op, params)
+#else
+# define __inline_mathop_decl(func, op, params...) \
+ __inline_mathop_decl_ (double, func, op, params)
+#endif
+
+#define __inline_mathop_decl_(float_type, func, op, params...) \
+ __MATH_INLINE float_type func (float_type); \
+ __MATH_INLINE float_type func (float_type __x) \
+ { \
+ register float_type __result; \
+ __asm __volatile__ (op : "=t" (__result) : params); \
+ return __result; \
+ }
+
+
+#if defined __USE_MISC || defined __USE_ISOC9X
+# define __inline_mathcode(func, arg, code) \
+ __inline_mathcode_ (double, func, arg, code) \
+ __inline_mathcode_ (float, __CONCAT(func,f), arg, code) \
+ __inline_mathcode_ (long double, __CONCAT(func,l), arg, code)
+# define __inline_mathcode2(func, arg1, arg2, code) \
+ __inline_mathcode2_ (double, func, arg1, arg2, code) \
+ __inline_mathcode2_ (float, __CONCAT(func,f), arg1, arg2, code) \
+ __inline_mathcode2_ (long double, __CONCAT(func,l), arg1, arg2, code)
+# define __inline_mathcode3(func, arg1, arg2, arg3, code) \
+ __inline_mathcode3_ (double, func, arg1, arg2, arg3, code) \
+ __inline_mathcode3_ (float, __CONCAT(func,f), arg1, arg2, arg3, code) \
+ __inline_mathcode3_ (long double, __CONCAT(func,l), arg1, arg2, arg3, code)
+#else
+# define __inline_mathcode(func, arg, code) \
+ __inline_mathcode_ (double, func, (arg), code)
+# define __inline_mathcode2(func, arg1, arg2, code) \
+ __inline_mathcode2_ (double, func, arg1, arg2, code)
+# define __inline_mathcode3(func, arg1, arg2, arg3, code) \
+ __inline_mathcode3_ (double, func, arg1, arg2, arg3, code)
+#endif
+
+#define __inline_mathcode_(float_type, func, arg, code) \
+ __MATH_INLINE float_type func (float_type); \
+ __MATH_INLINE float_type func (float_type arg) \
+ { \
+ code; \
+ }
+
+#define __inline_mathcode2_(float_type, func, arg1, arg2, code) \
+ __MATH_INLINE float_type func (float_type, float_type); \
+ __MATH_INLINE float_type func (float_type arg1, float_type arg2) \
+ { \
+ code; \
+ }
+
+#define __inline_mathcode3_(float_type, func, arg1, arg2, arg3, code) \
+ __MATH_INLINE float_type func (float_type, float_type, float_type); \
+ __MATH_INLINE float_type func (float_type arg1, float_type arg2, \
+ float_type arg3) \
+ { \
+ code; \
+ }
+#endif
+
+
+#if !defined __NO_MATH_INLINES && defined __OPTIMIZE__
+/* Miscellaneous functions */
+
+__inline_mathcode(__sgn, __x,
+ return __x == 0.0 ? 0.0 : (__x > 0.0 ? 1.0 : -1.0))
+ __inline_mathcode(__pow2, __x,
+ register long double __value;
+ register long double __exponent;
+ __extension__ long long int __p = (long long int)__x;
+ if (__x == (long double) __p)
+ {
+__asm __volatile__("fscale": "=t"(__value):"0"(1.0), "u"(__x));
+ return
+ __value;}
+__asm __volatile__("fld %%st(0)\n\t" "frndint # int(x)\n\t" "fxch\n\t" "fsub %%st(1) # fract(x)\n\t" "f2xm1 # 2^(fract(x)) - 1\n\t": "=t"(__value), "=u"(__exponent): "0"(__x)); __value += 1.0; __asm __volatile__("fscale": "=t"(__value):"0"(__value), "u"(__exponent));
+ return
+ __value)
+#define __sincos_code \
+ register long double __cosr; \
+ register long double __sinr; \
+ __asm __volatile__ \
+ ("fsincos\n\t" \
+ "fnstsw %%ax\n\t" \
+ "testl $0x400, %%eax\n\t" \
+ "jz 1f\n\t" \
+ "fldpi\n\t" \
+ "fadd %%st(0)\n\t" \
+ "fxch %%st(1)\n\t" \
+ "2: fprem1\n\t" \
+ "fnstsw %%ax\n\t" \
+ "testl $0x400, %%eax\n\t" \
+ "jnz 2b\n\t" \
+ "fstp %%st(1)\n\t" \
+ "fsincos\n\t" \
+ "1:" \
+ : "=t" (__cosr), "=u" (__sinr) : "0" (__x)); \
+ *__sinx = __sinr; \
+ *__cosx = __cosr
+
+ __MATH_INLINE void __sincos(double __x, double *__sinx,
+ double *__cosx);
+__MATH_INLINE void __sincos(double __x, double *__sinx, double *__cosx)
+{
+ __sincos_code;
+}
+
+__MATH_INLINE void __sincosf(float __x, float *__sinx, float *__cosx);
+__MATH_INLINE void __sincosf(float __x, float *__sinx, float *__cosx)
+{
+ __sincos_code;
+}
+
+__MATH_INLINE void __sincosl(long double __x, long double *__sinx,
+ long double *__cosx);
+__MATH_INLINE void
+__sincosl(long double __x, long double *__sinx, long double *__cosx)
+{
+ __sincos_code;
+}
+
+
+/* Optimized inline implementation, sometimes with reduced precision
+ and/or argument range. */
+
+#define __expm1_code \
+ register long double __value; \
+ register long double __exponent; \
+ register long double __temp; \
+ __asm __volatile__ \
+ ("fldl2e # e^x - 1 = 2^(x * log2(e)) - 1\n\t" \
+ "fmul %%st(1) # x * log2(e)\n\t" \
+ "fst %%st(1)\n\t" \
+ "frndint # int(x * log2(e))\n\t" \
+ "fxch\n\t" \
+ "fsub %%st(1) # fract(x * log2(e))\n\t" \
+ "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" \
+ "fscale # 2^(x * log2(e)) - 2^(int(x * log2(e)))\n\t" \
+ : "=t" (__value), "=u" (__exponent) : "0" (__x)); \
+ __asm __volatile__ \
+ ("fscale # 2^int(x * log2(e))\n\t" \
+ : "=t" (__temp) : "0" (1.0), "u" (__exponent)); \
+ __temp -= 1.0; \
+ return __temp + __value
+__inline_mathcode_(long double, __expm1l, __x, __expm1_code)
+#define __exp_code \
+ register long double __value; \
+ register long double __exponent; \
+ __asm __volatile__ \
+ ("fldl2e # e^x = 2^(x * log2(e))\n\t" \
+ "fmul %%st(1) # x * log2(e)\n\t" \
+ "fst %%st(1)\n\t" \
+ "frndint # int(x * log2(e))\n\t" \
+ "fxch\n\t" \
+ "fsub %%st(1) # fract(x * log2(e))\n\t" \
+ "f2xm1 # 2^(fract(x * log2(e))) - 1\n\t" \
+ : "=t" (__value), "=u" (__exponent) : "0" (__x)); \
+ __value += 1.0; \
+ __asm __volatile__ \
+ ("fscale" \
+ : "=t" (__value) : "0" (__value), "u" (__exponent)); \
+ return __value
+__inline_mathcode(exp, __x, __exp_code) __inline_mathcode_(long double, __expl, __x, __exp_code) __inline_mathcode(tan, __x, register long double __value; register long double __value2 __attribute__ ((__unused__)); __asm __volatile__("fptan": "=t"(__value2), "=u"(__value):"0"(__x)); return __value)
+#define __atan2_code \
+ register long double __value; \
+ __asm __volatile__ \
+ ("fpatan\n\t" \
+ : "=t" (__value) : "0" (__x), "u" (__y) : "st(1)"); \
+ return __value
+ __inline_mathcode2(atan2, __y, __x,
+ __atan2_code) __inline_mathcode2_(long double, __atan2l,
+ __y, __x,
+ __atan2_code)
+__inline_mathcode2(fmod, __x, __y, register long double __value; __asm __volatile__("1: fprem\n\t" "fnstsw %%ax\n\t" "sahf\n\t" "jp 1b": "=t"(__value): "0"(__x), "u"(__y):"ax", "cc"); return __value)
+ __inline_mathcode2(pow, __x, __y,
+ register long double __value;
+ register long double __exponent;
+ __extension__ long long int __p =
+ (long long int)__y; if (__x == 0.0 && __y > 0.0)
+ return 0.0; if (__y == (double) __p)
+ {
+ long double __r = 1.0;
+ if (__p == 0) return 1.0; if (__p < 0) {
+ __p = -__p; __x = 1.0 / __x;}
+ while (1) {
+ if (__p & 1)
+ __r *= __x;
+ __p >>= 1; if (__p == 0) return __r; __x *= __x;}
+ /* NOTREACHED */
+ }
+
+__asm __volatile__("fyl2x": "=t"(__value): "0"(__x), "u"(1.0): "st(1)"); __asm __volatile__("fmul %%st(1) # y * log2(x)\n\t" "fst %%st(1)\n\t" "frndint # int(y * log2(x))\n\t" "fxch\n\t" "fsub %%st(1) # fract(y * log2(x))\n\t" "f2xm1 # 2^(fract(y * log2(x))) - 1\n\t": "=t"(__value), "=u"(__exponent): "0"(__y), "1"(__value)); __value += 1.0; __asm __volatile__("fscale": "=t"(__value):"0"(__value), "u"(__exponent));
+ return
+ __value)
+
+
+ __inline_mathop(sqrt, "fsqrt")
+ __inline_mathop_(long double, __sqrtl, "fsqrt")
+#if defined __GNUC__ && (__GNUC__ > 2 || __GNUC__ == 2 && __GNUC_MINOR__ >= 8)
+ __inline_mathcode_(double, fabs, __x, return __builtin_fabs(__x))
+ __inline_mathcode_(float, fabsf, __x, return __builtin_fabsf(__x))
+ __inline_mathcode_(long double, fabsl, __x,
+ return __builtin_fabsl(__x))
+ __inline_mathcode_(long double, __fabsl, __x,
+ return __builtin_fabsl(__x))
+#else
+ __inline_mathop(fabs, "fabs")
+ __inline_mathop_(long double, __fabsl, "fabs")
+#endif
+/* The argument range of this inline version is reduced. */
+ __inline_mathop(sin, "fsin")
+/* The argument range of this inline version is reduced. */
+ __inline_mathop(cos, "fcos")
+ __inline_mathop(atan, "fld1; fpatan")
+ __inline_mathop(log, "fldln2; fxch; fyl2x")
+ __inline_mathop(log10, "fldlg2; fxch; fyl2x")
+ __inline_mathcode(asin, __x,
+ return __atan2l(__x,
+ __sqrtl(1.0 -
+ __x *
+ __x)))
+ __inline_mathcode(acos, __x,
+ return __atan2l(__sqrtl(1.0 - __x * __x),
+ __x)) __inline_mathcode_(long
+ double,
+ __sgn1l,
+ __x,
+ return
+ __x >=
+ 0.0 ?
+ 1.0 :
+ -1.0)
+/* The argument range of the inline version of sinhl is slightly reduced. */
+ __inline_mathcode(sinh, __x, register long double __exm1 =
+ __expm1l(__fabsl(__x));
+ return 0.5 * (__exm1 / (__exm1 + 1.0) +
+ __exm1) *
+ __sgn1l(__x)) __inline_mathcode(cosh, __x,
+ register long double
+ __ex = __expl(__x);
+ return 0.5 * (__ex +
+ 1.0 /
+ __ex))
+__inline_mathcode(tanh, __x, register long double __exm1 = __expm1l(-__fabsl(__x + __x)); return __exm1 / (__exm1 + 2.0) * __sgn1l(-__x)) __inline_mathcode(floor, __x, register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile("fnstcw %0":"=m"(__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0400;
+ /* rounding down */
+__asm __volatile("fldcw %0": : "m"(__cwtmp)); __asm __volatile("frndint": "=t"(__value): "0"(__x)); __asm __volatile("fldcw %0": : "m"(__cw)); return __value)
+__inline_mathcode(ceil, __x, register long double __value; __volatile unsigned short int __cw; __volatile unsigned short int __cwtmp; __asm __volatile("fnstcw %0":"=m"(__cw)); __cwtmp = (__cw & 0xf3ff) | 0x0800;
+ /* rounding up */
+__asm __volatile("fldcw %0": : "m"(__cwtmp)); __asm __volatile("frndint": "=t"(__value): "0"(__x)); __asm __volatile("fldcw %0": :"m"(__cw));
+ return
+ __value)
+#define __ldexp_code \
+ register long double __value; \
+ __asm __volatile__ \
+ ("fscale" \
+ : "=t" (__value) : "0" (__x), "u" ((long double) __y)); \
+ return __value
+__MATH_INLINE double ldexp(double __x, int __y);
+__MATH_INLINE double ldexp(double __x, int __y)
+{
+ __ldexp_code;
+}
+
+
+/* Optimized versions for some non-standardized functions. */
+#if defined __USE_ISOC9X || defined __USE_MISC
+
+__inline_mathcode(expm1, __x, __expm1_code)
+/* We cannot rely on M_SQRT being defined. So we do it for ourself
+ here. */
+# define __M_SQRT2 1.41421356237309504880L /* sqrt(2) */
+ __inline_mathcode(log1p, __x,
+ register long double __value;
+ if (__fabsl(__x) >= 1.0 - 0.5 * __M_SQRT2)
+ __value = logl(1.0 + __x);
+ else
+__asm __volatile__("fldln2\n\t" "fxch\n\t" "fyl2xp1": "=t"(__value):"0"(__x));
+ return
+ __value)
+
+
+/* The argument range of the inline version of asinhl is slightly reduced. */
+ __inline_mathcode(asinh, __x,
+ register long double __y = __fabsl(__x);
+ return (log1pl
+ (__y * __y /
+ (__sqrtl(__y * __y + 1.0) + 1.0) +
+ __y) *
+ __sgn1l(__x))) __inline_mathcode(acosh, __x,
+ return
+ logl(__x +
+ __sqrtl
+ (__x -
+ 1.0)
+ *
+ __sqrtl
+ (__x +
+ 1.0)))
+ __inline_mathcode(atanh, __x, register long double __y = __fabsl(__x);
+ return -0.5 * log1pl(-(__y + __y) / (1.0 + __y)) *
+ __sgn1l(__x))
+/* The argument range of the inline version of hypotl is slightly reduced. */
+__inline_mathcode2(hypot, __x, __y, return __sqrtl(__x * __x + __y * __y)) __inline_mathcode(logb, __x, register long double __value; register long double __junk; __asm __volatile__("fxtract\n\t": "=t"(__junk), "=u"(__value):"0"(__x)); return __value)
+#endif
+#ifdef __USE_ISOC9X
+ __inline_mathop(log2, "fld1; fxch; fyl2x")
+__MATH_INLINE float ldexpf(float __x, int __y);
+__MATH_INLINE float ldexpf(float __x, int __y)
+{
+ __ldexp_code;
+}
+
+__MATH_INLINE long double ldexpl(long double __x, int __y);
+__MATH_INLINE long double ldexpl(long double __x, int __y)
+{
+ __ldexp_code;
+}
+
+__inline_mathcode3(fma, __x, __y, __z, return (__x * __y) + __z)
+ __inline_mathop(rint, "frndint")
+#define __lrint_code \
+ long int __lrintres; \
+ __asm__ __volatile__ \
+ ("fistpl %0" \
+ : "=m" (__lrintres) : "t" (__x) : "st"); \
+ return __lrintres
+__MATH_INLINE long int lrintf(float __x)
+{
+ __lrint_code;
+}
+
+__MATH_INLINE long int lrint(double __x)
+{
+ __lrint_code;
+}
+
+__MATH_INLINE long int lrintl(long double __x)
+{
+ __lrint_code;
+}
+
+#undef __lrint_code
+
+#define __llrint_code \
+ long long int __llrintres; \
+ __asm__ __volatile__ \
+ ("fistpll %0" \
+ : "=m" (__llrintres) : "t" (__x) : "st"); \
+ return __llrintres
+__MATH_INLINE long long int llrintf(float __x)
+{
+ __llrint_code;
+}
+
+__MATH_INLINE long long int llrint(double __x)
+{
+ __llrint_code;
+}
+
+__MATH_INLINE long long int llrintl(long double __x)
+{
+ __llrint_code;
+}
+
+#undef __llrint_code
+
+#endif
+
+
+#ifdef __USE_MISC
+
+__inline_mathcode2(drem, __x, __y, register double __value; register int __clobbered; __asm __volatile__("1: fprem1\n\t" "fstsw %%ax\n\t" "sahf\n\t" "jp 1b": "=t"(__value), "=&a"(__clobbered): "0"(__x), "u"(__y):"cc"); return __value)
+/* This function is used in the `isfinite' macro. */
+#if 0
+__MATH_INLINE int __finite(double __x) __attribute__ ((__const__));
+__MATH_INLINE int __finite(double __x)
+{
+ return (__extension__(((((union {
+ double __d;
+ int __i[2];
+ }
+ ) {
+ __d: __x}
+ ).__i[1] | 0x800fffff) + 1) >> 31));
+}
+#endif
+
+/* Miscellaneous functions */
+
+__inline_mathcode(__coshm1, __x,
+ register long double __exm1 = __expm1l(__fabsl(__x));
+ return 0.5 * (__exm1 / (__exm1 + 1.0)) * __exm1)
+ __inline_mathcode(__acosh1p, __x,
+ return log1pl(__x + __sqrtl(__x) * __sqrtl(__x + 2.0)))
+#endif /* __USE_MISC */
+/* Undefine some of the large macros which are not used anymore. */
+#undef __expm1_code
+#undef __exp_code
+#undef __atan2_code
+#undef __sincos_code
+#endif /* __NO_MATH_INLINES */
+/* This code is used internally in the GNU libc. */
+#ifdef __LIBC_INTERNAL_MATH_INLINES
+__inline_mathop(__ieee754_sqrt, "fsqrt") __inline_mathcode2(__ieee754_atan2, __y, __x, register long double __value; __asm __volatile__("fpatan\n\t": "=t"(__value): "0"(__x), "u"(__y):"st(1)"); return __value;
+ )
+#endif
+#endif /* __GNUC__ */
+#endif
+#endif
diff --git a/src/include/i386/ctrl87.h b/src/include/i386/ctrl87.h
new file mode 100644
index 0000000..02b4490
--- /dev/null
+++ b/src/include/i386/ctrl87.h
@@ -0,0 +1,120 @@
+/*
+ * This file is part of ms-dos port for XaoS
+ * ctrl87.h
+ *
+ */
+
+
+#ifndef __CONTROL87_H__
+
+
+#define __CONTROL87_H__
+
+
+#ifdef __CONTROL87_C__
+#define EXTERN
+#else
+#define EXTERN extern
+#endif
+
+
+/* 8087/80287 Status Word format */
+
+#define SW_INVALID 0x0001 /* Invalid operation */
+#define SW_DENORMAL 0x0002 /* Denormalized operand */
+#define SW_ZERODIVIDE 0x0004 /* Zero divide */
+#define SW_OVERFLOW 0x0008 /* Overflow */
+#define SW_UNDERFLOW 0x0010 /* Underflow */
+#define SW_INEXACT 0x0020 /* Precision (Inexact result) */
+
+/* 8087/80287 Control Word format */
+
+#define MCW_EM 0x003f /* interrupt Exception Masks */
+#define EM_INVALID 0x0001 /* invalid */
+#define EM_DENORMAL 0x0002 /* denormal */
+#define EM_ZERODIVIDE 0x0004 /* zero divide */
+#define EM_OVERFLOW 0x0008 /* overflow */
+#define EM_UNDERFLOW 0x0010 /* underflow */
+#define EM_INEXACT 0x0020 /* inexact (precision) */
+
+#define MCW_IC 0x1000 /* Infinity Control */
+#define IC_AFFINE 0x1000 /* affine */
+#define IC_PROJECTIVE 0x0000 /* projective */
+
+#define MCW_RC 0x0c00 /* Rounding Control */
+#define RC_CHOP 0x0c00 /* chop */
+#define RC_UP 0x0800 /* up */
+#define RC_DOWN 0x0400 /* down */
+#define RC_NEAR 0x0000 /* near */
+
+#define MCW_PC 0x0300 /* Precision Control */
+#define PC_24 0x0000 /* 24 bits */
+#define PC_53 0x0200 /* 53 bits */
+#define PC_64 0x0300 /* 64 bits */
+
+/**************************************************************************/
+/************************* Type declarations **************************/
+/**************************************************************************/
+
+/**************************************************************************/
+/************************ Function declarations ***********************/
+/**************************************************************************/
+
+/*
+ _control87 changes floating-point control word.
+
+ Declaration:
+ ------------
+ unsigned short _control87(unsigned short newcw, unsigned short mask);
+
+ Remarks:
+ --------
+ _control87 retrieves or changes the floating-point control word.
+
+ The floating-point control word is an unsigned short that specifies the
+ following modes in the 80x87 FPU:
+ o allowed exceptions
+ o infinity mode
+ o rounding mode
+ o precision mode
+
+ Changing these modes allows you to mask or unmask floating-point exceptions.
+
+ _control87 matches the bits in mask to the bits in newcw.
+
+ If any mask bit = 1, the corresponding bit in newcw contains the new value
+ for the same bit in the floating-point control word.
+
+ If mask = 0000, _control87 returns the floating-point control word without
+ altering it.
+
+ Examples:
+ ---------
+ Switching to projective infinity mode:
+ _control87(IC_PROJECTIVE, MCW_IC);
+
+ Disabling all exceptions:
+ _control87(MCW_EM, MCW_EM);
+
+ Return Value:
+ -------------
+ The bits in the value returned reflect the new floating-point control word.
+*/
+EXTERN unsigned short _control87(unsigned short, unsigned short);
+
+
+/**************************************************************************/
+/************************** Global variables **************************/
+/**************************************************************************/
+
+
+
+#ifdef __CONTROL87_C__
+#else
+#endif
+
+
+#undef EXTERN
+
+
+#endif
diff --git a/src/include/i386/sstring.h b/src/include/i386/sstring.h
new file mode 100644
index 0000000..bd2dd2d
--- /dev/null
+++ b/src/include/i386/sstring.h
@@ -0,0 +1,414 @@
+#if 0
+#ifndef _I386_STRING_I486_H_
+#define _I386_STRING_I486_H_
+#if defined(__OPTIMIZE__) && defined(__GNUC__) && defined(__i386__)
+/*
+ * This string-include defines all string functions as inline
+ * functions. Use gcc. It also assumes ds=es=data space, this should be
+ * normal. Most of the string-functions are rather heavily hand-optimized,
+ * see especially strtok,strstr,str[c]spn. They should work, but are not
+ * very easy to understand. Everything is done entirely within the register
+ * set, making the functions fast and clean.
+ *
+ * Copyright (C) 1991, 1992 Linus Torvalds
+ * Revised and optimized for i486/pentium
+ * 1994/03/15 by Alberto Vignani/Davide Parodi @crf.it
+ *
+ * Split into 2 CPU specific files by Alan Cox to keep #ifdef noise down.
+ *
+ * Revised and optimized again by Jan Hubicka (1997/11/16)
+ * (please report bugs to hubicka@paru.cas.cz)
+ *
+ * memset and memcpy routines seems to be always faster at 486 and
+ * pentium but at pentium MMX they are sometimes bit slower (5-10%)..
+ * because of less strict register allocation they produces better code.
+ */
+
+
+#define __HAVE_ARCH_MEMCPY
+#define memcpy(d,s,count) \
+(__builtin_constant_p(count) ? \
+ __memcpy_c((d),(s),(count)) : \
+ __memcpy_g((d),(s),(count)))
+
+/*
+ * These ought to get tweaked to do some cache priming.
+ */
+
+
+/* This implementation of the memcpy is designed for moveoldpoints from
+ * mkrealloctables. It is expected to work well for both small and large
+ * sizes.
+ *
+ * Small (1-10) and meduim (300) sizes seems to be important for XaoS.
+ * So implementation is not super fast for large sizes, but my experiemnts
+ * don't show large improvements in speed anyway.
+ *
+ * We use rep movsX operations (they works well on PPro and don't seems to be
+ * so bad on Pentium) and expect cld operation to be set. Hope that it will
+ * not make problems.
+ *
+ * My attempt was to use c code where possible to let GCC do the
+ */
+extern inline void *__memcpy_g(void *to, const register void *from,
+ register size_t n);
+extern inline void *__memcpy_g(void *to, const register void *from,
+ register size_t n)
+{
+ register void *tmp = (void *) to;
+ if (n >= 7) {
+ register int c = (-(int) to) & 3;
+ n -= c;
+ __asm__ __volatile__( /*Align the destination */
+ "rep\n\tmovsb":"=c"(c), "=D"(tmp),
+ "=S"(from):"c"(c), "D"((long) tmp),
+ "S"((long) from):"memory");
+ c = n >> 2;
+ __asm__ __volatile__( /*Copy the main body */
+ "rep\n\tmovsl":"=c"(c), "=D"(tmp),
+ "=S"(from):"c"(c), "D"((long) tmp),
+ "S"((long) from):"memory");
+ n &= 3;
+ }
+ __asm__ __volatile__("rep\n\tmovsb":"=c"(n), "=D"(tmp),
+ "=S"(from):"c"(n), "D"((long) tmp),
+ "S"((long) from):"memory");
+ return (to);
+}
+
+/*
+ * This looks horribly ugly, but the compiler can optimize it totally,
+ * as the count is constant.
+ */
+
+#define COMMON(x) \
+__asm__ __volatile__ ( \
+ "\n.align 4\n" \
+ "1:\tmovl (%2),%0\n\t" \
+ "addl $4,%2\n\t" \
+ "movl %0,(%1)\n\t" \
+ "addl $4,%1\n\t" \
+ "decl %3\n\t" \
+ "jnz 1b\n" \
+ x \
+ :"=r" (dummy1), "=r" (tmp), "=r" (from), "=r" (dummy2) \
+ :"1" (tmp), "2" (from), "3" (n/4) \
+ :"memory"); \
+return (to); \
+
+extern inline void *__memcpy_c(void *to, const void *from, size_t n);
+extern inline void *__memcpy_c(void *to, const void *from, size_t n)
+{
+ if (n < 24) {
+ if (n >= 4)
+ ((unsigned long *) to)[0] = ((const unsigned long *) from)[0];
+ if (n >= 8)
+ ((unsigned long *) to)[1] = ((const unsigned long *) from)[1];
+ if (n >= 12)
+ ((unsigned long *) to)[2] = ((const unsigned long *) from)[2];
+ if (n >= 16)
+ ((unsigned long *) to)[3] = ((const unsigned long *) from)[3];
+ if (n >= 20)
+ ((unsigned long *) to)[4] = ((const unsigned long *) from)[4];
+ switch ((unsigned int) (n % 4)) {
+ case 3:
+ ((unsigned short *) to)[n / 2 - 1] =
+ ((const unsigned short *) from)[n / 2 - 1];
+ ((unsigned char *) to)[n - 1] =
+ ((const unsigned char *) from)[n - 1];
+ return to;
+ case 2:
+ ((unsigned short *) to)[n / 2 - 1] =
+ ((const unsigned short *) from)[n / 2 - 1];
+ return to;
+ case 1:
+ ((unsigned char *) to)[n - 1] =
+ ((const unsigned char *) from)[n - 1];
+ case 0:
+ return to;
+ }
+ }
+ {
+ register void *tmp = (void *) to;
+ register int dummy1, dummy2;
+ switch ((unsigned int) (n % 4)) {
+ case 0:
+ COMMON("");
+ case 1:
+ COMMON("movb (%2),%b0 ; movb %b0,(%1)");
+ case 2:
+ COMMON("movw (%2),%w0 ; movw %w0,(%1)");
+ case 3:
+ COMMON("movw (%2),%w0 ; movw %w0,(%1)\n\t"
+ "movb 2(%2),%b0 ; movb %b0,2(%1)");
+ }
+ }
+ return to;
+}
+
+#undef COMMON
+
+
+#define __HAVE_ARCH_MEMMOVE
+extern inline void *memmove(void *dest, const void *src, size_t n);
+extern inline void *memmove(void *dest, const void *src, size_t n)
+{
+ register void *tmp = (void *) dest;
+ if (dest < src)
+ __asm__ __volatile__("cld\n\t" "rep\n\t" "movsb": /* no output */
+ :"c"(n), "S"(src), "D"(tmp):"cx", "si", "di",
+ "memory");
+ else
+ __asm__ __volatile__("std\n\t" "rep\n\t" "movsb\n\t" "cld": /* no output */
+ : "c"(n), "S"(n - 1 + (const char *) src), "D"(n - 1 + (char *) tmp):"cx", "si", "di", "memory");
+ return dest;
+}
+
+#define memcmp __builtin_memcmp
+
+#define __HAVE_ARCH_MEMCHR
+extern inline void *memchr(const void *cs, int c, size_t count);
+extern inline void *memchr(const void *cs, int c, size_t count)
+{
+ register void *__res;
+ if (!count)
+ return NULL;
+ __asm__ __volatile__("cld\n\t"
+ "repne\n\t"
+ "scasb\n\t"
+ "je 1f\n\t"
+ "movl $1,%0\n"
+ "1:\tdecl %0":"=D"(__res):"a"(c), "D"(cs),
+ "c"(count):"cx");
+ return __res;
+}
+
+
+
+#define __HAVE_ARCH_MEMSET
+#define memset(s,c,count) \
+(__builtin_constant_p(c) ? \
+ (__builtin_constant_p(count) ? \
+ __memset_cc((s),(c),(count)) : \
+ __memset_cg((s),(c),(count))) : \
+ (__builtin_constant_p(count) ? \
+ __memset_gc((s),(c),(count)) : \
+ __memset_gg((s),(c),(count))))
+
+
+
+
+extern inline void *__memset_cg(void *s, char c, size_t count);
+extern inline void *__memset_cg(void *s, char c, size_t count)
+{
+ int tmp2;
+ register void *tmp = (void *) s;
+ __asm__ __volatile__("shrl $1,%%ecx\n\t"
+ "rep\n\t"
+ "stosw\n\t"
+ "jnc 1f\n\t"
+ "movb %%al,(%%edi)\n"
+ "1:":"=c"(tmp2), "=D"(tmp):"c"(count), "D"(tmp),
+ "a"(0x0101U * (unsigned char) c):"memory");
+ return s;
+}
+
+extern inline void *__memset_gg(void *s, char c, size_t count);
+extern inline void *__memset_gg(void *s, char c, size_t count)
+{
+ register void *tmp = (void *) s;
+ int tmp2;
+ __asm__ __volatile__("movb %%al,%%ah\n\t"
+ "shrl $1,%%ecx\n\t"
+ "rep\n\t"
+ "stosw\n\t"
+ "jnc 1f\n\t"
+ "movb %%al,(%%edi)\n"
+ "1:":"=c"(tmp2), "=D"(tmp):"c"(count), "D"(tmp),
+ "a"(c):"memory");
+ return s;
+}
+
+/*
+ * This non-rep routines are not much faster (slower for small strings)
+ * but they allows better register allocation
+ */
+#define COMMON(x) \
+__asm__ __volatile__ ( \
+ "\n.align 4\n" \
+ "1:\tmovl %k2,(%k0)\n\t" \
+ "addl $4,%k0\n\t" \
+ "decl %k1\n\t" \
+ "jnz 1b\n" \
+ x \
+ :"=r" (tmp), "=r" (dummy) \
+ :"q" ((unsigned) pattern), "0" (tmp), "1" (count/4) \
+ :"memory"); \
+return s;
+
+extern inline void *__memset_cc(void *s, unsigned long pattern,
+ size_t count);
+extern inline void *__memset_cc(void *s, unsigned long pattern,
+ size_t count)
+{
+ pattern = ((unsigned char) pattern) * 0x01010101UL;
+ if (count < 24) {
+ /*Handle small values manualy since they are incredibly slow */
+
+ if (count >= 4)
+ *(unsigned long *) s = pattern;
+ if (count >= 8)
+ ((unsigned long *) s)[1] = pattern;
+ if (count >= 12)
+ ((unsigned long *) s)[2] = pattern;
+ if (count >= 16)
+ ((unsigned long *) s)[3] = pattern;
+ if (count >= 20)
+ ((unsigned long *) s)[4] = pattern;
+ switch ((unsigned int) (count % 4)) {
+ case 3:
+ ((unsigned short *) s)[count / 2 - 1] = pattern;
+ ((unsigned char *) s)[count - 1] = pattern;
+ return s;
+ case 2:
+ ((unsigned short *) s)[count / 2 - 1] = pattern;
+ return s;
+ case 1:
+ ((unsigned char *) s)[count - 1] = pattern;
+ case 0:
+ return s;
+ }
+ } else {
+ register void *tmp = (void *) s;
+ register int dummy;
+ switch ((unsigned int) (count % 4)) {
+ case 0:
+ COMMON("");
+ case 1:
+ COMMON("movb %b2,(%0)");
+ case 2:
+ COMMON("movw %w2,(%0)");
+ case 3:
+ COMMON("movw %w2,(%0)\n\tmovb %b2,2(%0)");
+ }
+ }
+ return s;
+}
+
+extern inline void *__memset_gc(void *s, unsigned long pattern,
+ size_t count);
+extern inline void *__memset_gc(void *s, unsigned long pattern,
+ size_t count)
+{
+ if (count < 4) {
+ if (count > 1)
+ __asm__("movb %b0,%h0\n\t": "=q"(pattern):"0"((unsigned)
+ pattern));
+ switch ((unsigned int) (count)) {
+ case 3:
+ ((unsigned short *) s)[0] = pattern;
+ ((unsigned char *) s)[2] = pattern;
+ return s;
+ case 2:
+ *((unsigned short *) s) = pattern;
+ return s;
+ case 1:
+ *(unsigned char *) s = pattern;
+ case 0:
+ return s;
+ }
+ }
+
+ __asm__("movb %b0,%h0\n\t" "pushw %w0\n\t" "shll $16,%k0\n\t" "popw %w0\n": "=q"(pattern):"0"((unsigned)
+ pattern));
+
+ if (count < 24) {
+ /*Handle small values manualy since they are incredibly slow */
+
+ *(unsigned long *) s = pattern;
+ if (count >= 8)
+ ((unsigned long *) s)[1] = pattern;
+ if (count >= 12)
+ ((unsigned long *) s)[2] = pattern;
+ if (count >= 16)
+ ((unsigned long *) s)[3] = pattern;
+ if (count >= 20)
+ ((unsigned long *) s)[4] = pattern;
+ switch ((unsigned int) (count % 4)) {
+ case 3:
+ ((unsigned short *) s)[count / 2 - 1] = pattern;
+ ((unsigned char *) s)[count - 1] = pattern;
+ return s;
+ case 2:
+ ((unsigned short *) s)[count / 2 - 1] = pattern;
+ return s;
+ case 1:
+ ((unsigned char *) s)[count - 1] = pattern;
+ case 0:
+ return s;
+ }
+ } else {
+ register void *tmp = (void *) s;
+ register int dummy;
+ switch ((unsigned int) (count % 4)) {
+ case 0:
+ COMMON("");
+ case 1:
+ COMMON("movb %b2,(%0)");
+ case 2:
+ COMMON("movw %w2,(%0)");
+ case 3:
+ COMMON("movw %w2,(%0)\n\tmovb %b2,2(%0)");
+ }
+ }
+ return s;
+}
+
+#undef COMMON
+
+
+/*
+ * find the first occurrence of byte 'c', or 1 past the area if none
+ */
+#define __HAVE_ARCH_MEMSCAN
+extern inline void *memscan(void *addr, int c, size_t size);
+extern inline void *memscan(void *addr, int c, size_t size)
+{
+ if (!size)
+ return addr;
+ __asm__ __volatile__("cld\n\t"
+ "repnz; scasb\n\t"
+ "jnz 1f\n\t"
+ "dec %%edi\n\t"
+ "1:":"=D"(addr), "=c"(size):"0"(addr), "1"(size),
+ "a"(c));
+ return addr;
+}
+
+#define memset_long(x,y,z) __memset_long(x,y,z)
+
+extern inline void *__memset_long(void *s, char c, size_t count);
+extern inline void *__memset_long(void *s, char c, size_t count)
+{
+ register unsigned int fill = c;
+ register void *tmp = (void *) s;
+ if (count >= 7) {
+ register int c = (-(int) s) & 3;
+/*__asm__ __volatile__ ("movb %b0,%h0":"=r"(fill):"r"(fill));*/
+ fill |= fill << 8;
+ count -= c;
+ fill |= fill << 16;
+ __asm__ __volatile__("rep\n\tstosb":"=c"(c), "=D"(tmp):"c"(c),
+ "D"(tmp), "a"(fill):"memory");
+ c = count >> 2;
+ __asm__ __volatile__("rep\n\tstosl":"=c"(c), "=D"(tmp):"c"(c),
+ "D"(tmp), "a"(fill):"memory");
+ count &= 3;
+ }
+ __asm__ __volatile__("rep\n\tstosb":"=c"(count), "=D"(tmp):"c"(count),
+ "D"(tmp), "a"((char) fill):"memory");
+ return s;
+}
+#endif
+#endif
+#endif
diff --git a/src/include/include.pri b/src/include/include.pri
new file mode 100644
index 0000000..22a4996
--- /dev/null
+++ b/src/include/include.pri
@@ -0,0 +1,38 @@
+HEADERS += \
+ $$PWD/archaccel.h \
+ $$PWD/btrace.h \
+ $$PWD/c256.h \
+ $$PWD/catalog.h \
+ $$PWD/complex.h \
+ $$PWD/cursor.h \
+ $$PWD/fconfig.h \
+ $$PWD/filter.h \
+ $$PWD/formulas.h \
+ $$PWD/fractal.h \
+ $$PWD/gccaccel.h \
+ $$PWD/gccbuild.h \
+ $$PWD/generic.h \
+ $$PWD/grlib.h \
+ $$PWD/hicolor.h \
+ $$PWD/misc-f.h \
+ $$PWD/param.h \
+ $$PWD/pixel_t.h \
+ $$PWD/plane.h \
+ $$PWD/sffe.h \
+ $$PWD/sffe_cmplx_asm.h \
+ $$PWD/sffe_cmplx_gsl.h \
+ $$PWD/timers.h \
+ $$PWD/true24.h \
+ $$PWD/truecolor.h \
+ $$PWD/ui.h \
+ $$PWD/ui_helper.h \
+ $$PWD/xerror.h \
+ $$PWD/xio.h \
+ $$PWD/xldio.h \
+ $$PWD/xmenu.h \
+ $$PWD/xshl.h \
+ $$PWD/xthread.h \
+ $$PWD/zoom.h \
+ $$PWD/i386/ctrl87.h \
+ $$PWD/i386/sstring.h \
+ $$PWD/i386/__math.h
diff --git a/src/include/misc-f.h b/src/include/misc-f.h
new file mode 100644
index 0000000..64ed054
--- /dev/null
+++ b/src/include/misc-f.h
@@ -0,0 +1,17 @@
+#ifndef IUTIL_H
+#define IUTIL_H
+#include <xio.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+ struct image;
+
+ CONST char *writepng(xio_constpath filename, CONST struct image *image);
+ void XaoS_srandom(unsigned int x);
+ long int XaoS_random(void);
+ char *mystrdup(CONST char *);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/param.h b/src/include/param.h
new file mode 100644
index 0000000..c9ac6f1
--- /dev/null
+++ b/src/include/param.h
@@ -0,0 +1,48 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef PARAMS_H
+#define PARAMS_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ struct params {
+ CONST char *name;
+ int type;
+ void *value;
+ CONST char *help;
+ };
+
+#define P_SWITCH 0
+#define P_NUMBER 1
+#define P_STRING 2
+#define P_FLOAT 3
+#define P_HELP 4
+
+ int params_parser(int, char **);
+ void params_register(CONST struct params *par);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/pixel_t.h b/src/include/pixel_t.h
new file mode 100644
index 0000000..9b9555c
--- /dev/null
+++ b/src/include/pixel_t.h
@@ -0,0 +1,21 @@
+#if SIZEOF_INT==4
+typedef unsigned int pixel32_t;
+#elif SIZEOF_LONG==4
+typedef unsigned long pixel32_t;
+#else
+/*#error define size for pixel32 please */
+00
+#endif
+#if SIZEOF_SHORT==2
+typedef unsigned short pixel16_t;
+#elif SIZEOF_INT==2
+typedef unsigned int pixel16_t;
+#else
+/*#error define size for pixel16 please */
+ 00
+#endif
+typedef unsigned char pixel8_t;
+typedef unsigned char ppixel24_t[3];
+typedef pixel8_t *ppixel8_t;
+typedef pixel16_t *ppixel16_t;
+typedef pixel32_t *ppixel32_t;
diff --git a/src/include/plane.h b/src/include/plane.h
new file mode 100644
index 0000000..a37b16a
--- /dev/null
+++ b/src/include/plane.h
@@ -0,0 +1,58 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef PLANE_H
+#define PLANE_H
+
+#include <config.h>
+#include <zoom.h>
+
+#ifdef SFFE_USING
+#include "sffe.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*#define PLANES 7*/
+#define P_MU 0
+#define P_INVERSE 1
+#define P_PARABOL 2
+#define P_LAMBDA 3
+#define P_INVLAMBDA 4
+#define P_TRANLAMBDA 5
+#define P_MEREBERG 6
+#define P_USER 7
+ extern void recalculate(int plane, number_t *,
+ number_t *) REGISTERS(3);
+
+ extern CONST char *CONST planename[];
+
+#ifdef SFFE_USING
+ extern CONST sffe *planec;
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* PLANE_H */
diff --git a/src/include/sffe.h b/src/include/sffe.h
new file mode 100644
index 0000000..3f21869
--- /dev/null
+++ b/src/include/sffe.h
@@ -0,0 +1,139 @@
+/*/////////////////////////////////////////////////////////////////////////////////////
+// project : sFFe ( SegFault (or Segmentation Fault :) ) formula evalutaor )
+// author : Mateusz Malczak ( mateusz@malczak.info )
+// wpage : www.segfaultlabs.com/projects/sffe
+///////////////////////////////////////////////////////////////////////////////////////
+// possible config definitions
+// general
+// SFFE_DEVEL - print extra info to stdout
+// SFFE_DLL - Windows DLL
+// complex numbers
+// SFFE_CMPLX_GSL - uses GSL complex number routines
+// SFFE_CMPLX_ASM - uses my asm complex unit (compile it with NASM)
+///////////////////////////////////////////////////////////////////////////////////////
+// special build for XaoS, for more info visit
+// http://www.segfaultlabs.com/projects/sfXaos
+/////////////////////////////////////////////////////////////////////////////////////*/
+
+#ifndef SFFE_H
+#define SFFE_H
+#include <config.h>
+#include <stdlib.h>
+
+/* dont udef next line. removing this definitions can lead to compile and/or runtime errors */
+#define SFFE_COMPLEX 1
+
+/* --- */
+/*TODO long double needed*/
+#ifdef SFFE_CMPLX_ASM
+typedef struct cmpx__ {
+ double r, i;
+} cmplx;
+#define sfNumber cmplx
+#elif SFFE_CMPLX_GSL
+#include <gsl/gsl_complex.h>
+typedef gsl_complex cmplx;
+#define sfNumber gsl_complex
+#endif
+
+/* basic sffe argument 'stack' */
+typedef struct sfargument__ {
+ struct sfargument__ *parg;
+ sfNumber *value;
+} sfarg;
+
+/* sffe function prototype, parameters order is right-to-left (cdecl) */
+typedef sfarg *(*sffptr) (sfarg * const a);
+
+/* constats eval functions */
+typedef void (*cfptr) (sfNumber * cnst);
+
+/* function type structure */
+typedef struct sffunction__ {
+ sffptr fptr;
+ unsigned char parcnt;
+ /*FIXME changed from char* to char[20] to get rid of warnings during compilation */
+ char name[20];
+} sffunction;
+
+/* basic sffe 'stack' operation ( function + result slot ) */
+typedef struct sfoperation__ {
+ sfarg *arg;
+ sffptr f;
+} sfopr;
+
+/* SFFE main structure */
+typedef struct sffe__ {
+/*public*/
+ char *expression; /* parsed expression (read-only) */
+ char *errormsg; /* parser errors (read-only) */
+ sfNumber *result; /* evaluation result (read-only) */
+/* protected/private */
+ unsigned int argCount; /* number of argument in use */
+ sfarg *args;
+ unsigned int oprCount; /* number of operations in use */
+ sfopr *oprs;
+ unsigned int varCount; /* number of used variables */
+ char *varChars;
+ sfNumber **varPtrs;
+ unsigned int userfCount; /* number of user functions */
+ sffunction *userf;
+/* not used
+ unsigned int stCount;
+ sfNumber* statics;
+*/
+} sffe;
+
+#define SFFE sffe
+#define sffeparser sffe
+#define sfparser sffe
+#define SFFEPARSER sffe
+
+/* 'stack' slot value */
+#define sfvalue(p) (*((p)->value))
+
+/* function parameters */
+#define sfaram1(p) ((p)->parg)
+#define sfaram2(p) ((p)->parg->parg)
+#define sfaram3(p) ((p)->parg->parg->parg)
+#define sfaram4(p) ((p)->parg->parg->parg->parg)
+#define sfaram5(p) ((p)->parg->parg->parg->parg->parg)
+/* and so on */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* create formula evaluator structure */
+ sffe *sffe_alloc(void);
+/* free fe structure */
+ void sffe_free(sffe ** parser);
+/* parse expression 'expression' and strore result in 'parser' struct, error (if any) returned */
+ int sffe_parse(sffe ** parser, char *expression);
+/* evaulate function and return evaluation result */
+ sfNumber sffe_eval(sffe * const parser);
+/* evaluate without returnig result */
+//void sffe_eval2(sffe *const parser);
+/* register user function with name 'vname', with 'parcnt' parameters and defined with function pointed by 'funptr'*/
+ void *sffe_regfunc(sffe ** parser, char *vname, unsigned int parcnt,
+ sffptr funptr);
+/* register single variable 'vptrs' identified by name 'vchars' */
+ void *sffe_regvar(sffe ** parser, sfNumber * vptrs, char vchars);
+/* register multiple variables */
+ void *sffe_regvars(sffe ** parser, unsigned int cN, sfNumber ** vptrs,
+ char *vchars);
+/* get variable 'vchar' pointer */
+ sfNumber *sffe_varptr(sffe * const parser, char vchar);
+/* set 'vptrs' as 'vchars' variable */
+ sfNumber *sffe_setvar(sffe ** parser, sfNumber * vptrs, char vchars);
+
+#ifdef __cplusplus
+}
+#endif
+#ifdef SFFE_CMPLX_ASM
+#include "sffe_cmplx_asm.h"
+#elif SFFE_CMPLX_GSL
+#include "sffe_cmplx_gsl.h"
+#endif
+#endif
diff --git a/src/include/sffe_cmplx_asm.h b/src/include/sffe_cmplx_asm.h
new file mode 100644
index 0000000..f14aae8
--- /dev/null
+++ b/src/include/sffe_cmplx_asm.h
@@ -0,0 +1,140 @@
+/*/////////////////////////////////////////////////////////////////////////////////////
+// project : sFFe ( SegFault (or Segmentation Fault :) ) formula evalutaor )
+// author : Mateusz Malczak ( mateusz@malczak.info )
+// wpage : www.segfaultlabs.com/projects/sffe
+///////////////////////////////////////////////////////////////////////////////////////
+// special build for XaoS, for more info visit
+// http://www.segfaultlabs.com/projects/sfXaos
+/////////////////////////////////////////////////////////////////////////////////////*/
+#ifndef SFFE_CMPLX_ASM_H
+#define SFFE_CMPLX_ASM_H
+
+#include <config.h>
+#ifdef SFFE_CMPLX_ASM
+
+#include "sffe.h"
+
+#define sffnctscount 43
+#define sfvarscount 6
+#define cmplxset(c,r,i) ( c = cset(r,i) )
+#define real(c) (c).r
+#define imag(c) (c).i
+
+#ifdef __ELF__
+#define sffecabs _sffecabs
+#define sffecarg _sffecarg
+#define sffecargs _sffecargs
+#define sffecargc _sffecargc
+#define sffecinv _sffecinv
+#define sffecexp _sffecexp
+#define sffecln _sffecln
+#define sffeclog2 _sffeclog2
+#define sffeclog _sffeclog
+#define sffecsin _sffecsin
+#define sffeccos _sffeccos
+#define sffectan _sffectan
+#define sffeccot _sffeccot
+#define sffecsinh _sffecsinh
+#define sffeccosh _sffeccosh
+#define sffectanh _sffectanh
+#define sffeccoth _sffeccoth
+#define sffeccpow _sffeccpow
+#define sffecpowd _sffecpowd
+#define sffecpowi _sffecpowi
+#define sffecpowc _sffecpowc
+#define sffecsqrt _sffecsqrt
+#define sffecrtni _sffecrtni
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ /* written with asm in file cmplx.asm, compile with NASM */
+ extern double sffecabs(const cmplx c);
+ extern double sffecarg(const cmplx c);
+ extern double sffecargs(const cmplx c);
+ extern double sffecargc(const cmplx c);
+ extern cmplx sffecinv(const cmplx c);
+ extern cmplx sffecexp(const cmplx c);
+ extern cmplx sffecln(const cmplx c);
+ extern cmplx sffeclog2(const cmplx c);
+ extern cmplx sffeclog(const cmplx c, unsigned int base);
+ extern cmplx sffecsin(const cmplx c);
+ extern cmplx sffeccos(const cmplx c);
+ extern cmplx sffectan(const cmplx c);
+ extern cmplx sffeccot(const cmplx c);
+ extern cmplx sffecsinh(const cmplx c);
+ extern cmplx sffeccosh(const cmplx c);
+ extern cmplx sffectanh(const cmplx c);
+ extern cmplx sffeccoth(const cmplx c);
+ /* power functions */
+ extern cmplx sffeccpow(const cmplx b, const cmplx exp);
+ extern cmplx sffecpowd(const cmplx b, double exp);
+ extern cmplx sffecpowi(const cmplx b, int exp);
+ extern cmplx sffecpowc(double b, const cmplx exp);
+ extern cmplx sffecsqrt(const cmplx b); /* square root */
+ extern cmplx sffecrtni(const cmplx b, int n, int i); /* i-th solution of N-th order root of a CN */
+/*complex numbers for mparser*/
+ cmplx cset(double r, double i);
+ cmplx cadd(const cmplx c1, const cmplx c2);
+ cmplx csub(const cmplx c1, const cmplx c2);
+ cmplx cmul(const cmplx c1, const cmplx c2);
+ cmplx cdiv(const cmplx c1, const cmplx c2);
+ sfarg *sfadd(sfarg * const p); /* + */
+ sfarg *sfsub(sfarg * const p); /* - */
+ sfarg *sfmul(sfarg * const p); /* * */
+ sfarg *sfdiv(sfarg * const p); /* / */
+ sfarg *sfsin(sfarg * const p); /* sin */
+ sfarg *sfcos(sfarg * const p); /* cos */
+ sfarg *sftan(sfarg * const p); /* tan */
+ sfarg *sfcot(sfarg * const p); /* ctan */
+ sfarg *sfasin(sfarg * const p); /* asin */
+ sfarg *sfacos(sfarg * const p); /* acos */
+ sfarg *sfatan(sfarg * const p); /* atan */
+ sfarg *sfacot(sfarg * const p); /* actan */
+ sfarg *sfatan2(sfarg * const p); /* atan2 */
+ sfarg *sfsinh(sfarg * const p); /* sinh */
+ sfarg *sfcosh(sfarg * const p); /* cosh */
+ sfarg *sftanh(sfarg * const p); /* tanh */
+ sfarg *sfcoth(sfarg * const p); /* ctanh */
+ sfarg *sfexp(sfarg * const p); /* exp */
+ sfarg *sflog(sfarg * const p); /* log */
+ sfarg *sflog2(sfarg * const p); /* log2 */
+ sfarg *sflog10(sfarg * const p); /* log2 */
+ sfarg *sflogN(sfarg * const p); /* logN */
+ sfarg *sflogCN(sfarg * const p); /* logCN */
+ sfarg *sfpow(sfarg * const p); /* csflx pow */
+ sfarg *sfpowi(sfarg * const p); /* int pow */
+ sfarg *sfpowd(sfarg * const p); /* double pow */
+ sfarg *sfpowdc(sfarg * const p); /* double to csflx pow */
+ sfarg *sfsqr(sfarg * const p); /* sqr */
+ sfarg *sfsqrt(sfarg * const p); /* sqrt */
+ sfarg *sfrtni(sfarg * const p); /* rtni *//*cos tu nie tak jak powinno byc ;( */
+ sfarg *sfinv(sfarg * const p); /* cinv */
+ sfarg *sfceil(sfarg * const p); /* ceil */
+ sfarg *sffloor(sfarg * const p); /* floor */
+ sfarg *sfabs(sfarg * const p); /* abs - |z| */
+ sfarg *sfre(sfarg * const p); /* RE */
+ sfarg *sfim(sfarg * const p); /* IM */
+ sfarg *sfrabs(sfarg * const p); /* abs - real numbers */
+ sfarg *sfrand(sfarg * const p); /* rand */
+/*const eval*/
+ void sfcPI(sfNumber * cnst);
+ void sfcPI2(sfNumber * cnst);
+ void sfc2PI(sfNumber * cnst);
+ void sfcE(sfNumber * cnst);
+ void sfcI(sfNumber * cnst);
+ void sfcRND(sfNumber * cnst);
+#ifdef __cplusplus
+}
+#endif
+/* all available function (function pointer, number of parameters, name )*/
+ extern const sffunction sfcmplxfunc[sffnctscount];
+/* all available buildin variables */
+extern const char sfcnames[sfvarscount][5];
+/* available variables function pointers */
+extern const cfptr sfcvals[sfvarscount];
+
+#endif
+#endif
diff --git a/src/include/sffe_cmplx_gsl.h b/src/include/sffe_cmplx_gsl.h
new file mode 100644
index 0000000..7bc5b66
--- /dev/null
+++ b/src/include/sffe_cmplx_gsl.h
@@ -0,0 +1,82 @@
+/*/////////////////////////////////////////////////////////////////////////////////////
+// project : sFFe ( SegFault (or Segmentation Fault :) ) formula evalutaor )
+// author : Mateusz Malczak ( mateusz@malczak.info )
+// wpage : www.segfaultlabs.com/projects/sffe
+///////////////////////////////////////////////////////////////////////////////////////
+// special build for XaoS, for more info visit
+// http://www.segfaultlabs.com/projects/sfXaos
+/////////////////////////////////////////////////////////////////////////////////////*/
+#ifndef SFFE_CMPLX_GSL_H
+#define SFFE_CMPLX_GSL_H
+
+#include <config.h>
+#ifdef SFFE_CMPLX_GSL
+
+#include "sffe.h"
+
+#include <gsl/gsl_complex.h>
+#include <gsl/gsl_complex_math.h>
+
+#define sffnctscount 43
+#define sfvarscount 6
+#define cmplxset(c,r,i) GSL_SET_COMPLEX(&c,r,i)
+#define real(c) GSL_REAL((c))
+#define imag(c) GSL_IMAG((c))
+
+sfarg *sfadd(sfarg * const p); /* + */
+sfarg *sfsub(sfarg * const p); /* - */
+sfarg *sfmul(sfarg * const p); /* * */
+sfarg *sfdiv(sfarg * const p); /* / */
+sfarg *sfsin(sfarg * const p); /* sin */
+sfarg *sfcos(sfarg * const p); /* cos */
+sfarg *sftan(sfarg * const p); /* tan */
+sfarg *sfcot(sfarg * const p); /* ctan */
+sfarg *sfasin(sfarg * const p); /* asin */
+sfarg *sfacos(sfarg * const p); /* acos */
+sfarg *sfatan(sfarg * const p); /* atan */
+sfarg *sfacot(sfarg * const p); /* actan */
+sfarg *sfatan2(sfarg * const p); /* atan2 */
+sfarg *sfsinh(sfarg * const p); /* sinh */
+sfarg *sfcosh(sfarg * const p); /* cosh */
+sfarg *sftanh(sfarg * const p); /* tanh */
+sfarg *sfcoth(sfarg * const p); /* ctanh */
+sfarg *sfexp(sfarg * const p); /* exp */
+sfarg *sflog(sfarg * const p); /* log */
+sfarg *sflog10(sfarg * const p); /* log10 */
+sfarg *sflog2(sfarg * const p); /* log2 */
+sfarg *sflogN(sfarg * const p); /* logN */
+sfarg *sfpow(sfarg * const p); /* csflx pow */
+sfarg *sfpowd(sfarg * const p); /* double pow */
+sfarg *sfpowi(sfarg * const p); /* double pow */
+sfarg *sfpowdc(sfarg * const p); /* double to csflx pow */
+sfarg *sfsqr(sfarg * const p); /* sqr */
+sfarg *sfsqrt(sfarg * const p); /* sqrt */
+sfarg *sfrtni(sfarg * const p); /* rtni */
+sfarg *sfinv(sfarg * const p); /* cinv */
+sfarg *sfceil(sfarg * const p); /* ceil */
+sfarg *sffloor(sfarg * const p); /* floor */
+sfarg *sfabs(sfarg * const p); /* abs - |z| */
+sfarg *sfre(sfarg * const p); /* RE */
+sfarg *sfim(sfarg * const p); /* IM */
+sfarg *sfrabs(sfarg * const p); /* abs - real numbers */
+sfarg *sfrand(sfarg * const p); /* rand */
+/*const eval*/
+void sfcPI(sfNumber * cnst);
+void sfcPI2(sfNumber * cnst);
+void sfc2PI(sfNumber * cnst);
+void sfcE(sfNumber * cnst);
+void sfcI(sfNumber * cnst);
+void sfcRND(sfNumber * cnst);
+#ifdef __cplusplus
+}
+#endif
+
+/* all available function (function pointer, number of parameters, name )*/
+extern const sffunction sfcmplxfunc[sffnctscount];
+/* all available buildin variables */
+extern const char sfcnames[sfvarscount][5];
+/* available variables function pointers */
+extern const cfptr sfcvals[sfvarscount];
+
+#endif
+#endif
diff --git a/src/include/timers.h b/src/include/timers.h
new file mode 100644
index 0000000..140151f
--- /dev/null
+++ b/src/include/timers.h
@@ -0,0 +1,67 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#ifndef TIMERS_H
+#define TIMERS_H
+#include "config.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ struct timer;
+ struct timeemulator;
+ typedef struct timer tl_timer;
+ typedef struct timer tl_group;
+
+ void tl_update_time(void);
+ tl_timer *tl_create_timer(void);
+ tl_group *tl_create_group(void);
+ void tl_set_interval(tl_timer * timer, int interval);
+ void tl_set_handler(tl_timer * timer, void (*handler) (void *),
+ void *userdata);
+ void tl_set_multihandler(tl_timer * timer,
+ void (*handler) (void *, int),
+ void *userdata);
+ void tl_add_timer(tl_group * group, tl_timer * timer);
+ void tl_remove_timer(tl_timer * timer);
+ void tl_free_timer(tl_timer * timer);
+ void tl_free_group(tl_group * timer);
+ void tl_stop_timer(tl_timer * t);
+ void tl_resume_timer(tl_timer * t);
+ void tl_slowdown_timer(tl_timer * t, int time);
+ int tl_process_group(tl_group * group, int *activated);
+ extern tl_group *syncgroup, *asyncgroup;
+ void tl_sleep(int);
+ void tl_allegromode(int mode); /*Just for djgpp */
+ int tl_lookup_timer(tl_timer * t) REGISTERS(3);
+ void tl_reset_timer(tl_timer * t) REGISTERS(3);
+
+ struct timeemulator *tl_create_emulator(void);
+ void tl_free_emulator(struct timeemulator *t);
+ void tl_elpased(struct timeemulator *t, int elpased);
+ void tl_emulate_timer(struct timer *t, struct timeemulator *e);
+ void tl_unemulate_timer(struct timer *t);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* TIMER_H */
diff --git a/src/include/true24.h b/src/include/true24.h
new file mode 100644
index 0000000..de626a3
--- /dev/null
+++ b/src/include/true24.h
@@ -0,0 +1,31 @@
+#ifdef cpixel_t
+#undef cpixel_t
+#undef cpixeldata_t
+#undef cppixel_t
+#undef cpixeldata_t
+#undef bpp
+#undef bpp1
+#undef p_add
+#undef p_inc
+#undef p_set
+#undef p_get
+#undef p_setp
+#undef UNSUPPORTED
+#undef p_getp
+#undef p_copy
+#endif
+#ifndef STRUECOLOR24
+#define UNSUPPORTED
+#endif
+#define cpixel_t pixel8_t
+#define cppixel_t ppixel8_t
+#define cpixeldata_t pixel32_t
+#define bpp 3
+/*FIXME this should make problems at small edian machines? */
+#define p_set(ptr,val) ((*(pixel16_t *)(ptr))=(pixel16_t)(val),((ptr)[2])=(pixel8_t)((val)>>16))
+#define p_get(ptr) (((pixel32_t)*(pixel16_t *)(ptr)+(pixel32_t)(*((ptr)+2)<<16)))
+#define p_copy(ptr1,pos1,ptr2,pos2) (*((pixel16_t *)((ptr1)+(pos1)*3))=*(pixel16_t *)((ptr2)+(pos2)*3),(ptr1)[(pos1)*3+2]=(ptr2)[(pos2)*3+2])
+#define p_setp(ptr,pos,val) p_set((ptr)+(pos)*3,val)
+#define p_getp(ptr,pos) p_get((ptr)+(pos)*3)
+#define p_add(ptr,pos) ((ptr)+(pos)*3)
+#define p_inc(ptr,pos) ((ptr)+=(pos)*3)
diff --git a/src/include/truecolor.h b/src/include/truecolor.h
new file mode 100644
index 0000000..9025318
--- /dev/null
+++ b/src/include/truecolor.h
@@ -0,0 +1,13 @@
+#ifdef cpixel_t
+#undef UNSUPPORTED
+#undef cpixel_t
+#undef cpixeldata_t
+#undef cppixel_t
+#undef bpp
+#undef bpp1
+#endif
+#define cpixel_t pixel32_t
+#define cpixeldata_t pixel32_t
+#define cppixel_t ppixel32_t
+#define bpp 4
+#include <generic.h>
diff --git a/src/include/ui.h b/src/include/ui.h
new file mode 100644
index 0000000..8bdf783
--- /dev/null
+++ b/src/include/ui.h
@@ -0,0 +1,160 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef UI_H
+#define UI_H
+/*
+#include "xio.h"
+#include "zoom.h"
+*/
+#include "config.h"
+#include "param.h"
+#include "xmenu.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#undef BUTTON1
+#undef BUTTON2
+#undef BUTTON3
+#define BUTTON1 256
+#define BUTTON2 512
+#define BUTTON3 1024
+#define UI_C256 1
+#define UI_GRAYSCALE 2
+#define UI_TRUECOLOR16 4
+#define UI_TRUECOLOR24 8
+#define UI_TRUECOLOR 16
+#define UI_PROTECTIMAGES 32
+#define UI_LBITMAP 256
+#define UI_MBITMAP 512
+#define UI_LIBITMAP 1024
+#define UI_MIBITMAP 2048
+#define UI_FIXEDCOLOR 4096
+
+
+#define NORMALMOUSE 0
+#define WAITMOUSE 1
+#define REPLAYMOUSE 2
+#define VJMOUSE 3
+
+#define UIKEY_UP 257
+#define UIKEY_DOWN 258
+#define UIKEY_LEFT 259
+#define UIKEY_RIGHT 260
+#define UIKEY_ESC 261
+#define UIKEY_BACKSPACE 8
+#define UIKEY_TAB '\t'
+#define UIKEY_HOME 262
+#define UIKEY_END 263
+#define UIKEY_PGUP 264
+#define UIKEY_PGDOWN 265
+
+ typedef unsigned char ui_rgb[4];
+ typedef ui_rgb *ui_palette;
+ struct uih_context;
+ struct gui_driver {
+ void (*setrootmenu) (struct uih_context * c, CONST char *name);
+ void (*enabledisable) (struct uih_context * c, CONST char *name);
+ void (*menu) (struct uih_context * c, CONST char *name);
+ void (*dialog) (struct uih_context * c, CONST char *name);
+ void (*help) (struct uih_context * c, CONST char *name);
+ };
+ struct ui_driver {
+ CONST char *name;
+ int (*init) (void); /*initializing function. recturns 0 if fail */
+ void (*getsize) (int *, int *); /*get current size..in fullscreen versions
+ i.e svga and dos asks user for it */
+ void (*processevents) (int, int *, int *, int *, int *);
+ /*processevents..calls ui_resize,ui_key
+ laso returns possitions of mouse..
+ waits for event if first parameter is
+ 1 */
+ void (*getmouse) (int *, int *, int *);
+ /*returns current mouse possitions */
+ void (*uninit) (void);
+ /*called before exit */
+ int (*set_color) (int, int, int, int);
+ void (*set_range) (ui_palette palette, int, int);
+ /*sets palette color and returns number */
+ void (*print) (int, int, CONST char *); /*prints text */
+ void (*display) (void); /*displays bitmap */
+ int (*alloc_buffers) (char **buffer1, char **buffer2); /*makes buffers */
+ void (*free_buffers) (char *buffer1, char *buffer2); /*frees buffers */
+ void (*flip_buffers) (void); /*prints text */
+ void (*mousetype) (int type);
+ void (*flush) (void);
+ int textwidth;
+ int textheight; /*width of text */
+ /*int helpsize; */
+ CONST struct params *params;
+ int flags;
+ float width, height;
+ int maxwidth, maxheight;
+ int imagetype;
+ int palettestart, paletteend, maxentries;
+ int rmask, gmask, bmask;
+ CONST struct gui_driver *gui_driver;
+ };
+
+ extern struct uih_context *globaluih;
+
+#ifdef USE_LOCALEPATH
+ extern char *localepath;
+#endif
+
+ number_t ui_getfloat(CONST char *text);
+ void ui_resize(void);
+ void ui_call_resize(void);
+ void ui_quit(void) NORETURN;
+ void ui_menu(CONST char *text);
+ void ui_menuactivate(CONST menuitem * item, dialogparam * d);
+ int ui_key(int);
+ void ui_loadstr(CONST char *data);
+ xio_path ui_getfile(CONST char *basename, CONST char *extension);
+ void ui_help(CONST char *name);
+ char *ui_getpos(void);
+ int MAIN_FUNCTION(int argc, char **argv);
+
+
+
+#ifndef RANDOM_PALETTE_SIZE
+#define RANDOM_PALETTE_SIZE 1 /*FIXME currently ignored */
+#define FULLSCREEN 2
+#define UPDATE_AFTER_PALETTE 4
+#define UPDATE_AFTER_RESIZE 8
+#define PALETTE_ROTATION 16
+#define ASYNC_PALETTE 32
+#define ROTATE_INSIDE_CALCULATION 64
+#define PALETTE_REDISPLAYS 128
+#define SCREENSIZE 256
+#define PIXELSIZE 512
+#define RESOLUTION 1024
+#endif
+#define NOFLUSHDISPLAY 2048
+#define AALIB (4096*2)
+#define RESIZE_COMMAND (4096*4)
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* UI_H */
diff --git a/src/include/ui_helper.h b/src/include/ui_helper.h
new file mode 100644
index 0000000..73ead16
--- /dev/null
+++ b/src/include/ui_helper.h
@@ -0,0 +1,550 @@
+#ifndef UI_HELPER_H
+#define UI_HELPER_H
+#include "timers.h"
+#include "xio.h"
+
+#ifdef SFFE_USING
+#include "sffe.h"
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define MAXFILTERS 20
+#define AVRGSIZE 50
+#define NMESSAGES 5
+#define BGCOLOR(uih) uih->palette->index[0]
+#define FGCOLOR(uih) uih->palette->index[1]
+#define SELCOLOR(uih) uih->palette->index[2]
+#define DARKGRAYCOLOR(uih) uih->palette->index[3]
+#define LIGHTGRAYCOLOR(uih) uih->palette->index[4]
+#define LIGHTGRAYCOLOR2(uih) uih->palette->index[5]
+#define NONTRANSPARENTW 1
+#define DRAWBORDER 2
+#define BORDER_PRESSED 4
+#define BORDER_TRANSPARENT 8
+#define BORDER_LIGHT 16
+
+ struct uih_message {
+ char *message[NMESSAGES];
+ tl_timer *messagetimer[NMESSAGES];
+ int messagetype[NMESSAGES];
+ struct uih_window *w[NMESSAGES];
+ int pid[NMESSAGES];
+ int messagestart;
+ };
+ struct uih_line {
+ int key;
+ int morph;
+ int color;
+ int posmode;
+ number_t x1, y1, x2, y2;
+ int mposmode;
+ number_t mx1, my1, mx2, my2;
+ struct uih_line *next, *prev;
+ struct uih_window *w;
+ };
+ struct uih_lines {
+ struct uih_line *first;
+ int morphing;
+ int currkey;
+ };
+
+ struct uih_savedcontext {
+ xio_file file;
+ int mode;
+ number_t speedup, maxstep;
+ number_t xcenter, ycenter;
+ tl_timer *timer;
+ tl_timer *synctimer;
+ struct fractal_context *fcontext;
+ int clearscreen;
+ int fastmode, juliamode, fastrotate, autorotate;
+ number_t rotationspeed;
+ int firsttime;
+ int filter[MAXFILTERS];
+ int pressed;
+ int rotatepressed;
+ int cycling;
+ int shifted;
+ int manualpaletteshift;
+ int direction;
+ int cyclingspeed;
+ int zoomactive;
+ int xtextpos, ytextpos;
+ int writefailed;
+ int nonfractalscreen;
+ int color;
+ };
+#define MAXLEVEL 10 /*Maximal include level */
+ struct uih_playcontext {
+ xio_file file;
+ xio_file prevfiles[MAXLEVEL + 1];
+ int level;
+ xio_path directory;
+ tl_timer *timer;
+ int waittime;
+ int playframe;
+ int timerin;
+ int frametime, starttime;
+ int morph;
+ int morphtimes[2];
+ int morphjulia;
+ int morphjuliatimes[2];
+ int morphangle;
+ int morphangletimes[2];
+ vinfo destination;
+ vinfo source;
+ number_t srcangle, destangle;
+ number_t sr, si, dr, di;
+ int readfailed;
+ int line;
+ struct uih_lines lines;
+ int morphlinetimes[2];
+ };
+#define SQR(val) (((double)(val))*(val))
+#define MORPHVALUE(time,len,starttime,endtime) \
+ (time)<0?0.0 \
+ :(time)>=(len)?1.0 \
+ :(time)<(starttime) && (starttime)?(SQR((time)/(double)(starttime))/2*(starttime)/((len)-(starttime)/2-(endtime)/2))\
+ :((len)-(time)<(endtime)) && (endtime)?1-(SQR(((len)-(time))/(double)(endtime))/2*(endtime)/((len)-(starttime)/2-(endtime)/2)) \
+ :((time)-(starttime)/2)/((double)(len)-(starttime)/2-(endtime)/2)
+#ifdef _NEVER_
+#define MORPHVALUE(time,len,starttime,endtime) \
+ (((time))/((double)(len)))
+#endif
+#define DOMORPH(time,len,starttime,endtime,startval,endval) \
+ ((startval)+((endval)-(startval))*MORPHVALUE(time,len, starttime,endtime))
+
+#define UNDOLEVEL 256
+ struct uih_undocontext {
+ int last;
+ char *undos[256];
+ };
+ struct uih_context {
+ void (*updatemenus) (struct uih_context *, CONST char *);
+ /*stuff that should be visible from outside */
+ number_t speedup, maxstep; /*zooming speed */
+
+ /* Informations provided to the user interface: */
+ CONST char *menuroot;
+ int display; /*1 when ui wants to display something */
+ int save; /*1 if save animation is enabled */
+ int play; /*1 if animation replay is active */
+ int cycling; /*1 if cycling is enabled */
+ int incalculation; /*1 if calulcation is currently in process */
+ int flags;
+ int interrupt; /*set to interrupt current calculation */
+
+ /*server's callbacks */
+ int (*passfunc) (struct uih_context *, int, CONST char *, float);
+ void (*longwait) (struct uih_context *);
+
+ struct uih_undocontext undo;
+ /*Filter system state */
+ struct image *image;
+ struct palette *palette;
+ struct fractal_context *fcontext; /*fractal informations */
+ struct queue *queue;
+ struct filter *uifilter; /*user interface layer */
+ struct filter *rotatef; /* Special filters handler by ui_helper: */
+ struct filter *zengine;
+ struct filter *fixedcolor;
+ /*Julia/filter mechanizm */
+ struct filter *subwindow, *julia, *smalliter;
+ struct filter *filter[MAXFILTERS];
+
+ /*General status variables */
+ double mul; /*speed of last iteration */
+ int rotatemode; /*ROTATE_NONE, ROTATE_CONTINUOUS or ROTATE_NONE */
+ number_t rotationspeed; /*speed of continuous rotation */
+ int fastmode; /*when draw in fast mode */
+ int juliamode;
+ int fastrotate;
+ int uncomplette; /*1 if image is not complettly caluclated or in animation */
+ int dirty; /*1 if image is inexact */
+ int inanimation; /*1 if uih_update wants to be called soon */
+ int fastanimation; /*1 if animation needs to be fast */
+ int palettetype, paletteseed; /*0 for default palette,1,2 for random */
+ int clearscreen; /*1 when ui want to clear screen */
+ int indofractal; /*1 when caluclation is in the process */
+ int xtextpos, ytextpos; /*possitioning of text */
+ int color; /*Color of text */
+ int recalculatemode; /*informations for user interface */
+ int stoppedtimers; /*1 when timers are stopped */
+ int nletters; /*Number of letters displayed at screen */
+ int letterspersec; /*Number of letters per second user should read */
+ char *text[3]; /*Currently displayed text informations: */
+ struct uih_window *textwindow[3], *cscreenwindow;
+ int textpos[3], textcolor[3];
+ CONST char *errstring; /*String of last unprocessed error */
+
+ CONST struct xfont *font; /*Font used by UI */
+ struct uih_window *wtop;
+ int wflipped;
+ int wdisplayed;
+
+ /*Save variables */
+ int todisplayletters;
+ struct uih_savedcontext *savec;
+ int viewchanged; /*When to generate setview commands */
+ int palettechanged; /*When to generate setpalette commands */
+ int displaytext; /*When text was displayed in this frame */
+ int nonfractalscreen;
+ /*waiting variables */
+ void (*complettehandler) (void *); /*Handler to be activated when calculation is complette */
+ void *handlerdata;
+ /*replay variables */
+ struct uih_playcontext *playc;
+ int playpos;
+ CONST char *playstring;
+
+ /*For constant framerate */
+ struct timeemulator *emulator;
+ int emulatedframetime;
+ int aliasnum;
+ int fixedstep;
+
+ /*zoom/unzoom */
+ number_t speed, step;
+ number_t xcenter, ycenter;
+ int xcenterm, ycenterm;
+ int zoomactive;
+
+ /*drag&drop move */
+ int pressed;
+ number_t oldx, oldy;
+ int moved;
+
+ /*drag&drop rotate */
+ int rotatepressed;
+ number_t oldangle;
+
+ int ddatalost;
+ int tbreak;
+
+ int autopilot; /*for uih side of autopilot */
+ int autopilotx, autopiloty, autopilotbuttons;
+
+ /*calculation time variables */
+ int interruptiblemode;
+ int starttime, endtime;
+ int maxtime;
+
+ /*dynamical timeout measuring */
+ int times[2][AVRGSIZE]; /*for statistics */
+ int timespos, count[2];
+ double lastspeed, lasttime;
+
+ /*number_t xsize, ysize; */
+ tl_timer *maintimer, *cyclingtimer, *autopilottimer,
+ *calculatetimer, *doittimer;
+ tl_group *autopilotgroup;
+
+ /*color cycling values */
+ int direction;
+ int cyclingdirection;
+ int stopped;
+ int cyclingspeed;
+
+ /*autopilot internal values */
+ int x1, y1, c1;
+ number_t minsize;
+ number_t maxsize;
+ int autopilotversion;
+ int autime;
+ int minlong;
+ int interlevel;
+
+ /*saved palettes */
+ struct palette *palette2;
+
+ int paletteshift;
+ int manualpaletteshift;
+
+ struct uih_message messg;
+
+ /*Used by uih_update to figure out when save undo */
+ int lastbuttons;
+
+ int encoding;
+
+ /* performers really don't want text echoed to the screen */
+ int inhibittextoutput;
+
+ /* user data */
+ void *data;
+
+#ifdef SFFE_USING
+ /*User formulas (used in sffe parser) */
+ /*sffe *cparser; user define c evaluation formula, not used now, not used yet */
+ sffe *parser; /* fractal formula */
+ sffe *pinit;
+#endif
+
+ };
+ typedef void (*uih_getposfunc) (struct uih_context * c, int *x, int *y,
+ int *width, int *height, void *data);
+ typedef void (*uih_drawfunc) (struct uih_context * c, void *data);
+ struct uih_window {
+ int x, y, width, height;
+ uih_getposfunc getpos;
+ uih_drawfunc draw;
+ struct uih_window *next;
+ struct uih_window *previous;
+ int savedline, savedpos;
+ char *saveddata;
+ void *data;
+ int flags;
+ };
+ typedef struct uih_context uih_context;
+
+#define UIH_SAVEALL 2
+#define UIH_SAVEANIMATION 1
+#define UIH_SAVEPOS 0
+
+#define UIH_PALETTEDRAW -2
+#define UIH_FILTERANIMATION -1
+#define UIH_INTERRUPTIBLE 0
+#define UIH_ANIMATION 1
+#define UIH_NEW_IMAGE 2
+#define UIH_UNINTERRUPTIBLE 3
+#define FRAMETIME (1000000/FRAMERATE)
+
+#define UIH_TEXTTOP 0
+#define UIH_TEXTMIDDLE 1
+#define UIH_TEXTBOTTOM 2
+
+#define UIH_TEXTLEFT 0
+#define UIH_TEXTCENTER 1
+#define UIH_TEXTRIGHT 2
+
+#define RANDOM_PALETTE_SIZE 1
+#define FULLSCREEN 2
+#define UPDATE_AFTER_PALETTE 4
+#define UPDATE_AFTER_RESIZE 8
+#define PALETTE_ROTATION 16
+#define ASYNC_PALETTE 32
+#define ROTATE_INSIDE_CALCULATION 64
+#define PALETTE_REDISPLAYS 128
+#define SCREENSIZE 256
+#define PIXELSIZE 512
+#define RESOLUTION 1024
+
+#define BUTTON1 256
+#define BUTTON2 512
+#define BUTTON3 1024
+
+#define ROTATE_NONE 0
+#define ROTATE_MOUSE 1
+#define ROTATE_CONTINUOUS 2
+
+#define uih_needrecalculate(context) ((context)->recalculatemode)
+#define uih_needdisplay(context) ((context)->display)
+#define GETMAX(a,b) ((a)>(b)?(a):(b))
+#define uih_newimage(c) ((c)->display=1,((c)->recalculatemode=GETMAX((c)->recalculatemode,UIH_NEW_IMAGE)))
+#define uih_animate_image(c) ((c)->display=1,(c)->recalculatemode=GETMAX((c)->recalculatemode,UIH_ANIMATION))
+
+#define uih_updatemenus(uih,c) if(uih->updatemenus!=NULL) uih->updatemenus(uih,c);
+
+ extern CONST struct filteraction *CONST uih_filters[MAXFILTERS];
+ extern CONST int uih_nfilters;
+
+ struct uih_context *uih_mkcontext(int flags, struct image *image,
+ int (*passfunc) (struct uih_context
+ *, int,
+ CONST char *,
+ float),
+ void (*longwait) (struct uih_context
+ *),
+ void (*updatemenus) (struct
+ uih_context * c,
+ CONST char *));
+ int uih_updateimage(uih_context * c, struct image *img);
+ void uih_freecontext(uih_context * c);
+
+
+ void uih_callcomplette(uih_context * c);
+/*palette functions */
+ void uih_mkdefaultpalette(uih_context * c);
+ void uih_mkpalette(uih_context * c);
+ void uih_savepalette(uih_context * c);
+ void uih_restorepalette(uih_context * c);
+ void uih_loadpalette(uih_context * c, struct palette *palette);
+
+/*autopilot handling */
+ void uih_autopilot_on(uih_context * c);
+ void uih_autopilot_off(uih_context * c);
+
+/*misc functions */
+ int uih_update(uih_context * c, int mousex, int mousey,
+ int mousebuttons);
+ CONST char *uih_save(struct uih_context *c, xio_constpath filename);
+ void uih_tbreak(uih_context * c);
+ double uih_displayed(uih_context * c);
+ void uih_do_fractal(uih_context * c);
+ void uih_prepare_image(uih_context * c);
+ void uih_interrupt(uih_context * c);
+ void uih_stopzooming(uih_context * c);
+ void uih_setspeedup(uih_context * c, number_t speed);
+ void uih_setmaxstep(uih_context * c, number_t speed);
+ void uih_setcomplettehandler(uih_context * c, void (h) (void *),
+ void *d);
+ void uih_recalculate(struct uih_context *c);
+ void uih_initstate(struct uih_context *uih);
+ void uih_screentofractalcoord(uih_context * c, int mousex, int mousey,
+ number_t * re, number_t * im);
+
+
+/*cycling functions */
+ void uih_cycling_off(struct uih_context *c);
+ void uih_cycling_stop(struct uih_context *c);
+ void uih_cycling_continue(struct uih_context *c);
+ void uih_setcycling(struct uih_context *c, int speed);
+ int uih_cycling_on(struct uih_context *c);
+ int uih_cycling(struct uih_context *c, int mode);
+
+/*fractal context manipulation routines */
+ void uih_setformula(uih_context * c, int formula);
+ void uih_setperbutation(uih_context * c, number_t re, number_t im);
+ void uih_perbutation(uih_context * c, int mousex, int mousey);
+ void uih_setmaxiter(uih_context * c, int maxiter);
+ void uih_setbailout(uih_context * c, number_t bailout);
+ void uih_setincoloringmode(uih_context * c, int mode);
+ void uih_setoutcoloringmode(uih_context * c, int mode);
+ void uih_setintcolor(uih_context * c, int mode);
+ void uih_setouttcolor(uih_context * c, int mode);
+ void uih_setplane(uih_context * c, int mode);
+ void uih_setmandelbrot(uih_context * c, int mode, int mousex,
+ int mousey);
+ void uih_setfastmode(uih_context * c, int mode);
+ void uih_setguessing(uih_context * c, int range);
+ void uih_setperiodicity(uih_context * c, int periodicity);
+ void uih_display(uih_context * c);
+ void uih_disablejulia(uih_context * c);
+ int uih_enablejulia(uih_context * c);
+ int uih_setjuliamode(uih_context * c, int mode);
+ void uih_setjuliaseed(uih_context * c, number_t zre, number_t zim);
+
+/*filter manipulation */
+ int uih_enablefilter(uih_context * c, int n);
+ void uih_disablefilter(uih_context * c, int n);
+
+/*Animation save routines */
+ int uih_save_enable(struct uih_context *uih, xio_file f, int mode);
+ void uih_save_disable(struct uih_context *uih);
+ void uih_saveframe(struct uih_context *uih);
+ void uih_save_possition(struct uih_context *uih, xio_file f, int mode);
+
+ void uih_load(struct uih_context *uih, xio_file f, xio_constpath name);
+ void uih_loadstr(struct uih_context *uih, CONST char *data);
+ void uih_playstr(struct uih_context *uih, CONST char *data);
+ void uih_playupdate(struct uih_context *uih);
+ void uih_replaydisable(struct uih_context *uih);
+ void uih_skipframe(struct uih_context *uih);
+ int uih_replayenable(struct uih_context *uih, xio_file f,
+ xio_constpath filename, int animroot);
+ void uih_command(struct uih_context *uih, CONST char *command);
+ void uih_playtutorial(struct uih_context *c, CONST char *name);
+
+/* Easy to use functions for handling save/load*/
+ void uih_loadfile(struct uih_context *uih, xio_constpath d);
+ void uih_playfile(struct uih_context *c, xio_constpath d);
+ void uih_loadexample(struct uih_context *c);
+ void uih_savepngfile(struct uih_context *c, xio_constpath d);
+ void uih_saveposfile(struct uih_context *c, xio_constpath d);
+ char *uih_savepostostr(struct uih_context *c);
+ void uih_savecfg(struct uih_context *c);
+ void uih_saveanimfile(struct uih_context *c, xio_constpath d);
+ void uih_update_lines(uih_context * c);
+
+
+/*timer functions */
+ void uih_stoptimers(uih_context * c);
+ void uih_resumetimers(uih_context * c);
+ void uih_slowdowntimers(uih_context * c, int time);
+
+/*text output functions */
+ void uih_clearscreen(uih_context * c);
+ void uih_settextpos(uih_context * c, int x, int y);
+ void uih_text(uih_context * c, CONST char *text);
+ void uih_letterspersec(uih_context * c, int n);
+
+/*image rotation functions */
+ int uih_fastrotate(uih_context * c, int mode);
+ int uih_fastrotateenable(uih_context * c);
+ void uih_fastrotatedisable(uih_context * c);
+ void uih_angle(uih_context * c, number_t angle);
+ void uih_rotatemode(uih_context * c, int mode);
+ void uih_rotate(uih_context * c, int mode);
+ void uih_rotationspeed(uih_context * c, number_t speed);
+
+/*Catalog functions */
+ int uih_loadcatalog(uih_context * c, CONST char *name);
+ void uih_freecatalog(uih_context * c);
+
+ void uih_registermenus(void);
+ void uih_registermenus_i18n(void);
+ void uih_registermenudialogs_i18n(void);
+ void uih_unregistermenus(void);
+
+/*Windows :)*/
+ struct uih_window *uih_registerw(struct uih_context *uih,
+ uih_getposfunc getpos,
+ uih_drawfunc draw, void *data,
+ int flags);
+ void uih_removew(struct uih_context *uih, struct uih_window *w);
+ void uih_clearwindows(struct uih_context *uih);
+ void uih_drawwindows(struct uih_context *uih);
+ void uih_drawborder(struct uih_context *uih, int x, int y, int width,
+ int height, int flags);
+ void uih_setline(struct uih_context *uih, struct uih_window *w,
+ int color, int x1, int y1, int x2, int y2);
+ struct uih_window *uih_registerline(struct uih_context *uih, int color,
+ int x1, int y1, int x2, int y2);
+
+
+/*Messages*/
+ void uih_scrollup(uih_context * c);
+ void uih_clearmessages(uih_context * c);
+ int uih_message(uih_context * c, CONST char *message);
+ int uih_error(uih_context * c, CONST char *error);
+ void uih_rmmessage(uih_context * c, int pid);
+ void uih_printmessages(uih_context * c);
+
+/*Constant framerate functions*/
+ void uih_emulatetimers(uih_context * c);
+ void uih_constantframetime(uih_context * c, int time);
+ void uih_noconstantframetime(uih_context * c);
+
+/*undo and redo*/
+ void uih_saveundo(uih_context * c);
+ void uih_undo(uih_context * c);
+ void uih_redo(uih_context * c);
+
+ void uih_setfont(uih_context * c);
+
+/*animation rendering*/
+ int uih_renderanimation(struct uih_context *gc, CONST char *basename,
+ CONST xio_constpath animation, int width,
+ int height, float pixelwidth,
+ float pixelheight, int frametime, int type,
+ int antialiasing, int slowmode,
+ int letterspersec, CONST char *catalog,
+ int motionvectors, int iframedist2);
+ int uih_renderimage(struct uih_context *gc1, xio_file af,
+ xio_constpath path, struct image *img,
+ int antialias, CONST char *catalog, int noise);
+
+ void uih_initmessages(uih_context * c);
+ void uih_destroymessages(uih_context * c);
+ void uih_inittext(uih_context * c);
+ void uih_destroytext(uih_context * c);
+
+ void uih_inhibittextsw(uih_context * c);
+ int uih_inhibittextselected(uih_context * c);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/version.h.in b/src/include/version.h.in
new file mode 100644
index 0000000..8b80450
--- /dev/null
+++ b/src/include/version.h.in
@@ -0,0 +1,23 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#undef PACKAGE_VERSION
+#define XaoS_VERSION PACKAGE_VERSION
diff --git a/src/include/xerror.h b/src/include/xerror.h
new file mode 100644
index 0000000..2ae5638
--- /dev/null
+++ b/src/include/xerror.h
@@ -0,0 +1,12 @@
+#ifndef XERROR_H
+#define XERROR_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void x_message(CONST char *text, ...);
+ void x_error(CONST char *text, ...);
+ void x_fatalerror(CONST char *text, ...) NORETURN;
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/xio.h b/src/include/xio.h
new file mode 100644
index 0000000..2395302
--- /dev/null
+++ b/src/include/xio.h
@@ -0,0 +1,107 @@
+/* This is implementation of input/output routines similar to stdio.
+ purpose of this library is to hide differences between OSes (Mac OS don't
+ have stdio!) and allow general streams to strings etc. */
+#ifndef XIO1_H
+#define XIO1_H 1
+#include <config.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define XIO_FAILED NULL
+ struct xio_filestruct {
+ void *data;
+ int (*fputc) (int c, struct xio_filestruct * f);
+ int (*fputs) (const char *s, struct xio_filestruct * f);
+ int (*fgetc) (struct xio_filestruct * f);
+ int (*fungetc) (int c, struct xio_filestruct * f);
+ int (*xeof) (struct xio_filestruct * f);
+ int (*fclose) (struct xio_filestruct * f);
+ int (*flush) (struct xio_filestruct * f);
+ };
+
+ typedef struct xio_filestruct *xio_file;
+
+#define xio_puts(s,f) (f)->fputs((s),(f))
+#define xio_putc(s,f) (f)->fputc((s),(f))
+#define xio_getc(f) (f)->fgetc((f))
+#define xio_ungetc(s,f) (f)->fungetc((s),(f))
+#define xio_feof(f) (f)->xeof((f))
+#define xio_close(f) (f)->fclose((f))
+#define xio_flush(f) if ((f)->flush!=NULL) (f)->flush((f))
+
+/* Standard stdio maps. These defines says, that filenames are strings and
+ path is separated by slash or backslash (windoze, dog)
+ the main I/O routines are in the xstdio file
+*/
+
+#ifdef USE_STDIO
+/* Ugly hack because of unknown problems w/ va_list in v*print* in plan9 */
+#ifdef _plan9_
+#define va_list char *
+#endif
+#include <stdio.h>
+
+ typedef char *xio_path;
+ typedef CONST char *xio_constpath;
+ typedef char xio_pathdata[4096];
+ extern char *xio_appdir; /*Where application binary is */
+ extern char *xio_homedir;
+
+
+#ifdef _WIN32
+#define XIO_PATHSEP '\\'
+#define XIO_PATHSEPSTR "\\"
+#define XIO_EMPTYPATH ".\\" /*Should be also call to currentdir function */
+#else
+#ifdef DJGPP
+#define XIO_PATHSEP '\\'
+#define XIO_PATHSEPSTR "\\"
+#define XIO_EMPTYPATH ".\\" /*Should be also call to currentdir function */
+#else
+#define XIO_PATHSEP '/'
+#define XIO_PATHSEPSTR "/"
+#define XIO_EMPTYPATH "./" /*Should be also call to currentdir function */
+#endif
+#endif
+#define XIO_EOF EOF
+
+#define xio_addfname(destination, dirrectory, filename) \
+{strcpy(destination,dirrectory);if (strlen(dirrectory)&&destination[strlen(destination)-1]!=XIO_PATHSEP) strcat(destination,XIO_PATHSEPSTR);strcat(destination,filename);}
+#define xio_addextension(destination,extension) strcat(destination,extension)
+
+#ifdef _plan9_
+#define xio_errorstring() errstr
+#else
+#define xio_errorstring() strerror(errno)
+#endif /*plan9 */
+
+ char *xio_fixpath(CONST char *name);
+#endif /*USE_STDIO */
+
+ xio_file xio_ropen(xio_constpath name);
+ xio_file xio_wopen(xio_constpath name);
+ xio_file xio_strropen(CONST char *c);
+ xio_file xio_strwopen(void);
+ char *xio_getstring(xio_file f);
+ xio_path xio_getdirectory(xio_constpath name);
+ xio_path xio_getfilename(CONST char *base, CONST char *extension);
+ xio_file xio_getrandomexample(xio_path name);
+ xio_file xio_getcatalog(CONST char *name);
+ xio_file xio_gethelp(void);
+ xio_file xio_gettutorial(CONST char *name, xio_path result);
+
+ /*look trought directory with examples, choose one file, open it (and return
+ *descriptor+put name into name parameter*/
+ int xio_exist(xio_constpath name);
+ int xio_getfiles(xio_constpath path, char ***names, char ***dirs,
+ int *nnames, int *ndirs);
+ void xio_init(CONST char *c);
+ void xio_uninit(void);
+
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/xldio.h b/src/include/xldio.h
new file mode 100644
index 0000000..b17a993
--- /dev/null
+++ b/src/include/xldio.h
@@ -0,0 +1,14 @@
+#ifndef X_LDIO_H
+#define X_LDIO_H
+#ifdef USE_XLDIO
+#include "xio.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+ void x_ldout(long double param, int prec, xio_file stream);
+ long double x_strtold(CONST char *s, CONST char **sret);
+#ifdef __cplusplus
+}
+#endif
+#endif /*USE_XLDIO */
+#endif /*X_LDIO_H */
diff --git a/src/include/xmenu.h b/src/include/xmenu.h
new file mode 100644
index 0000000..70d3ccc
--- /dev/null
+++ b/src/include/xmenu.h
@@ -0,0 +1,377 @@
+#ifndef XMENU_H
+#define XMENU_H
+#include <xio.h>
+#include <fconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ struct uih_context;
+ typedef union {
+ char *dstring;
+ int dint;
+ number_t number;
+ number_t dcoord[2];
+ xio_path dpath;
+ void *dummy;
+ } dialogparam;
+ typedef struct dialog {
+ CONST char *question;
+ int type;
+ int defint;
+ CONST char *defstr;
+ number_t deffloat;
+ number_t deffloat2;
+ } menudialog;
+
+ typedef char *(*tokenfunc) (struct uih_context * c);
+#define DIALOG_INT 1
+#define DIALOG_FLOAT 2
+#define DIALOG_STRING 3
+#define DIALOG_KEYSTRING 4
+#define DIALOG_IFILE 5
+#define DIALOG_OFILE 6
+#define DIALOG_CHOICE 7
+#define DIALOG_ONOFF 8
+#define DIALOG_COORD 9
+
+#define DIALOGIFILE(question,filename) {question, DIALOG_IFILE, 0,filename}
+#define DIALOGOFILE(question,filename) {question, DIALOG_OFILE, 0,filename}
+#define DIALOGSTR(question,default) {question, DIALOG_STRING, 0, default}
+#define DIALOGKEYSTR(question,default) {question, DIALOG_KEYSTRING, 0, default}
+#define DIALOGINT(question,default) {question, DIALOG_INT, default}
+#define DIALOGONOFF(question,default) {question, DIALOG_ONOFF, default}
+#define DIALOGFLOAT(question,default) {question, DIALOG_FLOAT, 0, NULL, default}
+#define DIALOGCHOICE(question,table,default) {question, DIALOG_CHOICE, default,(CONST char *)table}
+#define DIALOGCOORD(question,default1,default2) {question, DIALOG_COORD,0, NULL, default1,default2}
+
+#define DIALOGIFILE_I(_question,_filename) \
+ menudialogs_i18n[no_menudialogs_i18n].question=_question; \
+ menudialogs_i18n[no_menudialogs_i18n].type=DIALOG_IFILE; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=0; \
+ menudialogs_i18n[no_menudialogs_i18n].defstr=_filename; \
+ menudialogs_i18n[no_menudialogs_i18n].deffloat=0; \
+ menudialogs_i18n[no_menudialogs_i18n].deffloat2=0; \
+ ++no_menudialogs_i18n;
+#define DIALOGOFILE_I(_question,_filename) \
+ menudialogs_i18n[no_menudialogs_i18n].question=_question; \
+ menudialogs_i18n[no_menudialogs_i18n].type=DIALOG_OFILE; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=0; \
+ menudialogs_i18n[no_menudialogs_i18n].defstr=_filename; \
+ ++no_menudialogs_i18n;
+#define DIALOGKEYSTR_I(_question,_default) \
+ menudialogs_i18n[no_menudialogs_i18n].question=_question; \
+ menudialogs_i18n[no_menudialogs_i18n].type=DIALOG_KEYSTRING; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=0; \
+ menudialogs_i18n[no_menudialogs_i18n].defstr=_default; \
+ ++no_menudialogs_i18n;
+#define DIALOGSTR_I(_question,_default) \
+ menudialogs_i18n[no_menudialogs_i18n].question=_question; \
+ menudialogs_i18n[no_menudialogs_i18n].type=DIALOG_STRING; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=0; \
+ menudialogs_i18n[no_menudialogs_i18n].defstr=_default; \
+ ++no_menudialogs_i18n;
+#define DIALOGINT_I(_question,_default) \
+ menudialogs_i18n[no_menudialogs_i18n].question=_question; \
+ menudialogs_i18n[no_menudialogs_i18n].type=DIALOG_INT; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=_default; \
+ ++no_menudialogs_i18n;
+#define DIALOGONOFF_I(_question,_default) \
+ menudialogs_i18n[no_menudialogs_i18n].question=_question; \
+ menudialogs_i18n[no_menudialogs_i18n].type=DIALOG_ONOFF; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=_default; \
+ ++no_menudialogs_i18n;
+#define DIALOGFLOAT_I(_question,_default) \
+ menudialogs_i18n[no_menudialogs_i18n].question=_question; \
+ menudialogs_i18n[no_menudialogs_i18n].type=DIALOG_FLOAT; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=0; \
+ menudialogs_i18n[no_menudialogs_i18n].defstr=NULL; \
+ menudialogs_i18n[no_menudialogs_i18n].deffloat=_default; \
+ ++no_menudialogs_i18n;
+#define DIALOGCHOICE_I(_question,_table,_default) \
+ menudialogs_i18n[no_menudialogs_i18n].question=_question; \
+ menudialogs_i18n[no_menudialogs_i18n].type=DIALOG_CHOICE; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=_default; \
+ menudialogs_i18n[no_menudialogs_i18n].defstr=(CONST char *)_table; \
+ ++no_menudialogs_i18n;
+#define DIALOGCOORD_I(_question,_default1,_default2) \
+ menudialogs_i18n[no_menudialogs_i18n].question=_question; \
+ menudialogs_i18n[no_menudialogs_i18n].type=DIALOG_COORD; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=0; \
+ menudialogs_i18n[no_menudialogs_i18n].defstr=NULL; \
+ menudialogs_i18n[no_menudialogs_i18n].deffloat=_default1; \
+ menudialogs_i18n[no_menudialogs_i18n].deffloat2=_default2; \
+ ++no_menudialogs_i18n;
+
+#define NULL_I() \
+ menudialogs_i18n[no_menudialogs_i18n].question=NULL; \
+ menudialogs_i18n[no_menudialogs_i18n].type=0; \
+ menudialogs_i18n[no_menudialogs_i18n].defint=0; \
+ menudialogs_i18n[no_menudialogs_i18n].defstr=NULL; \
+ menudialogs_i18n[no_menudialogs_i18n].deffloat=0; \
+ menudialogs_i18n[no_menudialogs_i18n].deffloat2=0; \
+ ++no_menudialogs_i18n;
+
+ typedef struct menuitem {
+ CONST char *menuname;
+ CONST char *key;
+ CONST char *name;
+ CONST char *shortname;
+ int type;
+ int flags;
+ void (*function) (void);
+ int iparam;
+ CONST void *pparam;
+ int (*control) (void);
+ CONST menudialog *(*dialog) (struct uih_context *);
+ } menuitem;
+
+#define MENU_NOPARAM 1
+#define MENU_SUBMENU 2
+#define MENU_INT 3
+#define MENU_STRING 4
+#define MENU_DIALOG 6
+#define MENU_CUSTOMDIALOG 7
+#define MENU_SEPARATOR 8
+
+/* Definitions for static menuitems. These items cannot be internationalized.
+ All of these definitions will become obsolete soon: */
+
+#define MENUNOP(menuname,key,name,shortname,flags,function) {menuname, key,name,shortname, MENU_NOPARAM, flags, (void (*)(void))function}
+#define MENUNOPCB(menuname,key,name,shortname,flags,function,checkbutton) {menuname, key, name,shortname, MENU_NOPARAM, (flags)|MENUFLAG_CHECKBOX, (void (*)(void))function,0,NULL,(int (*)(void))checkbutton}
+#define MENUCOORDCB(menuname,key,name,shortname,flags,function,checkbutton) {menuname, key, name,shortname, MENU_COORD, (flags)|MENUFLAG_CHECKBOX, (void (*)(void))function,0,NULL,(int (*)(void))checkbutton}
+#define MENUCOORD(menuname,key,name,shortname,flags,function) {menuname, key, name,shortname, MENU_COORD, flags, (void (*)(void))function}
+
+#define MENUINT(menuname,key,name,shortname,flags,function,param) {menuname, key, name,shortname, MENU_INT, flags, (void (*)(void))function,param}
+#define MENUINTRB(menuname,key,name,shortname,flags,function,param,checkbutton) {menuname, key, name,shortname, MENU_INT, (flags)|MENUFLAG_RADIO, (void (*)(void))function,param,NULL,(int (*)(void))checkbutton}
+#define SUBMENU(menuname,key,name,param) {menuname, key, name,param, MENU_SUBMENU, 0, NULL,0,NULL}
+
+#define MENUSEPARATOR(menuname) {menuname, 0, "", NULL, MENU_SEPARATOR, 0, NULL,0,NULL}
+#define SUBMENUNOOPT(menuname,key,name,param) {menuname, key, name,param, MENU_SUBMENU, MENUFLAG_NOOPTION, NULL,0,NULL}
+#define MENUDIALOG(menuname,key,name,shortname,flags,function,param) {menuname, key, name,shortname, MENU_DIALOG, flags, (void (*)(void))function,0,param}
+#define MENUDIALOGCB(menuname,key,name,shortname,flags,function,param,check) {menuname, key, name,shortname, MENU_DIALOG, flags|MENUFLAG_CHECKBOX, (void (*)(void))function,0,param,(int (*)(void))check}
+#define MENUCDIALOG(menuname,key,name,shortname,flags,function,param) {menuname, key, name,shortname, MENU_CUSTOMDIALOG, flags, (void (*)(void))function,0,NULL,NULL,(CONST menudialog *(*)(struct uih_context *))param}
+#define MENUCDIALOGCB(menuname,key,name,shortname,flags,function,param,check) {menuname, key, name,shortname, MENU_CUSTOMDIALOG, flags|MENUFLAG_CHECKBOX,(void (*)(void))function,0,NULL,(int (*)(void))check,(CONST menudialog *(*)(struct uih_context *))param}
+#define MENUSTRING(menuname,key,name,shortname,flags,function,param) {menuname, key, name,shortname, MENU_STRING, flags, (void (*)(void))function,0,param}
+
+
+/* Definitions for internationalized menus. All of them must be defined
+ dynamically because gettext() cannot be used within a static
+ variable. Usage (example):
+
+ SUBMENU_I("file", "q", "Quit", "quitmenu")
+
+ See ui/ui.c, ui_registermenus_i18n() for further details. */
+
+#define MENUNOP_I(_menuname,_key,_name,_shortname,_flags,_function)\
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _shortname; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_NOPARAM; \
+ menuitems_i18n[no_menuitems_i18n].flags = _flags; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].pparam = NULL; \
+ menuitems_i18n[no_menuitems_i18n].function = (void (*)(void))_function; \
+ ++no_menuitems_i18n;
+
+#define MENUNOPCB_I(_menuname,_key,_name,_shortname,_flags,_function,_checkbutton) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _shortname; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_NOPARAM; \
+ menuitems_i18n[no_menuitems_i18n].flags = (_flags)|MENUFLAG_CHECKBOX; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].pparam = NULL; \
+ menuitems_i18n[no_menuitems_i18n].function = (void (*)(void))_function; \
+ menuitems_i18n[no_menuitems_i18n].control = (int (*)(void))_checkbutton; \
+ ++no_menuitems_i18n;
+
+#define MENUINT_I(_menuname,_key,_name,_shortname,_flags,_function,_param) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _shortname; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_INT; \
+ menuitems_i18n[no_menuitems_i18n].flags = _flags; \
+ menuitems_i18n[no_menuitems_i18n].iparam = _param; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].function = (void (*)(void))_function; \
+ ++no_menuitems_i18n;
+
+#define MENUINTRB_I(_menuname,_key,_name,_shortname,_flags,_function,_param,_checkbutton) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _shortname; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_INT; \
+ menuitems_i18n[no_menuitems_i18n].flags = (_flags)|MENUFLAG_RADIO; \
+ menuitems_i18n[no_menuitems_i18n].iparam = _param; \
+ menuitems_i18n[no_menuitems_i18n].pparam = NULL; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].function = (void (*)(void))_function; \
+ menuitems_i18n[no_menuitems_i18n].control = (int (*)(void))_checkbutton; \
+ ++no_menuitems_i18n;
+
+#define SUBMENU_I(_menuname,_key,_name,_param) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _param; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_SUBMENU; \
+ menuitems_i18n[no_menuitems_i18n].flags = 0; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].pparam = NULL; \
+ menuitems_i18n[no_menuitems_i18n].function = NULL; \
+ ++no_menuitems_i18n;
+
+#define MENUDIALOG_I(_menuname,_key,_name,_shortname,_flags,_function,_param) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _shortname; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_DIALOG; \
+ menuitems_i18n[no_menuitems_i18n].flags = _flags; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].pparam = _param; \
+ menuitems_i18n[no_menuitems_i18n].function = (void (*)(void))_function; \
+ ++no_menuitems_i18n;
+
+#define MENUDIALOGCB_I(_menuname,_key,_name,_shortname,_flags,_function,_param,_check) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _shortname; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_DIALOG; \
+ menuitems_i18n[no_menuitems_i18n].flags = (_flags)|MENUFLAG_CHECKBOX; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].pparam = _param; \
+ menuitems_i18n[no_menuitems_i18n].function = (void (*)(void))_function; \
+ menuitems_i18n[no_menuitems_i18n].control = (int (*)(void))_check; \
+ ++no_menuitems_i18n;
+
+#define MENUCDIALOG_I(_menuname,_key,_name,_shortname,_flags,_function,_param) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _shortname; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_CUSTOMDIALOG; \
+ menuitems_i18n[no_menuitems_i18n].flags = _flags; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].pparam = NULL; \
+ menuitems_i18n[no_menuitems_i18n].control = NULL; \
+ menuitems_i18n[no_menuitems_i18n].function = (void (*)(void))_function; \
+ menuitems_i18n[no_menuitems_i18n].dialog = (CONST menudialog *(*)(struct uih_context *))_param; \
+ ++no_menuitems_i18n;
+
+#define MENUCDIALOGCB_I(_menuname,_key,_name,_shortname,_flags,_function,_param,_check)\
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _shortname; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_CUSTOMDIALOG; \
+ menuitems_i18n[no_menuitems_i18n].flags = (_flags)|MENUFLAG_CHECKBOX; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].pparam = _param; \
+ menuitems_i18n[no_menuitems_i18n].function = (void (*)(void))_function; \
+ menuitems_i18n[no_menuitems_i18n].control = (int (*)(void))_check; \
+ menuitems_i18n[no_menuitems_i18n].dialog = (CONST menudialog *(*)(struct uih_context *))_param; \
+ ++no_menuitems_i18n;
+
+#define MENUSEPARATOR_I(_menuname) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = NULL; \
+ menuitems_i18n[no_menuitems_i18n].key = 0; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_SEPARATOR; \
+ menuitems_i18n[no_menuitems_i18n].flags = 0; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = ""; \
+ menuitems_i18n[no_menuitems_i18n].pparam = NULL; \
+ menuitems_i18n[no_menuitems_i18n].function = NULL; \
+ ++no_menuitems_i18n;
+
+#define SUBMENUNOOPT_I(_menuname,_key,_name,_param) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _param; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_SUBMENU; \
+ menuitems_i18n[no_menuitems_i18n].flags = MENUFLAG_NOOPTION; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].pparam = NULL; \
+ menuitems_i18n[no_menuitems_i18n].function = NULL; \
+ ++no_menuitems_i18n;
+
+#define MENUSTRING_I(_menuname,_key,_name,_shortname,_flags,_function,_param) \
+ menuitems_i18n[no_menuitems_i18n].menuname = _menuname; \
+ menuitems_i18n[no_menuitems_i18n].shortname = _shortname; \
+ menuitems_i18n[no_menuitems_i18n].key = _key; \
+ menuitems_i18n[no_menuitems_i18n].type = MENU_STRING; \
+ menuitems_i18n[no_menuitems_i18n].flags = _flags; \
+ menuitems_i18n[no_menuitems_i18n].iparam = 0; \
+ menuitems_i18n[no_menuitems_i18n].name = _name; \
+ menuitems_i18n[no_menuitems_i18n].pparam = _param; \
+ menuitems_i18n[no_menuitems_i18n].function = (void (*)(void))_function; \
+ ++no_menuitems_i18n;
+
+/* End of i18n definitions. */
+
+
+#define MENUFLAG_CHECKBOX 1
+#define MENUFLAG_RADIO 2
+#define MENUFLAG_INTERRUPT 4
+#define MENUFLAG_INCALC 8
+#define MENUFLAG_NOMENU 16
+#define MENUFLAG_NOOPTION 32
+#define MENUFLAG_NOPLAY 64
+#define MENUFLAG_ATSTARTUP 128
+#define MENUFLAG_DIALOGATDISABLE 256
+
+#define NITEMS(n) (sizeof(n)/sizeof(menuitem))
+#define menu_getdialog(context, m) \
+ ((m)->type==MENU_DIALOG?(CONST menudialog *)(m)->pparam:(m)->dialog(context))
+
+ void menu_add(CONST menuitem * item, int n);
+ void menu_insert(CONST menuitem * item, CONST char *before, int n);
+ CONST menuitem *menu_findkey(CONST char *key, CONST char *root);
+ CONST menuitem *menu_findcommand(CONST char *name);
+ CONST char *menu_fullname(CONST char *menu);
+ CONST menuitem *menu_item(CONST char *menu, int n);
+ void menu_delete(CONST menuitem * items, int n);
+ int menu_enabled(CONST menuitem * item, struct uih_context *c);
+ void menu_activate(CONST menuitem * item, struct uih_context *c,
+ dialogparam * d);
+ CONST menuitem *menu_genernumbered(int n, CONST char *menuname,
+ CONST char *CONST * CONST names,
+ CONST char *keys, int type,
+ int flags,
+ void (*fint) (struct uih_context *
+ context, int),
+ int (*cint) (struct uih_context *
+ context, int),
+ CONST char *prefix);
+ void menu_delnumbered(int n, CONST char *name);
+ void menu_addqueue(CONST menuitem * item, dialogparam * d);
+ CONST menuitem *menu_delqueue(dialogparam ** d);
+ void menu_destroydialog(CONST menuitem * item, dialogparam * d,
+ struct uih_context *uih);
+ int menu_havedialog(CONST menuitem * item, struct uih_context *c);
+ int menu_available(CONST menuitem * item, CONST char *root);
+ CONST char *menu_processcommand(struct uih_context *uih, tokenfunc f,
+ int scheme, int mask,
+ CONST char *root);
+ void menu_printhelp(void);
+
+ number_t menu_getfloat(CONST char *s, CONST char **error);
+ CONST char *menu_fillparam(struct uih_context *uih, tokenfunc f,
+ CONST menudialog * d, dialogparam * p);
+ int menu_processargs(int n, int argc, char **argv);
+ void uih_xshlprintmenu(struct uih_context *c, CONST char *name);
+ void uih_xshlprintmenus(struct uih_context *c);
+ void menu_forall(struct uih_context *c,
+ void (*callback) (struct uih_context * c,
+ CONST menuitem * item));
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/xshl.h b/src/include/xshl.h
new file mode 100644
index 0000000..05631f8
--- /dev/null
+++ b/src/include/xshl.h
@@ -0,0 +1,50 @@
+#ifndef XSHL_H
+#define XSHL_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define XSHL_BIG 1
+#define XSHL_EMPH 2
+#define XSHL_WHITE 4
+#define XSHL_RED 8
+#define XSHL_BLACK 16
+#define XSHL_COLORMASK (XSHL_BLACK|XSHL_RED|XSHL_WHITE)
+#define XSHL_RIGHTALIGN 32
+#define XSHL_CENTERALIGN 64
+#define XSHL_MONOSPACE 128
+#define XSHL_LINK 256
+ struct xshl_context {
+ int flags;
+ char *linktext;
+ };
+ struct xshl_item {
+ struct xshl_context c;
+ char *text;
+ int x;
+ int width;
+ struct xshl_item *next;
+ };
+ struct xshl_line {
+ int y;
+ struct xshl_item *first;
+ };
+ extern char *xshl_error;
+ struct xshl_line *xshl_interpret(void *userdata, int (*get) (void *),
+ int width, int getwidth(void *,
+ int flags,
+ CONST char
+ *text),
+ int startflags, int smallheight,
+ int bigheight);
+ void xshl_free(struct xshl_line *);
+ int xshl_textlen(void *data, int flags, CONST char *text);
+ void xshl_print(int startskip, struct xshl_line *lines);
+ struct xshl_line *help_make(CONST char *command,
+ int getwidth(void *, int flags,
+ CONST char *text), int width,
+ int smallheight, int bigheight);
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/xthread.h b/src/include/xthread.h
new file mode 100644
index 0000000..01f210c
--- /dev/null
+++ b/src/include/xthread.h
@@ -0,0 +1,208 @@
+/*
+ * An XaoS thread API implementation
+ * Many functions are implemented as macros that maps simple
+ * XaoS thread API into architecture depended API.
+ * I tried avoid functions because of speed issues
+ * So this header will be quite messy soon :)
+ *
+ * Supported API for now:
+ * pthread (POSIX) enabled using USE_PTHREAD
+ * nothread (my own) enabled by default
+ */
+#ifndef THREAD_H
+#define THREAD_H 1
+#include <fconfig.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+#define MAXTHREADS 32
+ /*You might increase this constant if needed
+ (xaos on connection machine? :) */
+
+#define NSEMAPHORS 2
+#define MAXSEMAPHORS 2
+#define NSLEEPS 2
+#define MAXCONDS 2
+
+#ifdef USE_PTHREAD
+#include <pthread.h>
+#endif
+#ifdef __BEOS__
+#include <OS.h>
+#endif
+
+ struct taskinfo {
+ int n;
+#ifdef USE_PTHREAD
+ pthread_t id;
+#endif
+#ifdef _plan9_
+ int id;
+#endif
+#ifdef __BEOS__
+ thread_id id;
+#endif
+ };
+
+ extern struct taskinfo definfo;
+ extern int ethreads; /*Is threading enabled? */
+ extern int nthreads; /*Number of threads */
+ typedef void (*xfunction) (void *, struct taskinfo *, int, int);
+
+/*No-thread API implementation version */
+#define nothread { }
+#define nothread_init(nthreads) nothread
+#define nothread_uninit() nothread
+#define nothread_function(f,data,range) f(data,&definfo,0,range)
+#define nothread_bgjob(f,d) f(d,&definfo,0,0)
+#define nothread_lock(n) nothread
+#define nothread_unlock(n) nothread
+#define nothread_sync() nothread
+#define nothread_sleep(n,l) nothread
+#define nothread_wakeup(n) nothread
+#define nothread_wakefirst(n) nothread
+
+#define xth_wrap(f1,f2) if(nthreads!=1) f1(); else f2();
+
+#ifdef USE_PTHREAD
+/* A posix thread API maps */
+ void pth_init(int nthreads);
+ void pth_uninit(void);
+ void pth_function(xfunction f, void *d, int r);
+ void pth_synchronize(void);
+ void pth_bgjob(xfunction f, void *d);
+ extern pthread_mutex_t semaphors[MAXSEMAPHORS];
+ extern pthread_cond_t conds[MAXCONDS];
+
+/*Map pthread API to XaoS thread API */
+
+#define xth_init(nthreads) pth_init(nthreads)
+#define xth_uninit() pth_uninit()
+#define xth_lock(n) if(ethreads) pthread_mutex_lock(semaphors+(n))
+#define xth_unlock(n) if(ethreads) pthread_mutex_unlock(semaphors+(n))
+#define xth_function(f,d,r) if(ethreads) pth_function(f,d,r); else nothread_function(f,d,r)
+#define xth_nthread(ts) (ethreads?ts->n:0)
+#define xth_sync() if(ethreads) pth_synchronize();
+#define xth_bgjob(f,d) if(ethreads) pth_bgjob(f,d); else f(d,&definfo,0,0);
+#define xth_sleep(n,l) if(ethreads) pthread_cond_wait(conds+(n),semaphors+(l))
+#define xth_wakeup(n) if(ethreads) pthread_cond_broadcast(conds+(n))
+#define xth_wakefirst(n) if(ethreads) pthread_cond_signal(conds+(n))
+#define API_MAPPED
+#endif /*USE_PTHREAD */
+
+#ifdef _plan9_
+
+ struct Stack {
+ int nwaiting;
+ int tags[MAXTHREADS];
+ };
+#ifdef _plan9v2_
+#include <lock.h> /* in plan9v3 part of libc */
+#endif
+/* A plan9 thread API maps */
+ void p9wait(struct Stack *s, Lock * l);
+ void p9wakeup(struct Stack *s);
+ void p9wakeall(struct Stack *s);
+ void p9init(int nthreads);
+ void p9uninit(void);
+ void p9function(xfunction f, void *d, int r);
+ void p9synchronize(void);
+ void p9bgjob(xfunction f, void *d);
+ extern Lock semaphors[MAXSEMAPHORS];
+ extern struct Stack conds[MAXCONDS];
+
+/*Map pthread API to XaoS thread API */
+
+#define xth_init(nthreads) p9init(nthreads)
+#define xth_uninit() p9uninit()
+#define xth_lock(n) if(ethreads) lock(semaphors+(n))
+#define xth_unlock(n) if(ethreads) unlock(semaphors+(n))
+#define xth_function(f,d,r) if(ethreads) p9function(f,d,r); else nothread_function(f,d,r)
+#define xth_nthread(ts) (ethreads?ts->n:0)
+#define xth_sync() if(ethreads) p9synchronize();
+#define xth_bgjob(f,d) if(ethreads) p9bgjob(f,d); else f(d,&definfo,0,0);
+#define xth_sleep(n,l) if(ethreads) p9wait(conds+(n), semaphors+(l))
+#define xth_wakeup(n) if(ethreads) p9wakeall(conds+(n))
+#define xth_wakefirst(n) if(ethreads) p9wakeup(conds+(n))
+#define API_MAPPED
+#endif /*USE_PTHREAD */
+
+#ifdef __BEOS__
+ typedef struct {
+ int32 cnt;
+ sem_id sem;
+ } benaphore;
+
+ void acquire_benaphore(benaphore * p);
+ void release_benaphore(benaphore * p);
+#ifdef __GNUC__
+ extern
+#endif
+ inline void acquire_benaphore(benaphore * p) {
+ if (atomic_add(&(p->cnt), 1) >= 1) {
+ /* Someone was faster. */
+ while (acquire_sem(p->sem) == B_INTERRUPTED);
+ }
+ }
+#ifdef __GNUC__
+ extern
+#endif
+ inline void release_benaphore(benaphore * p) {
+ if (atomic_add(&(p->cnt), -1) > 1) {
+ /* Someone was slower. */
+ release_sem(p->sem);
+ }
+ }
+
+ extern benaphore mutexes[MAXSEMAPHORS];
+ extern benaphore condvars[MAXCONDS];
+
+ void be_thread_init(int num_threads);
+ void be_thread_uninit(void);
+ void be_thread_function(xfunction f, void *d, int r);
+ void be_thread_synchronize(void);
+ void be_thread_bgjob(xfunction f, void *d);
+ void be_thread_sleep(benaphore * pCondition, benaphore * pMutex);
+ void be_thread_wakeup(benaphore * pCondition);
+ void be_thread_wakefirst(benaphore * pCondition);
+
+/* Map BeOS API to XaoS thread API. */
+
+#define xth_init(nthreads) be_thread_init(nthreads)
+#define xth_uninit() be_thread_uninit()
+#define xth_function(f,d,r) if(ethreads) be_thread_function(f,d,r); else nothread_function(f,d,r)
+#define xth_nthread(ts) (ethreads?ts->n:0)
+#define xth_sync() if(ethreads) be_thread_synchronize();
+#define xth_bgjob(f,d) if(ethreads) be_thread_bgjob(f,d); else f(d,&definfo,0,0);
+#define xth_lock(n) if(ethreads) acquire_benaphore(mutexes+(n))
+#define xth_unlock(n) if(ethreads) release_benaphore(mutexes+(n))
+#define xth_sleep(n,l) if(ethreads) be_thread_sleep(condvars+(n),mutexes+(l))
+#define xth_wakeup(n) if(ethreads) be_thread_wakeup(condvars+(n))
+#define xth_wakefirst(n) if(ethreads) be_thread_wakefirst(condvars+(n))
+#define API_MAPPED
+#endif /* __BEOS__ */
+
+#ifndef API_MAPPED
+/*
+ * No thread support is compiled - do just wrappers
+ * to nothread implementation
+ */
+#define nthreads 1
+#define ethreads 0
+#define xth_init(n) nothread_init(n)
+#define xth_uninit() nothread_uninit()
+#define xth_function(f,d,r) nothread_function(f,d,r)
+#define xth_lock(n) nothread_lock(n)
+#define xth_unlock(n) nothread_unlock(n)
+#define xth_sync() nothread_sync()
+#define xth_bgjob(f,d) nothread_bgjob(f,d)
+#define xth_nthread(ts) 0
+#define xth_wakeup(n) nothreads_wakeup(n)
+#define xth_wakefirst(n) nothreads_wakefirst(n)
+#define xth_sleep(n,l) nothreads_sleep(n,l)
+#endif
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/src/include/zoom.h b/src/include/zoom.h
new file mode 100644
index 0000000..f42eecd
--- /dev/null
+++ b/src/include/zoom.h
@@ -0,0 +1,40 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef ZOOM_H
+#define ZOOM_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+#define LOWQUALITY (1<<30)
+#define ZOOMMASK (LOWQUALITY|UNCOMPLETTE)
+
+ extern CONST struct filteraction zoom_filter;
+ extern struct filter cfilter;
+ extern CONST struct filteraction subwindow_filter;
+ void subwindow_setsecond(struct filter *f, struct filter *f1);
+
+#ifdef __cplusplus
+}
+#endif
+#endif /* ZOOM_H */
diff --git a/src/sffe/About b/src/sffe/About
new file mode 100644
index 0000000..bea0456
--- /dev/null
+++ b/src/sffe/About
@@ -0,0 +1,4 @@
+SFFE ( Segfautlabs Formula Evaluator )
+sffe is very fast complex math formula evaluator written in C.
+you can read more about sffe lib at
+ http://www.segfaultlabs.com/projects/sffe
diff --git a/src/sffe/Makefile.in b/src/sffe/Makefile.in
new file mode 100644
index 0000000..6d1f565
--- /dev/null
+++ b/src/sffe/Makefile.in
@@ -0,0 +1,36 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = sffe.c \
+ sffe_cmplx_asm.c \
+ sffe_cmplx_gsl.c
+
+OBJS = $(SRCS:.c=.o) @ASM_CMPLX_O@
+
+TLIB = ../lib/libsffe.a
+
+all: $(TLIB)
+
+asm/cmplx.o: asm/cmplx.asm
+ nasm -f @CMPLX_O_TARGET@ asm/cmplx.asm -oasm/cmplx.o
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $(OBJS) @ASM_CMPLX_O@
+ $(RANLIB) $@
+
+keywords.c: keywords.gperf
+ gperf -t -p -D -C -a keywords.gperf > keywords.c
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas] asm/*.o
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
diff --git a/src/sffe/asm/build.sh b/src/sffe/asm/build.sh
new file mode 100644
index 0000000..9c0f362
--- /dev/null
+++ b/src/sffe/asm/build.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+nasm -f elf cmplx.asm -ocmplx.o
+# Not used anymore because ../Makefile already contains this compilation.
diff --git a/src/sffe/asm/build_win.sh b/src/sffe/asm/build_win.sh
new file mode 100644
index 0000000..8f1214b
--- /dev/null
+++ b/src/sffe/asm/build_win.sh
@@ -0,0 +1,3 @@
+#!/bin/bash
+nasm -f coff cmplx.asm -ocmplx.o
+# Not used anymore because ../Makefile already contains this compilation.
diff --git a/src/sffe/asm/cmplx.asm b/src/sffe/asm/cmplx.asm
new file mode 100644
index 0000000..ea3826b
--- /dev/null
+++ b/src/sffe/asm/cmplx.asm
@@ -0,0 +1,901 @@
+ ; COMPLEX NUMBER ARITHMETICS
+ ; Mateusz Malczak
+ ; NASM version
+ ; http://www.malczak.info
+ ; SFFE libs
+ ; http://segfaultlabs.com/projects/sffe
+ global _sffecabs,_sffecarg,_sffecargs,_sffecargc
+ global _sffecinv
+ global _sffecexp,_sffecln,_sffeclog2,_sffeclog
+ global _sffecsin,_sffeccos,_sffecsincos,_sffectan,_sffeccot
+ global _sffecsinh,_sffeccosh,_sffectanh,_sffeccoth
+ global _sffeccpow, _sffecpowd, _sffecpowi, _sffecpowc
+ global _sffecsqrt, _sffecrtni
+
+ %ifndef DELPHI
+ ; section .text use32 class=CODE ;class=CODE - needed for Borlands Compiler
+
+ ; section CODE use32
+ ; ".text" is more portable than "CODE use32":
+ section .text
+ %endif
+
+ ;; internal use
+%ifdef DELPHI
+[section expfunc_text use32]
+%endif
+_sffecexpfnc: ; exponent of real argument
+ fldl2e
+ fmulp st1
+ fld st0
+ frndint
+ fsub to st1
+ fld1
+ fscale
+ fstp st1
+ fxch st1
+ f2xm1
+ fld1
+ faddp st1
+ fmulp st1
+ ret
+
+ ;; globals
+%ifdef DELPHI
+[section cabs_text use32]
+%endif
+_sffecabs:
+ push ebp
+ mov ebp, esp
+ fld qword [ebp+08h]
+ fmul qword [ebp+08h]
+ fld qword [ebp+10h]
+ fmul qword [ebp+10h]
+ faddp st1
+ fsqrt
+ leave
+ ret
+
+%ifdef DELPHI
+[section carg_text use32]
+%endif
+_sffecarg:
+ push ebp
+ mov ebp, esp
+ fld qword [ebp+08h]
+ fld qword [ebp+10h]
+ fpatan
+ wait
+ leave
+ ret
+
+%ifdef DELPHI
+[section cargs_text use32]
+%endif
+_sffecargs:
+ push ebp
+ mov ebp, esp
+ fld qword [ebp+10h]
+ fld qword [ebp+08h]
+ fmul qword [ebp+08h]
+ fld qword [ebp+10h]
+ fmul qword [ebp+10h]
+ faddp st1
+ fsqrt
+ fdivp st1
+ wait
+ leave
+ ret
+
+%ifdef DELPHI
+[section cargc_text use32]
+%endif
+_sffecargc:
+ push ebp
+ mov ebp, esp
+ fld qword [ebp+08h]
+ fld qword [ebp+08h]
+ fmul qword [ebp+08h]
+ fld qword [ebp+10h]
+ fmul qword [ebp+10h]
+ faddp st1
+ fsqrt
+ fdivp st1
+ wait
+ leave
+ ret
+
+%ifdef DELPHI
+[section cinv_text use32]
+%endif
+_sffecinv:
+ push ebp
+ mov ebp, esp
+ mov edx, [ebp+08h]
+ fld qword [ebp+0ch]
+ fld qword [ebp+14h]
+ fld st0
+ fmul to st0
+ fld st2
+ fmul to st0
+ faddp st1
+ fdiv to st1
+ fdiv to st2
+ fstp st0
+ fchs
+ fstp qword [edx+08h]
+ fstp qword [edx]
+ wait
+ leave
+ ret
+
+%ifdef DELPHI
+[section cexp_text use32]
+%endif
+_sffecexp:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ fld qword [ebp+0ch]
+ call _sffecexpfnc
+ fld qword [ebp+14h]
+ fsincos
+ fld st2
+ fmulp st1
+ fstp qword [eax]
+ fmulp st1
+ fstp qword [eax+08h]
+ wait
+ leave
+ ret
+
+%ifdef DELPHI
+[section cln_text use32]
+%endif
+_sffecln:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ ;theta
+ fld qword [ebp+14h]
+ fld qword [ebp+0ch]
+ fpatan
+ ;z module
+ fld qword [ebp+0ch]
+ fmul qword [ebp+0ch]
+ fld qword [ebp+14h]
+ fmul qword [ebp+14h]
+ faddp st1
+ fsqrt
+ ;ln||z||
+ fld1
+ fxch st1
+ fyl2x
+ fldl2e
+ fdivp st1
+ fstp qword [eax]
+ fstp qword [eax+08h]
+ wait
+ leave
+ ret
+
+%ifdef DELPHI
+[section clog2_text use32]
+%endif
+_sffeclog2:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ fld1
+ ;z module
+ fld qword [ebp+0ch]
+ fmul qword [ebp+0ch]
+ fld qword [ebp+14h]
+ fmul qword [ebp+14h]
+ faddp st1
+ fsqrt
+ fyl2x
+ ;theta
+ fld qword [ebp+14h]
+ fld qword [ebp+0ch]
+ fpatan
+ fldln2
+ fdivp st1
+ fstp qword [eax+08h]
+ fstp qword [eax]
+ wait
+ leave
+ ret
+
+%ifdef DELPHI
+[section clog_text use32]
+%endif
+_sffeclog:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ ;ln(base)
+ fld1
+ fild word [ebp+1ch]
+ fyl2x
+ fldl2e
+ fdivp st1
+ ;z module
+ fld qword [ebp+0ch]
+ fmul qword [ebp+0ch]
+ fld qword [ebp+14h]
+ fmul qword [ebp+14h]
+ faddp st1
+ fsqrt
+ ;ln||z||
+ fld1
+ fxch st1
+ fyl2x
+ fldl2e
+ fdivp st1
+ fdiv st1
+ ;theta
+ fld qword [ebp+14h]
+ fld qword [ebp+0ch]
+ fpatan
+ fdiv st2
+ fstp qword [eax+08h]
+ fstp qword [eax]
+ fstp st0
+ wait
+ leave
+ ret
+
+%ifdef DELPHI
+[section csin_text use32]
+%endif
+_sffecsin:
+ push ebp
+ mov ebp, esp
+ mov eax, [ebp+08h]
+ fld1
+ fld1
+ faddp st1
+ fld qword [ebp+14h]
+ call _sffecexpfnc
+ fld1
+ fdiv st1
+ fld st1;-
+ fld st1;- optimize
+ faddp st1;-
+ fdiv st3
+ fxch st2
+ fxch st1
+ fsubp st1
+ fdiv st2
+ fld qword [ebp+0ch]
+ fsincos
+ fxch st3
+ fmulp st1
+ fstp qword [eax]
+ fmulp st1
+ fstp qword [eax+08h]
+ fstp st0
+ fwait
+ leave
+ ret
+
+%ifdef DELPHI
+[section ccos_text use32]
+%endif
+_sffeccos:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ fld1
+ fld1
+ faddp st1
+ fld qword [ebp+14h]
+ call _sffecexpfnc
+ fld1
+ fdiv st1
+ fld st1
+ fld st1
+ faddp st1
+ fdiv st3
+ fxch st2
+ fxch st1
+ fsubp st1
+ fdiv st2
+ fld qword [ebp+0ch]
+ fsincos
+ fxch st2
+ fmulp st1
+ fchs
+ fstp qword [eax+08h]
+ fmulp st1
+ fstp qword [eax]
+ fstp st0
+ fwait
+ leave
+ ret
+
+%ifdef DELPHI
+[section ctan_text use32]
+%endif
+_sffectan:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ ;sinh(2b) cosh(2b)
+ fld1
+ fld1
+ faddp st1
+ fld qword [ebp+14h]
+ fadd qword [ebp+14h]
+ call _sffecexpfnc
+ fld1
+ fdiv st1
+ fld st1
+ fld st1
+ faddp st1
+ fdiv st3
+ fxch st2
+ fxch st1
+ fsubp st1
+ fdivrp st2 ;fdivrp st(2),st(0)
+ ;sin(2b) cos(2b)
+ fld qword [ebp+0ch]
+ fadd qword [ebp+0ch]
+ fsincos
+ faddp st2
+ ;check if zero
+ fdiv st1
+ fstp qword [eax]
+ fdivp st1
+ fstp qword [eax+08h]
+ fwait
+ leave
+ ret
+
+%ifdef DELPHI
+[section ccot_text use32]
+%endif
+_sffeccot:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ ;sinh(2b) cosh(2b)
+ fld1
+ fld1
+ faddp st1
+ fld qword [ebp+14h]
+ fadd qword [ebp+14h]
+ call _sffecexpfnc
+ fld1
+ fdiv st1
+ fld st1
+ fld st1
+ fsubp st1
+ fdiv st3
+ fxch st2
+ fxch st1
+ faddp st1
+ fdivrp st2 ;fdivrp st(2),st(0)
+ ;sin(2b) cos(2b)
+ fld qword [ebp+0ch]
+ fld st0
+ faddp st1
+ fsincos
+ fsubp st3
+ ;check if zero
+ fdiv st2
+ fstp qword [eax]
+ fdiv st1
+ fchs
+ fstp qword [eax+08h]
+ fstp st0
+ fwait
+ leave
+ ret
+
+%ifdef DELPHI
+[section csinh_text use32]
+%endif
+_sffecsinh:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ fld1
+ fld1
+ faddp st1
+ fld qword [ebp+0Ch]
+ call _sffecexpfnc
+ fld1
+ fdiv st1
+ fld st1
+ fld st1
+ faddp st1
+ fdiv st3
+ fxch st2
+ fxch st1
+ fsubp st1
+ fdivrp st2 ;jak w tan i cot
+ fld qword [ebp+14h]
+ fsincos
+ fxch st2
+ fmulp st1
+ fstp qword [eax+08h]
+ fmulp st1
+ fstp qword [eax]
+ fwait
+ leave
+ ret
+
+%ifdef DELPHI
+[section ccosh_text use32]
+%endif
+_sffeccosh:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ fld qword [ebp+0ch]
+ call _sffecexpfnc
+ fld st0
+ fld1
+ fxch st1
+ fdivp st1
+ fld st1
+ fld st1
+ faddp st1
+ fld1
+ fld1
+ faddp st1
+ fdivp st1
+ fxch st2
+ fxch st1
+ fsubp st1
+ fld1
+ fld1
+ faddp st1
+ fdivp st1
+ fld qword [ebp+14h]
+ fsincos
+ fxch st2
+ fmulp st1
+ fstp qword [eax+08h]
+ fmulp st1
+ fstp qword [eax]
+ fwait
+ leave
+ ret
+
+%ifdef DELPHI
+[section ctanh_text use32]
+%endif
+_sffectanh:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ ;sinh(2a) cosh(2a)
+ fld1
+ fld1
+ faddp st1
+ fld qword [ebp+0ch]
+ fadd qword [ebp+0ch]
+ call _sffecexpfnc
+ fld1
+ fdiv st1
+ fld st1
+ fld st1
+ fsubp st1
+ fdiv st3
+ fxch st2
+ fxch st1
+ faddp st1
+ fdivrp st2 ;jak wczesniej
+ ;sin(2b) cos(2b)
+ fld qword [ebp+14h]
+ fadd qword [ebp+14h]
+ fsincos
+ faddp st3
+ ;check if zero
+ fdiv st2
+ fstp qword [eax+08h]
+ fxch st1
+ fdivp st1
+ fstp qword [eax]
+ fwait
+ leave
+ ret
+
+%ifdef DELPHI
+[section ccoth_text use32]
+%endif
+_sffeccoth:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ ;sinh(2b) cosh(2b)
+ fld1
+ fld1
+ faddp st1
+ fld qword [ebp+0ch]
+ fadd qword [ebp+0ch]
+ call _sffecexpfnc
+ fld1
+ fdiv st1
+ fld st1
+ fld st1
+ fsubp st1
+ fdiv st3
+ fxch st2
+ fxch st1
+ faddp st1
+ fdivrp st2 ;jak wczesniej
+ ;sin(2b) cos(2b)
+ fld qword [ebp+14h]
+ fadd qword [ebp+14h]
+ fsincos
+ fsubp st3
+ ;check if zero
+ fdiv st2
+ fchs
+ fstp qword [eax+08h]
+ fxch st1
+ fdivp st1
+ fstp qword [eax]
+ fwait
+ leave
+ ret
+
+;***************** COMPLEX TO COMPLEX POWER
+%ifdef DELPHI
+[section ccpow_text use32]
+%endif
+_sffeccpow:
+;TODO: wyeliminowac xch po wystepujace po obliczeniu theta
+ push ebp
+ mov ebp,esp
+ fld1
+ ;z module
+ fld qword [ebp+0ch]
+ fmul qword [ebp+0ch]
+ fld qword [ebp+14h]
+ fmul qword [ebp+14h]
+ faddp st1
+ fsqrt
+ ftst
+ fstsw ax
+ test ah, 1000000b
+ jnz MZ
+ mov eax, [ebp+08h]
+ ;ln||z||*/
+ fyl2x
+ fldl2e
+ fdivp st1
+ ;theta*/
+ fld qword [ebp+14h]
+ fld qword [ebp+0ch]
+ fpatan
+
+ fld st1 ;ln||z||
+ fmul qword [ebp+1ch]
+ fld st1 ;theta
+ fmul qword [ebp+24h]
+ fsubp st1 ; st0-st1
+ fxch st2 ; w st2 mam teraz a = z2.re * lnz - z2.im * theta w st0 jest ln||z||
+ fmul qword [ebp+24h]
+ fxch st1
+ fmul qword [ebp+1ch]
+ faddp st1
+ fxch st1
+
+ call _sffecexpfnc
+ fxch st1
+ fsincos
+ fld st2
+ fmulp st1
+ fstp qword [eax]
+ fmulp st1
+ fstp qword [eax+08h]
+ jmp END
+MZ:
+ mov eax, [ebp+08h]
+ fstp qword [eax+08h]
+ fldz
+ fstp qword [eax]
+ fstp st0
+END:
+s fwait
+ leave
+ ret
+
+;***************** COMPLEX TO REAL POWER
+%ifdef DELPHI
+[section cpowd_text use32]
+%endif
+_sffecpowd:
+ push ebp
+ mov ebp,esp
+; fld1
+ ;z module
+ fld qword [ebp+0ch]
+ fmul qword [ebp+0ch]
+ fld qword [ebp+14h]
+ fmul qword [ebp+14h]
+ faddp st1
+ fsqrt
+ ftst
+ fstsw ax
+ test ah, 1000000b
+ jnz MZ2
+ mov eax, [ebp+08h]
+ fld1
+ ;theta
+ fld qword [ebp+14h]
+ fld qword [ebp+0ch]
+ fpatan
+ fmul qword [ebp+1ch]
+ fxch st2
+ ;ln||z||
+ fyl2x
+ fldl2e
+ fdivp st1
+ fmul qword [ebp+1ch]
+
+ call _sffecexpfnc
+ fxch st1
+ fsincos
+ fld st2
+ fmulp st1
+ fstp qword [eax]
+ fmulp st1
+ fstp qword [eax+08h]
+ jmp END2
+MZ2:
+ mov eax, [ebp+08h]
+ fstp qword [eax+08h]
+ fldz
+ fstp qword [eax]
+END2:
+ fwait
+ leave
+ ret
+
+;***************** COMPLEX TO INT POWER
+%ifdef DELPHI
+[section cpowi_text use32]
+%endif
+_sffecpowi:
+ push ebp
+ mov ebp,esp
+ ;z module
+ fild dword [ebp+1ch] ;st(0)=n
+ fld qword [ebp+0ch]
+ fmul qword [ebp+0ch]
+ fld qword [ebp+14h]
+ fmul qword [ebp+14h]
+ faddp st1
+ fsqrt
+ ftst
+ fstsw ax
+ test ah, 1000000b
+ jnz MZ5
+ mov eax, [ebp+08h]
+ ;||z||^n
+ fld1
+ fxch st1
+ fyl2x
+ fmulp st1
+ fld st0
+ frndint
+ fsub to st1
+ fld1
+ fscale
+ fstp st1
+ fxch st1
+ f2xm1
+ fld1
+ faddp st1
+ fmulp st1
+ ;theta
+ fld qword [ebp+14h]
+ fld qword [ebp+0ch]
+ fpatan
+ fild dword [ebp+1ch]
+ fmulp st1
+ fsincos
+ fld st2
+ fmulp st1
+ fstp qword [eax]
+ fmulp st1
+ fstp qword [eax+08h]
+ jmp END53
+MZ5:
+ mov eax, [ebp+08h]
+ fstp qword [eax+08h]
+ fldz
+ fstp qword [eax]
+ fstp st0
+END53:
+ fwait
+ leave
+ ret
+
+;***************** INT/DOUBLE TO COMPLEX POWER
+%ifdef DELPHI
+[section cpowc_text use32]
+%endif
+_sffecpowc:
+ push ebp
+ mov ebp,esp
+ fld qword [ebp+0ch]
+ ftst
+ fstsw ax
+ test ah, 1000000b
+ jnz MZ3
+ mov eax, [ebp+08h]
+ ;n^a
+ fld qword [ebp+14h]
+ fxch st1
+ fabs
+ fld1
+ fxch st1
+ fyl2x
+ fmulp st1
+ fld st0
+ frndint
+ fsub to st1
+ fld1
+ fscale
+ fstp st1
+ fxch st1
+ f2xm1
+ fld1
+ faddp st1
+ fmulp st1
+ ;ln||n||
+ fld qword [ebp+0ch]
+ fabs
+ fld1
+ fxch st1
+ fyl2x
+ fldl2e
+ fdivp st1
+ fld qword [ebp+1ch]
+ fmulp st1
+ fsincos
+ fld st2
+ fmulp st1
+ fstp qword [eax]
+ fmulp st1
+ fstp qword [eax+08h]
+ jmp END3
+MZ3:
+ mov eax, [ebp+08h]
+ fstp qword [eax+08h]
+ fldz
+ fstp qword [eax]
+END3:
+ fwait
+ leave
+ ret
+
+;***************** SQRT
+%ifdef DELPHI
+[section csqrt_text use32]
+%endif
+_sffecsqrt:
+ push ebp
+ mov ebp,esp
+ push ebx
+ mov ebx, [ebp+08h]
+ ;z module
+ fld qword [ebp+0ch]
+ fmul qword [ebp+0ch]
+ fld qword [ebp+14h]
+ fmul qword [ebp+14h]
+ faddp st1
+ fsqrt
+ fld st0 ;duplicate |z|
+ ;real
+ fadd qword [ebp+0ch]
+ fld1
+ fld1
+ faddp st1
+ fdivp st1
+ fsqrt
+ fstp qword [ebx]
+ fwait
+ ;imag
+ fsub qword [ebp+0ch]
+ fld1
+ fld1
+ faddp st1
+ fdivp st1
+ fsqrt
+ ;imag sign check
+ push eax
+ fld qword [ebp+14h]
+ ftst
+ fstp st0
+ fstsw ax
+ test ah, 1b
+ jz IMAGPOS
+ fchs
+IMAGPOS:
+ pop eax
+ fwait
+ fstp qword [ebx+08h]
+ pop ebx
+ leave
+ ret
+
+;***************** Nth ORDER ROOT
+%ifdef DELPHI
+[section crtni_text use32]
+%endif
+_sffecrtni:
+ push ebp
+ mov ebp,esp
+ ;z module
+ fld qword [ebp+0ch]
+ fmul qword [ebp+0ch]
+ fld qword [ebp+14h]
+ fmul qword [ebp+14h]
+ faddp st1
+ fsqrt
+ ftst
+ fstsw ax
+ test ah, 1000000b
+ jnz MZ4
+ mov eax, [ebp+08h]
+ ;n-th root if ||z||
+ fld1
+ fild word [ebp+1ch]
+ fdivp st1 ;st0=1/n
+ fxch st1 ;st0=||z|| st1=1/n
+ fyl2x ;log2(||z||/n)
+ fld st0 ;duplikuj st0
+ frndint
+ fsub to st1 ;st0=int( log2(||z||/n) ) st1=frac( log2(||z||/n) )
+ fld1 ;st0=1
+ fscale ;st0=2^int( log2(||z||/n) ) st1=frac( log2(||z||/n) )
+ fstp st1
+ fxch st1
+ f2xm1 ;st1=2^frac( log2(||z||/n) )-1
+ fld1
+ faddp st1
+ fmulp st1 ;sqrt(||z||)
+ ;theta
+ fld qword [ebp+14h]
+ fld qword [ebp+0ch]
+ fpatan ;st0=theta st1=sqrN(||z||)
+ ;theta_i
+ fldpi
+ fldpi
+ faddp st1 ;st0=2Pi st1=theta st2=sqrN(||z||)
+ fimul word [ebp+20h]
+ faddp st1 ;st1=theta+i2Pi
+ fidiv word [ebp+1ch] ;st0=theta_i
+ ;re/im
+ fsincos
+
+ fld st2
+ fmulp st1
+ fstp qword [eax]
+ fmulp st1
+ fstp qword [eax+08h]
+ jmp END4
+MZ4:
+ fldz
+ fstp qword [eax]
+ fstp qword [eax+08h]
+END4:
+ leave
+ ret
+
+%ifndef DELPHI
+_sffecfunc:
+ push ebp
+ mov ebp,esp
+ mov eax, [ebp+08h]
+ leave
+ ret
+%endif
diff --git a/src/sffe/sffe.c b/src/sffe/sffe.c
new file mode 100644
index 0000000..668893e
--- /dev/null
+++ b/src/sffe/sffe.c
@@ -0,0 +1,1013 @@
+/*/////////////////////////////////////////////////////////////////////////////////////
+// project : sFFe ( SegFault (or Segmentation Fault :) ) formula evalutaor )
+// author : Mateusz Malczak ( mateusz@malczak.info )
+// wpage : www.segfaultlabs.com/projects/sffe
+///////////////////////////////////////////////////////////////////////////////////////
+// special build for XaoS, for more info visit
+// http://www.segfaultlabs.com/projects/sfXaos
+/////////////////////////////////////////////////////////////////////////////////////*/
+
+#include <config.h>
+#ifdef SFFE_USING
+
+#include <stdlib.h>
+#include <stdio.h>
+#ifdef linux
+#include <ctype.h>
+#endif
+#include <string.h>
+
+#include "sffe.h"
+#ifdef SFFE_CMPLX_ASM
+#include "sffe_cmplx_asm.h"
+#elif SFFE_CMPLX_GSL
+#include "sffe_cmplx_gsl.h"
+#endif
+
+#define sfset(arg,val) {\
+ (arg)->value = (sfNumber*)malloc(sizeof(sfNumber));\
+ if ( (arg)->value ) cmplxset( *((arg)->value), (val),0 ); }
+
+#define sfvar(p,parser,idx) (p)->value = (sfNumber*)((parser)->vars+idx)
+
+/************************* custom function */
+/* all used in this section variables are defined depanding on complex number realization */
+sffunction *sffe_function(char *fn, size_t len)
+{
+ unsigned char idx;
+ for (idx = 5; idx < sffnctscount; idx += 1) /* sffnctscount - defined in sffe_cmplx_* file */
+ if (!strncmp(fn, sfcmplxfunc[idx].name, len))
+ return (sffunction *) (sfcmplxfunc + idx);
+ return NULL;
+};
+
+sffunction *sffe_operator(char op)
+{
+ switch (op) {
+ case '^':
+ return (sffunction *) sfcmplxfunc;
+ break;
+ case '+':
+ return (sffunction *) sfcmplxfunc + 1;
+ break;
+ case '-':
+ return (sffunction *) sfcmplxfunc + 2;
+ break;
+ case '*':
+ return (sffunction *) sfcmplxfunc + 3;
+ break;
+ case '/':
+ return (sffunction *) sfcmplxfunc + 4;
+ break;
+ };
+ return NULL;
+};
+
+void *sffe_const(char *fn, size_t len, void *ptr)
+{
+ unsigned char idx = 3;
+ for (idx = 0; idx < sfvarscount; idx += 1)
+ if (!strncmp(fn, sfcnames[idx], len)) {
+ sfcvals[idx] ((sfNumber *) ptr);
+ return ptr;
+ };
+ return NULL;
+};
+
+/************************* custom function */
+
+
+sffe *sffe_alloc(void)
+{
+ sffe *rp = (sffe *) malloc(sizeof(sffe));
+ if (!rp)
+ return NULL;
+ memset(rp, 0, sizeof(sffe));
+ return rp;
+};
+
+static void sffe_clear(sffe ** parser)
+{
+ sffe *p = *parser;
+ unsigned int i = 0, j;
+ for (; i < p->argCount; i++) {
+ for (j = 0; j < p->varCount; j++)
+ if (p->args[i].value == p->varPtrs[j])
+ j = p->varCount;
+ if (j == p->varCount)
+ if (p->args[i].value)
+ free(p->args[i].value);
+ };
+ if (p->expression)
+ free(p->expression);
+ if (p->args)
+ free(p->args);
+ if (p->oprs)
+ free(p->oprs);
+ p->expression = NULL;
+ p->args = NULL;
+ p->oprs = NULL;
+};
+
+void sffe_free(sffe ** parser)
+{
+ sffe_clear(parser);
+ if ((*parser)->userf)
+ free((*parser)->userf);
+ if ((*parser)->varChars)
+ free((*parser)->varChars);
+ if ((*parser)->varPtrs)
+ free((*parser)->varPtrs);
+ free(*parser);
+ parser = NULL;
+};
+
+/* not really used, marked to remove
+void sffe_eval2(sffe *const parser)
+{
+ register sfopr* optro;
+ register sfopr* optr = parser->oprs;
+ register sfopr* optrl = parser->oprs+parser->oprCount;
+ optro = optr;
+ for ( optr=optr; optr!=optrl; optr+=1, optro+=1 )
+ {
+ optro->arg->parg = optro->arg-1;
+ optr->arg->parg = optr->f( optr->arg )->parg;
+ };
+};*/
+
+sfNumber sffe_eval(sffe * const parser)
+{
+ register sfopr *optro;
+ register sfopr *optr = parser->oprs;
+ register sfopr *optrl = parser->oprs + parser->oprCount;
+ optro = optr;
+ for (optr = optr; optr != optrl; optr += 1, optro += 1) {
+ optro->arg->parg = optro->arg - 1;
+ optr->arg->parg = optr->f(optr->arg)->parg;
+ };
+ return *(parser->result);
+};
+
+void *sffe_regvar(sffe ** parser, sfNumber * vptrs, char vchars)
+{
+ unsigned int i = (*parser)->varCount;
+ (*parser)->varCount += 1;
+ (*parser)->varPtrs =
+ (sfNumber **) realloc((*parser)->varPtrs,
+ (*parser)->varCount * sizeof(sfNumber *));
+ if (!(*parser)->varPtrs)
+ return NULL;
+ (*parser)->varChars =
+ (char *) realloc((*parser)->varChars, (*parser)->varCount);
+ if (!(*parser)->varChars)
+ return NULL;
+ (*parser)->varPtrs[i] = vptrs;
+ (*parser)->varChars[i] = toupper(vchars);
+ return (void *) ((*parser)->varPtrs + i);
+};
+
+void *sffe_regvars(sffe ** parser, unsigned int cN, sfNumber ** vptrs,
+ char *vchars)
+{
+ unsigned int i = (*parser)->varCount;
+ (*parser)->varCount += cN;
+ (*parser)->varPtrs =
+ (sfNumber **) realloc((*parser)->varPtrs,
+ (*parser)->varCount * sizeof(sfNumber *));
+ if (!(*parser)->varPtrs)
+ return NULL;
+ (*parser)->varChars =
+ (char *) realloc((*parser)->varChars, (*parser)->varCount);
+ if (!(*parser)->varChars)
+ return NULL;
+ for (cN = 0; i < (*parser)->varCount; i += 1, cN += 1) {
+ (*parser)->varPtrs[i] = vptrs[cN];
+ (*parser)->varChars[i] = toupper(vchars[cN]);
+ };
+ return (void *) ((*parser)->varPtrs + i);
+};
+
+sfNumber *sffe_varptr(sffe * const parser, char vchar)
+{
+ unsigned int i = 0;
+ while (i < parser->varCount) {
+ if (parser->varChars[i] == vchar)
+ return parser->varPtrs[i];
+ i += 1;
+ };
+ return NULL;
+};
+
+sfNumber *sffe_setvar(sffe ** parser, sfNumber * vptrs, char vchars)
+{
+ unsigned int i = 0;
+ while (i < (*parser)->varCount) {
+ if ((*parser)->varChars[i] == vchars) {
+ sfNumber *ret = (*parser)->varPtrs[i];
+ (*parser)->varPtrs[i] = vptrs;
+ return ret;
+ };
+ i += 1;
+ };
+ return NULL;
+};
+
+void *sffe_regfunc(sffe ** parser, char *vname, unsigned int parcnt,
+ sffptr funptr)
+{
+ sffunction *sff;
+ unsigned short i;
+ (*parser)->userf =
+ (sffunction *) realloc((*parser)->userf,
+ ((*parser)->userfCount +
+ 1) * sizeof(sffunction));
+ if (!(*parser)->userf)
+ return NULL;
+ sff = (*parser)->userf + (*parser)->userfCount;
+ /* 2.XI.2007 changed to get rid of warinings */
+ strcpy(sff->name, vname);
+ /* sff->name = (char*)malloc( strlen(vname) ); */
+ for (i = 0; i < strlen(vname); i += 1)
+ sff->name[i] = (char) toupper((int) vname[i]);
+ sff->parcnt = parcnt;
+ sff->fptr = funptr;
+ (*parser)->userfCount += 1;
+ return (void *) sff;
+};
+
+void *sffe_variable(sffe * const p, char *fname, size_t len)
+{
+ unsigned int idx = 0;
+ if (len == 1) /*FIXME vars names with length > 1 should be allowed */
+ for (; idx < p->varCount; idx += 1)
+ /* if ( !strncmp(fname,p->varChars[idx],len) ) */
+ if (p->varChars[idx] == *fname)
+ return (void *) p->varPtrs[idx];
+ return NULL;
+};
+
+sffunction *userfunction(const sffe * const p, char *fname, size_t len)
+{
+ unsigned char idx;
+ for (idx = 0; idx < p->userfCount; idx += 1)
+ if (!strncmp(fname, p->userf[idx].name, len))
+ return (sffunction *) (p->userf + idx);
+ return NULL;
+};
+
+char sffe_donum(char **str)
+{ /* parse number in format [-+]ddd[.dddd[e[+-]ddd]] */
+ unsigned char flag = 0; /*bit 1 - dot, bit 2 - dec, bits 3,4 - stan, bits 5..8 - error */
+ if (**str == '-') {
+ flag = 0x80;
+ *str += 1;
+ };
+ if (**str == '+')
+ *str += 1;
+ while (!((flag >> 4) & 0x07)) {
+ switch ((flag & 0x0f) >> 2) {
+ case 0: /*0..9 */
+ while (isdigit(**str))
+ *str += 1;
+ switch (**str) { /*only '.' or 'E' allowed */
+ case '.':
+ flag = (flag & 0xf3) | 4;
+ break;
+ case 'E':
+ flag = (flag & 0xf3) | 8;
+ break;
+ default:
+ flag = 0x10;
+ };
+ break;
+ case 1: /*. */
+ if (flag & 0x03)
+ flag = 0x20;
+ else
+ *str += 1; /*no 2nd dot, no dot after E */
+ flag = (flag & 0xf2) | 0x01;
+ break;
+ case 2: /*e */
+ if (flag & 0x02)
+ flag = 0x30;
+ else
+ *str += 1; /*no 2nd E */
+ if (!isdigit(**str)) { /*after E noly [+-] allowed */
+ if (**str != '-' && **str != '+')
+ flag = 0x40;
+ else
+ *str += 1;
+ };
+ flag = (flag & 0xf1) | 0x02;
+ break;
+ };
+ };
+ if (flag & 0x80)
+ flag ^= 0x80;
+ return flag >> 4;
+};
+
+char sffe_docmplx(char **str, sfarg ** arg)
+{ /* parse complex number in format { [-+]ddd[.dddd[e[+-]ddd]] ; [-+]ddd[.dddd[e[+-]ddd]] } */
+ char *chr, *chi;
+ chr = *str;
+ if (sffe_donum(str) > 1)
+ return 1;
+ if (*(*str)++ != ';')
+ return 2;
+ chi = *str;
+ if (sffe_donum(str) > 1)
+ return 1;
+ if (*(*str)++ != '}')
+ return 2;
+
+ cmplxset(*(*arg)->value, atof(chr), atof(chi));
+ return 0;
+};
+
+char sffe_doname(char **str)
+{
+ do {
+ *str += 1;
+ } while (isalnum(**str) || **str == '_');
+ if (strchr("+-*/^~!@#$%&<>?\\:\"|", (int) **str))
+ return 1; /*punctator */
+ if (**str == '(')
+ return 2; /* ( - funkcja */
+ if (**str == '.')
+ return 3; /*error :( this means something like X. COS. PI. */
+ return 1;
+};
+
+int sffe_parse(sffe ** parser, char *expression)
+{
+/**************var area */
+ struct opstack__ {
+#ifdef SFFE_DEVEL
+ char c; /* used in debug build to store operator character */
+#endif
+ unsigned char t; /* store priority of the operator 'f' */
+ sffptr f;
+ };
+ struct stack__ {
+ struct opstack__ *stck;
+ unsigned int size; //number of items on stack
+ struct stack__ *prev;
+ } *stmp, *stack;
+ sffunction **fnctbl;
+ sffunction **f;
+ sfarg *arg, *argcnt;
+ char *ech;
+ char *ch1, *ch2;
+ char *expcode; /*tokenized form : (f(n)+f(n))*f(n)-n (f-func, n-num,const) */
+ unsigned int ui1, ui2;
+ unsigned char opr;
+ char err;
+ sffe *p;
+/**************used defines */
+#define MEMERROR 1
+#define UNBALANCEDBRACKES 2
+#define INVALIDFUNCTION 3
+#define INAVLIDNUMBER 4
+#define UNKNOWNCONST 5
+#define OPERATOR 6
+#define STACKERROR 7
+#define PARCNTERROR 8
+#define NO_FUNCTIONS 9
+#define code(chr) \
+ expcode = (char*)realloc(expcode,ui1+2);\
+ expcode[ui1++] = chr;\
+ ch2 = expcode+ui1-1;\
+ opr = chr;\
+ expcode[ui1] = '\0';
+#define errset(errno) {\
+ err = errno;\
+ break;}
+#define insertfnc(fnc) \
+ for ( argcnt=p->args+p->argCount-1; argcnt>arg; argcnt-=1 )\
+ argcnt->value = (argcnt-1)->value;\
+ sfset(argcnt,-1.0);
+#ifdef SFFE_DEVEL
+#define sfpopstack(a)\
+ {\
+ stack->size-=1;\
+ insertfnc(NULL);\
+ printf("%c",stack->stck[stack->size].c);\
+ p->oprs[ui1].arg = (sfarg*)arg;\
+ p->oprs[ui1].f = stack->stck[stack->size].f;\
+ ui1 += 1;\
+ arg += 1;\
+ };
+#else
+#define sfpopstack(a)\
+ {\
+ stack->size-=1;\
+ insertfnc(NULL);\
+ p->oprs[ui1].arg = (sfarg*)arg;\
+ p->oprs[ui1].f = stack->stck[stack->size].f;\
+ ui1 += 1;\
+ arg += 1;\
+ };
+#endif
+
+#define priority(chr)\
+ (*chr=='f')?0x60:(\
+ (*chr=='^')?0x40:(\
+ ((*chr=='/')||(*chr=='*'))?0x20:(\
+ ((*chr=='+')||(*chr=='-'))?0x00:0x80\
+ )\
+ )\
+ )
+
+#ifdef SFFE_DEVEL
+ printf("parse - BEGIN\n");
+#endif
+/**************** CODE */
+ fnctbl = NULL;
+ ech = expression;
+ expcode = (char *) malloc(1);
+ err = 0;
+ //parser
+ p = *parser;
+ /* clear all internal structures */
+ if (p->expression)
+ sffe_clear(parser);
+
+ p->oprCount = 0;
+ p->argCount = 0;
+ p->expression = (char *) malloc(strlen(expression) + 1);
+ strcpy(p->expression, expression);
+ ech = p->expression;
+
+#ifdef SFFE_DEVEL
+ printf
+ ("\n|-----------------------------------------\n+ > %s[%d] - parsing\n|-----------------------------------------\n",
+ __FILE__, __LINE__);
+ printf("| input (dl.=%d) :|%s|\n", strlen(p->expression),
+ p->expression);
+#endif
+
+/*! PHASE 1 !!!!!!!!! remove spaces, count brackets, change decimal separators ',' to '.', remove multiple operators eg. ++--++1 -> 1, -+++2 -> -2 */
+ ch1 = NULL;
+ ui1 = 0; /*brackets */
+ ch2 = ech;
+ while (isspace(*ech))
+ ech += 1; /* skip leading spaces */
+ while (*ech) {
+ /*handle brackets and chaange ','->'.' */
+ switch (*ech) {
+ case '[':
+ *ech = '(';
+ case '(':
+ ui1 += 1;
+ break;
+ case ']':
+ *ech = ')';
+ case ')':
+ ui1 -= 1;
+ break;
+ case ',':
+ *ech = '.';
+ break;
+ };
+ *ch2 = (char) toupper((int) *ech);
+ /*fix multiple arithm operators */
+ if (ch1 && strchr("+-/*^", (int) *ech)
+ && strchr("+-/*^", (int) *ch1)) {
+ if (*ch1 == '-' && *ech == '-')
+ *ch1 = '+';
+ else if (*ch1 == '-' && *ech == '+')
+ *ch1 = '-';
+ else if (*ch1 == '+' && *ech == '-')
+ *ch1 = '-';
+ else if (*ch1 == *ech)
+ *ch1 = *ech;
+ else if (*ech == '-')
+ ch1 = ++ch2;
+ else if (*ch1 != *ech) {
+ err = OPERATOR;
+ break;
+ };
+ } else {
+ ch1 = ch2;
+ ch2 += 1;
+ };
+ do {
+ ech += 1;
+ } while (isspace(*ech)); /*skip spaces */
+ };
+ *ch2 = '\0';
+ p->expression =
+ (char *) realloc(p->expression, strlen(p->expression) + 1);
+ if (ui1 && !err)
+ err = UNBALANCEDBRACKES;
+
+#ifdef SFFE_DEVEL
+ printf("| check (dl.=%d) :|%s|\n", strlen(p->expression),
+ p->expression);
+#endif
+
+/*! PHASE 2 !!!!!!!! tokenize expression, lexical analysis (need optimizations) */
+ *expcode = '\0';
+ ch2 = NULL;
+ ui1 = 0;
+ ch1 = NULL; /*string starting position */
+ ech = p->expression;
+ opr = '('; /* in case of leading '-' */
+ while (*ech && !err) {
+ ch1 = ech;
+
+ if (isalpha(*ech)) {
+ switch (sffe_doname(&ech)) {
+ case 1: /* const or variable */
+ p->args =
+ (sfarg *) realloc(p->args,
+ (++p->argCount) * sizeof(sfarg));
+ if (!p->args)
+ errset(MEMERROR);
+ arg = p->args + p->argCount - 1;
+ arg->value =
+ (sfNumber *) sffe_variable(p, ch1,
+ (size_t) (ech - ch1));
+ if (!arg->value) {
+ sfset(arg, 10.0);
+ if (arg->value) {
+ if (!sffe_const
+ (ch1, (size_t) (ech - ch1), arg->value))
+ errset(UNKNOWNCONST);
+ } else
+ errset(MEMERROR);
+ };
+ opr = 'n';
+ break;
+ case 2: /* function */
+ fnctbl =
+ (sffunction **) realloc(fnctbl,
+ (p->oprCount +
+ 1) * sizeof(sffunction *));
+ if (!fnctbl)
+ errset(MEMERROR);
+ f = fnctbl + (p->oprCount++);
+ *f = NULL;
+ if (p->userfCount)
+ /*is it user defined function */
+ *f = (sffunction *) (void *) userfunction(p, ch1,
+ (size_t) (ech
+ -
+ ch1));
+ if (!*f)
+ /*if not, is it build in function */
+ *f = (sffunction *) (void *) sffe_function(ch1,
+ (size_t)
+ (ech -
+ ch1));
+ /* if not -> ERROR */
+ if (!*f)
+ errset(INVALIDFUNCTION);
+ opr = 'f';
+ break;
+ case 3: /* what ? */
+ errset(OPERATOR);
+ break;
+ };
+ } else /* numbers (this part can be optimized) */
+ /* is it a real number */ if (isdigit(*ech)
+ || (strchr("/*^(", (int) opr)
+ && strchr("+-", *ech))) {
+ ch1 = ech; /* st = 1; */
+ if (sffe_donum(&ech) > 1)
+ errset(INAVLIDNUMBER);
+ /*epx */
+ p->args =
+ (sfarg *) realloc(p->args,
+ (++p->argCount) * sizeof(sfarg));
+ if (!p->args)
+ errset(MEMERROR);
+ arg = p->args + p->argCount - 1;
+ /* 22.I.2009 fix for '-n'/'+n', which was parsed as 0*n */
+ if ((ech - ch1) == 1 && (*ch1 == '-'))
+ sfset(arg, -1)
+ else
+ sfset(arg, atof(ch1));
+ /*epx */
+ opr = 'n';
+ } else
+ /* if not, it can be complex number */
+#ifdef SFFE_COMPLEX
+ if (*ech == '{') {
+ ech += 1;
+ p->args =
+ (sfarg *) realloc(p->args,
+ (++p->argCount) * sizeof(sfarg));
+ if (!p->args)
+ errset(MEMERROR);
+ arg = p->args + p->argCount - 1;
+ sfset(arg, 0);
+ if (sffe_docmplx(&ech, &arg))
+ errset(INAVLIDNUMBER);
+ opr = 'n';
+ } else
+#endif
+ /* if not, we have operator */
+ {
+ ch1 = (char *) sffe_operator(*ech);
+
+ if (ch1) {
+ fnctbl =
+ (sffunction **) realloc(fnctbl,
+ (++p->oprCount) *
+ sizeof(sffunction *));
+ if (!fnctbl)
+ errset(MEMERROR);
+ fnctbl[p->oprCount - 1] = (sffunction *) ch1;
+ };
+ ch1 = ech;
+ opr = *ech;
+ ech += 1;
+ };
+
+
+ /* check if multiply sign skipped, nf, n(, )( */
+ if (!err && ui1 > 0)
+ if (opr == 'f' || opr == 'n' || opr == '(')
+ if (*ch2 == 'n' || *ch2 == ')') {
+ ch1 = (char *) sffe_operator('*');
+ fnctbl =
+ (sffunction **) realloc(fnctbl,
+ (++p->oprCount) *
+ sizeof(sffunction *));
+ if (!fnctbl)
+ errset(MEMERROR);
+ if (opr == 'f') {
+ fnctbl[p->oprCount - 1] = fnctbl[p->oprCount - 2];
+ fnctbl[p->oprCount - 2] = (sffunction *) ch1;
+ } else
+ fnctbl[p->oprCount - 1] = (sffunction *) ch1;
+ ch1 = (char *) (int) opr; /* ]:-> */
+ code('*');
+ opr = (char) (int) ch1;
+ ch1 = NULL;
+ };
+
+ code(opr);
+ };
+
+ ech = expcode;
+
+#ifdef SFFE_DEVEL
+ printf
+ ("| compiled expr. :|%s|\n| operacje: %d\n| stale,zmienne: %d\n| stack not.: ",
+ expcode, p->oprCount, p->argCount);
+#endif
+
+/*! PRE PHASE 3 !!!!! no operations in expression = single numeric value */
+ if (!p->oprCount && p->argCount == 1) {
+ p->oprs = (sfopr *) malloc(p->argCount * sizeof(sfopr));
+ p->oprs[0].arg = (sfarg *) p->args;
+ p->oprs[0].f = NULL;
+ p->result = (sfNumber *) p->args->value;
+ } else
+/*! PHASE 3 !!!!! create sffe 'stack' notation ]:-> */
+/* lots of memory operations are done here but no memory leaks should occur */
+ if (!err) {
+ ui1 = p->argCount + p->oprCount;
+ p->args = (sfarg *) realloc(p->args, ui1 * sizeof(sfarg));
+ memset(p->args + p->argCount, 0, p->oprCount * sizeof(sfarg));
+ p->argCount = ui1;
+ arg = p->args;
+ p->oprs = (sfopr *) malloc(p->oprCount * sizeof(sfopr));
+ ch1 = NULL; /* number */
+ /* stacks ( stores operations and controls parameters count inside of brackts blocks ) */
+ stack = (struct stack__ *) malloc(sizeof(struct stack__));
+ stack->size = 0; /* 0-stack is empty, but ready to write (one slot allocated), >0-number of element on stack */
+ stack->stck =
+ (struct opstack__ *) malloc(sizeof(struct opstack__));
+ stack->prev = NULL;
+ memset(stack->stck, 0, sizeof(struct opstack__));
+ ui1 = 0; /* used in defines */
+ f = fnctbl;
+
+ while (*ech && !err) {
+ switch (*ech) {
+ /* O */
+ case '+':
+ case '-':
+ case '*':
+ case '/':
+ case '^':
+ if (ch1) {
+#ifdef SFFE_DEVEL
+ printf("%c", *ch1);
+#endif
+ arg += 1;
+ };
+
+ ch1 = (char *) (int) (priority(ech));
+ /* there is an operator on stack */
+ if (stack->size) {
+ /* double casting to get rid of 'cast from pointer to integer of different size' warning
+ * remove all operators with higher, or equal priority
+ **/
+ while ((unsigned char) (int) ch1 <=
+ stack->stck[stack->size - 1].t) {
+ sfpopstack(NULL);
+ stack->stck = (struct opstack__ *) realloc(stack->stck, sizeof(struct opstack__)); /* is this reallocation really needed ?!? */
+ if (stack->size == 0)
+ break;
+ };
+ stack->stck =
+ (struct opstack__ *) realloc(stack->stck,
+ (stack->size +
+ 1) *
+ sizeof(struct
+ opstack__));
+ };
+
+#ifdef SFFE_DEVEL
+ stack->stck[stack->size].c = *ech;
+#endif
+
+ stack->stck[stack->size].t = (unsigned char) (int) ch1; /* store operator prority */
+ stack->stck[stack->size].f = ((sffunction *) (*f))->fptr; /* get function pointer */
+ stack->size += 1;
+ f += 1;
+ ch1 = NULL;
+ break;
+ /* F */
+ case 'f':
+ stack->stck =
+ (struct opstack__ *) realloc(stack->stck,
+ (stack->size +
+ 1) *
+ sizeof(struct opstack__));
+#ifdef SFFE_DEVEL
+ stack->stck[stack->size].c = 'f';
+#endif
+
+ /* mark operator as a function, and store number of parameters (0 - unlimited) */
+ stack->stck[stack->size].t =
+ 0x60 | (((sffunction *) (*f))->parcnt & 0x1F);
+ stack->stck[stack->size].f = ((sffunction *) (*f))->fptr; /* get function pointer */
+
+ stack->size += 1;
+ f += 1;
+ ch1 = NULL;
+ break;
+ /* ( */
+ case '(':
+ /* store current stack */
+ stmp = (struct stack__ *) malloc(sizeof(struct stack__));
+ stmp->prev = stack;
+ stack = stmp;
+ stack->size = 0;
+ stack->stck =
+ (struct opstack__ *) malloc(sizeof(struct opstack__));
+#ifdef SFFE_DEVEL
+ stack->stck[0].c = '_';
+#endif
+ opr = 0;
+ break;
+ /* ; */
+ case ';':
+ /* check if anything whas been read !!! */
+ if (ch1) {
+#ifdef SFFE_DEVEL
+ printf("%c", *ch1);
+#endif
+ arg += 1;
+ ch1 = NULL;
+ };
+ /* if there is something on stack, flush it we need to read next parameter */
+ while (stack->size)
+ sfpopstack(NULL);
+
+ /* wrong number of parameters */
+ ch2 = (char *) (stack->prev->stck + stack->prev->size - 1);
+ if ((((struct opstack__ *) ch2)->t & 0x1f) == 1)
+ errset(PARCNTERROR);
+ ((struct opstack__ *) ch2)->t =
+ 0x60 | ((((struct opstack__ *) ch2)->t & 0x1f) - 1);
+ break;
+ /* ) */
+ case ')':
+ if (ch1) {
+#ifdef SFFE_DEVEL
+ printf("%c", *ch1);
+#endif
+ arg += 1;
+ }
+ ch1 = NULL;
+
+ /* if there is something on stack, flush it we need to read next parameter */
+ while (stack->size)
+ sfpopstack(NULL);
+
+ if (!stack->prev)
+ errset(STACKERROR);
+ stmp = stack;
+ free(stmp->stck);
+ stack = stmp->prev;
+ free(stmp);
+
+ /* i was reading function, if so at the top of current
+ * stack is a function. identified by '*.t==3'
+ **/
+ ch2 = (char *) (stack->stck + stack->size - 1);
+ if ((((struct opstack__ *) ch2)->t & 0xE0) == 0x60) {
+ /* wrong number of parameters */
+ if ((((struct opstack__ *) ch2)->t & 0x1f) > 1)
+ errset(PARCNTERROR);
+ if (!err) {
+ sfpopstack(NULL);
+ if (stack->size)
+ stack->stck =
+ (struct opstack__ *) realloc(stack->stck,
+ (stack->
+ size) *
+ sizeof(struct
+ opstack__));
+ };
+ };
+ break;
+ /* n */
+ case 'n':
+ ch1 = ech;
+ break;
+ };
+ ech += 1;
+ };
+
+ if (!err) {
+ if (ch1) {
+#ifdef SFFE_DEVEL
+ printf("%c", *ch1);
+#endif
+ arg += 1;
+ }
+
+ while (stack) { /*clean up stack */
+ while (stack->size) {
+ stack->size -= 1;
+#ifdef SFFE_DEVEL
+ printf("%c", stack->stck[stack->size].c);
+#endif
+ insertfnc(NULL);
+ p->oprs[ui1].arg = (sfarg *) arg;
+ p->oprs[ui1].f = stack->stck[stack->size].f;
+ ui1 += 1;
+ arg += 1;
+ };
+ free(stack->stck);
+ stmp = stack->prev;
+ free(stack);
+ stack = stmp;
+ };
+
+ /* set up formula call stack */
+ (p->args)->parg = NULL;
+ for (ui1 = 1; ui1 < p->argCount; ui1 += 1)
+ (p->args + ui1)->parg = (p->args + ui1 - 1);
+
+#ifdef SFFE_DEVEL
+ printf("\n| numbers :");
+ for (ui1 = 0; ui1 < p->argCount; ui1 += 1) {
+ if ((p->args + ui1)->value)
+ printf(" %g%+gI", real((*(p->args + ui1)->value)),
+ imag((*(p->args + ui1)->value)));
+ else
+ printf(" [_]");
+ };
+
+ printf("\n| functions fnctbl:");
+ for (ui1 = 0; ui1 < p->oprCount; ui1 += 1)
+ printf(" 0x%.6X [%s]", (int) fnctbl[ui1]->fptr,
+ fnctbl[ui1]->name);
+
+ printf("\n| functions used ptrs:");
+ for (ui1 = 0; ui1 < p->oprCount; ui1 += 1)
+ printf(" 0x%.6X", (int) p->oprs[ui1].f);
+#endif
+ } else { /* prevent memory leaks */
+
+ while (stack) { /* clean up stack */
+ free(stack->stck);
+ stmp = stack->prev;
+ free(stack);
+ stack = stmp;
+ };
+ };
+ /* set up evaluation result pointer (result is stored in last operation return) */
+ p->result = (sfNumber *) (p->oprs + p->oprCount - 1)->arg->value;
+ if (!p->result)
+ err = MEMERROR;
+ };
+
+ if (err) {
+#ifdef SFFE_DEVEL
+ /* in debug mode report errors on stdout */
+ printf("Parser error : ");
+ switch (err) {
+ case MEMERROR:
+ printf(" MEMORY ERROR!!");
+ break;
+ case UNBALANCEDBRACKES:
+ printf(" UNBALANCED BRACKETS!! : %s\n", ch1);
+ break;
+ case INVALIDFUNCTION:
+ printf(" UNKNOWN FUNCTION!! : %s\n", ch1);
+ break;
+ case INAVLIDNUMBER:
+ printf(" NUMBER FORMAT!! : %s\n", ch1);
+ break;
+ case UNKNOWNCONST:
+ printf(" UNKOWN CONST or VAR NAME!! : %s\n", ch1);
+ break;
+ case OPERATOR:
+ printf(" UNKNOWN OPERATOR!! : %s\n", ch1);
+ break;
+ case STACKERROR:
+ printf(" INTERNAL STACK CORRUPTED!! : %s\n", ch1);
+ break;
+ case PARCNTERROR:
+ printf(" FUNCTION PARAMETERS ERROR!! : %s\n", ch1);
+ break;
+ case NO_FUNCTIONS:
+ printf("Formula error ! ARE YOU KIDDING ME ?!? : %s", ch1);
+ break;
+ };
+#endif
+ /* try to store error message */
+ if (p->errormsg)
+ switch (err) {
+ case MEMERROR:
+ sprintf(p->errormsg, "Formula error ! MEMORY ERROR!!");
+ break;
+ case UNBALANCEDBRACKES:
+ sprintf(p->errormsg,
+ "Formula error ! UNBALANCED BRACKETS!! : %s", ch1);
+ break;
+ case INVALIDFUNCTION:
+ sprintf(p->errormsg,
+ "Formula error ! UNKNOWN FUNCTION!! : %s", ch1);
+ break;
+ case INAVLIDNUMBER:
+ sprintf(p->errormsg,
+ "Formula error ! NUMBER FORMAT!! : %s", ch1);
+ break;
+ case UNKNOWNCONST:
+ sprintf(p->errormsg,
+ "Formula error ! UNKOWN CONST or VAR NAME!! : %s",
+ ch1);
+ break;
+ case OPERATOR:
+ sprintf(p->errormsg,
+ "Formula error ! UNKNOWN OPERATOR!! : %s", ch1);
+ break;
+ case STACKERROR:
+ sprintf(p->errormsg,
+ "Formula error ! INTERNAL STACK CORRUPTED!! : %s",
+ ch1);
+ break;
+ case PARCNTERROR:
+ sprintf(p->errormsg,
+ "Formula error ! FUNCTION PARAMETERS ERROR!! : %s",
+ ch1);
+ break;
+ case NO_FUNCTIONS:
+ sprintf(p->errormsg,
+ "Formula error ! ARE YOU KIDDING ME ?!? : %s",
+ ch1);
+ break;
+ };
+ /* if error -> clean up */
+ sffe_clear(&p);
+ };
+
+ /*undefine defines */
+#undef priority
+#undef sfpopstack
+#undef insertfnc
+#undef code
+#undef errset
+#undef MEMERROR
+#undef UNBALANCEDBRACKES
+#undef INVALIDFUNCTION
+#undef INAVLIDNUMBER
+#undef UNKNOWNCONST
+#undef OPERATOR
+#undef STACKERROR
+#undef PARCNTERROR
+ free(expcode);
+ free(fnctbl);
+
+#ifdef SFFE_DEVEL
+ printf("\nparse - END\n");
+#endif
+ return err;
+};
+
+#undef sfset
+#undef sfvar
+
+#endif
diff --git a/src/sffe/sffe.pri b/src/sffe/sffe.pri
new file mode 100644
index 0000000..2935585
--- /dev/null
+++ b/src/sffe/sffe.pri
@@ -0,0 +1,23 @@
+DEFINES += SFFE_USING SFFE_CMPLX_ASM
+
+SOURCES += \
+ $$PWD/sffe.c \
+ $$PWD/sffe_cmplx_asm.c \
+ $$PWD/sffe_cmplx_gsl.c
+
+ASM_SOURCES += \
+ $$PWD/asm/cmplx.asm
+
+nasm.input = ASM_SOURCES
+nasm.output = $$PWD/${QMAKE_FILE_BASE}.o
+
+win32 {
+ nasm.commands = nasm -f coff -o $$PWD/${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME}
+} else:macx {
+ nasm.commands = nasm -f macho -o $$PWD/${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME}
+} else {
+ nasm.commands = nasm -f elf -o $$PWD/${QMAKE_FILE_BASE}.o ${QMAKE_FILE_NAME}
+}
+
+
+QMAKE_EXTRA_COMPILERS += nasm
diff --git a/src/sffe/sffe_cmplx_asm.c b/src/sffe/sffe_cmplx_asm.c
new file mode 100644
index 0000000..88a008d
--- /dev/null
+++ b/src/sffe/sffe_cmplx_asm.c
@@ -0,0 +1,331 @@
+/*/////////////////////////////////////////////////////////////////////////////////////
+// project : sFFe ( SegFault (or Segmentation Fault :) ) formula evalutaor )
+// author : Mateusz Malczak ( mateusz@malczak.info )
+// wpage : www.segfaultlabs.com/projects/sffe
+///////////////////////////////////////////////////////////////////////////////////////
+// special build for XaoS, for more info visit
+// http://www.segfaultlabs.com/projects/sfXaos
+/////////////////////////////////////////////////////////////////////////////////////*/
+
+#include <config.h>
+#ifdef SFFE_CMPLX_ASM
+
+#include <math.h>
+#include "sffe.h"
+#include "sffe_cmplx_asm.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+ const sffunction sfcmplxfunc[sffnctscount] = {
+ /* nie uwzgledniaj w wyszukaniu funkcji */
+ {sfpow, 2, "^\0"}, {sfadd, 2, "+\0"}, {sfsub, 2, "-\0"}, {sfmul, 2,
+ "*\0"},
+ {sfdiv, 2, "/\0"},
+ /* ponizej uwzgledniaj w wyszukaniu funkcji */
+ {sfsin, 1, "SIN\0"}, {sfcos, 1, "COS\0"}, {sftan, 1, "TAN\0"},
+ {sfcot, 1, "COT\0"},
+ {sfasin, 1, "ASIN\0"}, {sfacos, 1, "ACOS\0"}, {sfatan, 1,
+ "ATAN\0"}, {sfacot,
+ 1,
+ "ACOT\0"},
+ {sfatan2, 2, "ATAN2\0"},
+ {sfsinh, 1, "SINH\0"}, {sfcosh, 1, "COSH\0"}, {sftanh, 1,
+ "TANH\0"}, {sfcoth,
+ 1,
+ "COTH\0"},
+ {sfexp, 1, "EXP\0"}, {sflog, 1, "LOG\0"}, {sflog10, 1, "LOG10\0"},
+ {sflog2, 1, "LOG2\0"},
+ {sflogN, 2, "LOGN\0"}, {sflogCN, 2, "LOGCN\0"},
+ /*power functions */
+ {sfpow, 2, "POW\0"}, {sfpowi, 2, "POWI\0"}, {sfpowd, 2, "POWD\0"},
+ {sfpowdc, 2, "POWDC\0"},
+ {sfsqr, 1, "SQR\0"}, {sfsqrt, 1, "SQRT\0"}, {sfrtni, 3, "RTNI"},
+ {sfinv, 1, "INV\n"},
+ {sfceil, 1, "CEIL\0"}, {sffloor, 1, "FLOOR\0"}, {sfabs, 1,
+ "ABS\0"}, {sfrabs,
+ 1,
+ "RABS\0"},
+ {sfre, 1, "RE\0"}, {sfim, 1, "IM\0"},
+ {NULL, 1, "RAD\0"}, {NULL, 1, "DEG\0"},
+ {NULL, 1, "SIGN\0"}, {NULL, 1, "TRUNC\0"}, {sfrand, 1, "RAND\0"}
+ };
+
+ const char sfcnames[sfvarscount][5] =
+ { "PI\0", "PI_2\0", "PI2\0", "E\0", "I\0", "RND\0" };
+
+ const cfptr sfcvals[sfvarscount] =
+ { sfcPI, sfcPI2, sfc2PI, sfcE, sfcI, sfcRND };
+
+
+ cmplx cset(double r, double i) {
+ cmplx c;
+ c.r = r;
+ c.i = i;
+ return c;
+ };
+
+ cmplx cadd(const cmplx c1, const cmplx c2) {
+ cmplx r;
+ r.r = c1.r + c2.r;
+ r.i = c1.i + c2.i;
+ return r;
+ };
+
+ cmplx csub(const cmplx c1, const cmplx c2) {
+ cmplx r;
+ r.r = c1.r - c2.r;
+ r.i = c1.i - c2.i;
+ return r;
+ };
+
+ cmplx cmul(const cmplx c1, const cmplx c2) {
+ cmplx r;
+ r.r = c1.r * c2.r - c1.i * c2.i;
+ r.i = c1.r * c2.i + c1.i * c2.r;
+ return r;
+ };
+
+ cmplx cdiv(const cmplx c1, const cmplx c2) {
+ double d = (c2.r * c2.r + c2.i * c2.i);
+ cmplx r;
+ r.r = (c1.r * c2.r + c1.i * c2.i) / d;
+ r.i = (-c1.i * c2.r + c1.r * c2.i) / d;
+ return r;
+ };
+
+ sfarg *sfadd(sfarg * const p) { /* + */
+ sfvalue(p) = cadd(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+ sfarg *sfsub(sfarg * const p) { /* - */
+ sfvalue(p) = csub(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+ sfarg *sfmul(sfarg * const p) { /* * */
+ sfvalue(p) = cmul(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+ sfarg *sfdiv(sfarg * const p) { /* / */
+ sfvalue(p) = cdiv(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+
+ sfarg *sfsin(sfarg * const p) { /* sin */
+ sfvalue(p) = sffecsin(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfcos(sfarg * const p) { /* cos */
+ sfvalue(p) = sffeccos(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sftan(sfarg * const p) { /* tan */
+ sfvalue(p) = sffectan(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfcot(sfarg * const p) { /* ctan */
+ sfvalue(p) = sffeccot(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+
+ sfarg *sfasin(sfarg * const p) { /* asin */
+ //sfvalue(p) = asin( sfvalue( sfaram1(p) ) );
+ return sfaram1(p);
+ };
+
+ sfarg *sfacos(sfarg * const p) { /* acos */
+ //sfvalue(p) = acos( sfvalue( sfaram1(p) ) );
+ return sfaram1(p);
+ };
+
+ sfarg *sfatan(sfarg * const p) { /* atan */
+// sfvalue(p) = atan( sfvalue( sfaram1(p) ) );
+ return sfaram1(p);
+ };
+
+ sfarg *sfacot(sfarg * const p) { /* actan */
+// sfvalue(p) = 1.0/atan( sfvalue( sfaram1(p) ) );
+ return sfaram1(p);
+ };
+
+ sfarg *sfatan2(sfarg * const p) { /* atan2 */
+ //sfvalue(p) = atan2( sfvalue( sfaram2(p) ), sfvalue( sfaram1(p) ) );
+ return sfaram2(p);
+ };
+
+
+ sfarg *sfsinh(sfarg * const p) { /* sinh */
+ sfvalue(p) = sffecsinh(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfcosh(sfarg * const p) { /* cosh */
+ sfvalue(p) = sffeccosh(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sftanh(sfarg * const p) { /* tanh */
+ sfvalue(p) = sffectanh(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfcoth(sfarg * const p) { /* ctanh */
+ sfvalue(p) = sffeccoth(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+
+ sfarg *sfexp(sfarg * const p) { /* exp */
+ sfvalue(p) = sffecexp(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sflog(sfarg * const p) { /* log */
+ sfvalue(p) = sffecln(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sflog2(sfarg * const p) { /* log2 */
+ sfvalue(p) = sffeclog2(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sflog10(sfarg * const p) { /* log2 */
+ sfvalue(p) = sffeclog(sfvalue(sfaram1(p)), 10);
+ return sfaram1(p);
+ };
+
+ sfarg *sflogN(sfarg * const p) { /* logN */
+ sfvalue(p) = sffeclog(sfvalue(sfaram1(p)), sfvalue(sfaram2(p)).r);
+ return sfaram2(p);
+ };
+
+ sfarg *sflogCN(sfarg * const p) { /* logCN */
+ sfvalue(p) =
+ cdiv(sffecln(sfvalue(sfaram2(p))),
+ sffecln(sfvalue(sfaram1(p))));
+ return sfaram2(p);
+ };
+
+ sfarg *sfpow(sfarg * const p) { /* csflx pow */
+ sfvalue(p) = sffeccpow(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+ sfarg *sfpowi(sfarg * const p) { /* int pow */
+ sfvalue(p) =
+ sffecpowi(sfvalue(sfaram2(p)), (int) (sfvalue(sfaram1(p)).r));
+ return sfaram2(p);
+ };
+
+ sfarg *sfpowd(sfarg * const p) { /* double pow */
+ sfvalue(p) = sffecpowd(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)).r);
+ return sfaram2(p);
+ };
+
+ sfarg *sfpowdc(sfarg * const p) { /* double to csflx pow */
+ sfvalue(p) = sffecpowc(sfvalue(sfaram2(p)).r, sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+ sfarg *sfsqr(sfarg * const p) { /* sqr */
+ sfvalue(p) = cmul(sfvalue(sfaram1(p)), sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfsqrt(sfarg * const p) { /* sqrt */
+ sfvalue(p) = sffecsqrt(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfrtni(sfarg * const p) /* rtni *///cos tu nie tak jak powinno byc ;(
+ {
+ sfvalue(p) =
+ sffecrtni(sfvalue(sfaram3(p)), (int) (sfvalue(sfaram2(p)).r),
+ (int) (sfvalue(sfaram1(p)).r));
+ return sfaram3(p);
+ };
+
+ sfarg *sfinv(sfarg * const p) { /* cinv */
+ sfvalue(p) = sffecinv(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfceil(sfarg * const p) { /* ceil */
+ //sfvalue(p) = ceil( sfvalue( sfaram1(p) ) );
+ return sfaram1(p);
+ };
+
+ sfarg *sffloor(sfarg * const p) { /* floor */
+ //sfvalue(p) = floor( sfvalue( sfaram1(p) ) );
+ return sfaram1(p);
+ };
+
+ sfarg *sfabs(sfarg * const p) { /* abs - |z| */
+ sfvalue(p).r = sffecabs(sfvalue(sfaram1(p)));
+ sfvalue(p).i = 0;
+ return sfaram1(p);
+ };
+
+ sfarg *sfrabs(sfarg * const p) { /* abs - real numbers */
+ sfvalue(p).r = sfvalue(sfaram1(p)).r;
+ if (sfvalue(p).r < 0)
+ sfvalue(p).r = -sfvalue(p).r;
+ sfvalue(p).i = 0;
+ return sfaram1(p);
+ };
+
+ sfarg *sfre(sfarg * const p) { /* RE */
+ sfvalue(p).r = sfvalue(sfaram1(p)).r;
+ sfvalue(p).i = 0;
+ return sfaram1(p);
+ };
+
+ sfarg *sfim(sfarg * const p) { /* IM */
+ sfvalue(p).r = sfvalue(sfaram1(p)).i;
+ sfvalue(p).i = 0;
+ return sfaram1(p);
+ };
+
+ sfarg *sfrand(sfarg * const p) { /* rand */
+ sfvalue(p).r =
+ sfvalue(sfaram1(p)).r * (double) rand() / (double) RAND_MAX;
+ sfvalue(p).i = 0;
+ return sfaram1(p);
+ };
+
+//const eval
+ void sfcPI(sfNumber * cnst) {
+ *cnst = cset(4 * atan(1), 0);
+ };
+ void sfcPI2(sfNumber * cnst) {
+ *cnst = cset(2 * atan(1), 0);
+ };
+ void sfc2PI(sfNumber * cnst) {
+ *cnst = cset(8 * atan(1), 0);
+ };
+ void sfcE(sfNumber * cnst) {
+ *cnst = cset(exp(1), 0);
+ };
+ void sfcI(sfNumber * cnst) {
+ *cnst = cset(0, 1);
+ };
+ void sfcRND(sfNumber * cnst) {
+ *cnst = cset((double) rand() / (double) RAND_MAX, 0);
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/sffe/sffe_cmplx_gsl.c b/src/sffe/sffe_cmplx_gsl.c
new file mode 100644
index 0000000..6006663
--- /dev/null
+++ b/src/sffe/sffe_cmplx_gsl.c
@@ -0,0 +1,294 @@
+/*/////////////////////////////////////////////////////////////////////////////////////
+// project : sFFe ( SegFault (or Segmentation Fault :) ) formula evalutaor )
+// author : Mateusz Malczak ( mateusz@malczak.info )
+// wpage : www.segfaultlabs.com/projects/sffe
+///////////////////////////////////////////////////////////////////////////////////////
+// special build for XaoS, for more info visit
+// http://www.segfaultlabs.com/projects/sfXaos
+/////////////////////////////////////////////////////////////////////////////////////*/
+
+#include <config.h>
+#ifdef SFFE_CMPLX_GSL
+
+#include "sffe.h"
+#include "sffe_cmplx_gsl.h"
+#include <gsl/gsl_complex.h>
+#include <gsl/gsl_complex_math.h>
+#include <math.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ const sffunction sfcmplxfunc[sffnctscount] = {
+ /* nie uwzgledniaj w wyszukaniu funkcji */
+ {sfpow, 2, "^\0"}, {sfadd, 2, "+\0"}, {sfsub, 2, "-\0"}, {sfmul, 2,
+ "*\0"},
+ {sfdiv, 2, "/\0"},
+ /* ponizej uwzgledniaj w wyszukaniu funkcji */
+ {sfsin, 1, "SIN\0"}, {sfcos, 1, "COS\0"}, {sftan, 1, "TAN\0"},
+ {sfcot, 1, "COT\0"},
+ {sfasin, 1, "ASIN\0"}, {sfacos, 1, "ACOS\0"}, {sfatan, 1,
+ "ATAN\0"}, {sfacot,
+ 1,
+ "ACOT\0"},
+ {sfatan2, 2, "ATAN2\0"},
+ {sfsinh, 1, "SINH\0"}, {sfcosh, 1, "COSH\0"}, {sftanh, 1,
+ "TANH\0"}, {sfcoth,
+ 1,
+ "COTH\0"},
+ {sfexp, 1, "EXP\0"}, {sflog, 1, "LOG\0"}, {sflog10, 1, "LOG10\0"},
+ {sflog2, 1, "LOG2\0"},
+ {sflogN, 2, "LOGN\0"}, {sflogN, 2, "LOGCN\0"},
+ /*power functions */
+ {sfpow, 2, "POW\0"}, {sfpowd, 2, "POWD\0"}, {sfpow, 2, "POWI\0"},
+ {sfpow, 2, "POWDC\0"},
+ {sfsqr, 1, "SQR\0"}, {sfsqrt, 1, "SQRT\0"}, {sfrtni, 3, "RTNI"},
+ {sfinv, 1, "INV\n"},
+ {sfceil, 1, "CEIL\0"}, {sffloor, 1, "FLOOR\0"}, {sfabs, 1,
+ "ABS\0"}, {sfrabs,
+ 1,
+ "RABS\0"},
+ {sfre, 1, "RE\0"}, {sfim, 1, "IM\0"},
+ {NULL, 1, "RAD\0"}, {NULL, 1, "DEG\0"},
+ {NULL, 1, "SIGN\0"}, {NULL, 1, "TRUNC\0"}, {sfrand, 1, "RAND\0"}
+ };
+
+ const char sfcnames[sfvarscount][5] =
+ { "PI\0", "PI_2\0", "PI2\0", "E\0", "I\0", "RND\0" };
+
+ const cfptr sfcvals[sfvarscount] =
+ { sfcPI, sfcPI2, sfc2PI, sfcE, sfcI, sfcRND };
+
+ sfarg *sfadd(sfarg * const p) { /* + */
+ sfvalue(p) =
+ gsl_complex_add(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+ sfarg *sfsub(sfarg * const p) { /* - */
+ sfvalue(p) =
+ gsl_complex_sub(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+ sfarg *sfmul(sfarg * const p) { /* * */
+ sfvalue(p) =
+ gsl_complex_mul(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+ sfarg *sfdiv(sfarg * const p) { /* / */
+ sfvalue(p) =
+ gsl_complex_div(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+
+ sfarg *sfsin(sfarg * const p) { /* sin */
+ sfvalue(p) = gsl_complex_sin(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfcos(sfarg * const p) { /* cos */
+ sfvalue(p) = gsl_complex_cos(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sftan(sfarg * const p) { /* tan */
+ sfvalue(p) = gsl_complex_tan(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfcot(sfarg * const p) { /* ctan */
+ sfvalue(p) = gsl_complex_cot(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+
+ sfarg *sfasin(sfarg * const p) { /* asin */
+ sfvalue(p) = gsl_complex_arcsin(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfacos(sfarg * const p) { /* acos */
+ sfvalue(p) = gsl_complex_arccos(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfatan(sfarg * const p) { /* atan */
+ sfvalue(p) = gsl_complex_arctan(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfacot(sfarg * const p) { /* actan */
+ sfvalue(p) = gsl_complex_arccot(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfatan2(sfarg * const p) { /* atan2 */
+ return sfaram2(p);
+ };
+
+ sfarg *sfsinh(sfarg * const p) { /* sinh */
+ sfvalue(p) = gsl_complex_sinh(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfcosh(sfarg * const p) { /* cosh */
+ sfvalue(p) = gsl_complex_cosh(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sftanh(sfarg * const p) { /* tanh */
+ sfvalue(p) = gsl_complex_tanh(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfcoth(sfarg * const p) { /* ctanh */
+ sfvalue(p) = gsl_complex_coth(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+
+ sfarg *sfexp(sfarg * const p) { /* exp */
+ sfvalue(p) = gsl_complex_exp(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sflog(sfarg * const p) { /* log */
+ sfvalue(p) = gsl_complex_log(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sflog10(sfarg * const p) { /* log10 */
+ sfvalue(p) = gsl_complex_log10(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sflog2(sfarg * const p) { /* log2 */
+ sfNumber base;
+ real(base) = 2;
+ imag(base) = 0;
+ sfvalue(p) = gsl_complex_log_b(sfvalue(sfaram1(p)), base);
+ return sfaram1(p);
+ };
+
+ sfarg *sflogN(sfarg * const p) { /* logN */
+ sfvalue(p) =
+ gsl_complex_log_b(sfvalue(sfaram1(p)), sfvalue(sfaram2(p)));
+ return sfaram2(p);
+ };
+
+
+ sfarg *sfpow(sfarg * const p) { /* cmplx pow */
+ sfvalue(p) =
+ gsl_complex_pow(sfvalue(sfaram2(p)), sfvalue(sfaram1(p)));
+ return sfaram2(p);
+ };
+
+ sfarg *sfpowd(sfarg * const p) { /* int pow */
+ sfvalue(p) =
+ gsl_complex_pow_real(sfvalue(sfaram2(p)),
+ GSL_REAL(sfvalue(sfaram1(p))));
+ return sfaram2(p);
+ };
+
+ sfarg *sfsqr(sfarg * const p) { /* sqr */
+ sfvalue(p) =
+ gsl_complex_pow(sfvalue(sfaram1(p)), sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfsqrt(sfarg * const p) { /* sqrt */
+ sfvalue(p) = gsl_complex_sqrt(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfrtni(sfarg * const p) { /* rtni */
+ double nrz =
+ pow(gsl_complex_abs(sfvalue(sfaram3(p))),
+ 1.0 / (double) (int) real(sfvalue(sfaram2(p))));
+ double alfi =
+ (gsl_complex_arg(sfvalue(sfaram3(p))) +
+ 8 * atan(1.0) * (double) (int) real(sfvalue(sfaram1(p)))) /
+ (double) (int) real(sfvalue(sfaram2(p)));
+
+ cmplxset(sfvalue(sfaram3(p)), nrz * cos(alfi), nrz * sin(alfi));
+ return sfaram3(p);
+ };
+
+ sfarg *sfinv(sfarg * const p) { /* cinv */
+ sfvalue(p) = gsl_complex_inverse(sfvalue(sfaram1(p)));
+ return sfaram1(p);
+ };
+
+ sfarg *sfceil(sfarg * const p) { /* ceil */
+ //sfvalue(p) = ceil( sfvalue( sfaram1(p) ) );
+ return sfaram1(p);
+ };
+
+ sfarg *sffloor(sfarg * const p) { /* floor */
+ //sfvalue(p) = floor( sfvalue( sfaram1(p) ) );
+ return sfaram1(p);
+ };
+
+ sfarg *sfabs(sfarg * const p) { /* abs - |z| */
+ GSL_REAL(sfvalue(p)) = gsl_complex_abs(sfvalue(sfaram1(p)));
+ GSL_IMAG(sfvalue(p)) = 0.0;
+ return sfaram1(p);
+ };
+
+ sfarg *sfrabs(sfarg * const p) { /* abs - real numbers */
+ GSL_REAL(sfvalue(p)) = GSL_REAL(sfvalue(sfaram1(p)));
+ if (GSL_REAL(sfvalue(p)) < 0)
+ GSL_REAL(sfvalue(p)) = -GSL_REAL(sfvalue(p));
+ GSL_IMAG(sfvalue(p)) = 0;
+ return sfaram1(p);
+ };
+
+ sfarg *sfre(sfarg * const p) { /* RE */
+ GSL_REAL(sfvalue(p)) = GSL_REAL(sfvalue(sfaram1(p)));
+ GSL_IMAG(sfvalue(p)) = 0.0;
+ return sfaram1(p);
+ };
+
+ sfarg *sfim(sfarg * const p) { /* IM */
+ GSL_REAL(sfvalue(p)) = GSL_IMAG(sfvalue(sfaram1(p)));
+ GSL_IMAG(sfvalue(p)) = 0.0;
+ return sfaram1(p);
+ };
+
+ sfarg *sfrand(sfarg * const p) { /* rand */
+ GSL_REAL(sfvalue(p)) =
+ GSL_REAL(sfvalue(sfaram1(p))) * (double) rand() /
+ (double) RAND_MAX;
+ GSL_IMAG(sfvalue(p)) = 0;
+ return sfaram1(p);
+ };
+
+//const eval
+ void sfcPI(sfNumber * cnst) {
+ GSL_SET_COMPLEX(cnst, 4 * atan(1), 0);
+ };
+ void sfcPI2(sfNumber * cnst) {
+ GSL_SET_COMPLEX(cnst, 2 * atan(1), 0);
+ };
+ void sfc2PI(sfNumber * cnst) {
+ GSL_SET_COMPLEX(cnst, 8 * atan(1), 0);
+ };
+ void sfcE(sfNumber * cnst) {
+ GSL_SET_COMPLEX(cnst, exp(1), 0);
+ };
+ void sfcI(sfNumber * cnst) {
+ GSL_SET_COMPLEX(cnst, 0, 1);
+ };
+ void sfcRND(sfNumber * cnst) {
+ GSL_SET_COMPLEX(cnst, rand(), 0);
+ };
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif
diff --git a/src/ui-hlp/Makefile.in b/src/ui-hlp/Makefile.in
new file mode 100644
index 0000000..6e8c830
--- /dev/null
+++ b/src/ui-hlp/Makefile.in
@@ -0,0 +1,47 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = autopilot.c \
+ ui_helper.c \
+ menu.c \
+ play.c \
+ messg.c \
+ render.c \
+ playtext.c \
+ save.c \
+ wstack.c
+
+OBJS = $(SRCS:.c=.o)
+
+TLIB = ../lib/libui-hlp.a
+
+
+all: $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $(OBJS)
+ $(RANLIB) $@
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/ui-hlp/autod.c b/src/ui-hlp/autod.c
new file mode 100644
index 0000000..2d66816
--- /dev/null
+++ b/src/ui-hlp/autod.c
@@ -0,0 +1,112 @@
+#ifndef UNSUPPORTED
+static INLINE int
+look1(uih_context * context, int x, int y, int range, int max)
+{
+ register cpixel_t *vbuff;
+ register int i, j, c = 0;
+ if (range < context->zengine->image->width / 2)
+ if (x < 0 || x > context->zengine->image->width ||
+ y < 0 || y > context->zengine->image->height)
+ return 0;
+ do {
+ max--;
+ c = 0;
+ if (range > context->zengine->image->width / 2)
+ context->x1 =
+ rand() % (context->zengine->image->width - 2 * LOOKSIZE -
+ 1) + LOOKSIZE, context->y1 =
+ rand() % (context->zengine->image->height - 2 * LOOKSIZE -
+ 1) + LOOKSIZE;
+ else {
+ context->x1 = rand() % range - (range >> 1) + x;
+ context->y1 = rand() % range - (range >> 1) + y;
+ if (context->x1 < LOOKSIZE)
+ context->x1 = LOOKSIZE;
+ if (context->y1 < LOOKSIZE)
+ context->y1 = LOOKSIZE;
+ if (context->x1 >
+ context->zengine->image->width - 2 - LOOKSIZE)
+ context->x1 =
+ context->zengine->image->width - 2 - LOOKSIZE;
+ if (context->y1 >
+ context->zengine->image->height - 2 - LOOKSIZE)
+ context->y1 =
+ context->zengine->image->height - 2 - LOOKSIZE;
+ }
+ for (j = context->y1 - LOOKSIZE; j <= context->y1 + LOOKSIZE; j++) {
+ vbuff = (cpixel_t *) context->zengine->image->currlines[j];
+ for (i = context->x1 - LOOKSIZE; i <= context->x1 + LOOKSIZE;
+ i++)
+ if (InSet(p_getp(vbuff, i)))
+ c++;
+ }
+ }
+ while ((c == 0 || c > LOOKSIZE * LOOKSIZE) && max > 0);
+ if (max > 0) {
+ context->c1 = BUTTON1, context->interlevel = 1;
+ return 1;
+ }
+ return (0);
+}
+
+static INLINE int
+look2(uih_context * context, int x, int y, int range, int max)
+{
+ register cpixel_t *vbuff, *vbuff2;
+ register int i, j, i1, j1, c = 0;
+ if (range < context->zengine->image->width / 2)
+ if (x < 0 || x > context->zengine->image->width ||
+ y < 0 || y > context->zengine->image->height)
+ return 0;
+ do {
+ max--;
+ c = 0;
+
+ if (range > context->zengine->image->width / 2)
+ context->x1 =
+ rand() % (context->zengine->image->width - 2 * LOOKSIZE -
+ 1) + LOOKSIZE, context->y1 =
+ rand() % (context->zengine->image->height - 2 * LOOKSIZE -
+ 1) + LOOKSIZE;
+ else {
+ context->x1 = rand() % range - (range >> 1) + x;
+ context->y1 = rand() % range - (range >> 1) + y;
+ if (context->x1 < LOOKSIZE)
+ context->x1 = LOOKSIZE;
+ if (context->y1 < LOOKSIZE)
+ context->y1 = LOOKSIZE;
+ if (context->x1 >
+ context->zengine->image->width - 2 - LOOKSIZE)
+ context->x1 =
+ context->zengine->image->width - 2 - LOOKSIZE;
+ if (context->y1 >
+ context->zengine->image->height - 2 - LOOKSIZE)
+ context->y1 =
+ context->zengine->image->height - 2 - LOOKSIZE;
+ }
+
+ for (j = context->y1 - LOOKSIZE; j < context->y1 + LOOKSIZE; j++) {
+ vbuff = (cpixel_t *) context->zengine->image->currlines[j];
+ for (i = context->x1 - LOOKSIZE; i <= context->x1 + LOOKSIZE;
+ i++)
+ for (j1 = j + 1; j1 < context->y1 + LOOKSIZE; j1++) {
+ vbuff2 =
+ (cpixel_t *) context->zengine->image->
+ currlines[j1];
+ for (i1 = i + 1; i1 < context->x1 + LOOKSIZE; i1++)
+ if (p_getp(vbuff, i) == p_getp(vbuff2, i1))
+ c++;
+ }
+ }
+
+ }
+ while ((c > LOOKSIZE * LOOKSIZE / 2) && max > 0);
+ if (max > 0) {
+ context->c1 = BUTTON1, context->interlevel = 2;
+ return 1;
+ }
+ return 0;
+}
+#endif
+#undef look1
+#undef look2
diff --git a/src/ui-hlp/autopilot.c b/src/ui-hlp/autopilot.c
new file mode 100644
index 0000000..5f28879
--- /dev/null
+++ b/src/ui-hlp/autopilot.c
@@ -0,0 +1,214 @@
+
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#else
+#ifdef __MINGW32__
+#include <float.h>
+#define isnan _isnan
+#endif /* __MINGW32__ */
+#include <stdlib.h>
+#include <math.h>
+#include <config.h>
+#include <assert.h>
+#include <limits.h>
+#endif
+#include <fconfig.h>
+#define SLARGEITER
+#include <filter.h>
+#include <zoom.h>
+#include "autopilot.h"
+#include <ui_helper.h>
+#define MINCOUNT 5
+#define InSet(i) (i==context->image->palette->pixels[0])
+/*Include bitmap depended part first */
+
+#include <c256.h>
+#define look1 look18
+#define look2 look28
+#include "autod.c"
+
+#include <hicolor.h>
+#define look1 look116
+#define look2 look216
+#include "autod.c"
+
+#include <true24.h>
+#define look1 look124
+#define look2 look224
+#include "autod.c"
+
+#include <truecolor.h>
+#define look1 look132
+#define look2 look232
+#include "autod.c"
+
+void clean_autopilot(uih_context * context)
+{
+ context->minsize = 1000;
+ context->maxsize = 0;
+ context->autime = 0;
+ context->minlong = 0;
+ context->x1 = INT_MAX;
+ context->y1 = INT_MAX;
+ context->autopilotversion = context->fcontext->version;
+}
+
+static void again(uih_context * context)
+{
+ context->fcontext->s = context->fcontext->currentformula->v;
+ context->fcontext->version++;
+ clean_autopilot(context);
+}
+
+void
+do_autopilot(uih_context * context, int *x, int *y, int *controls,
+ void (*changed) (void), int times)
+{
+ int c = 0;
+ volatile number_t step =
+ (context->fcontext->rs.mc -
+ context->fcontext->rs.nc) / context->zengine->image->width / 10;
+ volatile number_t pos = context->fcontext->rs.mc;
+ volatile number_t pos1 = context->fcontext->rs.mc;
+ volatile number_t ystep =
+ (context->fcontext->rs.mi -
+ context->fcontext->rs.ni) / context->zengine->image->height / 10;
+ volatile number_t ypos = context->fcontext->rs.mi;
+ volatile number_t ypos1 = context->fcontext->rs.mi;
+ pos += step; /*out of precisity check */
+ ypos += ystep;
+ pos1 -= step; /*out of precisity check */
+ ypos1 -= ystep;
+ *x = context->x1;
+ *y = context->y1;
+ uih_clearwindows(context);
+ context->zengine->action->convertup(context->zengine, x, y);
+ if ((context->minlong > MINCOUNT && context->c1 == BUTTON3) ||
+ !(pos > context->fcontext->rs.mc) ||
+ !(ypos > context->fcontext->rs.mi) ||
+ (pos1 >= context->fcontext->rs.mc) ||
+ (ypos1 >= context->fcontext->rs.mi) ||
+ context->fcontext->rs.mc - context->fcontext->rs.nc > 100.0 ||
+ isnan(pos) || isnan(ypos) || isnan(context->fcontext->s.cr) ||
+ isnan(context->fcontext->s.ci) ||
+ isnan(context->fcontext->s.rr - context->fcontext->s.ri) ||
+ context->fcontext->s.rr == 0 ||
+ context->fcontext->s.ri == 0 ||
+ isnan(context->fcontext->rs.mc - context->fcontext->rs.mi) ||
+ isnan(context->fcontext->rs.nc - context->fcontext->rs.ni)) {
+ again(context);
+ changed();
+ }
+ /*Are we waiting for better qualitty? */
+ if (!context->c1 && context->zengine->flags & UNCOMPLETTE) {
+ return;
+ }
+ assert(changed != NULL);
+ if (context->fcontext->version != context->autopilotversion)
+ clean_autopilot(context);
+ if (context->fcontext->rs.mc - context->fcontext->rs.nc <
+ context->minsize) {
+ context->minsize =
+ context->fcontext->rs.mc - context->fcontext->rs.nc;
+ context->minlong = 0;
+ } /*Oscilating prevention */
+ if (context->fcontext->rs.mc - context->fcontext->rs.nc >
+ context->maxsize) {
+ context->minsize =
+ context->fcontext->rs.mc - context->fcontext->rs.nc;
+ context->maxsize =
+ context->fcontext->rs.mc - context->fcontext->rs.nc;
+ context->minlong = 0;
+ }
+ if (context->autime <= 0) {
+ context->minlong++;
+ context->autime = rand() % MAXTIME;
+ if (context->zengine->flags & LOWQUALITY) {
+ context->c1 = 0;
+ } else {
+ switch (context->zengine->image->bytesperpixel) {
+ case 1:
+ c = look18(context, *x, *y, RANGE1, NGUESSES);
+ if (!c)
+ c = look28(context, *x, *y, RANGE1, NGUESSES);
+ if (!(rand() % 30))
+ c = 0;
+ if (!c)
+ c = look18(context, *x, *y, 10000, NGUESSES1);
+ if (!c)
+ c = look18(context, *x, *y, 10000, NGUESSES2);
+ break;
+#ifdef SUPPORT16
+ case 2:
+ c = look116(context, *x, *y, RANGE1, NGUESSES);
+ if (!c)
+ c = look216(context, *x, *y, RANGE1, NGUESSES);
+ if (!(rand() % 30))
+ c = 0;
+ if (!c)
+ c = look116(context, *x, *y, 10000, NGUESSES1);
+ if (!c)
+ c = look216(context, *x, *y, 10000, NGUESSES1);
+ break;
+#endif
+#ifdef STRUECOLOR24
+ case 3:
+ c = look124(context, *x, *y, RANGE1, NGUESSES);
+ if (!c)
+ c = look224(context, *x, *y, RANGE1, NGUESSES);
+ if (!(rand() % 30))
+ c = 0;
+ if (!c)
+ c = look124(context, *x, *y, 10000, NGUESSES1);
+ if (!c)
+ c = look224(context, *x, *y, 10000, NGUESSES1);
+ break;
+#endif
+ case 4:
+ c = look132(context, *x, *y, RANGE1, NGUESSES);
+ if (!c)
+ c = look232(context, *x, *y, RANGE1, NGUESSES);
+ if (!(rand() % 30))
+ c = 0;
+ if (!c)
+ c = look132(context, *x, *y, 10000, NGUESSES1);
+ if (!c)
+ c = look232(context, *x, *y, 10000, NGUESSES1);
+ }
+ if (!c) {
+ if ((context->zengine->flags & UNCOMPLETTE)) {
+ context->c1 = 0;
+ } else
+ context->c1 = BUTTON3, context->autime >>= 1;
+ }
+ }
+ }
+ context->autime -= times;
+ *x = context->x1;
+ *y = context->y1;
+ context->zengine->action->convertup(context->zengine, x, y);
+/* printf("%i %i\n",*x,*y); */
+ *controls = context->c1;
+}
diff --git a/src/ui-hlp/autopilot.h b/src/ui-hlp/autopilot.h
new file mode 100644
index 0000000..98a3794
--- /dev/null
+++ b/src/ui-hlp/autopilot.h
@@ -0,0 +1,33 @@
+
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef AUTOPILOT_H
+#define AUTOPILOT_H
+
+#include <config.h>
+#include <ui_helper.h>
+
+void do_autopilot(uih_context *, int *, int *, int *, void (*)(void),
+ int times);
+void clean_autopilot(uih_context *);
+
+#endif
diff --git a/src/ui-hlp/menu.c b/src/ui-hlp/menu.c
new file mode 100644
index 0000000..4980efc
--- /dev/null
+++ b/src/ui-hlp/menu.c
@@ -0,0 +1,1678 @@
+#ifndef _plan9_
+#include <errno.h>
+#include <string.h>
+#include <stdlib.h>
+#else
+#include <u.h>
+#include <libc.h>
+#endif
+
+#include <aconfig.h>
+#include <filter.h>
+#include <fconfig.h>
+#include <formulas.h>
+#include <ui_helper.h>
+#include <plane.h>
+#include <xmenu.h>
+#include "play.h"
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+#define LANG(name,name2) MENUSTRING("lang", NULL, name,name2,0, (void (*) (struct uih_context *c, char *))uih_loadcatalog, name2)
+#define TUTOR(name1,name2,name3) MENUSTRING(name1, NULL, name2,name3,MENUFLAG_INTERRUPT|UI,uih_playtutorial,name3)
+#define LANG_I(name,name2) MENUSTRING_I("lang", NULL, name,name2,0, (void (*) (struct uih_context *c, char *))uih_loadcatalog, name2)
+#define TUTOR_I(name1,name2,name3) MENUSTRING_I(name1, NULL, name2,name3,MENUFLAG_INTERRUPT|UI,uih_playtutorial,name3)
+
+CONST static char *CONST morphstypes[] = {
+ "view",
+ "julia",
+ "angle",
+ "line"
+};
+
+static CONST char *CONST imgtypes[] = {
+ "Truecolor",
+ "256 colors",
+ NULL
+};
+
+static CONST char *CONST yesno[] = {
+ "No",
+ "Yes",
+ NULL
+};
+
+CONST static char *CONST lineposs[] = {
+ "screen",
+ "scaled",
+ "fractal",
+ NULL
+};
+
+CONST char *CONST uih_colornames[] = {
+ "white",
+ "black",
+ "red",
+ NULL
+};
+
+/* Registering internationalized dialogs.
+ *
+ * The method we are internationalizing dialogs is similar to
+ * menu i18n. The original version of XaoS (without i18n)
+ * contained lots of static variables. Each row of a variable
+ * (which is a structure) contains a widget of a dialog.
+ * The last row contains NULL and 0 values to show
+ * that the dialog does not contain any other widgets.
+ *
+ * Here we are using a huge static variable which contains
+ * all widget from all dialogs. We copy each dialog after
+ * each other into this huge array. The original static
+ * variables will now be pointers pointing to the first
+ * row of the widget data from the appropriate line
+ * of the huge array.
+ *
+ * Note that in the first version there are only 2
+ * internationalized text, the rest will be "converted"
+ * continously (as I have enough time :-).
+ *
+ * Zoltan Kovacs <kovzol@math.u-szeged.hu>, 2003-01-05
+ */
+
+#define MAX_MENUDIALOGS_I18N 100
+#define Register(variable) variable = & menudialogs_i18n[no_menudialogs_i18n]
+static menudialog menudialogs_i18n[MAX_MENUDIALOGS_I18N];
+//static int no_menudialogs_i18n;
+
+static menudialog *uih_perturbationdialog, *uih_juliadialog,
+ *uih_smoothmorphdialog, *uih_renderdialog, *uih_viewdialog,
+ *uih_linedialog, *uih_colordialog, *uih_rotationdialog,
+ *uih_lettersdialog, *uih_iterdialog, *dtextparam, *dcommand,
+ *loaddialog, *playdialog, *saveimgdialog, *saveposdialog,
+ *uih_formuladialog, *uih_plviewdialog, *uih_coorddialog,
+ *uih_angledialog, *uih_autorotatedialog, *uih_fastrotatedialog,
+ *uih_filterdialog, *uih_shiftdialog, *uih_speeddialog, *printdialog,
+ *uih_bailoutdialog, *saveanimdialog, *uih_juliamodedialog,
+ *uih_textposdialog, *uih_fastmodedialog, *uih_timedialog,
+ *uih_numdialog, *uih_fpdialog, *palettedialog, *uih_cyclingdialog
+#ifdef SFFE_USING
+, *uih_sffedialog, *uih_sffeinitdialog
+#endif
+;
+
+extern char *xtextposnames[];
+extern char *ytextposnames[];
+
+
+void uih_registermenudialogs_i18n(void)
+{
+ int no_menudialogs_i18n = 0;
+
+/*
+ * The original code was:
+
+static menudialog uih_perturbationdialog[] = {
+ DIALOGCOORD ("Perturbation:", 0, 0),
+ {NULL}
+
+};
+
+ * Now first the static variable have to be registered (1),
+ * the widget must be inserted into the huge array (2),
+ * and the last row shows that no more widget comes (3).
+ */
+
+ Register(uih_perturbationdialog); // (1)
+ DIALOGCOORD_I(gettext("Perturbation:"), 0, 0); // (2)
+ NULL_I(); // (3)
+
+ Register(uih_juliadialog);
+ DIALOGCOORD_I(gettext("Julia-seed:"), 0, 0);
+ NULL_I();
+
+ Register(uih_smoothmorphdialog);
+ DIALOGCHOICE_I(gettext("Morphing type:"), morphstypes, 0);
+ DIALOGINT_I(gettext("Startuptime:"), 0);
+ DIALOGINT_I(gettext("Stoptime:"), 0);
+ NULL_I();
+
+ Register(uih_renderdialog);
+ DIALOGIFILE_I(gettext("File to render:"), "fract*.xaf");
+ DIALOGOFILE_I(gettext("Basename:"), "anim");
+ DIALOGINT_I(gettext("Width:"), 640);
+ DIALOGINT_I(gettext("Height:"), 480);
+ DIALOGFLOAT_I(gettext("Real width (cm):"), 29.0);
+ DIALOGFLOAT_I(gettext("Real height (cm):"), 21.0);
+ DIALOGFLOAT_I(gettext("Framerate:"), 30);
+ DIALOGCHOICE_I(gettext("Image type:"), imgtypes, 0);
+ DIALOGCHOICE_I(gettext("Antialiasing:"), yesno, 0);
+ DIALOGCHOICE_I(gettext("Always recalculate:"), yesno, 0);
+ DIALOGCHOICE_I(gettext("Calculate MPEG motion vectors:"), yesno, 0);
+ DIALOGINT_I(gettext("Recommended I frame distance:"), 27);
+ NULL_I();
+
+ Register(uih_viewdialog);
+ DIALOGCOORD_I(gettext("Center:"), 0, 0);
+ DIALOGFLOAT_I(gettext("Radius:"), 1);
+ DIALOGFLOAT_I(gettext("Angle:"), 0);
+ NULL_I();
+
+ Register(uih_linedialog);
+ DIALOGCHOICE_I(gettext("Mode:"), lineposs, 0);
+ DIALOGCOORD_I(gettext("Start:"), 0, 0);
+ DIALOGCOORD_I(gettext("End:"), 0, 0);
+ NULL_I();
+
+ Register(uih_colordialog);
+ DIALOGCHOICE_I(gettext("Color:"), uih_colornames, 0);
+ NULL_I();
+
+ Register(uih_rotationdialog);
+ DIALOGFLOAT_I(gettext("Rotations per second:"), 0);
+ NULL_I();
+
+ Register(uih_lettersdialog);
+ DIALOGINT_I(gettext("Letters per second:"), 0);
+ NULL_I();
+
+ Register(uih_iterdialog);
+ DIALOGINT_I(gettext("Iterations:"), 0);
+ NULL_I();
+
+ Register(dtextparam);
+ DIALOGSTR_I(gettext("Text:"), "");
+ NULL_I();
+
+ Register(dcommand);
+ DIALOGSTR_I(gettext("Your command:"), "");
+ NULL_I();
+
+ Register(loaddialog);
+ DIALOGIFILE_I(gettext("Filename:"), "fract*.xpf");
+ NULL_I();
+
+ Register(playdialog);
+ DIALOGIFILE_I(gettext("Filename:"), "anim*.xaf");
+ NULL_I();
+
+ Register(saveimgdialog);
+ DIALOGOFILE_I(gettext("Filename:"), "fract*.png");
+ NULL_I();
+
+ Register(saveposdialog);
+ DIALOGOFILE_I(gettext("Filename:"), "fract*.xpf");
+ NULL_I();
+
+ Register(uih_formuladialog);
+ DIALOGKEYSTR_I(gettext("Formula:"), "mandel");
+ NULL_I();
+
+ Register(uih_plviewdialog);
+ DIALOGFLOAT_I(gettext("X center:"), 0);
+ DIALOGFLOAT_I(gettext("Y center:"), 0);
+ DIALOGFLOAT_I(gettext("X Radius:"), 1);
+ DIALOGFLOAT_I(gettext("Y Radius:"), 1);
+ NULL_I();
+
+ Register(uih_coorddialog);
+ DIALOGCOORD_I(gettext("Coordinates:"), 0, 0);
+ NULL_I();
+
+ Register(uih_angledialog);
+ DIALOGFLOAT_I(gettext("Angle:"), 1);
+ NULL_I();
+
+ Register(uih_autorotatedialog);
+ DIALOGONOFF_I(gettext("continuous rotation"), 0);
+ NULL_I();
+
+ Register(uih_fastrotatedialog);
+ DIALOGONOFF_I(gettext("Fast rotation"), 0);
+ NULL_I();
+
+ Register(uih_filterdialog);
+ DIALOGKEYSTR_I(gettext("filter"), "");
+ DIALOGONOFF_I(gettext("enable"), 0);
+ NULL_I();
+
+ Register(uih_shiftdialog);
+ DIALOGINT_I(gettext("Amount:"), 0);
+ NULL_I();
+
+ Register(uih_speeddialog);
+ DIALOGFLOAT_I(gettext("Zooming speed:"), 0);
+ NULL_I();
+
+ Register(printdialog);
+ DIALOGSTR_I(gettext("Name:"), "");
+ NULL_I();
+
+ Register(uih_bailoutdialog);
+ DIALOGFLOAT_I(gettext("Bailout:"), 0);
+ NULL_I();
+
+ Register(saveanimdialog);
+ DIALOGOFILE_I(gettext("Filename:"), "anim*.xaf");
+ NULL_I();
+
+ Register(uih_juliamodedialog);
+ DIALOGONOFF_I(gettext("Julia mode:"), 0);
+ NULL_I();
+
+ Register(uih_textposdialog);
+ DIALOGCHOICE_I(gettext("Horizontal position:"), xtextposnames, 0);
+ DIALOGCHOICE_I(gettext("Vertical position:"), ytextposnames, 0);
+ NULL_I();
+
+ Register(uih_fastmodedialog);
+ DIALOGCHOICE_I(gettext("Dynamic resolution:"), save_fastmode, 0);
+ NULL_I();
+
+ Register(uih_timedialog);
+ DIALOGINT_I(gettext("Time:"), 0);
+ NULL_I();
+
+ Register(uih_numdialog);
+ DIALOGINT_I(gettext("Number:"), 0);
+ NULL_I();
+
+ Register(uih_fpdialog);
+ DIALOGFLOAT_I(gettext("Number:"), 0);
+ NULL_I();
+
+ Register(palettedialog);
+ DIALOGINT_I(gettext("Algorithm number:"), 0);
+ DIALOGINT_I(gettext("Seed:"), 0);
+ DIALOGINT_I(gettext("Shift:"), 0);
+ NULL_I();
+
+ Register(uih_cyclingdialog);
+ DIALOGINT_I(gettext("Frames per second:"), 0);
+ NULL_I();
+
+#ifdef SFFE_USING
+ Register(uih_sffedialog);
+ DIALOGSTR_I(gettext("Formula:"), "z^2+c");
+ NULL_I();
+
+ Register(uih_sffeinitdialog);
+ DIALOGSTR_I(gettext("Initialization:"), "");
+ NULL_I();
+#endif
+
+#ifdef DEBUG
+ printf("Filled %d widgets out of %d.\n",
+ no_menudialogs_i18n, MAX_MENUDIALOGS_I18N);
+#endif
+}
+
+#undef Register
+
+/*
+ * End of registering internationalized dialogs.
+ */
+
+#ifdef SFFE_USING
+void uih_sffein(uih_context * c, CONST char *text);
+void uih_sffeinitin(uih_context * c, CONST char *text);
+#endif
+
+static void uih_smoothmorph(struct uih_context *c, dialogparam * p)
+{
+ if (!c->playc)
+ return;
+ switch (p[0].dint) {
+ case 0:
+ c->playc->morphtimes[0] = p[1].dint;
+ c->playc->morphtimes[1] = p[2].dint;
+ break;
+ case 1:
+ c->playc->morphjuliatimes[0] = p[1].dint;
+ c->playc->morphjuliatimes[1] = p[2].dint;
+ break;
+ case 2:
+ c->playc->morphangletimes[0] = p[1].dint;
+ c->playc->morphangletimes[1] = p[2].dint;
+ break;
+ case 3:
+ c->playc->morphlinetimes[0] = p[1].dint;
+ c->playc->morphlinetimes[1] = p[2].dint;
+ break;
+ }
+}
+
+static void uih_render(struct uih_context *c, dialogparam * d)
+{
+#ifdef MACOSX
+ /*
+ * On Mac OS X, we must ensure basename specifies an absolute path in order
+ * to prevent png files from being rendered to the root directory.
+ */
+ if (d[1].dstring[0] != '/') {
+ uih_error(c,
+ gettext
+ ("renderanim: Must specify a valid absolute path for basename"));
+ return;
+ }
+#endif
+ if (d[2].dint <= 0 || d[2].dint > 4096) {
+ uih_error(c,
+ gettext
+ ("renderanim: Width parameter must be positive integer in the range 0..4096"));
+ return;
+ }
+ if (d[3].dint <= 0 || d[3].dint > 4096) {
+ uih_error(c,
+ gettext
+ ("renderanim: Height parameter must be positive integer in the range 0..4096"));
+ return;
+ }
+ if (d[4].number <= 0 || d[5].number <= 0) {
+ uih_error(c,
+ gettext
+ ("renderanim: Invalid real width and height dimensions"));
+ return;
+ }
+ if (d[6].number <= 0 || d[6].number >= 1000000) {
+ uih_error(c, gettext("renderanim: invalid framerate"));
+ return;
+ }
+ if (d[7].dint && d[8].dint) {
+ uih_error(c,
+ gettext
+ ("renderanim: antialiasing not supported in 256 color mode"));
+ return;
+ }
+ if (d[11].dint <= 0 || d[11].dint >= 1000000) {
+ uih_error(c, gettext("renderanim: incorrect I frame distance"));
+ return;
+ }
+ uih_renderanimation(c, d[1].dstring, (xio_path) d[0].dstring,
+ d[2].dint, d[3].dint, d[4].number / d[2].dint,
+ d[5].number / d[3].dint,
+ (int) (1000000 / d[6].number),
+#ifdef STRUECOLOR24
+ d[7].dint ? C256 : TRUECOLOR24,
+#else
+ d[7].dint ? C256 : TRUECOLOR,
+#endif
+ d[8].dint, d[9].dint, c->letterspersec, NULL,
+ d[10].dint, d[11].dint);
+}
+
+static menudialog *uih_getcolordialog(struct uih_context *c)
+{
+ if (c != NULL) {
+ uih_colordialog[0].defint = c->color;
+ }
+ return (uih_colordialog);
+}
+
+static void uih_setcolor(struct uih_context *c, int color)
+{
+ c->color = color;
+}
+
+
+static menudialog *uih_getperturbationdialog(struct uih_context *c)
+{
+ if (c != NULL) {
+ uih_perturbationdialog[0].deffloat = c->fcontext->bre;
+ uih_perturbationdialog[0].deffloat2 = c->fcontext->bim;
+ }
+ return (uih_perturbationdialog);
+}
+
+static menudialog *uih_getjuliadialog(struct uih_context *c)
+{
+ if (c != NULL) {
+ uih_juliadialog[0].deffloat = c->fcontext->pre;
+ uih_juliadialog[0].deffloat2 = c->fcontext->pim;
+ }
+ return (uih_juliadialog);
+}
+
+static void uih_plview(struct uih_context *c, dialogparam * d)
+{
+ if (d[2].number <= 0 || d[3].number <= 0) {
+ uih_error(c, gettext("animateview: Invalid viewpoint"));
+ return;
+ }
+ c->fcontext->s.cr = d[0].number;
+ c->fcontext->s.ci = d[1].number;
+ c->fcontext->s.rr = d[2].number;
+ c->fcontext->s.ri = d[3].number;
+ uih_newimage(c);
+}
+
+static void uih_plview2(struct uih_context *c, dialogparam * d)
+{
+ if (d[2].number <= 0 || d[3].number <= 0) {
+ uih_error(c, gettext("animateview: Invalid viewpoint"));
+ return;
+ }
+ c->fcontext->s.cr = d[0].number;
+ c->fcontext->s.ci = d[1].number;
+ c->fcontext->s.rr = d[2].number;
+ c->fcontext->s.ri = d[3].number;
+ uih_animate_image(c);
+}
+
+static void uih_dview(struct uih_context *c, dialogparam * d)
+{
+ if (d[1].number <= 0) {
+ uih_error(c, gettext("Invalid viewpoint"));
+ return;
+ }
+ c->fcontext->s.cr = d[0].dcoord[0];
+ c->fcontext->s.ci = d[0].dcoord[1];
+ c->fcontext->s.rr = d[1].number;
+ c->fcontext->s.ri = d[1].number;
+ uih_angle(c, d[2].number);
+ uih_newimage(c);
+}
+
+static menudialog *uih_getviewdialog(struct uih_context *c)
+{
+ number_t xs, ys;
+ if (c != NULL) {
+ xs = c->fcontext->s.rr;
+ ys = c->fcontext->s.ri * c->fcontext->windowwidth /
+ c->fcontext->windowheight;
+ uih_viewdialog[0].deffloat = c->fcontext->s.cr;
+ uih_viewdialog[0].deffloat2 = c->fcontext->s.ci;
+ uih_viewdialog[2].deffloat = c->fcontext->angle;
+ if (xs > ys)
+ uih_viewdialog[1].deffloat = c->fcontext->s.rr;
+ else
+ uih_viewdialog[1].deffloat = c->fcontext->s.ri;
+ }
+ return (uih_viewdialog);
+}
+
+static void uih_printdialog(struct uih_context *c, CONST char *name)
+{
+ CONST menuitem *item = menu_findcommand(name);
+ int y;
+ CONST menudialog *di;
+ if (item == NULL) {
+ fprintf(stderr, "print_dialog:unknown function %s\n", name);
+ return;
+ }
+ if (item->type != MENU_DIALOG && item->type != MENU_CUSTOMDIALOG) {
+ fprintf(stderr, "print_dialog:%s don't have any dialog. Sorry.\n",
+ name);
+ return;
+ }
+ di = menu_getdialog(c, item);
+ if (item->type == MENU_CUSTOMDIALOG)
+ printf("customdialog \"%s\"\n", item->shortname);
+ else
+ printf("dialog \"%s\"\n", item->shortname);
+ for (y = 0; di[y].question != NULL; y++) {
+ printf("dialogentry \"%s\" ", di[y].question);
+ switch (di[y].type) {
+ case DIALOG_INT:
+ printf("integer %i", di->defint);
+ break;
+ case DIALOG_FLOAT:
+ printf("float %f", (double) di->deffloat);
+ break;
+ case DIALOG_STRING:
+ printf("string \"%s\"", di->defstr);
+ case DIALOG_KEYSTRING:
+ printf("keyword \"%s\"", di->defstr);
+ break;
+ case DIALOG_IFILE:
+ printf("inputfile \"%s\"", di->defstr);
+ break;
+ case DIALOG_OFILE:
+ printf("outputfile \"%s\"", di->defstr);
+ break;
+ case DIALOG_ONOFF:
+ printf("onoff %s", di->defint ? "#t" : "#f");
+ break;
+ case DIALOG_COORD:
+ printf("complex %f %f", (double) di->deffloat,
+ (double) di->deffloat2);
+ break;
+ case DIALOG_CHOICE:
+ printf("choice {");
+ {
+ int y;
+ CONST char **str = (CONST char **) di->defstr;
+ for (y = 0; str[y] != NULL; y++)
+ printf("%s ", str[y]);
+ printf("}");
+ printf("%s ", str[di->defint]);
+ }
+ break;
+ }
+ printf("\n");
+ }
+ printf("enddialog\n");
+}
+
+static void
+uih_printmenu(struct uih_context *c, CONST char *name, int recursive)
+{
+ CONST char *fullname;
+ int i = 0;
+ CONST menuitem *item;
+ if ((fullname = menu_fullname(name)) == NULL) {
+ printf("Menu not found\n");
+ return;
+ }
+ printf("\n\nmenu \"%s\" \"%s\"\n", fullname, name);
+ for (i = 0; (item = menu_item(name, i)) != NULL; i++) {
+ if (item->type == MENU_SUBMENU) {
+ printf("submenu \"%s\" \"%s\"\n", item->name, item->shortname);
+ continue;
+ }
+ if (item->type == MENU_SUBMENU) {
+ printf("separator");
+ continue;
+ }
+ printf("menuentry \"%s\" \"%s\" ", item->name, item->shortname);
+ if (item->flags & MENUFLAG_RADIO)
+ printf("radio %s", menu_enabled(item, c) ? "on" : "off");
+ else if (item->flags & MENUFLAG_CHECKBOX)
+ printf("checkbox %s", menu_enabled(item, c) ? "on" : "off");
+ else
+ printf("normal");
+ if (item->flags & MENUFLAG_DIALOGATDISABLE)
+ printf(" dialogatdisable");
+ if (item->type == MENU_DIALOG || item->type == MENU_CUSTOMDIALOG)
+ printf(" dialog");
+ printf("\n");
+ }
+ printf("endmenu\n");
+ if (recursive)
+ for (i = 0; (item = menu_item(name, i)) != NULL; i++) {
+ if (item->type == MENU_SUBMENU) {
+ uih_printmenu(c, item->shortname, 1);
+ }
+ }
+}
+
+static void uih_printmenuwr(struct uih_context *c, CONST char *name)
+{
+ uih_printmenu(c, name, 0);
+}
+
+static void uih_printallmenus(struct uih_context *c)
+{
+ uih_printmenu(c, "root", 1);
+ uih_printmenu(c, "animroot", 1);
+ printf("endmenu\n");
+}
+
+static menudialog *uih_getlettersdialog(struct uih_context *c)
+{
+ if (c != NULL)
+ uih_lettersdialog[0].defint = c->letterspersec;
+ return (uih_lettersdialog);
+}
+
+static menudialog *uih_getiterdialog(struct uih_context *c)
+{
+ if (c != NULL)
+ uih_iterdialog[0].defint = c->fcontext->maxiter;
+ return (uih_iterdialog);
+}
+
+static menudialog *uih_getbailoutdialog(struct uih_context *c)
+{
+ if (c != NULL)
+ uih_bailoutdialog[0].deffloat = c->fcontext->bailout;
+ return (uih_bailoutdialog);
+}
+
+static int uih_saveanimenabled(struct uih_context *c)
+{
+ if (c == NULL)
+ return 0;
+ return (c->save);
+}
+
+
+
+static menudialog *uih_getrotationdialog(struct uih_context *c)
+{
+ if (c != NULL)
+ uih_rotationdialog[0].deffloat = c->rotationspeed;
+ return (uih_rotationdialog);
+}
+
+static menudialog *uih_getpalettedialog(struct uih_context *uih)
+{
+ if (uih != NULL) {
+ palettedialog[0].defint = uih->palettetype;
+ palettedialog[1].defint = uih->paletteseed;
+ palettedialog[2].defint =
+ uih->paletteshift + uih->manualpaletteshift;
+ }
+ return (palettedialog);
+}
+
+static menudialog *uih_getcyclingdialog(struct uih_context *uih)
+{
+ if (uih != NULL)
+ uih_cyclingdialog[0].defint = uih->cyclingspeed * uih->direction;
+ return (uih_cyclingdialog);
+}
+
+static menudialog *uih_getspeeddialog(struct uih_context *uih)
+{
+ if (uih != NULL)
+ uih_speeddialog[0].deffloat = uih->speedup / STEP;
+ return (uih_speeddialog);
+}
+
+static void uih_setspeed(uih_context * c, number_t p)
+{
+ if (p >= 100)
+ p = 1.0;
+ if (p < 0)
+ p = 0;
+ c->speedup = STEP * p;
+ c->maxstep = MAXSTEP * p;
+
+}
+
+static void uih_palette(struct uih_context *uih, dialogparam * p)
+{
+ int n1 = p[0].dint;
+ int n2 = p[1].dint;
+ int shift = p[2].dint;
+ if (!n1) {
+ uih_playdefpalette(uih, shift);
+ return;
+ }
+ if (n1 < 1 || n1 > PALGORITHMS) {
+ uih_error(uih, gettext("Unknown palette type"));
+ }
+ if (uih->zengine->fractalc->palette == NULL)
+ return;
+ if (mkpalette(uih->zengine->fractalc->palette, n2, n1 - 1) != 0) {
+ uih_newimage(uih);
+ }
+ uih->manualpaletteshift = 0;
+ uih->palettetype = n1;
+ uih->palettechanged = 1;
+ uih->paletteseed = n2;
+ if (shiftpalette(uih->zengine->fractalc->palette, shift)) {
+ uih_newimage(uih);
+ }
+ uih->paletteshift = shift;
+}
+
+static int uih_rotateselected(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ if (!c->fastrotate)
+ return !n;
+ return (c->rotatemode == n);
+}
+
+static int uih_guessingselected(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->range == n);
+}
+
+static int uih_fastmode(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fastmode == n);
+}
+
+static int uih_periodicityselected(struct uih_context *c)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->periodicity);
+}
+
+static void uih_periodicitysw(struct uih_context *c)
+{
+ uih_setperiodicity(c, c->fcontext->periodicity ^ 1);
+}
+
+static int uih_cyclingselected(struct uih_context *c)
+{
+ if (c == NULL)
+ return 0;
+ return (c->cycling && c->cyclingdirection == 1);
+}
+
+static int uih_rcyclingselected(struct uih_context *c)
+{
+ if (c == NULL)
+ return 0;
+ return (c->cycling && c->cyclingdirection == -1);
+}
+
+static void uih_cyclingsw(struct uih_context *c)
+{
+ // Andrew Stone: this fixes what I consider a bug - switching from Y to y should keep cycling:
+ if (c->cycling && c->cyclingdirection == -1)
+ uih_cycling_off(c);
+ c->cyclingdirection = 1;
+ if (c->cycling)
+ uih_cycling_off(c);
+ else if (!uih_cycling_on(c))
+ uih_error(c, gettext("Initialization of color cycling failed.")),
+ uih_message(c,
+ gettext("Try to enable palette emulation filter"));
+}
+
+static void uih_rcyclingsw(struct uih_context *c)
+{
+ // Andrew Stone: this fixes what I consider a bug - switching from y to Y should keep cycling:
+ if (c->cycling && c->cyclingdirection == 1)
+ uih_cycling_off(c);
+ c->cyclingdirection = -1;
+ if (c->cycling)
+ uih_cycling_off(c);
+ else if (!uih_cycling_on(c))
+ uih_error(c, gettext("Initialization of color cycling failed.")),
+ uih_message(c,
+ gettext("Try to enable palette emulation filter"));
+}
+
+static void uih_juliasw(struct uih_context *c)
+{
+ if (!c->juliamode)
+ uih_enablejulia(c);
+ else
+ uih_disablejulia(c);
+}
+
+static int uih_juliaselected(struct uih_context *c)
+{
+ if (c == NULL)
+ return 0;
+ return (c->juliamode);
+}
+
+static int uih_mandelbrotselected(struct uih_context *c)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->mandelbrot);
+}
+
+static void uih_mandelbrotsw(struct uih_context *c, number_t x, number_t y)
+{
+ c->fcontext->mandelbrot ^= 1;
+ if (c->fcontext->mandelbrot == 0 && !c->juliamode) {
+ c->fcontext->pre = x;
+ c->fcontext->pim = y;
+ } else
+ uih_disablejulia(c);
+ c->fcontext->version++;
+ uih_newimage(c);
+ uih_updatemenus(c, "uimandelbrot");
+}
+
+static int uih_autopilotselected(struct uih_context *c)
+{
+ if (c == NULL)
+ return 0;
+ return (c->autopilot);
+}
+
+static int uih_fixedstepselected(struct uih_context *c)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fixedstep);
+}
+
+static void uih_persw(struct uih_context *c, number_t x, number_t y)
+{
+ if (c->fcontext->bre || c->fcontext->bim)
+ uih_setperbutation(c, 0.0, 0.0);
+ else
+ uih_setperbutation(c, x, y);
+ // printf(""); // fixme: some newer versions of gcc crashes without this
+}
+
+static int uih_perselected(struct uih_context *c)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->bre || c->fcontext->bim);
+}
+
+static void uih_autopilotsw(struct uih_context *c)
+{
+ if (c->autopilot)
+ uih_autopilot_off(c);
+ else
+ uih_autopilot_on(c);
+}
+
+static void uih_fixedstepsw(struct uih_context *c)
+{
+ c->fixedstep ^= 1;
+}
+
+static void uih_setxtextpos(uih_context * c, int p)
+{
+ uih_settextpos(c, p, c->ytextpos);
+}
+
+static int uih_xtextselected(uih_context * c, int p)
+{
+ if (c == NULL)
+ return 0;
+ return (c->xtextpos == p);
+}
+
+static void uih_setytextpos(uih_context * c, int p)
+{
+ uih_settextpos(c, c->xtextpos, p);
+}
+
+static int uih_ytextselected(uih_context * c, int p)
+{
+ if (c == NULL)
+ return 0;
+ return (c->ytextpos == p);
+}
+
+static void uih_menumkpalette(uih_context * c)
+{
+ char s[256];
+ uih_mkpalette(c);
+ sprintf(s, gettext("Algorithm:%i seed:%i size:%i"), c->palettetype,
+ c->paletteseed, c->zengine->fractalc->palette->size);
+ uih_message(c, s);
+}
+
+static void uih_shiftpalette(uih_context * c, int shift)
+{
+ if (shiftpalette(c->zengine->fractalc->palette, shift)) {
+ uih_newimage(c);
+ }
+ c->manualpaletteshift += shift;
+}
+
+static void uih_fshift(uih_context * c)
+{
+ uih_shiftpalette(c, 1);
+}
+
+static void uih_bshift(uih_context * c)
+{
+ uih_shiftpalette(c, -1);
+}
+
+static CONST menuitem *menuitems; /*XaoS menu specifications */
+/* This structure is now empty. All static definitions have been moved
+ to uih_registermenus_i18n() which fills up its own static array. */
+
+
+/* Registering internationalized menus. See also include/xmenu.h
+ for details. Note that MAX_MENUITEMS_I18N should be increased
+ if more items will be added in future.
+
+ On 2006-07-12 J.B. Langston wrote:
+
+ The menu.c.diff file changes the MAX_MENUITEMS_I18N macro from
+ 200 to 250. As of 3.2.1, the number of allocated menu items had
+ been exceeded (there are 201 menu items now). This was causing
+ the memory within the application to be clobbered, resulting
+ in subtle bugs on the PowerPC platform (both X11 and OSX drivers).
+ For example, rendering animations generated a segmentation fault.
+ It's quite possible it could have been causing other subtle bugs
+ elsewhere in the program. */
+
+#define MAX_MENUITEMS_I18N 250
+static menuitem menuitems_i18n[MAX_MENUITEMS_I18N];
+int uih_no_menuitems_i18n;
+
+void uih_registermenus_i18n(void)
+{
+ // Special version (currently it's OK):
+ int no_menuitems_i18n = 0;
+ SUBMENU_I("", NULL, gettext("Root menu"), "root");
+ SUBMENU_I("", NULL, gettext("Animation root menu"), "animroot");
+ SUBMENU_I("", NULL, gettext("Replay only commands"), "plc");
+ SUBMENU_I("", NULL, gettext("Command line options only"), "comm");
+#define MP (MENUFLAG_NOMENU|MENUFLAG_NOPLAY|MENUFLAG_ATSTARTUP)
+ MENUNOP_I("comm", NULL,
+ gettext("print menus specifications of all menus"),
+ "print_menus", MP, uih_printallmenus);
+ MENUDIALOG_I("comm",
+ NULL,
+ gettext
+ ("print menu specification"),
+ "print_menu", MP, uih_printmenuwr, printdialog);
+ MENUDIALOG_I("comm", NULL,
+ gettext("print menu specification in xshl format"),
+ "xshl_print_menu", MP, uih_xshlprintmenu, printdialog);
+ MENUNOP_I("comm", NULL,
+ gettext
+ ("print all menu specifications in xshl format"),
+ "xshl_print_menus", MP, uih_xshlprintmenus);
+ MENUDIALOG_I("comm", NULL, gettext("print dialog specification"),
+ "print_dialog", MP, uih_printdialog, printdialog);
+#undef MP
+#define MP (MENUFLAG_NOMENU|MENUFLAG_NOOPTION)
+ /* Commands suitable only for animation replay */
+ SUBMENU_I("plc", NULL, gettext("Line drawing functions"), "linemenu");
+ MENUDIALOG_I("linemenu", NULL, gettext("Line"), "line", MP, uih_line,
+ uih_linedialog);
+ MENUDIALOG_I("linemenu", NULL,
+ gettext("Morph line"),
+ "morphline", MP, uih_morphline, uih_linedialog);
+ MENUDIALOG_I("linemenu", NULL, gettext("Morph last line"),
+ "morphlastline", MP, uih_morphlastline, uih_linedialog);
+ MENUDIALOG_I("linemenu", NULL,
+ gettext("Set line key"),
+ "linekey", MP, uih_setkey, uih_numdialog);
+ MENUNOP_I("linemenu", NULL, gettext("Clear line"), "clearline", MP,
+ uih_clear_line);
+ MENUNOP_I("linemenu", NULL,
+ gettext("Clear all lines"), "clearlines", MP,
+ uih_clear_lines);
+ SUBMENU_I("plc", NULL, gettext("Animation functions"), "animf");
+ MENUDIALOG_I("animf", NULL, gettext("View"), "animateview", MP,
+ uih_plview2, uih_plviewdialog);
+ MENUDIALOG_I("animf", NULL,
+ gettext
+ ("Morph view"),
+ "morphview", MP, uih_playmorph, uih_plviewdialog);
+ MENUDIALOG_I("animf", NULL, gettext("Morph julia"), "morphjulia", MP,
+ uih_playmorphjulia, uih_coorddialog);
+ MENUDIALOG_I("animf",
+ NULL,
+ gettext
+ ("Move view"), "moveview", MP, uih_playmove,
+ uih_coorddialog);
+ MENUDIALOG_I("animf", NULL, gettext("Morph angle"), "morphangle", MP,
+ uih_playmorphangle, uih_angledialog);
+ MENUDIALOG_I("animf", NULL, gettext("Zoom center"), "zoomcenter", MP,
+ uih_zoomcenter, uih_coorddialog);
+ MENUNOP_I("animf", NULL, gettext("Zoom"), "zoom", MP, uih_playzoom);
+ MENUNOP_I("animf", NULL, gettext("Un-zoom"),
+ "unzoom", MP, uih_playunzoom);
+ MENUNOP_I("animf",
+ NULL, gettext("Stop zooming"), "stop", MP, uih_playstop);
+ MENUDIALOG_I("animf", NULL, gettext("Smooth morphing parameters"),
+ "smoothmorph", MP, uih_smoothmorph,
+ uih_smoothmorphdialog);
+ SUBMENU_I("plc", NULL, gettext("Timing functions"), "time");
+ MENUDIALOG_I("time", NULL, gettext("Usleep"), "usleep", MP,
+ uih_playusleep, uih_timedialog);
+ MENUNOP_I("time", NULL,
+ gettext("Wait for text"), "textsleep", MP,
+ uih_playtextsleep);
+ MENUNOP_I("time", NULL, gettext("Wait for complete image"), "wait", MP,
+ uih_playwait);
+ MENUDIALOG_I("plc", NULL, gettext("Include file"), "load", MP,
+ uih_playload, loaddialog);
+ MENUDIALOG_I("palette", NULL, gettext("Default palette"),
+ "defaultpalette", MP, uih_playdefpalette, uih_numdialog);
+ MENUDIALOG_I("fractal", NULL, gettext("Formula"), "formula", MP,
+ uih_play_formula, uih_formuladialog);
+ MENUDIALOG_I("ui", NULL, gettext("Maximal zooming step"), "maxstep",
+ MP, uih_setmaxstep, uih_fpdialog);
+ MENUDIALOG_I("ui", NULL, gettext("Zooming speedup"), "speedup", MP,
+ uih_setspeedup, uih_fpdialog);
+ MENUDIALOG_I("mfilter", NULL, gettext("Filter"), "filter", MP,
+ uih_playfilter, uih_filterdialog);
+#undef MP
+#define UI (MENUFLAG_NOPLAY|MENUFLAG_NOOPTION)
+ MENUCDIALOG_I("ui", NULL, gettext("Letters per second"),
+ "letterspersec", MENUFLAG_NOMENU, uih_letterspersec,
+ uih_getlettersdialog);
+ MENUCDIALOG_I("uia", NULL,
+ gettext
+ ("Letters per second"),
+ "letters", UI, uih_letterspersec, uih_getlettersdialog);
+ MENUNOP_I("uia", "z", gettext("Interrupt"), "animinterrupt",
+ MENUFLAG_INTERRUPT | MENUFLAG_INCALC, uih_interrupt);
+ SUBMENU_I("root", "s", gettext("File"), "file");
+ SUBMENU_I("root", NULL, gettext("Edit"), "edit");
+ SUBMENU_I("root", NULL, gettext("Fractal"), "fractal");
+ SUBMENU_I("root", NULL, gettext("Calculation"), "calc");
+ SUBMENU_I("root", "e", gettext("Filters"), "mfilter");
+ SUBMENU_I("root", NULL, gettext("UI"), "ui");
+ SUBMENU_I("root", NULL, gettext("Misc"), "misc");
+#ifdef MACOSX
+ SUBMENU_I("root", NULL, gettext("Window"), "window");
+#endif
+ SUBMENU_I("root", NULL, gettext("Help"), "helpmenu");
+ SUBMENU_I("helpmenu", NULL, gettext("Tutorials"),
+ "tutor") SUBMENUNOOPT_I("animroot", "f", gettext("File"),
+ "file");
+ // You cannot have menu items directly on the root menu in some OS
+ // So we put the "Stop Replay" item in the UI menu instead
+ MENUSEPARATOR_I("uia");
+ MENUNOP_I("uia", "s", gettext("Stop replay"), "stopreplay",
+ UI | MENUFLAG_INTERRUPT, uih_replaydisable);
+ SUBMENUNOOPT_I("animroot", NULL, gettext("UI"), "uia");
+ SUBMENUNOOPT_I("animroot", NULL, gettext("Help"), "helpmenu");
+ MENUDIALOG_I("misc", "!", gettext("Command"), "command", UI,
+ uih_command, dcommand);
+ MENUDIALOG_I("misc", NULL, gettext("Play string"), "playstr",
+ MENUFLAG_NOMENU, uih_playstr, dcommand);
+ MENUDIALOG_I("misc", NULL, gettext("Render animation"), "renderanim",
+ UI, uih_render, uih_renderdialog);
+ MENUSEPARATOR_I("misc");
+ MENUNOP_I("misc", NULL, gettext("Clear screen"), "clearscreen",
+ MENUFLAG_NOOPTION, uih_clearscreen);
+ MENUNOP_I("misc", NULL, gettext("Display fractal"), "display",
+ MENUFLAG_NOOPTION, uih_display);
+ MENUSEPARATOR_I("misc");
+ MENUDIALOG_I("misc", NULL, gettext("Display text"), "text", 0, uih_text, dtextparam); /*FIXME: Should allow multiline */
+
+ MENUCDIALOG_I("misc", NULL, gettext("Color"), "color", 0, uih_setcolor,
+ uih_getcolordialog);
+ SUBMENU_I("misc", NULL, gettext("Horizontal text position"),
+ "xtextpos");
+ SUBMENU_I("misc", NULL, gettext("Vertical text position"), "ytextpos");
+ MENUDIALOG_I("misc", NULL,
+ gettext("Text position"),
+ "textposition",
+ MENUFLAG_NOMENU | MENUFLAG_INCALC,
+ uih_playtextpos, uih_textposdialog);
+ MENUDIALOG_I("misc", NULL, gettext("Message"), "message",
+ MENUFLAG_NOMENU, uih_playmessage, dtextparam);
+ /* The following 6 menu options should not be translated. The example
+ files heavily use these constants and lots of examples will not work
+ anymore... :-( Anyway, this should be fixed somehow. */
+
+ MENUINTRB_I("ytextpos", NULL, "Up", "ytextup", UI, uih_setytextpos,
+ UIH_TEXTTOP, uih_ytextselected);
+ MENUINTRB_I("ytextpos",
+ NULL, "Middle",
+ "ytextmiddle",
+ UI, uih_setytextpos, UIH_TEXTMIDDLE, uih_ytextselected);
+ MENUINTRB_I("ytextpos", NULL, "Bottom", "ytextbottom", UI,
+ uih_setytextpos, UIH_TEXTBOTTOM, uih_ytextselected);
+ MENUINTRB_I("xtextpos", NULL, "Left",
+ "xtextleft", UI,
+ uih_setxtextpos, UIH_TEXTLEFT, uih_xtextselected);
+ MENUINTRB_I("xtextpos", NULL, "Center", "xtextcenter", UI,
+ uih_setxtextpos, UIH_TEXTCENTER, uih_xtextselected);
+ MENUINTRB_I("xtextpos", NULL, "Right",
+ "xtexteight", UI,
+ uih_setxtextpos, UIH_TEXTRIGHT, uih_xtextselected);
+ MENUDIALOG_I("file", NULL, gettext("Load"), "loadpos",
+ MENUFLAG_INTERRUPT | MENUFLAG_NOPLAY, uih_loadfile,
+ loaddialog);
+ MENUDIALOG_I("file", NULL, gettext("Save"),
+ "savepos", 0, uih_saveposfile, saveposdialog);
+ MENUSEPARATOR_I("file") MENUDIALOGCB_I("file", NULL, gettext("Record"),
+ "record", 0, uih_saveanimfile,
+ saveanimdialog,
+ uih_saveanimenabled);
+ MENUDIALOG_I("file", NULL, gettext("Replay"), "play",
+ MENUFLAG_INTERRUPT | MENUFLAG_NOPLAY, uih_playfile,
+ playdialog);
+ MENUSEPARATOR_I("file");
+ MENUDIALOG_I("file",
+ NULL,
+ gettext
+ ("Save image"), "saveimg", 0, uih_savepngfile,
+ saveimgdialog);
+ MENUNOP_I("file", NULL, gettext("Load random example"), "loadexample",
+ MENUFLAG_INTERRUPT, uih_loadexample);
+ MENUNOP_I("file", NULL, gettext("Save configuration"), "savecfg", 0,
+ uih_savecfg);
+#ifndef MACOSX
+ MENUSEPARATOR_I("file");
+#endif
+ MENUNOP_I("edit", "u", gettext("Undo"), "undo",
+ MENUFLAG_INTERRUPT | MENUFLAG_NOPLAY |
+ MENUFLAG_NOOPTION, uih_undo);
+ MENUNOP_I("edit", NULL,
+ gettext("Redo"),
+ "redo",
+ MENUFLAG_INTERRUPT
+ | MENUFLAG_NOPLAY | MENUFLAG_NOOPTION, uih_redo);
+ SUBMENU_I("fractal", NULL, gettext("Formulae"), "mformula");
+ SUBMENU_I("fractal", NULL, gettext("More formulae"), "oformula");
+
+#ifdef SFFE_USING
+ /*FIXME: Should allow multiline */
+ MENUSEPARATOR_I("fractal");
+ MENUDIALOG_I("fractal", NULL, gettext("User formula"), "usrform", 0,
+ uih_sffein, uih_sffedialog);
+ MENUDIALOG_I("fractal", NULL, gettext("User initialization"),
+ "usrformInit", 0, uih_sffeinitin, uih_sffeinitdialog);
+#endif
+
+ MENUSEPARATOR_I("fractal");
+ SUBMENU_I("fractal", "f", gettext("Incoloring mode"), "mincoloring");
+ SUBMENU_I("fractal", "c", gettext("Outcoloring mode"), "moutcoloring");
+ SUBMENU_I("fractal", "i", gettext("Plane"), "mplane");
+ SUBMENU_I("fractal", NULL, gettext("Palette"), "palettemenu");
+ MENUSEPARATOR_I("fractal");
+ MENUCDIALOGCB_I("fractal", "m",
+ gettext("Mandelbrot mode"),
+ "uimandelbrot",
+ MENUFLAG_DIALOGATDISABLE |
+ MENUFLAG_INTERRUPT | UI,
+ uih_mandelbrotsw,
+ uih_getjuliadialog, uih_mandelbrotselected);
+ MENUCDIALOGCB_I("fractal", "b", gettext("Perturbation"),
+ "uiperturbation", MENUFLAG_INTERRUPT | UI, uih_persw,
+ uih_getperturbationdialog, uih_perselected);
+ MENUCDIALOG_I("fractal", NULL,
+ gettext("Perturbation"),
+ "perturbation",
+ MENUFLAG_NOMENU |
+ MENUFLAG_INTERRUPT,
+ uih_setperbutation, uih_getperturbationdialog);
+ MENUSEPARATOR_I("fractal");
+ MENUCDIALOG_I("fractal", NULL,
+ gettext("View"), "uiview",
+ MENUFLAG_INTERRUPT | UI, uih_dview, uih_getviewdialog);
+ MENUSEPARATOR_I("fractal");
+ MENUNOP_I("fractal", NULL,
+ gettext("Reset to defaults"), "initstate", 0, uih_initstate);
+ MENUDIALOG_I("fractal", NULL, gettext("Julia mode"), "julia",
+ MENUFLAG_NOMENU | MENUFLAG_INTERRUPT, uih_playjulia,
+ uih_juliamodedialog);
+ MENUDIALOG_I("fractal", NULL,
+ gettext("View"), "view",
+ MENUFLAG_NOMENU |
+ MENUFLAG_INTERRUPT, uih_plview, uih_plviewdialog);
+ MENUDIALOG_I("fractal", NULL, gettext("Set angle"), "angle",
+ MENUFLAG_NOMENU | MENUFLAG_INTERRUPT, uih_angle,
+ uih_angledialog);
+ MENUDIALOG_I("fractal", NULL,
+ gettext("Set plane"),
+ "plane",
+ MENUFLAG_NOMENU |
+ MENUFLAG_INTERRUPT, uih_setplane, uih_numdialog);
+ MENUDIALOG_I("fractal", NULL, gettext("Inside coloring mode"),
+ "incoloring", MENUFLAG_NOMENU | MENUFLAG_INTERRUPT,
+ uih_setincoloringmode, uih_numdialog);
+ MENUDIALOG_I("fractal", NULL,
+ gettext
+ ("Outside coloring mode"),
+ "outcoloring",
+ MENUFLAG_NOMENU |
+ MENUFLAG_INTERRUPT, uih_setoutcoloringmode,
+ uih_numdialog);
+ MENUDIALOG_I("fractal", NULL,
+ gettext("Inside truecolor coloring mode"), "intcoloring",
+ MENUFLAG_NOMENU | MENUFLAG_INTERRUPT, uih_setintcolor,
+ uih_numdialog);
+ MENUDIALOG_I("fractal", NULL,
+ gettext("Outside truecolor coloring mode"),
+ "outtcoloring", MENUFLAG_NOMENU | MENUFLAG_INTERRUPT,
+ uih_setouttcolor, uih_numdialog);
+ MENUDIALOG_I("fractal", NULL, gettext("Julia seed"), "juliaseed",
+ MENUFLAG_NOMENU | MENUFLAG_INTERRUPT, uih_setjuliaseed,
+ uih_coorddialog);
+ MENUNOP_I("palettemenu", "d", gettext("Default palette"), "defpalette",
+ 0, uih_mkdefaultpalette);
+ MENUNOP_I("palettemenu", "p", gettext("Random palette"),
+ "randompalette", 0, uih_menumkpalette);
+ MENUCDIALOG_I("palettemenu", NULL, gettext("Custom palette"),
+ "palette", 0, uih_palette, uih_getpalettedialog);
+ MENUSEPARATOR_I("palettemenu");
+ MENUNOPCB_I("palettemenu", "y",
+ gettext("Color cycling"),
+ "cycling", 0, uih_cyclingsw, uih_cyclingselected);
+ MENUNOPCB_I("palettemenu", "Y", gettext("Reversed color cycling"),
+ "rcycling", MENUFLAG_NOOPTION | MENUFLAG_NOPLAY,
+ uih_rcyclingsw, uih_rcyclingselected);
+ MENUCDIALOG_I("palettemenu", NULL,
+ gettext
+ ("Color cycling speed"),
+ "cyclingspeed", 0, uih_setcycling, uih_getcyclingdialog);
+ MENUSEPARATOR_I("palettemenu");
+ MENUDIALOG_I("palettemenu", NULL,
+ gettext("Shift palette"),
+ "shiftpalette", 0, uih_shiftpalette, uih_shiftdialog);
+ MENUNOP_I("palettemenu", "+", gettext("Shift one forward"), "fshift",
+ MENUFLAG_NOOPTION | MENUFLAG_NOPLAY, uih_fshift);
+ MENUNOP_I("palettemenu", "-",
+ gettext("Shift one backward"),
+ "bshift", MENUFLAG_NOOPTION | MENUFLAG_NOPLAY, uih_bshift);
+ SUBMENU_I("calc", NULL, gettext("Solid guessing"), "mguess");
+ SUBMENU_I("calc", NULL, gettext("Dynamic resolution"), "dynamic");
+ MENUNOPCB_I("calc", "k",
+ gettext("Periodicity checking"),
+ "periodicity", 0, uih_periodicitysw,
+ uih_periodicityselected);
+ MENUCDIALOG_I("calc", NULL, gettext("Iterations"), "maxiter",
+ MENUFLAG_INTERRUPT, uih_setmaxiter, uih_getiterdialog);
+ MENUCDIALOG_I("calc", NULL, gettext("Bailout"), "bailout",
+ MENUFLAG_INTERRUPT, uih_setbailout,
+ uih_getbailoutdialog);
+ MENUSEPARATOR_I("calc");
+ MENUNOPCB_I("calc", "j", gettext("Fast julia mode"), "fastjulia", 0,
+ uih_juliasw, uih_juliaselected);
+ SUBMENU_I("calc", "o", gettext("Rotation"), "rotate");
+ MENUDIALOG_I("calc", NULL, gettext("Solid guessing range"), "range",
+ MENUFLAG_NOMENU, uih_setguessing, uih_numdialog);
+ MENUINTRB_I("rotate", NULL,
+ gettext("Disable rotation"),
+ "norotate", UI, uih_rotate, 0, uih_rotateselected);
+ MENUSEPARATOR_I("rotate");
+ MENUINTRB_I("rotate", NULL,
+ gettext("Continuous rotation"),
+ "controtate", UI, uih_rotate,
+ ROTATE_CONTINUOUS, uih_rotateselected);
+ MENUINTRB_I("rotate", NULL, gettext("Rotate by mouse"), "mouserotate",
+ UI, uih_rotate, ROTATE_MOUSE, uih_rotateselected);
+ MENUCDIALOG_I("rotate", NULL,
+ gettext
+ ("Rotation speed"),
+ "rotationspeed", 0,
+ uih_rotationspeed, uih_getrotationdialog);
+ MENUDIALOG_I("rotate", NULL, gettext("Automatic rotation"),
+ "autorotate", MENUFLAG_NOMENU, uih_playautorotate,
+ uih_autorotatedialog);
+ MENUDIALOG_I("rotate", NULL,
+ gettext
+ ("Fast rotation mode"),
+ "fastrotate",
+ MENUFLAG_NOMENU,
+ (funcptr) uih_fastrotate, uih_fastrotatedialog);
+ MENUINTRB_I("dynamic", NULL, gettext("Disable dynamic resolution"),
+ "nodynamic", UI, uih_setfastmode, 1, uih_fastmode);
+ MENUSEPARATOR_I("dynamic");
+ MENUINTRB_I("dynamic", NULL, gettext("Use only during animation"),
+ "dynamicanimation", UI, uih_setfastmode, 2, uih_fastmode);
+ MENUINTRB_I("dynamic", NULL,
+ gettext
+ ("Use also for new images"),
+ "dynamicnew", UI, uih_setfastmode, 3, uih_fastmode);
+ MENUDIALOG_I("dynamic", NULL, gettext("Dynamic resolution mode"),
+ "fastmode", MENUFLAG_NOMENU, uih_setfastmode,
+ uih_fastmodedialog);
+ MENUNOPCB_I("ui", "a",
+ gettext("Autopilot"),
+ "autopilot", 0, uih_autopilotsw, uih_autopilotselected);
+ MENUSEPARATOR_I("ui");
+ MENUNOPCB_I("ui", "v",
+ gettext("VJ mode"),
+ "inhibittextoutput", 0, uih_inhibittextsw,
+ uih_inhibittextselected);
+ MENUSEPARATOR_I("ui");
+ MENUNOP_I("ui", "r", gettext("Recalculate"),
+ "recalculate", 0, uih_recalculate);
+ MENUNOP_I("ui", "z",
+ gettext
+ ("Interrupt"),
+ "interrupt",
+ MENUFLAG_INTERRUPT | MENUFLAG_INCALC, uih_interrupt);
+ MENUSEPARATOR_I("ui");
+ MENUCDIALOG_I("ui", NULL,
+ gettext("Zooming speed"), "speed",
+ 0, uih_setspeed, uih_getspeeddialog);
+ MENUNOPCB_I("ui", NULL, gettext("Fixed step"), "fixedstep", 0,
+ uih_fixedstepsw, uih_fixedstepselected);
+ MENUINTRB_I("mguess", NULL,
+ gettext
+ ("Disable solid guessing"),
+ "noguess", UI, uih_setguessing, 1, uih_guessingselected);
+ MENUSEPARATOR_I("mguess");
+ MENUINTRB_I("mguess", NULL,
+ gettext("Guess 2x2 rectangles"),
+ "guess2", UI, uih_setguessing, 2, uih_guessingselected);
+ MENUINTRB_I("mguess", NULL, gettext("Guess 3x3 rectangles"), "guess3",
+ UI, uih_setguessing, 3, uih_guessingselected);
+ MENUINTRB_I("mguess", NULL,
+ gettext
+ ("Guess 4x4 rectangles"),
+ "guess4", UI, uih_setguessing, 4, uih_guessingselected);
+ MENUINTRB_I("mguess", NULL, gettext("Guess 5x5 rectangles"), "guess5",
+ UI, uih_setguessing, 5, uih_guessingselected);
+ MENUINTRB_I("mguess", NULL,
+ gettext
+ ("Guess 6x6 rectangles"),
+ "guess6", UI, uih_setguessing, 6, uih_guessingselected);
+ MENUINTRB_I("mguess", NULL, gettext("Guess 7x7 rectangles"), "guess7",
+ UI, uih_setguessing, 7, uih_guessingselected);
+ MENUINTRB_I("mguess", NULL,
+ gettext
+ ("Guess 8x8 rectangles"),
+ "guess8", UI, uih_setguessing, 8, uih_guessingselected);
+ MENUINTRB_I("mguess", NULL, gettext("Guess unlimited rectangles"),
+ "guessall", UI, uih_setguessing, 2048,
+ uih_guessingselected);
+ /* Language selection is not sensible anymore if i18n is used: */
+#ifndef HAVE_GETTEXT
+ SUBMENU_I("tutor", NULL, gettext("Language"), "lang");
+ MENUSEPARATOR_I("tutor");
+#endif
+ SUBMENU_I("tutor", NULL, gettext("An introduction to fractals"),
+ "intro");
+ SUBMENU_I("tutor", NULL, gettext("XaoS features overview"),
+ "features");
+ SUBMENU_I("tutor", NULL, gettext("Math behind fractals"), "fmath");
+ SUBMENU_I("tutor", NULL, gettext("Other fractal types in XaoS"),
+ "otherf");
+ SUBMENU_I("tutor", NULL, gettext("What's new?"), "new");
+ /* Language selection is not sensible anymore if i18n is used: */
+#ifndef HAVE_GETTEXT
+ LANG_I("Cesky", "cesky");
+ LANG_I("Deutsch", "deutsch");
+ LANG_I("English", "english");
+ LANG_I("Espanhol", "espanhol");
+ LANG_I("Francais", "francais");
+ LANG_I("Magyar", "magyar");
+#endif
+ TUTOR_I("intro", gettext("Whole story"), "fractal.xaf");
+ MENUSEPARATOR_I("intro");
+ TUTOR_I("intro", gettext("Introduction"), "intro.xaf");
+ TUTOR_I("intro", gettext("Mandelbrot set"), "mset.xaf");
+ TUTOR_I("intro", gettext("Julia set"), "julia.xaf");
+ TUTOR_I("intro", gettext("Higher power Mandelbrots"), "power.xaf");
+ TUTOR_I("intro", gettext("Newton's method"), "newton.xaf");
+ TUTOR_I("intro", gettext("Barnsley's formula"), "barnsley.xaf");
+ TUTOR_I("intro", gettext("Phoenix"), "phoenix.xaf");
+ TUTOR_I("intro", gettext("Octo"), "octo.xaf");
+ TUTOR_I("intro", gettext("Magnet"), "magnet.xaf");
+ TUTOR_I("features", gettext("All features"), "features.xaf");
+ MENUSEPARATOR_I("features");
+ TUTOR_I("features", gettext("Outcoloring modes"), "outcolor.xaf");
+ TUTOR_I("features", gettext("Incoloring modes"), "incolor.xaf");
+ TUTOR_I("features", gettext("True-color coloring modes"),
+ "truecol.xaf");
+ TUTOR_I("features", gettext("Filters"), "filter.xaf");
+ TUTOR_I("features", gettext("Planes"), "plane.xaf");
+ TUTOR_I("features", gettext("Animations and position files"),
+ "anim.xaf");
+ TUTOR_I("features", gettext("Perturbation"), "pert.xaf");
+ TUTOR_I("features", gettext("Random palettes"), "palette.xaf");
+ TUTOR_I("features", gettext("Other noteworthy features"), "other.xaf");
+ TUTOR_I("fmath", gettext("Whole story"), "fmath.xaf");
+ MENUSEPARATOR_I("fmath");
+ TUTOR_I("fmath", gettext("The definition and fractal dimension"),
+ "dimension.xaf");
+ TUTOR_I("fmath", gettext("Escape time fractals"), "escape.xaf");
+ TUTOR_I("otherf", gettext("Other fractal types in XaoS"),
+ "otherfr.xaf");
+ MENUSEPARATOR_I("otherf");
+ TUTOR_I("otherf", gettext("Triceratops and Catseye fractals"),
+ "trice.xaf");
+ TUTOR_I("otherf", gettext("Mandelbar, Lambda, Manowar and Spider"),
+ "fourfr.xaf");
+ TUTOR_I("otherf",
+ gettext("Sierpinski Gasket, S.Carpet, Koch Snowflake"),
+ "classic.xaf");
+ TUTOR_I("new", gettext("What's new in 3.0?"), "new30.xaf");
+#ifdef DEBUG
+ printf("Filled %d menu items out of %d.\n", no_menuitems_i18n,
+ MAX_MENUITEMS_I18N);
+#endif
+ menu_add(menuitems_i18n, no_menuitems_i18n);
+ uih_no_menuitems_i18n = no_menuitems_i18n;
+}
+
+
+static CONST menuitem menuitems2[] = {
+ SUBMENU("mincoloring", NULL, "True-color incoloring mode",
+ "tincoloring"),
+ SUBMENU("moutcoloring", NULL, "True-color outcoloring mode",
+ "toutcoloring")
+};
+
+static int uih_selectedformula(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->currentformula == formulas + n);
+}
+
+static int uih_selectedincoloring(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->incoloringmode == n);
+}
+
+static void uih_setintruecolor(struct uih_context *c, int n)
+{
+ uih_setincoloringmode(c, 10);
+ uih_setintcolor(c, n);
+}
+
+static int uih_selectedintcoloring(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->intcolor == n);
+}
+
+static int uih_selectedoutcoloring(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->coloringmode == n);
+}
+
+static int uih_selectedplane(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->plane == n);
+}
+
+static void uih_setouttruecolor(struct uih_context *c, int n)
+{
+ uih_setoutcoloringmode(c, 10);
+ uih_setouttcolor(c, n);
+}
+
+static int uih_selectedouttcoloring(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ return (c->fcontext->outtcolor == n);
+}
+
+static int uih_filterenabled(struct uih_context *c, int n)
+{
+ if (c == NULL)
+ return 0;
+ return (c->filter[n] != NULL);
+}
+
+static void uih_filtersw(struct uih_context *c, int n)
+{
+ if (c->filter[n] != NULL)
+ uih_disablefilter(c, n);
+ else
+ uih_enablefilter(c, n);
+}
+
+static menuitem *formulaitems;
+static menuitem *filteritems;
+static char (*keys)[2];
+void uih_registermenus(void)
+{
+ menuitem *item;
+ int i;
+ menu_add(menuitems, NITEMS(menuitems));
+ formulaitems = item =
+ (menuitem *) malloc(sizeof(menuitem) * nformulas);
+
+ /* This code automatically generates code for fractal, incoloring and other
+ * menus*/
+ keys = malloc(sizeof(*keys) * nformulas);
+ for (i = 0; i < nformulas; i++) {
+ if (i < nmformulas) {
+ item[i].menuname = "mformula";
+ } else {
+ item[i].menuname = "oformula";
+ }
+ item[i].key = keys[i];
+ if (i < 9)
+ keys[i][0] = '1' + i;
+ else if (i == 9)
+ keys[i][0] = '0';
+#ifndef _MAC
+ else
+ keys[i][0] = '7' + i;
+#endif
+ keys[i][1] = 0;
+ item[i].type = MENU_INT;
+ item[i].flags =
+ MENUFLAG_RADIO | MENUFLAG_INTERRUPT | MENUFLAG_NOPLAY;
+ item[i].iparam = i;
+ item[i].name = formulas[i].name[!formulas[i].mandelbrot];
+ item[i].shortname = formulas[i].shortname;
+ item[i].function = (void (*)(void)) uih_setformula;
+ item[i].control = (int (*)(void)) uih_selectedformula;
+ }
+ menu_add(item, nformulas);
+
+ menu_genernumbered(INCOLORING - 1, "mincoloring", incolorname, NULL,
+ MENU_INT, UI | MENUFLAG_RADIO | MENUFLAG_INTERRUPT,
+ uih_setincoloringmode, uih_selectedincoloring,
+ "in");
+
+ menu_genernumbered(TCOLOR - 1, "tincoloring", tcolorname, NULL,
+ MENU_INT, UI | MENUFLAG_RADIO | MENUFLAG_INTERRUPT,
+ uih_setintruecolor, uih_selectedintcoloring, "int");
+
+ menu_genernumbered(OUTCOLORING - 1, "moutcoloring", outcolorname, NULL,
+ MENU_INT, UI | MENUFLAG_RADIO | MENUFLAG_INTERRUPT,
+ uih_setoutcoloringmode, uih_selectedoutcoloring,
+ "out");
+
+ menu_genernumbered(TCOLOR - 1, "toutcoloring", tcolorname, NULL,
+ MENU_INT, UI | MENUFLAG_RADIO | MENUFLAG_INTERRUPT,
+ uih_setouttruecolor, uih_selectedouttcoloring,
+ "outt");
+
+ {
+ int i;
+ for (i = 0; planename[i] != NULL; i++);
+ menu_genernumbered(i, "mplane", planename, NULL, MENU_INT,
+ UI | MENUFLAG_RADIO | MENUFLAG_INTERRUPT,
+ uih_setplane, uih_selectedplane, "plane");
+ }
+ filteritems = item =
+ (menuitem *) malloc(sizeof(menuitem) * uih_nfilters);
+
+ /* This code automatically generates code for fractal, incoloring and other
+ * menus*/
+ for (i = 0; i < uih_nfilters; i++) {
+ item[i].menuname = "mfilter";
+ item[i].key = NULL;
+ item[i].type = MENU_INT;
+ item[i].flags =
+ MENUFLAG_CHECKBOX | MENUFLAG_INTERRUPT | MENUFLAG_NOPLAY;
+ item[i].iparam = i;
+ item[i].name = uih_filters[i]->name;
+ item[i].shortname = uih_filters[i]->shortname;
+ if (!strcmp(item[i].shortname, "palette"))
+ item[i].shortname = "palettef";
+ /*this is one name collision because of ugly historical reasons */
+ item[i].function = (void (*)(void)) uih_filtersw;
+ item[i].control = (int (*)(void)) uih_filterenabled;
+ }
+ menu_add(item, uih_nfilters);
+
+ menu_add(menuitems2, NITEMS(menuitems2));
+}
+
+void uih_unregistermenus(void)
+{
+ menu_delete(menuitems, NITEMS(menuitems));
+ menu_delete(menuitems_i18n, uih_no_menuitems_i18n);
+
+ free(keys);
+ menu_delete(formulaitems, nformulas);
+ free(formulaitems);
+
+ menu_delnumbered(INCOLORING - 1, "in");
+
+ menu_delnumbered(TCOLOR - 1, "int");
+
+ menu_delnumbered(OUTCOLORING - 1, "out");
+
+ menu_delnumbered(TCOLOR - 1, "outt");
+ {
+ int i;
+ for (i = 0; planename[i] != NULL; i++);
+ menu_delnumbered(i, "plane");
+ }
+
+ menu_delete(filteritems, uih_nfilters);
+ free(filteritems);
+
+ menu_delete(menuitems2, NITEMS(menuitems2));
+}
+
+#ifdef SFFE_USING
+void uih_sffein(uih_context * c, CONST char *text)
+{
+ char str[200];
+ int err;
+ if (strlen(text)) {
+ c->parser->errormsg = (char *) str;
+ if ((err = sffe_parse(&c->parser, (char *) text)) > 0) {
+ uih_message(c, str);
+ sffe_parse(&c->parser, "z^2+c");
+ uih_sffedialog->defstr = c->parser->expression;
+ } else {
+ uih_sffedialog->defstr = c->parser->expression;
+ uih_message(c, c->parser->expression);
+ if (!(c->fcontext->currentformula->flags & SFFE_FRACTAL)) {
+ uih_play_formula(c, "user");
+ } else
+ uih_recalculate(c);
+ };
+
+ c->parser->errormsg = NULL;
+ };
+};
+
+void uih_sffeinitin(uih_context * c, CONST char *text)
+{
+ extern cmplx pZ;
+ extern cmplx C;
+ char str[200];
+ int err;
+ uih_sffeinitdialog->defstr = "";
+ if (strlen(text)) {
+ if (!c->pinit) {
+ c->pinit = sffe_alloc();
+ sffe_regvar(&c->pinit, &pZ, 'p');
+ sffe_regvar(&c->pinit, &C, 'c');
+ };
+
+ c->pinit->errormsg = (char *) str;
+ if ((err = sffe_parse(&c->pinit, (char *) text)) > 0) {
+ uih_message(c, str);
+ sffe_free(&c->pinit);
+ c->pinit = NULL;
+ } else {
+ uih_sffeinitdialog->defstr = c->pinit->expression; /*FIXME shouldnt this be done by str copy */
+ uih_message(c, c->pinit->expression);
+ if (!(c->fcontext->currentformula->flags & SFFE_FRACTAL)) {
+ uih_play_formula(c, "user");
+ } else
+ uih_recalculate(c);
+ c->pinit->errormsg = NULL;
+ };
+
+ } else if (c->pinit) {
+ sffe_free(&c->pinit);
+ c->pinit = NULL;
+ uih_recalculate(c);
+ };
+};
+#endif
diff --git a/src/ui-hlp/messg.c b/src/ui-hlp/messg.c
new file mode 100644
index 0000000..2a66fe2
--- /dev/null
+++ b/src/ui-hlp/messg.c
@@ -0,0 +1,145 @@
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#else
+#include <stdlib.h>
+#include <string.h>
+#endif
+#include <filter.h>
+#include <fractal.h>
+#include <timers.h>
+#include <ui_helper.h>
+#include <xerror.h>
+#include <misc-f.h>
+#include "grlib.h"
+#define EXPIRETIME 4000000
+static void
+getpos(uih_context * c, int *x, int *y, int *w, int *h, void *data)
+{
+ int n = (int) data;
+ if (c->messg.message[n] != NULL) {
+ int he = xtextheight(c->font);
+ *y = c->messg.messagestart + he * n;
+ *h = he;
+ *w = xtextwidth(c->font, c->messg.message[n]);
+ *x = (c->image->width - *w) / 2;
+ } else {
+ *w = *h = *x = *y = 0;
+ }
+}
+
+static void draw(uih_context * c, void *data)
+{
+ int x, y, w;
+ int n = (int) data;
+ if (c->messg.message[n] != NULL) {
+ int h = xtextheight(c->font);
+ y = c->messg.messagestart + h * n;
+ w = xtextwidth(c->font, c->messg.message[n]);
+ x = (c->image->width - w) / 2;
+ if (c->messg.messagetype[n])
+ xprint(c->image, c->font, x, y, c->messg.message[n],
+ (c->image->flags & AAIMAGE) ? BGCOLOR(c) : SELCOLOR(c),
+ BGCOLOR(c), 0);
+ else
+ xprint(c->image, c->font, x, y, c->messg.message[n],
+ (c->image->flags & AAIMAGE) ? BGCOLOR(c) : FGCOLOR(c),
+ BGCOLOR(c), 0);
+ }
+}
+
+void uih_rmmessage(uih_context * c, int pid)
+{
+ int i;
+ for (i = 0; i < NMESSAGES && c->messg.pid[i] != pid; i++);
+ if (i == NMESSAGES)
+ return;
+ if (c->messg.message[i] == NULL)
+ return;
+ free(c->messg.message[i]);
+ tl_remove_timer(c->messg.messagetimer[i]);
+ tl_free_timer(c->messg.messagetimer[i]);
+ c->messg.message[i] = NULL;
+ for (; i < NMESSAGES - 1; i++) {
+ c->messg.message[i] = c->messg.message[i + 1];
+ c->messg.messagetimer[i] = c->messg.messagetimer[i + 1];
+ c->messg.messagetype[i] = c->messg.messagetype[i + 1];
+ c->messg.pid[i] = c->messg.pid[i + 1];
+ }
+ c->messg.message[NMESSAGES - 1] = NULL;
+ c->display = 1;
+}
+
+void uih_scrollup(uih_context * c)
+{
+ uih_rmmessage(c, c->messg.pid[0]);
+}
+
+void uih_clearmessages(uih_context * c)
+{
+ while (c->messg.message[0] != NULL)
+ uih_scrollup(c);
+}
+
+void uih_initmessages(uih_context * c)
+{
+ int i;
+ for (i = 0; i < NMESSAGES; i++) {
+ c->messg.message[i] = NULL;
+ c->messg.w[i] = uih_registerw(c, getpos, draw, (void *) i, 0);
+ }
+ c->messg.messagestart = 0;
+}
+
+void uih_destroymessages(uih_context * c)
+{
+ int i;
+ uih_clearmessages(c);
+ for (i = 0; i < NMESSAGES; i++)
+ uih_removew(c, c->messg.w[i]);
+}
+
+static int uih_message1(uih_context * c, CONST char *message, int type)
+{
+ static int pid;
+ int i;
+ for (i = 0; i < NMESSAGES && c->messg.message[i] != NULL; i++);
+ if (i == NMESSAGES)
+ uih_scrollup(c), i--;
+ c->messg.message[i] = mystrdup(message);
+ c->messg.messagetype[i] = type;
+ c->messg.messagetimer[i] = tl_create_timer();
+ tl_reset_timer(c->messg.messagetimer[i]);
+ tl_set_interval(c->messg.messagetimer[i], 1);;
+ tl_slowdown_timer(c->messg.messagetimer[i], EXPIRETIME);;
+ tl_set_handler(c->messg.messagetimer[i],
+ (void (*)(void *)) uih_scrollup, c);
+ tl_add_timer(syncgroup, c->messg.messagetimer[i]);
+ /*tl_remove_timer (c->messg.messagetimer[i]); */
+ c->messg.pid[i] = ++pid;
+ c->display = 1;
+ return (pid);
+}
+
+int uih_message(uih_context * c, CONST char *message)
+{
+ if (c->inhibittextoutput)
+ return 0;
+
+ return (uih_message1(c, message, 0));
+}
+
+int uih_error(uih_context * c, CONST char *error)
+{
+ char str[256];
+ sprintf(str, "Error: %s", error);
+ c->errstring = error;
+ return (uih_message1(c, str, 1));
+}
+
+void uih_printmessages(uih_context * c)
+{
+ int i;
+ for (i = 0; i < NMESSAGES && c->messg.message[i] != NULL; i++)
+ x_message(c->messg.message[i], stderr);
+}
diff --git a/src/ui-hlp/play.c b/src/ui-hlp/play.c
new file mode 100644
index 0000000..17430d6
--- /dev/null
+++ b/src/ui-hlp/play.c
@@ -0,0 +1,946 @@
+#include <config.h>
+#ifndef _plan9_
+#include <limits.h>
+#ifdef NO_MALLOC_H
+#include <stdlib.h>
+#else
+#include <malloc.h>
+#endif
+#include <string.h>
+#else
+#include <u.h>
+#include <libc.h>
+#endif
+#include <fconfig.h>
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <catalog.h>
+#include <xmenu.h>
+#include <grlib.h>
+#include "play.h"
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+#define nextchar() (uih->playstring==NULL?xio_getc(FD):uih->playstring[uih->playpos++])
+#define ungetchar(c) (uih->playstring==NULL?xio_ungetc(c,FD):uih->playpos--)
+#define endoffile() (uih->playstring==NULL?xio_feof(FD):uih->playstring[uih->playpos]==0)
+static int nonblockmode;
+static catalog_t *catalog; /*The message catalog should be "session wide" */
+CONST static char *errstring;
+#define seterr(str) {if(errstring==NULL) errstring=str;}
+#define FD uih->playc->file
+static char token[1024];
+static int first;
+static int last;
+static int parsenext;
+
+static CONST char *CONST animroot = "animroot";
+
+static inline struct uih_line *uih_findkey(uih_context * c, int key)
+{
+ struct uih_line *l = c->playc->lines.first;
+ while (l != NULL) {
+ if (l->key == key)
+ return l;
+ l = l->next;
+ }
+ return NULL;
+}
+
+static inline void uih_removeline(uih_context * c, struct uih_line *l)
+{
+ if (l == NULL)
+ return;
+ uih_removew(c, l->w);
+ if (l->prev)
+ l->prev->next = l->next;
+ else
+ c->playc->lines.first = l->next;
+ if (l->next)
+ l->next->prev = l->prev;
+ free(l);
+}
+
+void uih_line(uih_context * c, dialogparam * d)
+{
+ struct uih_window *w;
+ struct uih_line *l;
+ if (c->playstring != NULL) {
+ seterr(gettext("line available only in animation replay"));
+ return;
+ }
+ w = uih_registerline(c, 0, -1, -1, -1, -1);
+ uih_removeline(c, uih_findkey(c, c->playc->lines.currkey));
+ l = (struct uih_line *) calloc(1, sizeof(*l));
+ l->posmode = d[0].dint;
+ l->w = w;
+ l->x1 = d[1].dcoord[0];
+ l->y1 = d[1].dcoord[1];
+ l->x2 = d[2].dcoord[0];
+ l->y2 = d[2].dcoord[1];
+ l->color = c->color;
+ l->morph = 0;
+ l->key = c->playc->lines.currkey++;
+ l->prev = NULL;
+ l->next = c->playc->lines.first;
+ c->playc->lines.first = l;
+}
+
+void uih_morphline(uih_context * c, dialogparam * d)
+{
+ struct uih_line *l;
+ l = uih_findkey(c, c->playc->lines.currkey);
+ if (l == NULL) {
+ seterr(gettext("Morphing non existing line!"));
+ return;
+ }
+ c->playc->lines.currkey++;
+ l->mposmode = d[0].dint;
+ l->mx1 = d[1].dcoord[0];
+ l->my1 = d[1].dcoord[1];
+ l->mx2 = d[2].dcoord[0];
+ l->my2 = d[2].dcoord[1];
+ l->morph = 1;
+ c->playc->lines.morphing = 1;
+}
+
+void uih_morphlastline(uih_context * c, dialogparam * d)
+{
+ c->playc->lines.currkey--;
+ uih_morphline(c, d);
+}
+
+void uih_setkey(uih_context * c, int line)
+{
+ if (!c->play) {
+ seterr(gettext("linekey not available in this context!"));
+ return;
+ }
+ c->playc->lines.currkey = line;
+}
+
+static void uih_stopmorphing(uih_context * c)
+{
+ struct uih_line *l = c->playc->lines.first;
+ while (l) {
+ if (l->morph) {
+ l->x1 = l->mx1;
+ l->y1 = l->my1;
+ l->x2 = l->mx2;
+ l->y2 = l->my2;
+ l->posmode = l->mposmode;
+ l->morph = 0;
+ c->playc->lines.morphing = 1;
+ }
+ l = l->next;
+ }
+}
+
+void uih_update_lines(uih_context * c)
+{
+ int m = 0;
+ int co;
+ struct uih_line *l = c->playc->lines.first;
+ int x1, y1, x2, y2;
+ number_t x, y;
+ int timer = tl_lookup_timer(c->playc->timer) - c->playc->starttime;
+ number_t mmul = /*(tl_lookup_timer (c->playc->timer) - c->playc->starttime) / (number_t) (c->playc->frametime - c->playc->starttime); */
+ MORPHVALUE(timer, c->playc->frametime - c->playc->starttime,
+ c->playc->morphlinetimes[0],
+ c->playc->morphlinetimes[1]);
+
+
+ while (l) {
+ switch (l->posmode) {
+ case 0:
+ x1 = (int) (c->image->width * l->x1);
+ y1 = (int) (c->image->height * l->y1);
+ x2 = (int) (c->image->width * l->x2);
+ y2 = (int) (c->image->height * l->y2);
+ break;
+ case 1:
+ x = c->image->width * c->image->pixelwidth;
+ y = c->image->height * c->image->pixelheight;
+ if (x > y)
+ x = y;
+ x1 = (int) (c->image->width / 2 +
+ (l->x1 - 0.5) * x / c->image->pixelwidth);
+ y1 = (int) (c->image->height / 2 +
+ (l->y1 - 0.5) * x / c->image->pixelheight);
+ x2 = (int) (c->image->width / 2 +
+ (l->x2 - 0.5) * x / c->image->pixelwidth);
+ y2 = (int) (c->image->height / 2 +
+ (l->y2 - 0.5) * x / c->image->pixelheight);
+ break;
+ case 2:
+ x = l->x1;
+ y = l->y1;
+ rotate(*(c->fcontext), x, y);
+ x = (x - c->fcontext->rs.nc) / (c->fcontext->rs.mc -
+ c->fcontext->rs.nc) *
+ c->zengine->image->width;
+ y = (y - c->fcontext->rs.ni) / (c->fcontext->rs.mi -
+ c->fcontext->rs.ni) *
+ c->zengine->image->height;
+ x1 = (int) x;
+ y1 = (int) y;
+ c->zengine->action->convertup(c->zengine, &x1, &y1);
+ x = l->x2;
+ y = l->y2;
+ rotate(*(c->fcontext), x, y);
+ x = (x - c->fcontext->rs.nc) / (c->fcontext->rs.mc -
+ c->fcontext->rs.nc) *
+ c->zengine->image->width;
+ y = (y - c->fcontext->rs.ni) / (c->fcontext->rs.mi -
+ c->fcontext->rs.ni) *
+ c->zengine->image->height;
+ x2 = (int) x;
+ y2 = (int) y;
+ c->zengine->action->convertup(c->zengine, &x2, &y2);
+ break;
+ }
+ if (l->morph) {
+ int mx1, mx2, my1, my2;
+ m = 1;
+ switch (l->mposmode) {
+ case 0:
+ mx1 = (int) (c->image->width * l->mx1);
+ my1 = (int) (c->image->height * l->my1);
+ mx2 = (int) (c->image->width * l->mx2);
+ my2 = (int) (c->image->height * l->my2);
+ break;
+ case 1:
+ x = c->image->width * c->image->pixelwidth;
+ y = c->image->height * c->image->pixelheight;
+ if (x > y)
+ x = y;
+ mx1 =
+ (int) (c->image->width / 2 +
+ (l->mx1 - 0.5) * x / c->image->pixelwidth);
+ my1 =
+ (int) (c->image->height / 2 +
+ (l->my1 - 0.5) * x / c->image->pixelheight);
+ mx2 =
+ (int) (c->image->width / 2 +
+ (l->mx2 - 0.5) * x / c->image->pixelwidth);
+ my2 =
+ (int) (c->image->height / 2 +
+ (l->my2 - 0.5) * x / c->image->pixelheight);
+ break;
+ default:
+ x = l->mx1;
+ y = l->my1;
+ rotate(*(c->fcontext), x, y);
+ x = (x - c->fcontext->rs.nc) / (c->fcontext->rs.mc -
+ c->fcontext->rs.nc) *
+ c->zengine->image->width;
+ y = (y - c->fcontext->rs.ni) / (c->fcontext->rs.mi -
+ c->fcontext->rs.ni) *
+ c->zengine->image->height;
+ mx1 = (int) x;
+ my1 = (int) y;
+ c->zengine->action->convertup(c->zengine, &mx1, &my1);
+ x = l->mx2;
+ y = l->my2;
+ rotate(*(c->fcontext), x, y);
+ x = (x - c->fcontext->rs.nc) / (c->fcontext->rs.mc -
+ c->fcontext->rs.nc) *
+ c->zengine->image->width;
+ y = (y - c->fcontext->rs.ni) / (c->fcontext->rs.mi -
+ c->fcontext->rs.ni) *
+ c->zengine->image->height;
+ mx2 = (int) x;
+ my2 = (int) y;
+ c->zengine->action->convertup(c->zengine, &mx2, &my2);
+ break;
+ }
+ x1 = (int) (x1 + (mx1 - x1) * mmul);
+ y1 = (int) (y1 + (my1 - y1) * mmul);
+ x2 = (int) (x2 + (mx2 - x2) * mmul);
+ y2 = (int) (y2 + (my2 - y2) * mmul);
+ }
+ switch (l->color) {
+ case 1:
+ co = BGCOLOR(c);
+ break;
+ case 0:
+ co = FGCOLOR(c);
+ break;
+ default:
+ co = SELCOLOR(c);
+ break;
+ }
+ uih_setline(c, l->w, co, x1, y1, x2, y2);
+
+ l = l->next;
+ }
+ c->playc->lines.morphing = m;
+ if (m)
+ c->display = 1;
+
+}
+
+void uih_clear_line(uih_context * c)
+{
+ if (c->playstring != NULL) {
+ seterr(gettext("clear_line available only in animation replay"));
+ return;
+ }
+ uih_removeline(c, uih_findkey(c, c->playc->lines.currkey++));
+}
+
+void uih_clear_lines(uih_context * c)
+{
+ if (c->playstring != NULL) {
+ seterr(gettext("clear_lines available only in animation replay"));
+ return;
+ }
+ while (c->playc->lines.first != NULL)
+ uih_removeline(c, c->playc->lines.first);
+ c->playc->lines.currkey = 0;
+}
+
+void uih_freecatalog(uih_context * c)
+{
+ if (catalog != NULL)
+ free_catalog(catalog), catalog = NULL;
+}
+
+void uih_setfont(struct uih_context *uih)
+{
+ if (catalog != NULL && find_text(catalog, "encoding")
+ && find_text(catalog, "encoding")[0] == '2')
+ uih->encoding = 2;
+ else
+ uih->encoding = 1;
+ if (uih->image->flags & AAIMAGE)
+ uih->font = &xaafont;
+ else {
+ if (uih->encoding == 2) {
+ // A better heuristics would be used later.
+ if (uih->image->width > 1000 && uih->image->height > 720)
+ uih->font = &xbigfont3;
+ else {
+ if (uih->image->width > 800 && uih->image->height > 600)
+ uih->font = &xbigfont2;
+ else {
+ if (uih->image->pixelheight < 0.07)
+ uih->font = &xbigfont;
+ else
+ uih->font = &xsmallfont;
+ }
+ }
+ } else {
+ if (uih->image->pixelheight < 0.04)
+ uih->font = &xbigfontil1;
+ else if (uih->image->pixelheight < 0.07)
+ uih->font = &xmedfontil1;
+ else
+ uih->font = &xsmallfontil1;
+ }
+ }
+}
+
+int uih_loadcatalog(uih_context * c, CONST char *name)
+{
+ static int firsttime = 1;
+ static CONST char *str;
+ xio_file f = xio_getcatalog(name);
+ if (f == XIO_FAILED) {
+ if (firsttime) {
+ firsttime = 0;
+ return 0;
+ } /*Let XaoS work as stand alone executable */
+ uih_error(c, gettext("Catalog file not found"));
+ return 0;
+ }
+ firsttime = 0;
+ if (catalog != NULL)
+ free_catalog(catalog);
+ catalog = load_catalog(f, &str);
+ if (str != NULL)
+ uih_error(c, str);
+ uih_setfont(c);
+ return (catalog != NULL);
+}
+
+static void handler(void *userdata)
+{
+ struct uih_context *uih = (struct uih_context *) userdata;
+ uih->playc->playframe++;
+ uih->inanimation = 2;
+ if (uih->playc->timerin)
+ tl_remove_timer(uih->playc->timer);
+ uih->playc->timerin = 0;
+}
+
+static void handler1(void *userdata)
+{
+ struct uih_context *uih = (struct uih_context *) userdata;
+ uih->playc->playframe++;
+ uih->inanimation = 2;
+ tl_update_time();
+ tl_reset_timer(uih->playc->timer);
+ uih_setcomplettehandler(uih, NULL, NULL);
+}
+
+void uih_skipframe(struct uih_context *uih)
+{
+ if (uih->play && uih->playc->timerin)
+ handler(uih), tl_reset_timer(uih->playc->timer);
+}
+
+int
+uih_replayenable(struct uih_context *uih, xio_file f,
+ xio_constpath filename, int animr)
+{
+ struct uih_playcontext *p;
+ CONST char *s;
+ if (uih->play) {
+ uih_error(uih, gettext("Replay is already active"));
+ return 0;
+ }
+ if (f == XIO_FAILED) {
+ uih_error(uih, gettext("File open failed"));
+ return 0;
+ }
+ p = (struct uih_playcontext *) calloc(1, sizeof(*p));
+ if (p == NULL) {
+ uih_error(uih, gettext("Out of memory"));
+ return 0;
+ }
+ if (animr) {
+ uih->menuroot = animroot;
+ uih_updatemenus(uih, NULL);
+ }
+ p->file = f;
+ p->playframe = 1;
+ p->timer = tl_create_timer();
+ p->frametime = 0;
+ p->morph = 0;
+ p->morphjulia = 0;
+ p->lines.first = NULL;
+ p->lines.morphing = 0;
+ p->lines.currkey = 0;
+ tl_update_time();
+ tl_set_handler(p->timer, handler, uih);
+ uih_stoptimers(uih);
+ if (uih->stoppedtimers)
+ tl_stop_timer(p->timer);
+ uih->playc = p;
+ uih->play = 1;
+ uih_emulatetimers(uih);
+ tl_reset_timer(p->timer);
+ uih->playc->line = 1;
+ if (filename != NULL) {
+ uih->playc->directory = xio_getdirectory(filename);
+ } else {
+ uih->playc->directory = xio_getdirectory(XIO_EMPTYPATH);
+ }
+ uih->playc->level = 0;
+ s = uih->playstring;
+ uih->playstring = NULL;
+ uih_playupdate(uih);
+ uih->playstring = s;
+ return 1;
+}
+
+void uih_replaydisable(struct uih_context *uih)
+{
+ if (uih->play) {
+ int i;
+ uih->play = 0;
+ tl_free_timer(uih->playc->timer);
+ if (uih->menuroot == animroot) {
+ uih->menuroot = "root";
+ uih_updatemenus(uih, NULL);
+ }
+ xio_close(uih->playc->file);
+ for (i = 0; i < uih->playc->level; i++)
+ xio_close(uih->playc->prevfiles[i]);
+ uih->display = 1;
+ uih->nonfractalscreen = 0;
+ uih_setcomplettehandler(uih, NULL, NULL);
+ uih_clear_lines(uih);
+ free(uih->playc->directory);
+ free(uih->playc);
+ uih_display(uih);
+ }
+}
+
+static void skipblank(struct uih_context *uih)
+{
+ int c;
+ if (uih->playstring != NULL) {
+ while ((uih->playstring[uih->playpos] == ' ' ||
+ uih->playstring[uih->playpos] == '\t' ||
+ uih->playstring[uih->playpos] == '\r' ||
+ uih->playstring[uih->playpos] == '\n'))
+ uih->playpos++;
+ return;
+ }
+ do {
+ c = xio_getc(FD);
+ if (c == '\n')
+ uih->playc->line++;
+ if (c == ';')
+ while (c != '\n' && !xio_feof(FD)) {
+ c = xio_getc(FD);
+ if (c == '\n')
+ uih->playc->line++;
+ }
+ while (xio_feof(FD) && uih->playc->level) {
+ c = XIO_EOF + 1;
+ xio_close(FD);
+ uih->playc->file = uih->playc->prevfiles[--uih->playc->level];
+ uih->playc->line = 1;
+ }
+ }
+ while (c == ' ' || c == '\t' || c == '\n' || c == '\r'
+ || c == XIO_EOF + 1);
+ if (c != XIO_EOF)
+ xio_ungetc(c, FD);
+}
+
+static int gettoken(struct uih_context *uih)
+{
+ int c;
+ int i = 0;
+ skipblank(uih);
+ if (first && ((c = nextchar()) != '(')) {
+ if (c && !endoffile()) {
+ seterr("'(' expected");
+ }
+ last = 1;
+ return -1;
+ }
+ if (first)
+ skipblank(uih), first = 0;
+ if (endoffile()) {
+ if (uih->playstring) {
+ seterr(gettext("Missing parameter"));
+ } else
+ seterr(gettext("Unexpected end of file"));
+ return 0;
+ }
+ if ((c = nextchar()) == '"') {
+ while (c == '\r')
+ c = nextchar();
+ token[i] = '"';
+ i++;
+ do {
+ c = nextchar();
+ while (c == '\r')
+ c = nextchar();
+ if (c == XIO_EOF || c == 0) {
+ if (uih->playstring) {
+ seterr(gettext("Missing parameter"));
+ } else
+ seterr(gettext("Unexpected end of file"));
+ return 0;
+ }
+ if (c == '\n' && uih->playstring == NULL)
+ uih->playc->line++;
+ if (c == '\\')
+ token[i] = nextchar();
+ else
+ token[i] = c;
+ i++;
+ if (i >= 1024) {
+ seterr(gettext("Token is too long"));
+ i = 0;
+ }
+ }
+ while (c != '"');
+ } else
+ ungetchar(c);
+ do {
+ c = nextchar();
+ if (c == XIO_EOF || c == 0) {
+ if (uih->playstring) {
+ seterr(gettext("Missing parameter"));
+ } else
+ seterr(gettext("Unexpected end of file"));
+ return 0;
+ }
+ token[i] = c;
+ i++;
+ if (i >= 1024) {
+ seterr(gettext("Token is too long"));
+ i = 0;
+ }
+ }
+ while (c != ' ' && c != '\t' && c != ')' && c != '\n' && c != '\r');
+ i--;
+ token[i] = 0;
+ skipblank(uih);
+ if (c == ')') {
+ last = 1;
+ return i;
+ }
+ c = nextchar();
+ if (uih->playstring == NULL) {
+ while (xio_feof(FD) && uih->playc->level)
+ uih->playc->file =
+ uih->playc->prevfiles[--uih->playc->level],
+ uih->playc->line = 1;
+ }
+ if (c == XIO_EOF || c == 0) {
+ if (uih->playstring) {
+ seterr(gettext("Missing parameter"));
+ } else
+ seterr(gettext("Unexpected end of file"));
+ return 0;
+ }
+ if (c == ')') {
+ last = 1;
+ return i;
+ }
+ ungetchar(c);
+ return i;
+}
+
+static char *gettokenwr(struct uih_context *c)
+{
+ if (last)
+ return NULL;
+ if (gettoken(c) < 0)
+ return NULL;
+ if (errstring)
+ return NULL;
+ return (token);
+}
+
+void uih_play_formula(struct uih_context *uih, char *fname)
+{
+ int i;
+ for (i = 0; i < nformulas; i++) {
+ if (!strcmp(formulas[i].shortname, fname)) {
+ set_formula(uih->fcontext, i);
+ uih_newimage(uih);
+ return;
+ }
+ }
+ seterr(gettext("Unknown formula type"));
+}
+
+void uih_playmorph(struct uih_context *uih, dialogparam * d)
+{
+ if (uih->playstring != NULL) {
+ seterr(gettext("morph available only in animation replay"));
+ return;
+ }
+ if (d[2].number <= 0 || d[3].number <= 0) {
+ seterr(gettext("morphview: Invalid viewpoint"));
+ uih->playc->destination = uih->fcontext->currentformula->v;
+ }
+ uih->playc->source = uih->fcontext->s;
+ uih->playc->destination.cr = d[0].number;
+ uih->playc->destination.ci = d[1].number;
+ uih->playc->destination.rr = d[2].number;
+ uih->playc->destination.ri = d[3].number;
+ uih->playc->morph = 1;
+}
+
+void uih_playmove(struct uih_context *uih, number_t x, number_t y)
+{
+ if (uih->playstring != NULL) {
+ seterr(gettext("move available only in animation replay"));
+ return;
+ }
+ uih->playc->source = uih->fcontext->s;
+ uih->playc->destination.cr = x;
+ uih->playc->destination.ci = y;
+ uih->playc->destination.rr = uih->fcontext->s.rr;
+ uih->playc->destination.ri = uih->fcontext->s.ri;
+ uih->playc->morph = 1;
+}
+
+void uih_playmorphjulia(struct uih_context *uih, number_t x, number_t y)
+{
+ if (uih->playstring != NULL) {
+ seterr(gettext("morphjulia available only in animation replay"));
+ return;
+ }
+ uih->playc->sr = uih->fcontext->pre;
+ uih->playc->si = uih->fcontext->pim;
+ uih->playc->dr = x;
+ uih->playc->di = y;
+ uih->playc->morphjulia = 1;
+}
+
+void uih_playmorphangle(struct uih_context *uih, number_t angle)
+{
+ if (uih->playstring != NULL) {
+ seterr(gettext("morphangle available only in animation replay"));
+ return;
+ }
+ uih->playc->morphangle = 1;
+ uih->playc->srcangle = uih->fcontext->angle;
+ uih->playc->destangle = angle;
+}
+
+void uih_playautorotate(struct uih_context *uih, int mode)
+{
+ if (mode) {
+ uih_fastrotateenable(uih);
+ uih_rotatemode(uih, ROTATE_CONTINUOUS);
+ } else
+ uih_rotatemode(uih, ROTATE_NONE);
+}
+
+void uih_playfilter(struct uih_context *uih, dialogparam * p)
+{
+ CONST char *fname = p[0].dstring;
+ int mode;
+ int i;
+ for (i = 0; i < uih_nfilters; i++) {
+ if (!strcmp(uih_filters[i]->shortname, fname)) {
+ mode = p[1].dint;
+ if (mode)
+ uih_enablefilter(uih, i);
+ else
+ uih_disablefilter(uih, i);
+ return;
+ }
+ }
+ seterr(gettext("Unknown filter"));
+}
+
+void uih_playdefpalette(struct uih_context *uih, int shift)
+{
+ if (uih->zengine->fractalc->palette == NULL)
+ return;
+ if (mkdefaultpalette(uih->zengine->fractalc->palette) != 0) {
+ uih_newimage(uih);
+ }
+ uih->palettetype = 0;
+ uih->palettechanged = 1;
+ if (shiftpalette(uih->zengine->fractalc->palette, shift)) {
+ uih_newimage(uih);
+ }
+ uih->manualpaletteshift = 0;
+ uih->paletteshift = shift;
+}
+
+void uih_zoomcenter(struct uih_context *uih, number_t x, number_t y)
+{
+ uih->xcenter = x;
+ uih->ycenter = y;
+ uih->xcenterm = INT_MAX;
+ uih->ycenterm = INT_MAX;
+}
+
+extern char *xtextposnames[];
+extern char *ytextposnames[];
+void uih_playtextpos(struct uih_context *uih, dialogparam * p)
+{
+ int x, y;
+ x = p[0].dint;
+ y = p[1].dint;
+ uih_settextpos(uih, x, y);
+}
+
+void uih_playusleep(struct uih_context *uih, int time)
+{
+ parsenext = 0;
+ if (uih->playstring != NULL) {
+ seterr(gettext("sleep available only in animation replay"));
+ return;
+ }
+ uih->playc->frametime = time;
+ if (time < tl_lookup_timer(uih->playc->timer) /*&&((!uih->step)||(!uih->zoomactive)) */
+ ) {
+ tl_slowdown_timer(uih->playc->timer, time);
+ uih->playc->playframe++;
+ } else {
+ tl_set_interval(uih->playc->timer, time);
+ if (!uih->playc->timerin) {
+ uih->playc->timerin = 1;
+ tl_add_timer(syncgroup, uih->playc->timer);
+ } else
+ printf(gettext("Internal program error #12 %i\n"),
+ uih->playc->playframe);
+ }
+ uih->playc->starttime = tl_lookup_timer(uih->playc->timer);
+}
+
+void uih_playtextsleep(struct uih_context *uih)
+{
+ uih_playusleep(uih,
+ 500000 + 1000000 * (uih->nletters +
+ uih->todisplayletters) /
+ uih->letterspersec);
+ uih->nletters = 0;
+ uih->todisplayletters = 0;
+}
+
+
+void uih_playwait(struct uih_context *uih)
+{
+ parsenext = 0;
+ if (uih->playstring != NULL) {
+ seterr(gettext("wait available only in animation replay"));
+ return;
+ }
+ if (!uih->uncomplette && !uih->display && !uih->recalculatemode
+ && !uih->displaytext && !uih->clearscreen) {
+ uih->playc->playframe++;
+ } else {
+ uih_setcomplettehandler(uih, handler1, uih);
+ }
+}
+
+void uih_playjulia(struct uih_context *uih, int julia)
+{
+ julia = !julia;
+ if (julia != uih->fcontext->mandelbrot) {
+ uih->fcontext->mandelbrot = julia;
+ uih->fcontext->version++;
+ uih_updatemenus(uih, "uimandelbrot");
+ uih_newimage(uih);
+ }
+}
+
+void uih_playcalculate(struct uih_context *uih)
+{
+ uih_newimage(uih);
+}
+
+void uih_playzoom(struct uih_context *uih)
+{
+ uih->zoomactive = 1;
+}
+
+void uih_playunzoom(struct uih_context *uih)
+{
+ uih->zoomactive = -1;
+}
+
+void uih_playstop(struct uih_context *uih)
+{
+ uih->zoomactive = 0;
+}
+
+void uih_playmessage(struct uih_context *uih, char *name)
+{
+ char *message;
+ if (catalog == NULL) {
+ uih_text(uih, gettext("No catalog file loaded"));
+ return;
+ }
+ message = find_text(catalog, name);
+ if (message == NULL) {
+ uih_text(uih, gettext("Message not found in catalog file"));
+ return;
+ }
+ uih_text(uih, message);
+}
+
+void uih_playload(struct uih_context *uih, xio_path file)
+{
+ xio_file f;
+ xio_pathdata tmp;
+ if (uih->playstring != NULL) {
+ seterr(gettext("load available only in animation replay"));
+ return;
+ }
+ if (uih->playc->level == MAXLEVEL) {
+ seterr(gettext("Include level overflow"));
+ return;
+ }
+
+
+ xio_addfname(tmp, uih->playc->directory, file);
+ f = xio_ropen(tmp);
+
+ if (f == XIO_FAILED) {
+ seterr(gettext("File not found"));
+ return;
+ }
+ uih->playc->prevfiles[uih->playc->level] = uih->playc->file;
+ uih->playc->level++;
+ uih->playc->file = f;
+ uih->playc->line = 1;
+}
+
+static void uih_processcommand(struct uih_context *uih, int flags)
+{
+ CONST char *error;
+ first = 1;
+ last = 0;
+ error = menu_processcommand(uih, gettokenwr, 1, flags, uih->menuroot);
+ if (error != NULL)
+ seterr(error);
+ if (!last) {
+ seterr(gettext("Too many parameters"));
+ }
+}
+
+void uih_playupdate(struct uih_context *uih)
+{
+ static char errtext[1024];
+ errstring = NULL;
+ while (uih->play && uih->playc->playframe && errstring == NULL) {
+ parsenext = 1;
+ uih->playc->playframe--;
+ if (uih->playc->lines.morphing) {
+ uih_stopmorphing(uih);
+ uih->display = 1;
+ }
+ if (uih->playc->morph) {
+ uih->fcontext->s = uih->playc->destination;
+ uih_animate_image(uih);
+ uih->playc->morph = 0;
+ }
+ if (uih->playc->morphangle) {
+ uih_angle(uih, uih->playc->destangle);
+ uih->playc->morphangle = 0;
+ }
+ if (uih->playc->morphjulia) {
+ uih_setjuliaseed(uih, uih->playc->dr, uih->playc->di);
+ uih->playc->morphjulia = 0;
+ }
+ while (!xio_feof(FD) && parsenext && errstring == NULL) {
+ uih_processcommand(uih, MENUFLAG_NOPLAY);
+ } /*while parsenext */
+ uih_update_lines(uih);
+ if (errstring != NULL) {
+ uih_error(uih, errstring);
+ if (uih->play) {
+ sprintf(errtext, gettext("Replay disabled at line %i"),
+ uih->playc->line);
+ uih_message(uih, errtext);
+ }
+ /*errstring[255]=0; */
+ }
+ if ((xio_feof(FD) && parsenext) || errstring) {
+ uih_replaydisable(uih);
+ }
+ } /*while play&&playframe */
+}
+
+void uih_load(struct uih_context *uih, xio_file f, xio_constpath filename)
+{
+ nonblockmode = 1;
+ uih_replayenable(uih, f, filename, 0);
+ uih_replaydisable(uih);
+ nonblockmode = 0;
+}
+
+void uih_command(struct uih_context *uih, CONST char *command)
+{
+ errstring = NULL;
+ uih->playpos = 0;
+ uih->playstring = command;
+ uih_processcommand(uih, (uih->play ? MENUFLAG_NOMENU : 0));
+ uih->playstring = NULL;
+ if (errstring != NULL) {
+ uih_error(uih, errstring);
+ }
+}
diff --git a/src/ui-hlp/play.h b/src/ui-hlp/play.h
new file mode 100644
index 0000000..62b7657
--- /dev/null
+++ b/src/ui-hlp/play.h
@@ -0,0 +1,50 @@
+#ifndef PLAY_H
+#define PLAY_H
+struct keyword {
+ char *name;
+ int type;
+ void (*callback) (void);
+ void *userdata;
+};
+typedef void (*funcptr) (void);
+#define GENERIC 0
+#define PARAM_INTEGER 1
+#define PARAM_BOOL 2
+#define PARAM_NSTRING 3
+#define PARAM_FLOAT 4
+#define PARAM_KEYSTRING 5
+#define PARAM_COORD 6
+#define PARAM_STRING 7
+extern CONST char *CONST save_fastmode[];
+extern CONST char *CONST uih_colornames[];
+void uih_play_formula(struct uih_context *uih, char *name);
+void uih_playfilter(struct uih_context *uih, dialogparam * p);
+void uih_zoomcenter(struct uih_context *uih, number_t x, number_t y);
+void uih_playpalette(struct uih_context *uih);
+void uih_playdefpalette(struct uih_context *uih, int shift);
+void uih_playusleep(struct uih_context *uih, int time);
+void uih_playtextsleep(struct uih_context *uih);
+void uih_playwait(struct uih_context *uih);
+void uih_playjulia(struct uih_context *uih, int julia);
+void uih_playzoom(struct uih_context *uih);
+void uih_playunzoom(struct uih_context *uih);
+void uih_playstop(struct uih_context *uih);
+void uih_playmorph(struct uih_context *uih, dialogparam * p);
+void uih_playmove(struct uih_context *uih, number_t x, number_t y);
+void uih_playtextpos(struct uih_context *uih, dialogparam * p);
+void uih_playcalculate(struct uih_context *uih);
+void uih_playmorphjulia(struct uih_context *uih, number_t x, number_t y);
+void uih_playmorphangle(struct uih_context *uih, number_t angle);
+void uih_playautorotate(struct uih_context *uih, int mode);
+void uih_playmessage(struct uih_context *uih, char *message);
+void uih_playload(struct uih_context *uih, char *message);
+void uih_playinit(struct uih_context *uih);
+
+void uih_line(uih_context * c, dialogparam * d);
+void uih_morphline(uih_context * c, dialogparam * d);
+void uih_morphlastline(uih_context * c, dialogparam * d);
+void uih_setkey(uih_context * c, int line);
+void uih_clear_line(uih_context * c);
+void uih_clear_lines(uih_context * c);
+
+#endif
diff --git a/src/ui-hlp/playtext.c b/src/ui-hlp/playtext.c
new file mode 100644
index 0000000..270134e
--- /dev/null
+++ b/src/ui-hlp/playtext.c
@@ -0,0 +1,174 @@
+#ifndef _plan9_
+#include <stdlib.h>
+#else
+#include <u.h>
+#include <libc.h>
+#endif
+#include <fconfig.h>
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <xerror.h>
+#include <grlib.h>
+
+static inline void
+prepare(struct uih_context *c, char *string, int *xmax, int *nr)
+{
+ int xm = 0;
+ int n = 1;
+ int pos = 0;
+ int tmp;
+ while (1) {
+ tmp = 0;
+ while (*string != '\n') {
+ if (*string == 0) {
+ tmp++;
+ if (tmp > xm)
+ xm = tmp;
+ *xmax = xm;
+ *nr = n;
+ return;
+ } else
+ tmp += xtextcharw(c->font, *string);
+ if (pos > 255)
+ break;
+ string++;
+ pos++;
+ }
+ tmp++;
+ if (tmp > xm)
+ xm = tmp;
+ n++;
+ if (n > 30) {
+ n = 30;
+ *xmax = tmp;
+ *nr = n;
+ return;
+ }
+ pos = 0;
+ string++;
+ }
+}
+
+static void
+getpos(uih_context * c, int *x, int *y, int *w, int *h, void *data)
+{
+ int num = (int) data;
+ int xmax, nr;
+ if (c->text[num] == NULL) {
+ *x = *y = *h = *w;
+ return;
+ }
+ prepare(c, c->text[num], &xmax, &nr);
+ nr *= xtextheight(c->font);
+ switch (num) {
+ case 0:
+ *y = 0;
+ break;
+ case 1:
+ *y = (c->image->height - nr) / 2;
+ break;
+ case 2:
+ *y = c->image->height - nr;
+ break;
+ }
+ *h = nr;
+ switch (c->textpos[num]) {
+ case 0:
+ *x = 0;
+ break;
+ case 1:
+ *x = (c->image->width - xmax) / 2;
+ break;
+ case 2:
+ *x = c->image->width - xmax;
+ break;
+ }
+ *w = xmax;
+}
+
+static void draw(uih_context * c, void *data)
+{
+ int num = (int) data;
+ int flags = 0;
+ int xmax, n, nr, i;
+ int x = 0, y = 0;
+ char *string;
+ int fgcolor = 0, bgcolor = 0;
+ if (c->text[num] == NULL)
+ return;
+ prepare(c, c->text[num], &xmax, &n);
+ nr = n * xtextheight(c->font);
+ switch (c->textcolor[num]) {
+ case 0:
+ fgcolor = FGCOLOR(c);
+ bgcolor = BGCOLOR(c);
+ break;
+ case 1:
+ fgcolor = BGCOLOR(c);
+ bgcolor = BGCOLOR(c);
+ flags = TEXT_PRESSED;
+ break;
+ case 2:
+ fgcolor = SELCOLOR(c);
+ bgcolor = BGCOLOR(c);
+ break;
+ default:
+ x_fatalerror("playtext:unknown color\n");
+ }
+ if (c->image->flags & AAIMAGE)
+ fgcolor = BGCOLOR(c);
+ switch (num) {
+ case 0:
+ y = 0;
+ break;
+ case 1:
+ y = (c->image->height - nr) / 2;
+ break;
+ case 2:
+ y = c->image->height - nr;
+ break;
+ }
+ string = c->text[num];
+ for (i = 0; i < n; i++) {
+ xmax = xtextwidth(c->font, string);
+ switch (c->textpos[num]) {
+ case 0:
+ x = 0;
+ break;
+ case 1:
+ x = (c->image->width - xmax) / 2;
+ break;
+ case 2:
+ x = c->image->width - xmax;
+ break;
+ }
+ string +=
+ xprint(c->image, c->font, x, y, string,
+ fgcolor, bgcolor,
+ flags) + 1;
+ y += xtextheight(c->font);
+ }
+}
+
+void uih_inittext(uih_context * c)
+{
+ c->text[0] = c->text[1] = c->text[2] = NULL;
+ c->textpos[0] = c->textpos[1] = c->textpos[2] = 0;
+ c->textwindow[0] = uih_registerw(c, getpos, draw, (void *) 0, 0);
+ c->textwindow[1] = uih_registerw(c, getpos, draw, (void *) 1, 0);
+ c->textwindow[2] = uih_registerw(c, getpos, draw, (void *) 2, 0);
+}
+
+void uih_destroytext(uih_context * c)
+{
+ if (c->text[0] != NULL)
+ free(c->text[0]), c->text[0] = NULL;
+ if (c->text[1] != NULL)
+ free(c->text[1]), c->text[1] = NULL;
+ if (c->text[2] != NULL)
+ free(c->text[2]), c->text[2] = NULL;
+ uih_removew(c, c->textwindow[0]);
+ uih_removew(c, c->textwindow[1]);
+ uih_removew(c, c->textwindow[2]);
+}
diff --git a/src/ui-hlp/render.c b/src/ui-hlp/render.c
new file mode 100644
index 0000000..f105e92
--- /dev/null
+++ b/src/ui-hlp/render.c
@@ -0,0 +1,664 @@
+
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#ifdef _plan9v2_
+#include <stdarg.h> /* not needed in plan9v3 */
+#endif
+#else
+#include <string.h>
+#include <math.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdarg.h>
+#endif
+
+#include <ui.h>
+#include <fconfig.h>
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <misc-f.h>
+#include <xmenu.h>
+#include <xerror.h>
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+#define SILENT 0
+#define ERRORS 1
+#define MESSAGES 2
+#define ALL 3
+static int noiselevel;
+/*static struct uih_context *uih, *gc;*/
+static struct uih_context *gc;
+static struct uih_context *uih;
+static int newline = 1;
+static int interrupt = 0;
+static void error(CONST char *str)
+{
+ if (noiselevel < ERRORS)
+ return;
+ if (!gc)
+ x_error(gettext("Error: %s"), str);
+ uih_error(gc, str);
+}
+
+static void uiherror(struct uih_context *c)
+{
+ if (noiselevel < ERRORS)
+ return;
+ if (!gc) {
+ uih_printmessages(c);
+ } else
+ uih_error(gc, uih->errstring);
+}
+
+static void printmsg(const char *text, ...)
+{
+ va_list ap;
+ if (noiselevel < MESSAGES)
+ return;
+ va_start(ap, text);
+ if (!gc) {
+ vprintf(text, ap);
+ printf("\n");
+ } else {
+ char s[256];
+ vsprintf(s, text, ap);
+ uih_message(gc, s);
+ interrupt |= gc->interrupt |= gc->passfunc(gc, 1, s, 100);
+ uih_clearwindows(gc);
+ }
+}
+
+static int
+passfunc(struct uih_context *c, int display, CONST char *text,
+ float percent)
+{
+ if (noiselevel < ALL)
+ return 0;
+ if (gc) {
+ if (gc->passfunc != NULL)
+ interrupt |= gc->interrupt |=
+ gc->passfunc(gc, display, text, percent);
+ uih_clearwindows(gc);
+ return interrupt;
+ } else if (display) {
+ {
+ if (newline)
+ printf("\n"), newline = 0;
+ printf("\r %s %3.2f%% ", text, (double) percent);
+ fflush(stdout);
+ }
+ }
+ return 0;
+}
+
+
+struct frame_info {
+ vrect rect;
+ number_t angle;
+ char *name;
+ int newimage;
+};
+static void
+save_frame_dist(uih_context * c, int backward, struct frame_info *f1,
+ struct frame_info *f2)
+{
+ xio_file f;
+ int x1, y1;
+ char str[256];
+ if (!(f2->rect.mc - f2->rect.nc) || !(f2->rect.mi - f2->rect.ni))
+ return;
+ /*printf ("Frame\n"); */
+ sprintf(str, "%s.%c", f1->name, backward ? 'b' : 'p');
+ f = xio_wopen(str);
+ if (f == NULL) {
+ x_error(gettext("Cannot open motion vector file!"));
+ return;
+ }
+ for (y1 = 0; y1 < (c->image->height + 7) / 8; y1++) {
+ for (x1 = 0; x1 < (c->image->width + 7) / 8; x1++) {
+ number_t x, y;
+ number_t x2, y2;
+ number_t tmp;
+ x = f1->rect.nc + (x1 * 8 + 4) * (f1->rect.mc -
+ f1->rect.nc) /
+ c->image->width;
+ y = f1->rect.ni + (y1 * 8 + 4) * (f1->rect.mi -
+ f1->rect.ni) /
+ c->image->height;
+
+ if (f2->angle != f1->angle) {
+ tmp =
+ x * cos(f2->angle - f1->angle) - y * sin(f2->angle -
+ f1->angle);
+ y = x * sin(f2->angle - f1->angle) + y * cos(f2->angle -
+ f1->angle);
+ x = tmp;
+ }
+ x2 = (x - f2->rect.nc) * c->image->width / (f2->rect.mc -
+ f2->rect.nc);
+ y2 = (y - f2->rect.ni) * c->image->height / (f2->rect.mi -
+ f2->rect.ni);
+ sprintf(str, "%3.2g %3.2g ",
+ ((int) ((x2 - (x1 * 8 + 4)) * 10)) / 10.0,
+ ((int) ((y2 - (y1 * 8 + 4)) * 10)) / 10.0);
+ xio_puts(str, f);
+ }
+ xio_putc('\n', f);
+ }
+ xio_close(f);
+ /*printf ("Frameend\n"); */
+}
+
+#define MAXBFRAMES 5
+#define IFRAMEDIST (27)
+static int iframedist;
+static int mvectors;
+static xio_file patf;
+static void
+uih_encodeframe(int startpos, int endpos, struct frame_info *curframe)
+{
+ static int lastiframe = -200;
+ static struct frame_info lastp;
+ static struct frame_info bframes[MAXBFRAMES];
+ static int nbframes = 0;
+ int i;
+ char type;
+ if (!gc)
+ printf(" motion");
+ fflush(stdout);
+ if (endpos > startpos + 4) {
+ if (endpos - lastiframe > iframedist)
+ type = 'I';
+ else
+ type = 'P';
+ } else {
+ if (endpos - lastiframe > iframedist)
+ type = 'I';
+ else
+ type = (startpos - lastiframe) % 3 ? 'B' : 'P';
+ if (startpos != endpos)
+ type = 'P';
+ }
+ if (curframe->newimage)
+ type = 'I';
+ if (mvectors) {
+ switch (type) {
+ case 'I':
+ if (startpos)
+ save_frame_dist(uih, 0, curframe, &lastp);
+ lastp = *curframe;
+ break;
+ case 'P':
+ save_frame_dist(uih, 0, curframe, &lastp);
+ lastp = *curframe;
+ break;
+ case 'B':
+ save_frame_dist(uih, 0, curframe, &lastp);
+ if (nbframes < MAXBFRAMES) {
+ bframes[nbframes] = *curframe;
+ bframes[nbframes].name = mystrdup(curframe->name);
+ nbframes++;
+ }
+ break;
+ }
+ }
+ xio_putc(type, patf);
+ if (type == 'I')
+ lastiframe = startpos;
+ if (startpos != endpos) {
+ while (startpos != endpos)
+ xio_putc('p', patf), startpos++;
+ }
+ if (!gc)
+ printf(" %c", type);
+ fflush(stdout);
+ if (mvectors) {
+ if (type != 'B' && nbframes) {
+ if (!gc)
+ printf(" backframes");
+ fflush(stdout);
+ for (i = 0; i < nbframes; i++) {
+ save_frame_dist(uih, 1, bframes + i, curframe);
+ fflush(stdout);
+ free(bframes[i].name);
+ }
+ nbframes = 0;
+ }
+ }
+ xio_flush(patf);
+}
+
+extern struct filteraction antialias_filter;
+int
+uih_renderanimation(struct uih_context *gc1, CONST char *basename,
+ CONST xio_constpath animation, int width, int height,
+ float pixelwidth, float pixelheight, int frametime,
+ int type, int antialias, int slowmode,
+ int letterspersec, CONST char *catalog,
+ int motionvectors, int iframedist2)
+{
+ struct palette *pal =
+ createpalette(0, 0, type, 0, 0, NULL, NULL, NULL, NULL, NULL);
+ struct image *img;
+ xio_file of;
+ FILE *f;
+ xio_file af;
+ char s[200];
+ int lastframenum = -1;
+ int aliasnum = 0;
+ static char *saveddata;
+ int newimage;
+ int y;
+
+ struct frame_info curframe;
+ int framenum = 0;
+
+
+ noiselevel = ALL;
+ gc = gc1;
+ if (gc)
+ gc->incalculation = 1;
+
+ mvectors = motionvectors;
+ printmsg(gettext("Vectors: %i"), motionvectors);
+ if (iframedist2)
+ iframedist = iframedist2;
+ else
+ iframedist = 27;
+
+ printmsg(gettext("Initializing"));
+ if (!(type & (TRUECOLOR24 | TRUECOLOR | TRUECOLOR16 | GRAYSCALE)))
+ antialias = 0;
+
+ while (uih_filters[aliasnum] != &antialias_filter)
+ aliasnum++;
+
+ if (!pal) {
+ error(gettext("Cannot create palette"));
+ if (gc)
+ gc->incalculation = 0;
+ return 0;
+ }
+ if (!pixelwidth)
+ pixelwidth = 29.0 / width;
+ if (!pixelheight)
+ pixelheight = 21.5 / height;
+ img = create_image_mem(width, height, 2, pal, pixelwidth, pixelheight);
+ if (!img) {
+ error(gettext("Cannot create image\n"));
+ if (gc)
+ gc->incalculation = 0;
+ destroypalette(pal);
+ return 0;
+ }
+ saveddata =
+ (char *) malloc(img->width * img->height * img->bytesperpixel);
+ if (saveddata == NULL) {
+ error(gettext("Cannot create checking buffer!"));
+ if (gc)
+ gc->incalculation = 0;
+ destroy_image(img);
+ destroypalette(pal);
+ return 0;
+ }
+ uih = uih_mkcontext(0, img, passfunc, NULL, NULL);
+ if (!uih) {
+ error(gettext("Cannot create context\n"));
+ if (gc)
+ gc->incalculation = 0;
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ return 0;
+ }
+ uih->fcontext->slowmode = 1;
+ uih_constantframetime(uih, frametime);
+ af = xio_ropen(animation);
+ if (af == NULL) {
+ error(gettext("Cannot open animation file\n"));
+ if (gc)
+ gc->incalculation = 0;
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ return 0;
+ }
+
+ if (!gc) {
+ printmsg(gettext("Loading catalogs"));
+ if (!gc) {
+ uih_loadcatalog(uih, "english");
+ if (uih->errstring) {
+ uiherror(uih);
+ if (gc)
+ gc->incalculation = 0;
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ xio_close(af);
+ return 0;
+ }
+ }
+ if (catalog != NULL)
+ uih_loadcatalog(uih, catalog);
+ if (uih->errstring) {
+ uiherror(uih);
+ if (gc)
+ gc->incalculation = 0;
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ if (!gc)
+ uih_freecatalog(uih);
+ xio_close(af);
+ return 0;
+ }
+ printmsg(gettext("Processing command line options"));
+ {
+ CONST menuitem *item;
+ dialogparam *d;
+ while ((item = menu_delqueue(&d)) != NULL) {
+ menu_activate(item, uih, d);
+ }
+ }
+ if (uih->errstring) {
+ uiherror(uih);
+ if (gc)
+ gc->incalculation = 0;
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ if (!gc)
+ uih_freecatalog(uih);
+ xio_close(af);
+ return 0;
+ }
+ }
+
+ printmsg(gettext("Enabling animation replay\n"));
+
+ uih_replayenable(uih, af, animation, 1);
+
+ sprintf(s, "%s.par", basename);
+ of = xio_wopen(s);
+ if (of == NULL) {
+ error(gettext("Cannot open image file"));
+ if (gc)
+ gc->incalculation = 0;
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ if (!gc)
+ uih_freecatalog(uih);
+ return 0;
+ }
+ sprintf(s, "%s.pat", basename);
+ patf = xio_wopen(s);
+ if (patf == NULL) {
+ error(gettext("Cannot open pattern file"));
+ if (gc)
+ gc->incalculation = 0;
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ if (!gc)
+ uih_freecatalog(uih);
+ xio_close(of);
+ return 0;
+ }
+ uih_letterspersec(uih, letterspersec);
+
+
+
+ if (!gc)
+ x_message(gettext("Entering calculation loop!"));
+ else
+ printmsg(gettext("Entering calculation loop!"));
+
+ while ((uih->play || uih->display) && !interrupt) {
+ if (uih->errstring) {
+ uiherror(uih);
+ if (gc)
+ gc->incalculation = 0;
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ if (!gc)
+ uih_freecatalog(uih);
+ xio_close(of);
+ xio_close(patf);
+ return 0;
+ }
+ fflush(stdout);
+ tl_process_group(syncgroup, NULL);
+ uih_update(uih, 0, 0, 0);
+
+
+ if (uih->display) {
+
+ if (lastframenum < framenum - 1) {
+ if (lastframenum == framenum - 1)
+ printmsg(gettext("Frame %i skipped."), framenum - 1);
+ else
+ printmsg(gettext("Frames %i - %i skipped."),
+ lastframenum, framenum - 1);
+ }
+
+ printmsg(gettext("Frame %4i: "), framenum);
+
+ newline = 1;
+ newimage = 0;
+ if (uih->recalculatemode > 0) {
+ if (!gc)
+ printf("calculating"), fflush(stdout);
+ if (slowmode)
+ uih_newimage(uih), uih->fcontext->version++;
+ }
+ if (antialias && !uih->filter[aliasnum]) {
+ if (!gc)
+ printf("antialias ");
+ uih->aliasnum = aliasnum;
+ uih_enablefilter(uih, aliasnum);
+ }
+ uih_prepare_image(uih);
+
+ if (!gc)
+ printf(" rendering");
+ fflush(stdout);
+ uih_drawwindows(uih);
+
+ y = 0;
+ if (lastframenum >= 0) {
+ for (; y < img->height; y++)
+ if (memcmp
+ (saveddata + img->width * img->bytesperpixel * y,
+ uih->image->currlines[y],
+ img->width * img->bytesperpixel))
+ break;
+ }
+
+
+ if (y != img->height) {
+ for (; y < img->height; y++)
+ memcpy(saveddata + img->width * img->bytesperpixel * y,
+ uih->image->currlines[y],
+ img->width * img->bytesperpixel);
+ if (framenum)
+ uih_encodeframe(lastframenum, framenum - 1, &curframe);
+ if (!gc)
+ printf(" saving");
+ fflush(stdout);
+ sprintf(s, "%s%04i.png", basename, framenum);
+ curframe.rect = uih->fcontext->rs;
+ curframe.angle = uih->fcontext->angle;
+ curframe.name = s;
+ curframe.newimage = newimage;
+
+
+ f = fopen(s, "wb");
+ if (f == NULL) {
+ error(gettext("Cannot open image file"));
+ if (gc)
+ gc->incalculation = 0;
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ if (!gc)
+ uih_freecatalog(uih);
+ xio_close(of);
+ xio_close(patf);
+ return 0;
+ }
+ writepng(f, uih->image);
+ printmsg(gettext(" done."));
+ uih_displayed(uih);
+ lastframenum = framenum;
+ } else {
+ printmsg(gettext(" skipping..."));
+ uih_displayed(uih);
+ }
+ }
+ xio_puts(s, of);
+ xio_puts("\n", of);
+ xio_flush(of);
+ framenum++;
+ }
+ curframe.newimage = 1;
+ if (framenum)
+ uih_encodeframe(lastframenum, framenum - 1, &curframe);
+ if (uih->errstring) {
+ uiherror(uih);
+ if (gc)
+ gc->incalculation = 0;
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ free(saveddata);
+ if (!gc)
+ uih_freecatalog(uih);
+ xio_close(of);
+ xio_close(patf);
+ return 0;
+ }
+ xio_close(of);
+ free(saveddata);
+ xio_close(patf);
+ uih_freecontext(uih);
+ destroy_image(img);
+ destroypalette(pal);
+ if (interrupt)
+ error(gettext("Calculation interrupted"));
+ else {
+ if (!gc)
+ x_message(gettext("Calculation finished"));
+ else
+ printmsg(gettext("Calculation finished"));
+ }
+ if (gc)
+ gc->incalculation = 0;
+ if (!gc)
+ uih_freecatalog(uih);
+ return 1;
+}
+
+int
+uih_renderimage(struct uih_context *gc1, xio_file af,
+ CONST xio_constpath path, struct image *img, int antialias,
+ CONST char *catalog, int noise)
+{
+ int aliasnum = 0;
+ int ok = 1;
+ noiselevel = noise;
+ gc = gc1;
+ if (gc)
+ gc->incalculation = 1;
+
+ while (uih_filters[aliasnum] != &antialias_filter)
+ aliasnum++;
+
+ uih = uih_mkcontext(0, img, passfunc, NULL, NULL);
+ if (!uih) {
+ error(gettext("Cannot create context\n"));
+ if (gc)
+ gc->incalculation = 0;
+ return 0;
+ }
+ uih->fcontext->slowmode = 1;
+ uih_constantframetime(uih, 1000000 / 10);
+
+ if (!gc) {
+ printmsg(gettext("Loading catalogs"));
+ uih_loadcatalog(uih, "english");
+ if (uih->errstring) {
+ fprintf(stderr, uih->errstring);
+ uih_clearmessages(uih);
+ uih->errstring = NULL;
+ }
+ if (catalog != NULL)
+ uih_loadcatalog(uih, catalog);
+ if (uih->errstring) {
+ fprintf(stderr, uih->errstring);
+ uih_clearmessages(uih);
+ uih->errstring = NULL;
+ }
+ if (uih->errstring) {
+ uih_freecatalog(uih);
+ uih_freecontext(uih);
+ uiherror(uih);
+ if (gc)
+ gc->incalculation = 0;
+ return 0;
+ }
+ }
+
+ uih_load(uih, af, path);
+ if (uih->errstring) {
+ uiherror(uih);
+ uih_freecatalog(uih);
+ uih_freecontext(uih);
+ if (gc)
+ gc->incalculation = 0;
+ return 0;
+ }
+ printmsg(gettext("Entering calculation loop!"));
+
+ tl_process_group(syncgroup, NULL);
+ uih_update(uih, 0, 0, 0);
+
+ uih_newimage(uih), uih->fcontext->version++;
+ if (antialias && !uih->filter[aliasnum]) {
+ uih->aliasnum = aliasnum;
+ uih_enablefilter(uih, aliasnum);
+ }
+ uih_prepare_image(uih);
+ if (uih->errstring)
+ ok = 0;
+ uih_drawwindows(uih);
+ if (uih->errstring)
+ ok = 0;
+ uih_freecontext(uih);
+ uih_freecatalog(uih);
+ if (interrupt)
+ error(gettext("Calculation interrupted"));
+ else {
+ printmsg(gettext("Calculation finished"));
+ }
+ if (gc)
+ gc->incalculation = 0;
+ return 1;
+}
diff --git a/src/ui-hlp/save.c b/src/ui-hlp/save.c
new file mode 100644
index 0000000..853b61b
--- /dev/null
+++ b/src/ui-hlp/save.c
@@ -0,0 +1,704 @@
+#include <config.h>
+#ifndef _plan9_
+#include <limits.h>
+#include <string.h>
+#include <errno.h>
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#else
+#include <u.h>
+#include <libc.h>
+#endif
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <config.h>
+#include <version.h>
+#include <xmenu.h>
+#include <xldio.h>
+#include "play.h"
+#define myputs(s) ((xio_puts(s,uih->savec->file)==XIO_EOF)?outputerror(uih),1:0)
+#define myputc(s) ((xio_putc(s,uih->savec->file)==XIO_EOF)?outputerror(uih),1:0)
+static int first;
+static int changed;
+static int last;
+CONST char *CONST save_fastmode[] =
+ { "zero", "never", "animation", "new", "allways", NULL };
+CONST char *CONST xtextposnames[] = { "left", "center", "right", NULL };
+CONST char *CONST ytextposnames[] = { "top", "middle", "bottom", NULL };
+
+REGISTERS(3)
+static void outputerror(struct uih_context *uih)
+{
+ static char error[245];
+ if (uih->savec->writefailed)
+ return;
+ sprintf(error, "Write failed:%s", xio_errorstring());
+ uih_error(uih, error);
+ uih->savec->writefailed = 1;
+}
+
+REGISTERS(3)
+static void start_save(struct uih_context *uih, CONST char *name)
+{
+ if (!changed && !uih->savec->firsttime) {
+ char s[256];
+ sprintf(s, "\n(usleep %i)\n", tl_lookup_timer(uih->savec->timer));
+ myputs(s);
+ tl_reset_timer(uih->savec->timer);
+ }
+ changed = 1;
+ myputc('(');
+ myputs(name);
+ first = 0;
+}
+
+REGISTERS(3)
+static void stop_save(struct uih_context *uih)
+{
+ myputc(')');
+ myputc('\n');
+}
+
+#ifdef SAVEKEYWORDUSED
+REGISTERS(3)
+static void save_keyword(struct uih_context *uih, CONST char *name)
+{
+ if (!first)
+ myputc(' ');
+ else
+ first = 0;
+ myputs(name);
+}
+#endif
+REGISTERS(3)
+static void save_keystring(struct uih_context *uih, CONST char *name)
+{
+ if (!first)
+ myputc(' ');
+ else
+ first = 0;
+ myputc('\'');
+ myputs(name);
+}
+
+REGISTERS(3)
+static void save_float(struct uih_context *uih, number_t number)
+{
+ if (!first)
+ myputc(' ');
+ else
+ first = 0;
+#ifdef HAVE_LONG_DOUBLE
+ /*20 should be enought to specify 64digit number :) */
+#ifdef USE_XLDIO
+ x_ldout((long double) number, 20, uih->savec->file);
+#else
+ {
+ char s[256];
+ sprintf(s, "%.20LG", (long double) number);
+ myputs(s);
+ }
+#endif
+#else
+ {
+ char s[256];
+ sprintf(s, "%.20G", (double) number);
+ myputs(s);
+ }
+#endif
+}
+
+REGISTERS(3)
+static void
+save_float2(struct uih_context *uih, number_t number, int places)
+{
+ char fs[10];
+ if (!first)
+ myputc(' ');
+ else
+ first = 0;
+ if (places < 0)
+ places = 0;
+ if (places > 20)
+ places = 20;
+#ifdef HAVE_LONG_DOUBLE
+#ifdef USE_XLDIO
+ fs[0] = 0; /* Avoid warning */
+ x_ldout((long double) number, places, uih->savec->file);
+#else
+ {
+ char s[256];
+ sprintf(fs, "%%.%iLG", places);
+ sprintf(s, fs, (long double) number);
+ myputs(s);
+ }
+#endif
+#else
+ {
+ char s[256];
+ sprintf(fs, "%%.%iG", places);
+ sprintf(s, fs, (double) number);
+ myputs(s);
+ }
+#endif
+}
+
+REGISTERS(3)
+static void save_int(struct uih_context *uih, int number)
+{
+ char s[256];
+ if (!first)
+ myputc(' ');
+ else
+ first = 0;
+ sprintf(s, "%i", number);
+ myputs(s);
+}
+
+REGISTERS(3)
+static void save_onoff(struct uih_context *uih, int number)
+{
+ if (!first)
+ myputc(' ');
+ else
+ first = 0;
+ myputs(number ? "#t" : "#f");
+}
+
+REGISTERS(3)
+static void save_string(struct uih_context *uih, CONST char *text)
+{
+ int i = 0;
+ if (!first)
+ myputc(' ');
+ else
+ first = 0;
+ myputc('"');
+ while (text[i] != 0) {
+ if (text[i] == '"')
+ myputc('\\');
+ myputc(text[i]);
+ i++;
+ }
+ myputc('"');
+}
+
+REGISTERS(3)
+static void
+save_intc(struct uih_context *uih, CONST char *name, int number)
+{
+ start_save(uih, name);
+ save_int(uih, number);
+ stop_save(uih);
+}
+
+REGISTERS(3)
+static void
+save_onoffc(struct uih_context *uih, CONST char *name, int number)
+{
+ start_save(uih, name);
+ save_onoff(uih, number);
+ stop_save(uih);
+}
+
+REGISTERS(3)
+static void
+save_floatc(struct uih_context *uih, CONST char *name, number_t number)
+{
+ start_save(uih, name);
+ save_float(uih, number);
+ stop_save(uih);
+}
+
+REGISTERS(3)
+static void
+save_float2c(struct uih_context *uih, CONST char *name,
+ number_t number, int places)
+{
+ start_save(uih, name);
+ save_float2(uih, number, places);
+ stop_save(uih);
+}
+
+REGISTERS(3)
+static void
+save_coordc(struct uih_context *uih, CONST char *name,
+ number_t number, number_t number2)
+{
+ start_save(uih, name);
+ save_float(uih, number);
+ save_float(uih, number2);
+ stop_save(uih);
+}
+
+REGISTERS(3)
+static void
+save_keystringc(struct uih_context *uih, CONST char *name,
+ CONST char *param)
+{
+ start_save(uih, name);
+ save_keystring(uih, param);
+ stop_save(uih);
+}
+
+REGISTERS(3)
+static void
+save_stringc(struct uih_context *uih, CONST char *name, CONST char *param)
+{
+ start_save(uih, name);
+ save_string(uih, param);
+ stop_save(uih);
+}
+
+REGISTERS(3)
+static void save_noparam(struct uih_context *uih, CONST char *name)
+{
+ start_save(uih, name);
+ stop_save(uih);
+}
+
+REGISTERS(3)
+static void
+save_nstring(struct uih_context *uih, int number,
+ CONST char *CONST * CONST texts)
+{
+ save_keystring(uih, texts[number]);
+}
+
+REGISTERS(3)
+static void
+save_nstringc(struct uih_context *uih, CONST char *name, int number,
+ CONST char *CONST * CONST texts)
+{
+ save_keystringc(uih, name, texts[number]);
+}
+
+static int ndecimals(struct uih_context *uih)
+{
+ number_t n = 10000;
+ number_t m = uih->fcontext->s.rr;
+ int i;
+ if (uih->fcontext->s.ri < m)
+ m = uih->fcontext->s.ri;
+ if (uih->fcontext->s.ri > 100 || uih->fcontext->s.rr > 100)
+ return (20);
+ for (i = 0; i < 20 && m < n; i++, n /= 10);
+ return (i);
+}
+
+static void savepos(struct uih_context *uih) REGISTERS(3);
+REGISTERS(3)
+static void savepos(struct uih_context *uih)
+{
+ int n = ndecimals(uih);
+ start_save(uih, "view");
+ save_float2(uih, uih->fcontext->s.cr, n);
+ save_float2(uih, uih->fcontext->s.ci, n);
+ save_float2(uih, uih->fcontext->s.rr, n);
+ save_float2(uih, uih->fcontext->s.ri, n);
+ stop_save(uih);
+ uih->savec->fcontext->s = uih->fcontext->s;
+}
+
+static void savepos2(struct uih_context *uih) REGISTERS(3);
+REGISTERS(3)
+static void savepos2(struct uih_context *uih)
+{
+ int n = ndecimals(uih);
+ start_save(uih, "animateview");
+ save_float2(uih, uih->fcontext->s.cr, n);
+ save_float2(uih, uih->fcontext->s.ci, n);
+ save_float2(uih, uih->fcontext->s.rr, n);
+ save_float2(uih, uih->fcontext->s.ri, n);
+ stop_save(uih);
+ uih->savec->fcontext->s = uih->fcontext->s;
+}
+
+static void savepos3(struct uih_context *uih) REGISTERS(3);
+REGISTERS(3)
+static void savepos3(struct uih_context *uih)
+{
+ int n = ndecimals(uih);
+ start_save(uih, "morphview");
+ save_float2(uih, uih->fcontext->s.cr, n);
+ save_float2(uih, uih->fcontext->s.ci, n);
+ save_float2(uih, uih->fcontext->s.rr, n);
+ save_float2(uih, uih->fcontext->s.ri, n);
+ stop_save(uih);
+ uih->savec->fcontext->s = uih->fcontext->s;
+}
+
+void uih_saveframe(struct uih_context *uih)
+{
+ struct uih_savedcontext *s = uih->savec;
+ int i;
+ int resetsync = 0;
+ if (uih->save) {
+ changed = 0;
+ if (s->firsttime)
+ save_noparam(uih, "initstate");
+ if (s->nonfractalscreen && !uih->nonfractalscreen)
+ save_noparam(uih, "display"), s->nonfractalscreen = 0;
+ for (i = uih_nfilters; i >= 0; i--) {
+ if (uih->filter[i] != NULL) {
+ if (s->filter[i] != 1) {
+ start_save(uih, "filter");
+ save_keystring(uih, uih->filter[i]->action->shortname);
+ save_onoff(uih, 1);
+ s->filter[i] = 1;
+ stop_save(uih);
+ }
+ } else if (s->filter[i] != 0) {
+ s->filter[i] = 0;
+ start_save(uih, "filter");
+ save_keystring(uih, uih_filters[i]->shortname);
+ save_onoff(uih, 0);
+ stop_save(uih);
+ }
+ }
+ if (uih->palettechanged) {
+ switch (uih->palettetype) {
+ case 0:
+ save_intc(uih, "defaultpalette", uih->paletteshift);
+ break;
+ default:
+ start_save(uih, "palette");
+ save_int(uih, uih->palettetype);
+ save_int(uih, uih->paletteseed);
+ save_int(uih, uih->paletteshift);
+ stop_save(uih);
+ break;
+ }
+ uih->palettechanged = 0;
+ s->manualpaletteshift = 0;
+ }
+ if (s->manualpaletteshift != uih->manualpaletteshift)
+ save_intc(uih, "shiftpalette",
+ uih->manualpaletteshift - s->manualpaletteshift),
+ s->manualpaletteshift = uih->manualpaletteshift;
+ if (s->fcontext->currentformula != uih->fcontext->currentformula) {
+ save_keystringc(uih, "formula",
+ uih->fcontext->currentformula->shortname),
+ s->fcontext->currentformula =
+ uih->fcontext->currentformula;
+#ifdef SFFE_USING
+/*SFFE : malczak */
+ if ((int) (uih->fcontext->currentformula - formulas) == 24) //user formula
+ {
+ save_stringc(uih, "usrform", uih->parser->expression);
+ if (uih->pinit)
+ save_stringc(uih, "usrformInit",
+ uih->pinit->expression);
+ else
+ save_stringc(uih, "usrformInit", "");
+ };
+/*SFFE : malczak */
+#endif
+ set_formula(s->fcontext,
+ (int) (uih->fcontext->currentformula - formulas));
+ }
+ if (s->mode >= UIH_SAVEALL)
+ save_intc(uih, "letterspersec", uih->letterspersec);
+ if (s->mode > UIH_SAVEPOS) {
+ if (s->speedup != uih->speedup)
+ save_floatc(uih, "speedup", uih->speedup), s->speedup =
+ uih->speedup;
+ if (s->maxstep != uih->maxstep)
+ save_floatc(uih, "maxstep", uih->maxstep), s->maxstep =
+ uih->maxstep;
+ if (s->fastmode != uih->fastmode)
+ save_nstringc(uih, "fastmode", uih->fastmode,
+ save_fastmode), s->fastmode = uih->fastmode;
+ }
+ if (s->juliamode != uih->juliamode)
+ save_onoffc(uih, "fastjulia", uih->juliamode), s->juliamode =
+ uih->juliamode;
+ if (s->cycling != uih->cycling)
+ save_onoffc(uih, "cycling", uih->cycling), s->cycling =
+ uih->cycling;
+ if (s->mode >= UIH_SAVEPOS
+ && s->fcontext->periodicity != uih->fcontext->periodicity)
+ save_onoffc(uih, "periodicity", uih->fcontext->periodicity),
+ s->fcontext->periodicity = uih->fcontext->periodicity;
+ if ((uih->cycling || s->mode >= UIH_SAVEALL)
+ && (s->cyclingspeed != uih->cyclingspeed
+ || s->direction != uih->direction * uih->cyclingdirection))
+ save_intc(uih, "cyclingspeed",
+ uih->cyclingspeed * uih->direction *
+ uih->cyclingdirection), s->cyclingspeed =
+ uih->cyclingspeed, s->direction =
+ uih->direction * uih->cyclingdirection;
+ if ((s->mode > UIH_SAVEPOS && (uih->step || uih->zoomactive))
+ && (s->xcenter != uih->xcenter || s->ycenter != uih->ycenter))
+ save_coordc(uih, "zoomcenter", uih->xcenter, uih->ycenter),
+ s->xcenter = uih->xcenter, s->ycenter = uih->ycenter;
+ if ((!uih->fcontext->mandelbrot || uih->juliamode)
+ && (s->fcontext->pre != uih->fcontext->pre
+ || s->fcontext->pim != uih->fcontext->pim)) {
+ if (uih->juliamode && uih->pressed)
+ save_coordc(uih, "morphjulia", uih->fcontext->pre,
+ uih->fcontext->pim), s->fcontext->pre =
+ uih->fcontext->pre, s->fcontext->pim =
+ uih->fcontext->pim;
+ else
+ save_coordc(uih, "juliaseed", uih->fcontext->pre,
+ uih->fcontext->pim), s->fcontext->pre =
+ uih->fcontext->pre, s->fcontext->pim =
+ uih->fcontext->pim;
+ }
+ if (uih->fcontext->bre != s->fcontext->bre
+ || uih->fcontext->bim != s->fcontext->bim) {
+ save_coordc(uih, "perturbation", uih->fcontext->bre,
+ uih->fcontext->bim), s->fcontext->bre =
+ uih->fcontext->bre, s->fcontext->bim = uih->fcontext->bim;
+ }
+ if (uih->fastrotate != s->fastrotate && s->mode > UIH_SAVEPOS) {
+ save_onoffc(uih, "fastrotate", uih->fastrotate);
+ s->fastrotate = uih->fastrotate;
+ }
+ if (uih->fcontext->angle != s->fcontext->angle
+ && s->autorotate != 1) {
+ if (s->rotatepressed && s->mode == UIH_SAVEANIMATION)
+ save_float2c(uih, "morphangle", uih->fcontext->angle, 5);
+ else
+ save_float2c(uih, "angle", uih->fcontext->angle, 5);
+ s->rotatepressed = uih->rotatepressed;
+ s->fcontext->angle = uih->fcontext->angle;
+ }
+ if (uih->rotationspeed != s->rotationspeed
+ &&
+ ((s->mode > UIH_SAVEPOS
+ && uih->rotatemode == ROTATE_CONTINUOUS)
+ || s->mode >= UIH_SAVEALL)) {
+ save_float2c(uih, "rotationspeed", uih->rotationspeed, 6);
+ s->rotationspeed = uih->rotationspeed;
+ }
+ if (s->autorotate != (uih->rotatemode == ROTATE_CONTINUOUS)) {
+ s->autorotate = (uih->rotatemode == ROTATE_CONTINUOUS);
+ save_onoffc(uih, "autorotate", s->autorotate);
+ }
+ if (s->fcontext->maxiter != uih->fcontext->maxiter)
+ save_intc(uih, "maxiter", uih->fcontext->maxiter),
+ s->fcontext->maxiter = uih->fcontext->maxiter;
+ if (s->fcontext->bailout != uih->fcontext->bailout)
+ save_floatc(uih, "bailout", uih->fcontext->bailout),
+ s->fcontext->bailout = uih->fcontext->bailout;
+ if (s->fcontext->coloringmode != uih->fcontext->coloringmode)
+ save_intc(uih, "outcoloring", uih->fcontext->coloringmode),
+ s->fcontext->coloringmode = uih->fcontext->coloringmode;
+ if (s->fcontext->incoloringmode != uih->fcontext->incoloringmode)
+ save_intc(uih, "incoloring", uih->fcontext->incoloringmode),
+ s->fcontext->incoloringmode =
+ uih->fcontext->incoloringmode;
+ if (s->fcontext->incoloringmode != uih->fcontext->incoloringmode)
+ save_intc(uih, "incoloring", uih->fcontext->incoloringmode),
+ s->fcontext->incoloringmode =
+ uih->fcontext->incoloringmode;
+ if ((s->fcontext->incoloringmode == 10 || s->mode >= UIH_SAVEALL)
+ && s->fcontext->intcolor != uih->fcontext->intcolor)
+ save_intc(uih, "intcoloring", uih->fcontext->intcolor),
+ s->fcontext->intcolor = uih->fcontext->intcolor;
+ if ((s->fcontext->coloringmode == 10 || s->mode >= UIH_SAVEALL)
+ && s->fcontext->outtcolor != uih->fcontext->outtcolor)
+ save_intc(uih, "outtcoloring", uih->fcontext->outtcolor),
+ s->fcontext->outtcolor = uih->fcontext->outtcolor;
+ if (s->fcontext->mandelbrot != uih->fcontext->mandelbrot)
+ save_onoffc(uih, "julia", !uih->fcontext->mandelbrot),
+ s->fcontext->mandelbrot = uih->fcontext->mandelbrot;
+ if (s->mode > UIH_SAVEPOS
+ && s->fcontext->range != uih->fcontext->range)
+ save_intc(uih, "range", uih->fcontext->range),
+ s->fcontext->range = uih->fcontext->range;
+ if (s->fcontext->plane != uih->fcontext->plane)
+ save_intc(uih, "plane", uih->fcontext->plane),
+ s->fcontext->plane = uih->fcontext->plane;
+ if (s->zoomactive != uih->zoomactive && s->mode > UIH_SAVEPOS) {
+ switch (uih->zoomactive) {
+ case -1:
+ save_noparam(uih, "unzoom");
+ break;
+ case 1:
+ save_noparam(uih, "zoom");
+ break;
+ default:
+ save_noparam(uih, "stop");
+ break;
+ }
+ s->zoomactive = uih->zoomactive;
+ }
+ if ((s->mode >= UIH_SAVEPOS || uih->displaytext)
+ && s->color != uih->color) {
+ start_save(uih, "color");
+ save_nstring(uih, uih->color, uih_colornames);
+ stop_save(uih);
+ s->color = uih->color;
+ }
+ if (s->clearscreen) {
+ save_noparam(uih, "clearscreen");
+ s->clearscreen = 0;
+ s->nonfractalscreen = 1;
+ }
+ if (uih->displaytext) {
+ for (i = 0; i < 3; i++) {
+ if (uih->displaytext & (1 << i)) {
+ if (s->ytextpos != i || s->xtextpos != uih->textpos[i]) {
+ start_save(uih, "textpossition");
+ save_nstring(uih, uih->xtextpos, xtextposnames);
+ save_nstring(uih, uih->ytextpos, ytextposnames);
+ stop_save(uih);
+ s->xtextpos = uih->xtextpos;
+ s->ytextpos = uih->ytextpos;
+ }
+ save_stringc(uih, "text", uih->text[i]);
+ s->nonfractalscreen = 1;
+ }
+ }
+ save_noparam(uih, "textsleep");
+ uih->displaytext = 0;
+ }
+ if (s->autorotate && changed
+ && tl_lookup_timer(uih->savec->synctimer) > 500000)
+ save_float2c(uih, "angle", uih->fcontext->angle, 5),
+ resetsync = 1;
+ if (s->mode == UIH_SAVEPOS)
+ savepos(uih);
+ else {
+ if (uih->viewchanged)
+ savepos(uih), uih->viewchanged = 0;
+ else if (uih->moved)
+ savepos3(uih), uih->moved = 0;
+ else if (((changed && uih->step) || last)
+ && tl_lookup_timer(uih->savec->synctimer) > 500000)
+ resetsync = 1, savepos2(uih);
+ }
+ if (uih->savec->firsttime)
+ uih->savec->firsttime = 0;
+ if (s->writefailed)
+ uih_save_disable(uih);
+ if (resetsync)
+ tl_reset_timer(uih->savec->synctimer);
+ } /*if uih->save */
+}
+
+int uih_save_enable(struct uih_context *uih, xio_file f, int mode)
+{
+ struct uih_savedcontext *s;
+ int i;
+ last = 0;
+ if (uih->save) {
+ uih_error(uih, "Recording is already enabled");
+ return 0;
+ }
+ s = (struct uih_savedcontext *) calloc(1, sizeof(*s));
+ if (f == NULL || s == NULL) {
+ uih_error(uih, "File could not be opended or out of memory");
+ return 0;
+ }
+ uih->savec = s;
+ s->fcontext =
+ make_fractalc(1, uih->image->pixelwidth * uih->image->width,
+ uih->image->pixelheight * uih->image->height);
+ if (s->fcontext == NULL) {
+ uih_error(uih, "File could not be opended or out of memory");
+ return 0;
+ }
+ s->mode = mode;
+ /*Invalidate context to force save everything first */
+ s->speedup = STEP;
+ s->maxstep = MAXSTEP;
+ s->xcenter = INT_MAX;
+ s->fastmode = 2;
+ s->juliamode = 0;
+ s->cycling = 0;
+ for (i = 0; i < uih_nfilters; i++)
+ s->filter[i] = 0;
+ s->pressed = 0;
+ s->firsttime = 1;
+ uih->palettechanged = 1;
+ s->cyclingspeed = 30;
+ s->fcontext->pre = s->fcontext->pim = 0;
+ s->fcontext->bre = s->fcontext->bim = 0;
+ s->fcontext->currentformula = NULL;
+ s->fcontext->periodicity = 1;
+ s->fcontext->maxiter = 170;
+ s->fcontext->bailout = 4;
+ s->fcontext->coloringmode = 0;
+ s->fcontext->incoloringmode = 0;
+ s->fcontext->outtcolor = 0;
+ s->fcontext->intcolor = 0;
+ s->fcontext->mandelbrot = 1;
+ s->fcontext->plane = 0;
+ s->fcontext->range = 3;
+ s->fcontext->angle = 0;
+ s->rotatepressed = 0;
+ s->autorotate = 0;
+ s->fastrotate = 0;
+ s->rotationspeed = 10;
+ s->clearscreen = 0;
+ s->color = 0;
+ s->xtextpos = 1;
+ s->ytextpos = 1;
+ s->file = f;
+ s->timer = tl_create_timer();
+ s->synctimer = tl_create_timer();
+ uih->viewchanged = 1;
+ uih->palettechanged = 1;
+ uih->save = 1;
+ uih_emulatetimers(uih);
+ tl_reset_timer(s->timer);
+ uih->moved = 0;
+#ifndef _plan9_
+ if (mode == UIH_SAVEANIMATION)
+ myputs(";Animation file automatically generated by XaoS "
+ XaoS_VERSION "\n"
+ "; - a realtime interactive fractal zoomer\n"
+ ";Use xaos -play <filename> to replay it\n");
+ else if (mode == UIH_SAVEPOS)
+ myputs(";Position file automatically generated by XaoS "
+ XaoS_VERSION "\n"
+ "; - a realtime interactive fractal zoomer\n"
+ ";Use xaos -load <filename> to display it\n");
+#endif
+ uih_saveframe(uih);
+ uih_updatemenus(uih, "save");
+ xio_putc('\n', f);
+ return 1;
+}
+
+void uih_save_disable(struct uih_context *uih)
+{
+ if (uih->save) {
+ last = 1;
+ if (uih->savec->mode >= UIH_SAVEANIMATION)
+ uih_saveframe(uih);
+ if (xio_close(uih->savec->file))
+ outputerror(uih);
+ uih->save = 0;
+ free(uih->savec->fcontext);
+ tl_free_timer(uih->savec->timer);
+ tl_free_timer(uih->savec->synctimer);
+ free(uih->savec);
+ uih_updatemenus(uih, "save");
+ }
+}
+
+void uih_save_possition(struct uih_context *uih, xio_file f, int mode)
+{
+ struct uih_savedcontext *c = uih->savec;
+ int save = uih->save;
+ int vc = uih->viewchanged;
+ int pc = uih->palettechanged;
+ int mov = uih->moved = 0;
+ uih->moved = 0;
+ uih->save = 0;
+ uih->savec = NULL;
+ uih_save_enable(uih, f, mode);
+ uih_save_disable(uih);
+ uih->savec = c;
+ uih->save = save;
+ uih->viewchanged = vc;
+ uih->palettechanged = pc;
+ mov = uih->moved;
+}
diff --git a/src/ui-hlp/ui-hlp.pri b/src/ui-hlp/ui-hlp.pri
new file mode 100644
index 0000000..22c401a
--- /dev/null
+++ b/src/ui-hlp/ui-hlp.pri
@@ -0,0 +1,12 @@
+SOURCES += $$PWD/autopilot.c \
+ $$PWD/ui_helper.c \
+ $$PWD/menu.c \
+ $$PWD/play.c \
+ $$PWD/render.c \
+ $$PWD/playtext.c \
+ $$PWD/save.c \
+ $$PWD/messg.c \
+ $$PWD/wstack.c
+
+OTHER_FILES += \
+ $$PWD/autod.c
diff --git a/src/ui-hlp/ui_helper.c b/src/ui-hlp/ui_helper.c
new file mode 100644
index 0000000..04cd903
--- /dev/null
+++ b/src/ui-hlp/ui_helper.c
@@ -0,0 +1,2303 @@
+#include <config.h>
+#ifndef _plan9_
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <ctype.h>
+#include <stdlib.h>
+#include <limits.h>
+#include <math.h>
+#include <string.h>
+#include <errno.h>
+#ifdef __EMX__
+#include <float.h>
+/*
+ #ifndef M_PI
+ #define M_PI 3.14159265358979323846
+ #endif
+ */
+#endif
+#else
+#include <u.h>
+#include <libc.h>
+#include <ctype.h>
+#endif
+#include <fconfig.h>
+#include <filter.h>
+#include <ui_helper.h>
+#include <plane.h>
+#include "../include/timers.h"
+#include <zoom.h>
+#include <xmenu.h>
+#include <xerror.h>
+#include "autopilot.h"
+#include "grlib.h"
+#include "play.h"
+#include <archaccel.h>
+#include <libgen.h>
+
+#ifdef SFFE_USING
+#include "sffe.h"
+#endif
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+#ifndef M_PI
+#define M_PI 3.14159265358979323846
+#endif
+
+#define WAITTIME 50000
+#define WAITTIME1 200000
+#define WAITTIME2 2000000
+#define uih_palettechg(uih) if(!uih->recalculatemode&&uih->queue->palettechg!=NULL) uih->recalculatemode=UIH_PALETTEDRAW, uih->display=1
+#include <misc-f.h>
+
+static struct filter *uih_getinstance(CONST struct filteraction *a);
+static void uih_destroyinstance(struct filter *f);
+static int uih_require(struct filter *f, struct requirements *r);
+static int uih_initialize(struct filter *f, struct initdata *i);
+static CONST rgb_t uicolors[] = {
+ {0, 0, 0},
+ {255, 255, 255},
+ {255, 65, 0},
+ {64, 64, 64},
+ {128, 128, 128},
+ {128 + 64, 128 + 64, 128 + 64}
+};
+
+static CONST rgb_t uibwcolors[] = {
+ {0, 0, 0},
+ {255, 255, 255},
+ {255, 255, 255},
+ {255, 255, 255},
+ {255, 255, 255},
+ {255, 255, 255}
+};
+
+static CONST struct filteraction uih_filter = {
+ "XaoS's user interface layer",
+ "ui",
+ 0,
+ uih_getinstance,
+ uih_destroyinstance,
+ NULL,
+ uih_require,
+ uih_initialize,
+ convertupgeneric,
+ convertdowngeneric,
+ NULL
+};
+
+static uih_context *uih;
+static int waitcount, waitcount1, waitcount2;
+
+extern CONST struct filteraction interlace_filter, stereogram_filter,
+ subwindow_filter, smalliter_filter, julia_filter, blur_filter,
+ edge_filter, edge2_filter, rotate_filter, starfield_filter,
+ truecolor_filter, fixedcolor_filter, bitmap_filter, emboss_filter,
+ palette_filter, antialias_filter, threed_filter;
+
+CONST struct filteraction *CONST uih_filters[MAXFILTERS] = {
+ &edge_filter,
+ &edge2_filter,
+ &threed_filter,
+ &starfield_filter,
+ &stereogram_filter,
+ &interlace_filter,
+ &blur_filter,
+ &emboss_filter,
+ &palette_filter,
+ &antialias_filter,
+ &truecolor_filter,
+ NULL
+};
+
+CONST int uih_nfilters = 11;
+
+static void uih_invalidatepos(uih_context * uih)
+{
+ uih->xcenterm = INT_MAX;
+ uih->xcenterm = INT_MAX;
+}
+
+static void uih_finishpalette(struct uih_context *uih)
+{
+ if (uih->image->palette->flags & UNFINISHED) {
+ if (uih->image->palette->allocfinished != NULL)
+ uih->image->palette->allocfinished(uih->image->palette);
+ uih->image->palette->flags &= ~UNFINISHED;
+ }
+}
+
+static void
+uih_getcoord(uih_context * uih, int x, int y, number_t * xr, number_t * yr)
+{
+ uih->uifilter->action->convertdown(uih->uifilter, &x, &y);
+ *xr = (((number_t)
+ (uih->fcontext->rs.nc +
+ (x) * ((uih->fcontext->rs.mc - uih->fcontext->rs.nc) /
+ (number_t) uih->zengine->image->width))));
+ *yr = (((number_t)
+ (uih->fcontext->rs.ni +
+ (y) * ((uih->fcontext->rs.mi - uih->fcontext->rs.ni) /
+ (number_t) uih->zengine->image->height))));
+ rotateback(*(uih->fcontext), *xr, *yr);
+}
+
+int uih_enablefilter(uih_context * c, int n)
+{
+ if (c->filter[n] == NULL) {
+ struct filter *f, *f1;
+ int i, wascycling = 0;
+ if (c->cycling)
+ uih_cycling_off(c), wascycling = 1;
+ f = uih_filters[n]->getinstance(uih_filters[n]);
+ f1 = c->uifilter;
+ if (c->fixedcolor != NULL)
+ f1 = c->fixedcolor;
+ for (i = MAXFILTERS - 1; i > n; i--) {
+ if (c->filter[i])
+ f1 = c->filter[i];
+ }
+ uih_newimage(c);
+ insertfilter(f, f1);
+ if (!initqueue(c->queue)) {
+ c->ddatalost = 1;
+ removefilter(f);
+ f->action->destroyinstance(f);
+ if (!initqueue(c->queue)) {
+ x_fatalerror
+ ("Fatal error. Can not continue - initialization of queue can not be performed eigher with or without filter");
+ }
+ if (wascycling)
+ uih_cycling_on(c);
+ if (!strcmp("palette", uih_filters[n]->shortname)) {
+ uih_updatemenus(c, "palettef");
+ } else {
+ uih_updatemenus(c, uih_filters[n]->shortname);
+ }
+ return 0;
+ } else
+ c->filter[n] = f;
+ if (wascycling)
+ uih_cycling_on(c);
+ if (!strcmp("palette", uih_filters[n]->shortname)) {
+ uih_updatemenus(c, "palettef");
+ } else {
+ uih_updatemenus(c, uih_filters[n]->shortname);
+ }
+ return 1;
+ }
+ return 0;
+}
+
+void uih_disablefilter(uih_context * c, int n)
+{
+ if (n == c->aliasnum)
+ return;
+ if (c->filter[n] != NULL) {
+ int wascycling = 0;
+ struct filter *f = c->filter[n];
+ if (c->cycling)
+ uih_cycling_off(c), wascycling = 1;
+ uih_newimage(c);
+ removefilter(f);
+ if (!initqueue(c->queue)) {
+ struct filter *f1;
+ int i;
+ c->ddatalost = 1;
+ f1 = c->uifilter;
+ if (c->fixedcolor != NULL)
+ f1 = c->fixedcolor;
+ for (i = MAXFILTERS - 1; i > n; i--) {
+ if (c->filter[i])
+ f1 = c->filter[i];
+ }
+ insertfilter(f, f1);
+ if (!initqueue(c->queue)) {
+ x_fatalerror("Fatal error. Can not continue");
+ }
+ } else
+ f->action->destroyinstance(f), c->filter[n] = NULL;
+ if (wascycling)
+ uih_cycling_on(c);
+ if (!strcmp("palette", uih_filters[n]->shortname)) {
+ uih_updatemenus(c, "palettef");
+ } else {
+ uih_updatemenus(c, uih_filters[n]->shortname);
+ }
+ }
+}
+
+int uih_fastrotateenable(uih_context * c)
+{
+ int wascycling = 0;
+ if (c->juliamode)
+ uih_disablejulia(c);
+ if (!c->fastrotate && !c->juliamode) {
+ if (c->cycling)
+ uih_cycling_off(c), wascycling = 1;
+ c->rotatef = rotate_filter.getinstance(&rotate_filter);
+ if (c->rotatef == NULL)
+ goto end;
+ uih_newimage(c);
+ addfilter(c->rotatef, c->zengine);
+ if (!initqueue(c->queue))
+ goto end2;
+ if (wascycling)
+ uih_cycling_on(c);
+ c->fastrotate = 1;
+ return 1;
+ }
+ return 0;
+ end2:
+ removefilter(c->rotatef);
+ initqueue(c->queue);
+ c->rotatef->action->destroyinstance(c->rotatef);
+ end:
+ if (wascycling)
+ uih_cycling_on(c);
+ return 0;
+}
+
+void uih_fastrotatedisable(uih_context * c)
+{
+ if (c->fastrotate) {
+ int wascycling = 0;
+ uih_rotatemode(c, ROTATE_NONE);
+ if (c->cycling)
+ uih_cycling_off(c), wascycling = 1;
+ c->fastrotate = 0;
+ removefilter(c->rotatef);
+ initqueue(c->queue);
+ c->rotatef->action->destroyinstance(c->rotatef);
+ uih_newimage(c);
+ if (wascycling)
+ uih_cycling_on(c);
+ }
+}
+
+void uih_rotate(struct uih_context *c, int n)
+{
+ if (!n)
+ uih_fastrotate(c, 0);
+ else {
+ uih_fastrotate(c, 1);
+ uih_rotatemode(c, n);
+ }
+}
+
+static void uih_fixedcolordisable(uih_context * c)
+{
+#ifdef SCONVERTORS
+ if (c->fixedcolor != NULL) {
+ int wascycling = 0;
+ if (c->cycling)
+ uih_cycling_off(c), wascycling = 1;
+ initqueue(c->queue);
+ removefilter(c->fixedcolor);
+ initqueue(c->queue);
+ c->fixedcolor->action->destroyinstance(c->fixedcolor);
+ c->fixedcolor = NULL;
+ uih_newimage(c);
+ if (wascycling)
+ uih_cycling_on(c);
+ }
+#endif
+}
+
+static int uih_fixedcolorenable(uih_context * c)
+{
+#ifdef SCONVERTORS
+ CONST struct filteraction *fa = NULL;
+ int wascycling = 0;
+ preallocpalette(c->palette);
+ switch (c->image->palette->type) {
+#ifdef SFIXEDCOLOR
+ case FIXEDCOLOR:
+ fa = &fixedcolor_filter;
+ break;
+#endif
+#ifdef SBITMAPS
+ case LBITMAP:
+ case MBITMAP:
+ case LIBITMAP:
+ case MIBITMAP:
+ fa = &bitmap_filter;
+ break;
+#endif
+ default:
+ x_fatalerror("Unsupported image type. Recompile XaoS");
+ }
+ if (c->fixedcolor != NULL && c->fixedcolor->action != fa)
+ uih_fixedcolordisable(c);
+ if (c->fixedcolor == NULL) {
+ if (c->cycling)
+ uih_cycling_off(c), wascycling = 1;
+ c->fixedcolor = fa->getinstance(fa);
+ if (c->fixedcolor == NULL)
+ goto end;
+ uih_newimage(c);
+ addfilter(c->fixedcolor, c->uifilter->previous);
+ if (!initqueue(c->queue))
+ goto end2;
+ if (wascycling)
+ uih_cycling_on(c);
+ return 1;
+ }
+ return 0;
+ end2:
+ removefilter(c->fixedcolor);
+ c->fixedcolor->action->destroyinstance(c->fixedcolor);
+ c->fixedcolor = NULL;
+ initqueue(c->queue);
+ end:
+ if (wascycling)
+ uih_cycling_on(c);
+ return 0;
+#else
+ x_fatalerror("Fixed color not supported, please recompile XaoS");
+ return 0;
+#endif
+}
+
+int uih_fastrotate(uih_context * c, int mode)
+{
+ if (mode)
+ return (uih_fastrotateenable(c));
+ uih_fastrotatedisable(c);
+ return 1;
+}
+
+void uih_angle(uih_context * c, number_t angle)
+{
+ if (angle != c->fcontext->angle) {
+ if (!c->fastrotate) {
+ c->fcontext->version++;
+ uih_newimage(c);
+ }
+ c->fcontext->angle = angle;
+ uih_animate_image(c);
+ }
+}
+
+void uih_rotatemode(uih_context * c, int mode)
+{
+ CONST char *names[] = {
+ "norotate",
+ "mouserotate",
+ "controtate"
+ };
+ if (c->fastrotate) {
+ if (c->rotatemode != mode) {
+ c->rotatemode = mode;
+ if (mode == ROTATE_CONTINUOUS)
+ tl_reset_timer(c->doittimer);
+ uih_updatemenus(c, names[mode]);
+ }
+ }
+}
+
+int uih_enablejulia(uih_context * c)
+{
+ int wascycling = 0;
+ if (!c->juliamode && c->fcontext->mandelbrot
+ /*&&c->fcontext->currentformula->calculate_julia != NULL */ ) {
+ struct filter *addf = c->zengine;
+ uih_newimage(c);
+ if (c->fastrotate)
+ uih_fastrotatedisable(c);
+ if (c->cycling)
+ uih_cycling_off(c), wascycling = 1;
+ if (c->fcontext->currentformula->calculate_julia == NULL
+ || c->fcontext->slowmode)
+ c->julia = zoom_filter.getinstance(&zoom_filter);
+ else
+ c->julia = julia_filter.getinstance(&julia_filter);
+ if (c->julia == NULL)
+ goto end;
+
+ c->subwindow = subwindow_filter.getinstance(&subwindow_filter);
+ if (c->subwindow == NULL)
+ goto end2;
+ if (c->fcontext->currentformula->calculate_julia != NULL
+ && !c->fcontext->slowmode) {
+ c->smalliter = smalliter_filter.getinstance(&smalliter_filter);
+ if (c->smalliter == NULL)
+ goto end3;
+ } else
+ c->smalliter = NULL;
+ addfilter(c->subwindow, addf);
+ if (c->fcontext->currentformula->calculate_julia != NULL
+ && !c->fcontext->slowmode) {
+ addfilter(c->smalliter, addf);
+ }
+ addfilter(c->julia, addf);
+ subwindow_setsecond(c->subwindow, addf);
+ if (!initqueue(c->queue))
+ goto end4;
+ if (c->fcontext->currentformula->calculate_julia == NULL
+ || c->fcontext->slowmode)
+ c->juliamode = 2;
+ else
+ c->juliamode = 1;
+ uih_updatemenus(c, "fastjulia");
+ return 1;
+ }
+ uih_updatemenus(c, "fastjulia");
+ return 0;
+ end4:;
+ removefilter(c->subwindow);
+ removefilter(c->julia);
+ if (c->smalliter != NULL)
+ removefilter(c->smalliter);
+ initqueue(c->queue);
+ end3:;
+ c->smalliter->action->destroyinstance(c->smalliter);
+ end2:;
+ c->subwindow->action->destroyinstance(c->subwindow);
+ end:;
+ c->julia->action->destroyinstance(c->julia);
+ if (wascycling)
+ uih_cycling_on(c);
+ uih_updatemenus(c, "fastjulia");
+ return 0;
+}
+
+void uih_disablejulia(uih_context * c)
+{
+ int wascycling = 0;
+ if (c->juliamode) {
+ uih_newimage(c);
+ c->fcontext->version++;
+ if (c->cycling)
+ uih_cycling_off(c), wascycling = 1;
+ removefilter(c->subwindow);
+ removefilter(c->julia);
+ if (c->smalliter != NULL)
+ removefilter(c->smalliter);
+ initqueue(c->queue);
+ if (c->smalliter != NULL)
+ c->smalliter->action->destroyinstance(c->smalliter);
+ c->subwindow->action->destroyinstance(c->subwindow);
+ c->julia->action->destroyinstance(c->julia);
+ if (wascycling)
+ uih_cycling_on(c);
+ c->juliamode = 0;
+ uih_updatemenus(c, "fastjulia");
+ }
+}
+
+int uih_setjuliamode(uih_context * c, int mode)
+{
+ if (mode)
+ return uih_enablejulia(c);
+ uih_disablejulia(c);
+ return 1;
+}
+
+void uih_rotationspeed(uih_context * c, number_t speed)
+{
+ c->rotationspeed = speed;
+}
+
+static void uih_cyclinghandler(void *userdata, int n)
+{
+ struct uih_context *uih = (struct uih_context *) userdata;
+ int direct;
+ if (uih->zengine->fractalc->palette != NULL &&
+ uih->zengine->fractalc->palette->cyclecolors == NULL)
+ return;
+ direct = uih->direction * uih->cyclingdirection * n;
+ if (direct > 0)
+ direct %= uih->zengine->fractalc->palette->size - 1;
+ else
+ direct =
+ -((-direct) % (uih->zengine->fractalc->palette->size - 1));
+ if (direct) {
+ uih->paletteshift += direct;
+ while (uih->paletteshift < 0)
+ uih->paletteshift += uih->zengine->fractalc->palette->size - 1;
+ uih->paletteshift =
+ uih->paletteshift % (uih->zengine->fractalc->palette->size -
+ 1);
+ uih->zengine->fractalc->palette->cyclecolors(uih->
+ zengine->fractalc->
+ palette, direct);
+ if (uih->flags & UPDATE_AFTER_PALETTE
+ && (!uih->play || !uih->nonfractalscreen))
+ uih->display = 1;
+ uih_palettechg(uih);
+ }
+}
+
+void uih_cycling_off(struct uih_context *c)
+{
+ if (c->cycling) {
+ tl_free_timer(c->cyclingtimer);
+ c->cycling = 0;
+ uih_updatemenus(c, "cycling");
+ uih_updatemenus(c, "rcycling");
+ }
+}
+
+void uih_display(struct uih_context *c)
+{
+ c->display = 1;
+ c->nonfractalscreen = 0;
+ if (c->clearscreen)
+ c->clearscreen = 0;
+ c->displaytext = 0;
+ c->nletters = 0;
+ c->display = 1;
+ if (c->text[0] != NULL)
+ free(c->text[0]), c->text[0] = NULL;
+ if (c->text[1] != NULL)
+ free(c->text[1]), c->text[1] = NULL;
+ if (c->text[2] != NULL)
+ free(c->text[2]), c->text[2] = NULL;
+ if (c->play)
+ uih_clear_lines(c);
+}
+
+void uih_cycling_stop(struct uih_context *c)
+{
+ if (c->cycling && !c->stopped) {
+ tl_remove_timer(c->cyclingtimer);
+ c->stopped = 1;
+ }
+}
+
+void uih_cycling_continue(struct uih_context *c)
+{
+ if (c->cycling && c->stopped) {
+ c->stopped = 0;
+ tl_add_timer(syncgroup, c->cyclingtimer);
+ }
+}
+
+void uih_loadfile(struct uih_context *c, xio_constpath d)
+{
+ xio_file f;
+ f = xio_ropen(d);
+ if (f == NULL) {
+#ifdef _plan9_
+ uih_error(c, (char *) errstr);
+#else
+ uih_error(c, strerror(errno));
+#endif
+ return;
+ }
+ uih_load(c, f, d);
+ return;
+}
+
+void uih_loadstr(struct uih_context *c, CONST char *data)
+{
+ xio_file f;
+ f = xio_strropen(data);
+ uih_load(c, f, "");
+ return;
+}
+
+void uih_playstr(struct uih_context *c, CONST char *data)
+{
+ xio_file f;
+ f = xio_strropen(mystrdup(data));
+ uih_replayenable(c, f, "", 1);
+ return;
+}
+
+void uih_recalculate(struct uih_context *c)
+{
+ c->fcontext->version++;
+ uih_newimage(c);
+}
+
+void uih_playfile(struct uih_context *c, xio_constpath d)
+{
+ xio_file f;
+ if (c->play)
+ uih_replaydisable(c);
+ f = xio_ropen(d);
+ if (f == NULL) {
+#ifdef _plan9_
+ uih_error(c, (char *) errstr);
+#else
+ uih_error(c, strerror(errno));
+#endif
+ return;
+ }
+ uih_replayenable(c, f, d, 1);
+ return;
+}
+
+void uih_playtutorial(struct uih_context *c, CONST char *name)
+{
+ xio_pathdata tmp;
+ xio_file f = XIO_FAILED;
+
+ f = xio_gettutorial(name, tmp);
+ if (f == NULL) {
+ uih_error(c, gettext("Tutorial files not found. Reinstall XaoS"));
+ return;
+ }
+ uih_replayenable(c, f, tmp, 1);
+ if (c->passfunc != NULL) {
+ c->passfunc(c, 1, gettext("Preparing first image"), 0);
+ }
+}
+
+void uih_loadexample(struct uih_context *c)
+{
+ xio_pathdata name;
+ xio_file f = xio_getrandomexample(name);
+ c->errstring = NULL;
+ if (f == NULL) {
+ uih_error(c, gettext("Could not open examples"));
+ return;
+ }
+ uih_load(c, f, name);
+ if (c->errstring == NULL) {
+ char s[256];
+ sprintf(s, gettext("File %s loaded."), basename(name));
+ uih_message(c, s);
+ }
+}
+
+void uih_savepngfile(struct uih_context *c, xio_constpath d)
+{
+ CONST char *s;
+ if (c->passfunc != NULL) {
+ c->passfunc(c, 1, gettext("Saving image..."), 0);
+ }
+ if (c->recalculatemode) {
+ uih_newimage(c);
+ uih_clearwindows(c);
+ uih_do_fractal(c);
+ }
+ if (c->interrupt) {
+ uih_message(c, gettext("Save interrupted"));
+ return;
+ }
+ c->errstring = NULL;
+ s = uih_save(c, d);
+ if (s != NULL)
+ uih_error(c, s);
+ if (c->errstring == NULL) {
+ char s[256];
+ sprintf(s, gettext("File %s saved."), d);
+ uih_message(c, s);
+ }
+}
+
+void uih_saveposfile(struct uih_context *c, xio_constpath d)
+{
+ xio_file f;
+ c->errstring = NULL;
+ f = xio_wopen(d);
+ if (f == XIO_FAILED) {
+ uih_error(c, gettext("Can not open file"));
+ return;
+ }
+ uih_save_possition(c, f, UIH_SAVEPOS);
+ if (c->errstring == NULL) {
+ char s[256];
+ sprintf(s, gettext("File %s saved."), d);
+ uih_message(c, s);
+ }
+}
+
+char *uih_savepostostr(struct uih_context *c)
+{
+ xio_file f;
+ c->errstring = NULL;
+ f = xio_strwopen();
+ uih_save_possition(c, f, UIH_SAVEPOS);
+ return (xio_getstring(f));
+}
+
+void uih_saveundo(struct uih_context *c)
+{
+ xio_file f;
+ if (c->play)
+ return;
+ c->errstring = NULL;
+ if (c->undo.undos[c->undo.last])
+ free(c->undo.undos[c->undo.last]);
+ f = xio_strwopen();
+ uih_save_possition(c, f, UIH_SAVEPOS);
+ c->undo.undos[c->undo.last] = xio_getstring(f);
+ c->undo.last = (c->undo.last + 1) % UNDOLEVEL;
+}
+
+void uih_undo(struct uih_context *c)
+{
+ xio_file f;
+ int pos = c->undo.last - 2;
+ if (pos < 0)
+ pos = UNDOLEVEL + pos;
+ if (c->undo.undos[pos]) {
+ f = xio_strropen(c->undo.undos[pos]);
+ c->undo.undos[pos] = NULL;
+ c->undo.last = pos;
+ uih_load(c, f, "");
+ }
+}
+
+void uih_redo(struct uih_context *c)
+{
+ xio_file f;
+ int pos = c->undo.last;
+ if (c->undo.undos[pos]) {
+ f = xio_strropen(c->undo.undos[pos]);
+ c->undo.undos[pos] = NULL;
+ c->undo.last = pos;
+ uih_load(c, f, "");
+ }
+}
+
+extern xio_pathdata configfile;
+void uih_savecfg(struct uih_context *c)
+{
+ xio_file f;
+ c->errstring = NULL;
+ f = xio_wopen(configfile);
+ if (f == XIO_FAILED) {
+ uih_message(c, (char *) xio_errorstring());
+ return;
+ }
+ uih_save_possition(c, f, UIH_SAVEALL);
+ if (c->errstring == NULL) {
+ char s[256];
+ sprintf(s, gettext("File %s saved."), configfile);
+ uih_message(c, s);
+ }
+}
+
+void uih_saveanimfile(struct uih_context *c, xio_constpath d)
+{
+ xio_file f;
+ c->errstring = NULL;
+ if (c->save) {
+ uih_save_disable(c);
+ uih_updatemenus(c, "record");
+ return;
+ }
+ f = xio_wopen(d);
+ if (f == XIO_FAILED) {
+ uih_message(c, (char *) xio_errorstring());
+ return;
+ }
+ uih_save_enable(c, f, UIH_SAVEANIMATION);
+ if (c->errstring == NULL) {
+ char s[256];
+ sprintf(s, gettext("Recording to file %s enabled."), d);
+ uih_message(c, s);
+ }
+ uih_updatemenus(c, "record");
+}
+
+
+
+
+
+
+
+CONST char *uih_save(struct uih_context *c, xio_constpath filename)
+{
+ CONST char *r;
+ uih_cycling_stop(c);
+ uih_stoptimers(c);
+ uih_clearwindows(c);
+ r = writepng(filename, c->queue->saveimage);
+ uih_cycling_continue(c);
+ uih_resumetimers(c);
+ return (r);
+}
+
+void uih_setcycling(struct uih_context *c, int speed)
+{
+ c->cyclingspeed = speed;
+ if (c->cyclingspeed < 0)
+ c->direction = -1;
+ else
+ c->direction = 1;
+ if (c->cycling) {
+ if (c->cyclingspeed)
+ tl_set_interval(c->cyclingtimer,
+ 1000000 / c->cyclingspeed * c->direction);
+ else
+ tl_set_interval(c->cyclingtimer, 1000000 * 100);
+ }
+}
+
+int uih_cycling_on(struct uih_context *c)
+{
+ if (c->zengine->fractalc->palette != NULL &&
+ c->zengine->fractalc->palette->cyclecolors != NULL) {
+ c->cycling = 1;
+ tl_update_time();
+ c->cyclingtimer = tl_create_timer();
+ uih_emulatetimers(c);
+ uih_setcycling(c, c->cyclingspeed);
+ tl_set_multihandler(c->cyclingtimer, uih_cyclinghandler, c);
+ tl_add_timer(syncgroup, c->cyclingtimer);
+ } else {
+ uih_updatemenus(c, "cycling");
+ uih_updatemenus(c, "rcycling");
+ return 0;
+ }
+ uih_updatemenus(c, "cycling");
+ uih_updatemenus(c, "rcycling");
+ return 1;
+}
+
+int uih_cycling(struct uih_context *uih, int mode)
+{
+ if (mode)
+ return (uih_cycling_on(uih));
+ uih_cycling_off(uih);
+ return 1;
+}
+
+
+
+static void uih_waitfunc(struct filter *f)
+{
+ int l;
+ tl_process_group(syncgroup, NULL);
+ l = tl_lookup_timer(uih->calculatetimer);
+ if (uih->interrupt)
+ f->interrupt = 1, uih->endtime = l;
+ if (uih->interruptiblemode) {
+ if (f->incalculation && !uih->starttime)
+ uih->starttime = l;
+ else if (uih->starttime && !f->incalculation && !uih->endtime)
+ uih->endtime = l;
+ if ((uih->maxtime && l > uih->maxtime && f->readyforinterrupt)
+ || uih->interrupt)
+ f->interrupt = 1, uih->endtime = l;
+ }
+ if ((l) > (waitcount + 1) * WAITTIME) {
+ int display = 0;
+ if (!uih->interruptiblemode && l > (waitcount1 + 1) * WAITTIME1) {
+ display = 1;
+ waitcount1 = l / WAITTIME1;
+ }
+ if (f->image == uih->image && !uih->interruptiblemode
+ && l > (waitcount2 + 1) * WAITTIME2) {
+ if (!uih->play)
+ uih->display = 1, uih_finishpalette(uih), display = 1;
+ waitcount2 = l / WAITTIME2;
+ }
+ if (uih->passfunc != NULL) {
+ f->interrupt |=
+ uih->passfunc(uih, display, f->pass,
+ (float) (f->max ? f->pos * 100.0 /
+ f->max : 100.0));
+ uih->display = 0;
+ }
+ waitcount = l / WAITTIME;
+ }
+ uih_clearwindows(uih);
+}
+
+void uih_do_fractal(uih_context * c)
+{
+ int flags;
+ int time;
+
+ c->interrupt = 0;
+ c->display = 0;
+ uih = c;
+ if (c->juliamode && !c->fcontext->mandelbrot) {
+ uih_disablejulia(c);
+ }
+ if ((c->juliamode == 1
+ && (c->fcontext->currentformula->calculate_julia == NULL
+ || c->fcontext->slowmode)) || (c->juliamode == 2
+ && c->
+ fcontext->currentformula->
+ calculate_julia != NULL
+ && !c->fcontext->slowmode)) {
+ uih_disablejulia(c);
+ uih_enablejulia(c);
+ c->fcontext->version++;
+ }
+
+ tl_update_time();
+ if (c->recalculatemode < c->fastmode && c->emulator == NULL
+ && !c->fixedstep)
+ c->interruptiblemode = 1;
+ else
+ c->interruptiblemode = 0;
+ if (!c->interruptiblemode && c->recalculatemode > UIH_ANIMATION) {
+ if (c->longwait != NULL)
+ c->longwait(c);
+ uih_stoptimers(c);
+ }
+
+ tl_update_time();
+ tl_reset_timer(c->calculatetimer);
+ c->starttime = 0;
+ c->endtime = 0;
+ waitcount = tl_lookup_timer(c->calculatetimer) / WAITTIME + 2;
+ waitcount1 = tl_lookup_timer(c->calculatetimer) / WAITTIME1 + 1;
+ waitcount2 = tl_lookup_timer(c->calculatetimer) / WAITTIME2 + 1;
+#ifdef _UNDEFINED_
+ waitcount = 2;
+ waitcount1 = 1;
+ waitcount2 = 1;
+#endif
+ c->incalculation = 1;
+
+ if (!(c->flags & ROTATE_INSIDE_CALCULATION))
+ uih_cycling_stop(c);
+
+ time = tl_lookup_timer(c->doittimer);
+ if (c->rotatemode == ROTATE_CONTINUOUS) {
+ c->fcontext->angle += c->rotationspeed * time / 1000000.0;
+ }
+
+ tl_reset_timer(c->doittimer);
+ c->indofractal = 1;
+ if (c->recalculatemode < UIH_PALETTEDRAW) {
+ if (c->queue->palettechg != NULL)
+ flags =
+ c->queue->palettechg->action->doit(c->queue->palettechg,
+ PALETTEONLY, 0);
+ else
+ flags = CHANGED;
+ } else
+ flags =
+ c->uifilter->previous->action->doit(c->uifilter->previous,
+ c->interruptiblemode ?
+ INTERRUPTIBLE : 0, time);
+ c->indofractal = 0;
+
+ if (!(c->flags & ROTATE_INSIDE_CALCULATION))
+ uih_cycling_continue(c);
+
+ c->dirty = 0;
+ if (c->inanimation)
+ c->inanimation--;
+ c->ddatalost = 0;
+ c->recalculatemode = 0;
+
+ if (flags & ANIMATION)
+ c->fastanimation = 1;
+ else
+ c->fastanimation = 0;
+ if (c->emulator)
+ c->inanimation = 1;
+ if (flags & (ANIMATION | UNCOMPLETTE)
+ || (c->rotatemode == ROTATE_CONTINUOUS)) {
+ tl_resume_timer(c->doittimer);
+ c->uncomplette = 1;
+ c->inanimation = 2;
+ if (flags & UNCOMPLETTE)
+ c->recalculatemode = UIH_ANIMATION;
+ else
+ c->recalculatemode = UIH_FILTERANIMATION;
+ c->display = 1;
+ } else {
+ tl_stop_timer(c->doittimer);
+ c->uncomplette = 0;
+ }
+ if ((flags & CHANGED) && (!c->play || !c->nonfractalscreen)) {
+ c->display = 1;
+ if (flags & INEXACT)
+ c->dirty = 1;
+ } else
+ c->incalculation = 0;
+ uih_callcomplette(c);
+ if (c->autopilot)
+ c->inanimation = 1;
+}
+
+void uih_prepare_image(uih_context * c)
+{
+ if (c->play)
+ uih_update_lines(c);
+ if (c->display) {
+ uih_clearwindows(c);
+ xprepareimage(c->image);
+ if (uih_needrecalculate(c))
+ uih_do_fractal(c);
+ }
+}
+
+void uih_callcomplette(uih_context * c)
+{
+ if (!c->uncomplette && !c->display && !c->recalculatemode
+ && !c->inanimation && c->complettehandler != NULL) {
+ c->complettehandler(c->handlerdata);
+ }
+}
+
+void uih_setcomplettehandler(uih_context * c, void (h) (void *), void *d)
+{
+ c->complettehandler = h;
+ c->handlerdata = d;
+}
+
+void uih_letterspersec(uih_context * c, int n)
+{
+ if (n < 1)
+ n = 1;
+ c->letterspersec = n;
+}
+
+double uih_displayed(uih_context * c)
+{
+ int drawingtime;
+ uih_finishpalette(c);
+ if (c->indofractal)
+ return 0; /*image is currently calculating */
+ if (c->recalculatemode)
+ c->display = 1;
+ else
+ c->display = 0;
+ tl_update_time();
+ uih_resumetimers(c);
+ c->nonfractalscreen = 0;
+ c->nletters = 0;
+ if (c->incalculation) {
+ c->incalculation = 0;
+ drawingtime = tl_lookup_timer(c->calculatetimer);
+ if (c->emulator)
+ drawingtime = 0;
+ if (c->lasttime == -1
+ || (drawingtime && c->lasttime
+ && (drawingtime / c->lasttime < 0.2
+ || drawingtime / c->lasttime > 4)))
+ c->lasttime = drawingtime;
+ c->lasttime = (c->lasttime * 30 + drawingtime) / 31;
+ c->lastspeed = c->lasttime ? 1000000.0 / c->lasttime : 100.0;
+ if (c->interruptiblemode) {
+ int i;
+ int time1, time;
+ time1 = drawingtime;
+ time1 -= c->endtime;
+ time = (drawingtime - c->endtime) + c->starttime;
+ if (c->times[0][0] == -1) {
+ for (i = 0; i < AVRGSIZE; i++)
+ c->times[0][i] = time, c->times[1][i] = time1;
+ c->count[0] = time * AVRGSIZE, c->count[1] =
+ time1 * AVRGSIZE;
+ }
+ c->timespos = (c->timespos + 1) % AVRGSIZE;
+ c->count[0] += time - c->times[0][c->timespos];
+ c->count[1] += time1 - c->times[1][c->timespos];
+ c->times[0][c->timespos] = time;
+ c->times[1][c->timespos] = time1;
+ c->maxtime = (c->count[0] * 5) / AVRGSIZE;
+ if (c->step || c->pressed
+ || (c->play
+ && (c->playc->morph || c->playc->morphangle
+ || c->playc->morphjulia
+ || c->playc->lines.morphing))
+ || (c->rotatemode == ROTATE_CONTINUOUS)
+ || c->fastanimation) {
+ if (c->maxtime > 1000000 / 25)
+ c->maxtime = c->count[0] * 3 / AVRGSIZE;
+ if (c->maxtime > 1000000 / 15)
+ c->maxtime = 1000000 / 15;
+ } else {
+ c->maxtime = 1000000 / 3;
+ }
+ if (c->maxtime < 1000000 / 30)
+ c->maxtime = 1000000 / 30;
+ c->maxtime -= c->count[1] / AVRGSIZE;
+ if (c->maxtime < c->starttime + 10000)
+ c->maxtime = c->starttime + 10000;
+ }
+ }
+ uih_callcomplette(c);
+ return (c->lastspeed);
+}
+
+void uih_text(uih_context * c, CONST char *text)
+{
+ int i, l;
+ c->display = 1;
+ if (c->text[c->ytextpos])
+ free(c->text[c->ytextpos]);
+ c->textpos[c->ytextpos] = c->xtextpos;
+ c->textcolor[c->ytextpos] = c->color;
+ c->displaytext |= 1 << c->ytextpos;
+ c->text[c->ytextpos] = mystrdup(text);
+ l = (int) strlen(text);
+ c->todisplayletters = 0;
+ for (i = 0; i < l; i++) {
+ if (isalnum(text[i]))
+ c->todisplayletters++;
+ if (text[i] == '-')
+ c->todisplayletters += 3;
+ if (text[i] == '.')
+ c->todisplayletters += 2;
+ }
+ c->step = 0;
+}
+
+void uih_clearscreen(uih_context * c)
+{
+ c->clearscreen = 1;
+ if (c->save)
+ c->savec->clearscreen = 1;
+ if (c->displaytext)
+ c->displaytext = 0;
+ if (c->text[0] != NULL)
+ free(c->text[0]), c->text[0] = NULL;
+ if (c->text[1] != NULL)
+ free(c->text[1]), c->text[1] = NULL;
+ if (c->text[2] != NULL)
+ free(c->text[2]), c->text[2] = NULL;
+ c->nletters = 0;
+ c->display = 1;
+ if (c->play)
+ uih_clear_lines(c);
+}
+
+void uih_settextpos(uih_context * c, int x, int y)
+{
+ CONST char *names1[] = {
+ "ytextposup",
+ "ytextposmiddle",
+ "ytextposbottom",
+ };
+ CONST char *names2[] = {
+ "xtextposleft",
+ "xtextposcenter",
+ "xtextposright",
+ };
+ c->xtextpos = x;
+ c->ytextpos = y;
+ uih_updatemenus(c, names1[y]);
+ uih_updatemenus(c, names2[x]);
+}
+
+
+/*timming routines */
+
+void uih_tbreak(uih_context * c)
+{
+ c->tbreak = 1;
+}
+
+void uih_emulatetimers(uih_context * c)
+{
+ if (c->emulator == NULL)
+ return;
+ tl_emulate_timer(c->maintimer, c->emulator);
+ tl_emulate_timer(c->doittimer, c->emulator);
+ if (c->autopilot)
+ tl_emulate_timer(c->autopilottimer, c->emulator);
+ if (c->cycling) {
+ tl_emulate_timer(c->cyclingtimer, c->emulator);
+ }
+ if (c->play) {
+ tl_emulate_timer(c->playc->timer, c->emulator);
+ }
+ if (c->save) {
+ tl_emulate_timer(c->savec->timer, c->emulator);
+ tl_emulate_timer(c->savec->synctimer, c->emulator);
+ }
+}
+
+static void uih_unemulatetimers(uih_context * c)
+{
+ tl_unemulate_timer(c->maintimer);
+ tl_unemulate_timer(c->doittimer);
+ if (c->autopilot)
+ tl_unemulate_timer(c->autopilottimer);
+ if (c->cycling)
+ tl_unemulate_timer(c->cyclingtimer);
+ if (c->play) {
+ tl_unemulate_timer(c->playc->timer);
+ }
+ if (c->save) {
+ tl_unemulate_timer(c->savec->timer);
+ tl_unemulate_timer(c->savec->synctimer);
+ }
+}
+
+void uih_constantframetime(uih_context * c, int time)
+{
+ if (c->emulator == NULL)
+ c->emulator = tl_create_emulator();
+ c->emulatedframetime = time;
+ uih_emulatetimers(c);
+}
+
+void uih_noconstantframetime(uih_context * c)
+{
+ if (c->emulator == NULL)
+ return;
+ uih_unemulatetimers(c);
+ tl_free_emulator(c->emulator);
+ c->emulator = NULL;
+}
+
+void uih_stoptimers(uih_context * c)
+{
+ if (!c->stoppedtimers) {
+ c->stoppedtimers = 1;
+ c->display = 1;
+ tl_stop_timer(c->maintimer);
+ tl_stop_timer(c->doittimer);
+ if (c->autopilot)
+ tl_stop_timer(c->autopilottimer);
+ if (c->play) {
+ tl_stop_timer(c->playc->timer);
+ if (c->cycling)
+ tl_stop_timer(c->cyclingtimer);
+ }
+ if (c->save) {
+ tl_stop_timer(c->savec->timer);
+ tl_stop_timer(c->savec->synctimer);
+ if (c->cycling)
+ tl_stop_timer(c->cyclingtimer);
+ }
+ }
+}
+
+void uih_slowdowntimers(uih_context * c, int time)
+{
+ tl_slowdown_timer(c->maintimer, time);
+ if (c->autopilot)
+ tl_slowdown_timer(c->autopilottimer, time);
+ if (c->play) {
+ tl_slowdown_timer(c->playc->timer, time);
+ if (c->cycling)
+ tl_slowdown_timer(c->cyclingtimer, time);
+ }
+ if (c->save) {
+ tl_slowdown_timer(c->savec->timer, time);
+ tl_slowdown_timer(c->savec->synctimer, time);
+ if (c->cycling)
+ tl_slowdown_timer(c->cyclingtimer, time);
+ }
+}
+
+void uih_resumetimers(uih_context * c)
+{
+ if (c->stoppedtimers) {
+ c->stoppedtimers = 0;
+ tl_resume_timer(c->maintimer);
+ if (c->cycling)
+ tl_resume_timer(c->cyclingtimer);
+ if (c->autopilot)
+ tl_resume_timer(c->autopilottimer);
+ if (c->play) {
+ tl_resume_timer(c->playc->timer);
+ }
+ if (c->save) {
+ tl_resume_timer(c->savec->timer);
+ tl_resume_timer(c->savec->synctimer);
+ }
+ }
+}
+
+/*autopilot implementation */
+
+static void uih_changed(void)
+{
+ uih_newimage(uih);
+}
+
+static void uih_autopilothandler(void *uih1, int n)
+{
+ uih = (uih_context *) uih1;
+ do_autopilot(uih, &uih->autopilotx, &uih->autopiloty,
+ &uih->autopilotbuttons, uih_changed, n);
+}
+
+static INLINE void uih_zoom(uih_context * uih)
+{
+ uih->step += uih->speedup * 2 * uih->mul;
+ if (uih->step > uih->maxstep)
+ uih->step = uih->maxstep;
+ else if (uih->step < -uih->maxstep)
+ uih->step = -uih->maxstep;
+}
+
+static INLINE void uih_unzoom(uih_context * uih)
+{
+ uih->step -= uih->speedup * 2 * uih->mul;
+ if (uih->step > uih->maxstep)
+ uih->step = uih->maxstep;
+ else if (uih->step < -uih->maxstep)
+ uih->step = -uih->maxstep;
+}
+
+static INLINE void uih_slowdown(uih_context * uih)
+{
+ if (uih->step > 0) {
+ if (uih->step < uih->speedup * uih->mul)
+ uih->step = 0;
+ else
+ uih->step -= uih->speedup * uih->mul;
+ } else if (uih->step < 0) {
+ if (uih->step > -uih->speedup * uih->mul)
+ uih->step = 0;
+ else
+ uih->step += uih->speedup * uih->mul;
+ }
+}
+
+static INLINE void uih_zoomupdate(uih_context * uih)
+{
+ number_t x;
+ number_t y;
+ number_t mmul = pow((double) (1 - uih->step), (double) uih->mul);
+ number_t mc = uih->fcontext->s.cr - uih->fcontext->s.rr / 2;
+ number_t nc = uih->fcontext->s.cr + uih->fcontext->s.rr / 2;
+ number_t mi = uih->fcontext->s.ci - uih->fcontext->s.ri / 2;
+ number_t ni = uih->fcontext->s.ci + uih->fcontext->s.ri / 2;
+ x = uih->xcenter, y = uih->ycenter;
+ mc = x + (mc - x) * (mmul);
+ nc = x + (nc - x) * (mmul);
+ mi = y + (mi - y) * (mmul);
+ ni = y + (ni - y) * (mmul);
+ uih->fcontext->s.rr = nc - mc;
+ uih->fcontext->s.ri = ni - mi;
+ uih->fcontext->s.cr = (nc + mc) / 2;
+ uih->fcontext->s.ci = (ni + mi) / 2;
+ uih_animate_image(uih);
+}
+
+
+/*main uih loop */
+
+int uih_update(uih_context * c, int mousex, int mousey, int mousebuttons)
+{
+ int inmovement = 0;
+ int slowdown = 1;
+ int time;
+ uih = c;
+
+ if (!mousebuttons && uih->lastbuttons)
+ uih_saveundo(c);
+ uih->lastbuttons = mousebuttons;
+ if (c->incalculation)
+ return 0;
+ if (c->emulator != NULL)
+ tl_elpased(c->emulator, c->emulatedframetime);
+
+ if (mousebuttons == (BUTTON1 | BUTTON3))
+ mousebuttons = BUTTON2;
+ tl_process_group(syncgroup, NULL); /*First we need to update timming */
+ tl_update_time();
+ time = tl_lookup_timer(c->maintimer);
+ if (c->autopilot) { /*now handle autopilot */
+ tl_process_group(c->autopilotgroup, NULL);
+ }
+ if (!c->inanimation)
+ time = 0;
+ if (time > 2000000) {
+ uih_slowdowntimers(uih, time - 2000000);
+ time = 2000000;
+ }
+ if (c->inanimation)
+ c->inanimation--;
+ tl_reset_timer(c->maintimer);
+ c->mul = (double) time / FRAMETIME;
+ if (c->fixedstep)
+ c->mul = 0.3;
+ if (c->tbreak)
+ c->mul = 1, c->tbreak--;
+ if (c->mul == 0)
+ c->mul = 0.00000001;
+ if (c->play) {
+ uih_playupdate(c);
+ if (!c->play) {
+ c->inanimation = 2;
+ return 1;
+ }
+ if (c->playc->lines.morphing) /*inmovement=1, c->display=1; */
+ uih_update_lines(c);
+ if (c->step)
+ uih_zoomupdate(c), inmovement = 1;
+ switch (c->zoomactive) {
+ case 1:
+ uih_zoom(c), inmovement = 1;
+ break;
+ case -1:
+ uih_unzoom(c), inmovement = 1;
+ break;
+ default:
+ uih_slowdown(c);
+ }
+ if (c->playc->morph) {
+ int timer =
+ tl_lookup_timer(c->playc->timer) - c->playc->starttime;
+ number_t mmul = /*(tl_lookup_timer (c->playc->timer) - c->playc->starttime) / (number_t) (c->playc->frametime - c->playc->starttime); */
+ MORPHVALUE(timer,
+ c->playc->frametime - c->playc->starttime,
+ c->playc->morphtimes[0],
+ c->playc->morphtimes[1]);
+ number_t srr, drr;
+ number_t mmul1;
+ if (c->playc->source.rr * c->fcontext->windowwidth >
+ c->playc->source.ri * c->fcontext->windowheight)
+ srr = c->playc->source.rr;
+ else
+ srr = c->playc->source.ri;
+ if (c->playc->destination.rr * c->fcontext->windowwidth >
+ c->playc->destination.ri * c->fcontext->windowheight)
+ drr = c->playc->destination.rr;
+ else
+ drr = c->playc->destination.ri;
+ if (srr == drr)
+ mmul1 = mmul;
+ else
+ mmul1 =
+ (exp(log(srr) + ((log(drr) - log(srr)) * mmul)) -
+ srr) / (drr - srr);
+ if (mmul1 > 1)
+ mmul1 = 1;
+ if (mmul1 < 0)
+ mmul1 = 0;
+ inmovement = 1;
+ c->fcontext->s.rr =
+ c->playc->source.rr + (c->playc->destination.rr -
+ c->playc->source.rr) * mmul1;
+ c->fcontext->s.ri =
+ c->playc->source.ri + (c->playc->destination.ri -
+ c->playc->source.ri) * mmul1;
+ c->fcontext->s.cr =
+ c->playc->source.cr + (c->playc->destination.cr -
+ c->playc->source.cr) * mmul1;
+ c->fcontext->s.ci =
+ c->playc->source.ci + (c->playc->destination.ci -
+ c->playc->source.ci) * mmul1;
+ uih_animate_image(c);
+ }
+ if (c->playc->morphjulia) {
+ int timer =
+ tl_lookup_timer(c->playc->timer) - c->playc->starttime;
+ number_t mmul = /*(tl_lookup_timer (c->playc->timer) - c->playc->starttime) / (number_t) (c->playc->frametime - c->playc->starttime); */
+ MORPHVALUE(timer,
+ c->playc->frametime - c->playc->starttime,
+ c->playc->morphjuliatimes[0],
+ c->playc->morphjuliatimes[1]);
+ uih_setjuliaseed(uih,
+ c->playc->sr + (c->playc->dr -
+ c->playc->sr) * mmul,
+ c->fcontext->pim =
+ c->playc->si + (c->playc->di -
+ c->playc->si) * mmul);
+ inmovement = 1;
+ }
+ if (c->playc->morphangle) {
+ int timer =
+ tl_lookup_timer(c->playc->timer) - c->playc->starttime;
+ number_t mmul = /*(tl_lookup_timer (c->playc->timer) - c->playc->starttime) / (number_t) (c->playc->frametime - c->playc->starttime); */
+ MORPHVALUE(timer,
+ c->playc->frametime - c->playc->starttime,
+ c->playc->morphangletimes[0],
+ c->playc->morphangletimes[1]);
+ uih_angle(uih,
+ c->playc->srcangle + (c->playc->destangle -
+ c->playc->srcangle) * mmul);
+ inmovement = 1;
+ }
+ } else {
+ if (!c->juliamode) {
+ if (c->autopilot) { /*now handle autopilot */
+ mousex = c->autopilotx;
+ mousey = c->autopiloty;
+ mousebuttons = c->autopilotbuttons;
+ inmovement = 1;
+ }
+ if (c->step) {
+ number_t x;
+ number_t y;
+ if (mousex != c->xcenterm || mousey != c->ycenterm) {
+ c->xcenterm = mousex;
+ c->ycenterm = mousey;
+ uih_getcoord(uih, mousex, mousey, &x, &y);
+ c->xcenter = x;
+ c->ycenter = y;
+ }
+ uih_zoomupdate(c), inmovement = 1;
+ }
+ c->zoomactive = 0;
+ if (c->rotatemode != ROTATE_MOUSE)
+ switch (mousebuttons) { /*process buttons */
+ case BUTTON1:
+ c->zoomactive = 1;
+ inmovement = 1;
+ break;
+ case BUTTON3:
+ c->zoomactive = -1;
+ inmovement = 1;
+ break;
+ }
+ uih_saveframe(c);
+ if (c->rotatemode != ROTATE_MOUSE) {
+ c->rotatepressed = 0;
+ switch (mousebuttons) { /*process buttons */
+ case BUTTON1:
+ uih_zoom(c), slowdown = 0;
+ break;
+ case BUTTON3:
+ uih_unzoom(c), slowdown = 0;
+ break;
+ case BUTTON2:
+ {
+ number_t x, y;
+ uih_getcoord(uih, mousex, mousey, &x, &y);
+ if (c->pressed && (c->oldx != x || c->oldy != y)) {
+ c->fcontext->s.cr -= x - c->oldx;
+ c->fcontext->s.ci -= y - c->oldy;
+ uih_animate_image(c);
+ c->moved = 1;
+ }
+ c->pressed = 1;
+ c->speed = 0;
+ update_view(c->fcontext);
+ uih_getcoord(uih, mousex, mousey, &c->oldx,
+ &c->oldy);
+ }
+ break;
+ }
+ } else {
+ if (mousebuttons & BUTTON1) {
+ number_t x, y;
+ number_t angle;
+
+ x = (mousex -
+ c->image->width / 2) * c->image->pixelwidth;
+ y = (mousey -
+ c->image->height / 2) * c->image->pixelheight;
+ angle = -atan2(x, y) * 180 / M_PI;
+ if (c->rotatepressed) {
+ uih_angle(uih,
+ c->fcontext->angle + angle -
+ c->oldangle);
+ }
+ c->rotatepressed = 1;
+ c->oldangle = angle;
+ } else
+ c->rotatepressed = 0;
+ }
+ if (!(mousebuttons & BUTTON2))
+ c->pressed = 0;
+ if (slowdown)
+ uih_slowdown(c);
+ } else {
+ if (mousebuttons & BUTTON1) {
+ number_t x, x1 = c->fcontext->pre;
+ number_t y, y1 = c->fcontext->pim;
+ c->zoomactive = 0;
+ uih_getcoord(uih, mousex, mousey, &x, &y);
+ c->fcontext->pre = x;
+ c->fcontext->pim = y;
+ uih_saveframe(c);
+ c->pressed = 1;
+ recalculate(c->fcontext->plane, &c->fcontext->pre,
+ &c->fcontext->pim);
+ if (c->fcontext->pre != x1 || c->fcontext->pim != y1) {
+ uih_animate_image(c);
+ }
+ } else
+ c->pressed = 0;
+ }
+ }
+ if (!inmovement)
+ uih_tbreak(c);
+ if (c->uncomplette)
+ inmovement = 1;
+ if (!c->recalculatemode && !c->display)
+ uih_finishpalette(c);
+ if (!inmovement)
+ uih_callcomplette(c);
+ if (c->inanimation < inmovement * 2)
+ c->inanimation = inmovement * 2;
+ return (inmovement * 2);
+}
+
+/*actions that can be used be user interface */
+
+void uih_autopilot_on(uih_context * c)
+{
+ if (!c->autopilot) {
+ clean_autopilot(c);
+ uih_autopilothandler(c, 1);
+ tl_update_time();
+ uih_resumetimers(c);
+ c->autopilottimer = tl_create_timer();
+ c->autopilotgroup = tl_create_group();
+ tl_set_multihandler(c->autopilottimer, uih_autopilothandler, c);
+ tl_set_interval(c->autopilottimer, 1000000 / 25);
+ tl_reset_timer(c->autopilottimer);
+ tl_add_timer(c->autopilotgroup, c->autopilottimer);
+ tl_update_time();
+ c->autopilot = 1;
+ uih_emulatetimers(c);
+ uih_updatemenus(c, "autopilot");
+ }
+}
+
+void uih_autopilot_off(uih_context * c)
+{
+ if (c->autopilot) {
+ tl_remove_timer(c->autopilottimer);
+ tl_free_timer(c->autopilottimer);
+ tl_free_group(c->autopilotgroup);
+ c->autopilot = 0;
+ uih_updatemenus(c, "autopilot");
+ }
+}
+
+void uih_mkdefaultpalette(uih_context * c)
+{
+ if (c->zengine->fractalc->palette == NULL)
+ return;
+ uih_cycling_stop(c);
+ if (mkdefaultpalette(c->zengine->fractalc->palette) != 0) {
+ uih_newimage(c);
+ }
+ uih_palettechg(c);
+ c->paletteshift = 0;
+ c->manualpaletteshift = 0;
+ c->palettechanged = 1;
+ c->palettetype = 0;
+ uih_finishpalette(c);
+ uih_cycling_continue(c);
+}
+
+void uih_mkpalette(uih_context * c)
+{
+ int seed;
+ int alg = rand() % PALGORITHMS;
+ if (c->zengine->fractalc->palette == NULL)
+ return;
+ uih_cycling_stop(c);
+ if (mkpalette(c->zengine->fractalc->palette, seed = rand(), alg) != 0) {
+ uih_newimage(c);
+ }
+ uih_palettechg(c);
+ c->paletteshift = 0;
+ c->manualpaletteshift = 0;
+ c->paletteseed = seed;
+ uih_finishpalette(c);
+ c->palettechanged = 1;
+ c->palettetype = alg + 1;
+ uih_cycling_continue(c);
+}
+
+/*Basic inicialization routines */
+
+static void uih_alloctables(uih_context * c)
+{
+ c->zengine = zoom_filter.getinstance(&zoom_filter);
+ if (c->zengine == NULL)
+ return;
+ c->fcontext =
+ make_fractalc(0, c->image->pixelwidth * c->image->width,
+ c->image->pixelheight * c->image->height);
+ uih_updatemenus(c, "periodicity") uih_updatemenus(c, "in0")
+ uih_updatemenus(c, "int0") uih_updatemenus(c,
+ "out0")
+ uih_updatemenus(c, "outt0")
+ uih_updatemenus(c, "plane0") uih_updatemenus(c, "guess3") uih = c;
+ c->uifilter = uih_filter.getinstance(&uih_filter);
+ c->queue = create_queue(c->uifilter);
+ insertfilter(c->zengine, c->uifilter);
+}
+
+static int uih_initqueue(uih_context * c)
+{
+ return (initqueue(c->queue));
+}
+
+void uih_setmaxstep(uih_context * c, number_t p)
+{
+ c->maxstep = p;
+}
+
+void uih_setspeedup(uih_context * c, number_t p)
+{
+ c->speedup = p;
+}
+
+void uih_setmaxiter(uih_context * c, int maxiter)
+{
+ if (maxiter < 1)
+ maxiter = 1;
+ if (maxiter > 2000000)
+ maxiter = 2000000;
+ if (c->fcontext->maxiter != (unsigned int) maxiter) {
+ c->fcontext->maxiter = maxiter;
+ c->fcontext->version++;
+ uih_newimage(c);
+ }
+}
+
+void uih_setbailout(uih_context * c, number_t bailout)
+{
+ if (bailout < 0)
+ bailout = 0;
+ if (c->fcontext->bailout != (number_t) bailout) {
+ c->fcontext->bailout = bailout;
+ c->fcontext->version++;
+ uih_newimage(c);
+ }
+}
+
+void uih_setincoloringmode(uih_context * c, int mode)
+{
+ if (mode < 0)
+ mode = rand() % INCOLORING;
+ if (mode > INCOLORING)
+ mode = INCOLORING;
+ if (c->fcontext->incoloringmode != mode) {
+ char str[10];
+ c->fcontext->incoloringmode = mode;
+ c->fcontext->version++;
+ uih_newimage(c);
+ sprintf(str, "in%i", mode);
+ uih_updatemenus(c, str);
+ }
+}
+
+void uih_setintcolor(uih_context * c, int mode)
+{
+ if (mode < 0)
+ mode = rand() % TCOLOR;
+ if (mode > TCOLOR)
+ mode = TCOLOR;
+ if (c->fcontext->intcolor != mode) {
+ char str[10];
+ c->fcontext->intcolor = mode;
+ if (c->fcontext->incoloringmode == 10) {
+ c->fcontext->version++;
+ uih_newimage(c);
+ }
+ sprintf(str, "int%i", mode);
+ uih_updatemenus(c, str);
+ }
+}
+
+void uih_setouttcolor(uih_context * c, int mode)
+{
+ if (mode < 0)
+ mode = rand() % TCOLOR;
+ if (mode > TCOLOR)
+ mode = TCOLOR;
+ if (c->fcontext->outtcolor != mode) {
+ char str[10];
+ c->fcontext->outtcolor = mode;
+ if (c->fcontext->coloringmode == 10) {
+ c->fcontext->version++;
+ uih_newimage(c);
+ }
+ sprintf(str, "outt%i", mode);
+ uih_updatemenus(c, str);
+ }
+}
+
+void uih_setperbutation(uih_context * c, number_t zre, number_t zim)
+{
+ if (c->fcontext->bre != zre || c->fcontext->bim != zim) {
+ c->fcontext->bre = zre;
+ c->fcontext->bim = zim;
+ if (c->fcontext->mandelbrot) {
+ c->fcontext->version++;
+ uih_newimage(c);
+ }
+ uih_updatemenus(c, "uiperturbation");
+ }
+}
+
+void uih_perbutation(uih_context * c, int mousex, int mousey)
+{
+ number_t r, i;
+ uih_getcoord(c, mousex, mousey, &r, &i);
+ uih_setperbutation(c, r, i);
+}
+
+void uih_setjuliaseed(uih_context * c, number_t zre, number_t zim)
+{
+ if (c->fcontext->pre != zre || c->fcontext->pim != zim) {
+ c->fcontext->pre = zre;
+ c->fcontext->pim = zim;
+ if (c->juliamode) {
+ uih_animate_image(c);
+ } else {
+ if (!c->fcontext->mandelbrot) {
+ c->fcontext->version++;
+ if (c->playc && c->playc->morphjulia)
+ uih_animate_image(c);
+ else
+ uih_newimage(c);
+ }
+ }
+ }
+}
+
+void uih_setfastmode(uih_context * c, int mode)
+{
+ CONST char *names[] = {
+ "nodynamic",
+ "nodynamic",
+ "dynamicanimation",
+ "dynamicnew",
+ "dynamicnew"
+ };
+ if (mode < 0)
+ mode = 0;
+ c->fastmode = mode;
+ uih_updatemenus(c, names[mode]);
+}
+
+void uih_setoutcoloringmode(uih_context * c, int mode)
+{
+ if (mode < 0)
+ mode = rand() % OUTCOLORING;
+ if (mode > OUTCOLORING)
+ mode = OUTCOLORING - 1;
+ if (c->fcontext->coloringmode != mode) {
+ char str[10];
+ c->fcontext->coloringmode = mode;
+ c->fcontext->version++;
+ uih_newimage(c);
+ sprintf(str, "out%i", mode);
+ uih_updatemenus(c, str);
+ }
+}
+
+void uih_setplane(uih_context * c, int mode)
+{
+ int i;
+
+ if (mode < 0)
+ mode = 0;
+ for (i = 0; planename[i] != NULL; i++);
+ if (mode >= i)
+ mode = i - 1;
+ if (mode < 0)
+ mode = rand() % i;
+ uih_invalidatepos(c);
+ if (c->fcontext->plane != mode) {
+ char str[10];
+ c->fcontext->plane = mode;
+ //if ( c->fcontext->plane == P_USER )
+ //printf("USER NOT IMPLEMENTED");
+ //uih_sffein( c, "z^3-c" )
+ c->fcontext->version++;
+ uih_newimage(c);
+ sprintf(str, "plane%i", mode);
+ uih_updatemenus(c, str);
+ }
+}
+
+void
+uih_screentofractalcoord(uih_context * c, int mousex, int mousey,
+ number_t * re, number_t * im)
+{
+ uih_getcoord(c, mousex, mousey, re, im);
+ recalculate(c->fcontext->plane, re, im);
+}
+
+void uih_setmandelbrot(uih_context * c, int mode, int mousex, int mousey)
+{
+ if (mode < 0)
+ mode = 0;
+ if (mode > 1)
+ mode = 1;
+ if (c->fcontext->mandelbrot != mode) {
+ c->fcontext->mandelbrot = mode;
+ if (c->fcontext->mandelbrot == 0 && !c->juliamode) {
+ uih_getcoord(c, mousex, mousey, &c->fcontext->pre,
+ &c->fcontext->pim);
+ recalculate(c->fcontext->plane, &c->fcontext->pre,
+ &c->fcontext->pim);
+ } else
+ uih_disablejulia(c);
+ c->fcontext->version++;
+ uih_newimage(c);
+ uih_updatemenus(c, "uimandelbrot");
+ }
+}
+
+void uih_setguessing(uih_context * c, int range)
+{
+ char str[10];
+ c->fcontext->range = range;
+ if (range <= 1) {
+ uih_updatemenus(c, "noguess");
+ } else if (range > 8) {
+ uih_updatemenus(c, "guessall");
+ } else {
+ sprintf(str, "guess%i", range);
+ uih_updatemenus(c, str);
+ }
+}
+
+void uih_setperiodicity(uih_context * c, int periodicity)
+{
+ c->fcontext->periodicity = periodicity;
+ uih_updatemenus(c, "periodicity");
+}
+
+void uih_interrupt(uih_context * c)
+{
+ if (c->incalculation)
+ c->interrupt = 1;
+}
+
+void uih_stopzooming(uih_context * c)
+{
+ c->speed = 0;
+}
+
+int uih_updateimage(uih_context * c, struct image *image)
+{
+ /*exit(); */
+ c->image = image;
+ c->palette = image->palette;
+ c->queue->isinitialized = 0;
+ c->ddatalost = 1;
+ fractalc_resize_to(c->fcontext, c->image->pixelwidth * c->image->width,
+ c->image->pixelheight * c->image->height);
+ c->display = 1;
+ c->palette->ncells = sizeof(uicolors) / sizeof(rgb_t);
+ c->palette->prergb = uicolors;
+ if (c->palette->type & BITMAPS)
+ c->palette->prergb = uibwcolors;
+ c->inanimation = 2;
+ uih_newimage(c);
+ if (image->palette->type & (FIXEDCOLOR | BITMAPS))
+ uih_fixedcolorenable(c);
+ else
+ uih_fixedcolordisable(c);
+ return (uih_initqueue(c));
+}
+
+static void
+uih_getcscreensizes(struct uih_context *uih, int *x, int *y, int *w,
+ int *h, void *data)
+{
+ *x = 0;
+ *y = 0;
+ if (uih->clearscreen)
+ *w = uih->image->width, *h = uih->image->height;
+ else
+ *w = *h = 0;
+}
+
+static void uih_drawcscreen(struct uih_context *uih, void *data)
+{
+ if (uih->clearscreen)
+ clear_image(uih->image);
+}
+
+#ifdef SFFE_USING
+extern cmplx C, Z, pZ;
+#endif
+struct uih_context *globaluih;
+
+struct uih_context *uih_mkcontext(int flags, struct image *image,
+ int (*passfunc) (struct uih_context *,
+ int, CONST char *,
+ float),
+ void (*longwait) (struct uih_context *),
+ void (*upd) (struct uih_context *,
+ CONST char *))
+{
+ uih_context *uih;
+ uih = (uih_context *) calloc(sizeof(*uih), 1); /*setup parameters */
+ uih->updatemenus = upd;
+ uih->autopilot = 0;
+ uih->flags = flags;
+ uih->image = image;
+ uih->playstring = NULL;
+ uih->palette = image->palette;
+ uih->menuroot = "root";
+ uih->palette->ncells = sizeof(uicolors) / sizeof(rgb_t);
+ uih->palette->prergb = uicolors;
+ if (uih->palette->type & BITMAPS) {
+ uih->palette->prergb = uibwcolors;
+ }
+ uih->speed = 0;
+ uih->step = 0;
+ uih->color = 0;
+ uih->speedup = STEP;
+ uih->maxstep = MAXSTEP;
+ uih->lasttime = -1;
+ uih->recalculatemode = UIH_NEW_IMAGE;
+ uih->display = 1;
+ uih->fastmode = 2;
+ uih_updatemenus(uih, "dynamicanimation");
+ uih->aliasnum = -1;
+ uih->direction = 1;
+ uih->cyclingdirection = 1;
+ uih->cyclingspeed = ROTATIONSPEED;
+ uih->ddatalost = 1;
+ uih->xtextpos = 1;
+ uih_updatemenus(uih, "xtextleft");
+ uih->complettehandler = 0;
+ uih->ytextpos = 1;
+ uih_updatemenus(uih, "ytextup");
+ uih->display = 0;
+ uih->errstring = NULL;
+ uih->rotatemode = 0;
+ uih_updatemenus(uih, "norotate");
+ uih->rotationspeed = 10;
+ uih->longwait = longwait;
+ uih->passfunc = passfunc;
+ uih->nletters = 0;
+ uih->letterspersec = 15;
+ uih->maintimer = tl_create_timer();
+ uih->calculatetimer = tl_create_timer();
+ uih->doittimer = tl_create_timer();
+#ifdef SFFE_USING
+ uih->pinit = NULL;
+ uih->parser = sffe_alloc();
+ /* uih->cparser = sffe_alloc(); */
+ sffe_regvar(&uih->parser, &pZ, 'p');
+ sffe_regvar(&uih->parser, &Z, 'z');
+ sffe_regvar(&uih->parser, &C, 'c');
+ /* sffe_regvar( &uih->cparser, &C, */
+#endif
+ /* 25.I.2009, Bugfix #2507911, malczak
+ * initilize globaluih here, not in 'ui.c'
+ */
+ globaluih = uih;
+
+ tl_update_time();
+ tl_reset_timer(uih->maintimer);
+ tl_reset_timer(uih->calculatetimer);
+ tl_stop_timer(uih->doittimer);
+ tl_reset_timer(uih->doittimer);
+ uih_alloctables(uih);
+ uih_initqueue(uih); /*FIXME return value should not be ignored */
+ if (image->palette->type & (FIXEDCOLOR | BITMAPS))
+ uih_fixedcolorenable(uih);
+ uih_mkdefaultpalette(uih);
+ uih_stoptimers(uih);
+ clean_autopilot(uih);
+ uih_newimage(uih);
+ uih->cscreenwindow =
+ uih_registerw(uih, uih_getcscreensizes, uih_drawcscreen, 0,
+ NONTRANSPARENTW);
+ uih_initmessages(uih);
+ uih_inittext(uih);
+ uih_emulatetimers(uih);
+ uih_setformula(uih, 0);
+ uih_saveundo(uih);
+ return (uih);
+}
+
+void uih_savepalette(uih_context * c)
+{
+ if (c->palette2 != NULL)
+ destroypalette(c->palette2);
+ if (c->zengine->fractalc->palette != NULL)
+ c->palette2 = clonepalette(c->zengine->fractalc->palette);
+}
+
+void uih_restorepalette(uih_context * uih)
+{
+ if (uih->palette2 != NULL) {
+ if (uih->zengine->fractalc->palette != NULL)
+ restorepalette(uih->zengine->fractalc->palette, uih->palette2);
+ destroypalette(uih->palette2);
+ }
+ uih->palette2 = NULL;
+ uih_finishpalette(uih);
+}
+
+void uih_loadpalette(uih_context * c, struct palette *palette)
+{
+ if (c->palette2)
+ destroypalette(c->palette2);
+ c->palette2 = clonepalette(palette);
+ uih_restorepalette(c);
+ uih_palettechg(c);
+}
+
+struct palette *uih_clonepalette(uih_context * c)
+{
+ if (c->zengine->fractalc->palette != NULL)
+ return clonepalette(c->zengine->fractalc->palette);
+ // I hope this is OK:
+ return NULL;
+}
+
+void uih_setformula(uih_context * c, int num)
+{
+ set_formula(c->fcontext, num);
+ uih_newimage(c);
+ uih_updatemenus(c, "uimandelbrot");
+ uih_updatemenus(c, "uiperturbation");
+ uih_updatemenus(c, c->fcontext->currentformula->shortname);
+}
+
+void uih_initstate(struct uih_context *uih)
+{
+ int i;
+ int ver = uih->fcontext->version;
+ uih->step = 0;
+ uih->speedup = STEP;
+ uih->maxstep = MAXSTEP;
+ uih_fastrotatedisable(uih);
+ uih_disablejulia(uih);
+ uih->color = 0;
+ uih_cycling_off(uih);
+ for (i = 0; i < uih_nfilters; i++)
+ uih_disablefilter(uih, i);
+ uih_setperbutation(uih, 0, 0);
+ set_formula(uih->fcontext, 0);
+ uih_setperiodicity(uih, 1);
+ uih_setmaxiter(uih, 170);
+ uih_setbailout(uih, 4);
+ uih_setincoloringmode(uih, 0);
+ uih_setoutcoloringmode(uih, 0);
+ uih_setcycling(uih, 30);
+ uih_display(uih);
+ uih_setfastmode(uih, 2);
+ uih_setintcolor(uih, 0);
+ uih_setouttcolor(uih, 0);
+ uih_setplane(uih, 0);
+ uih_setguessing(uih, 3);
+ uih_angle(uih, 0);
+ uih_rotatemode(uih, 0);
+ uih_rotationspeed(uih, 10);
+ uih->xtextpos = 1;
+ uih->ytextpos = 1;
+ if (uih->playc) {
+ uih->playc->morphtimes[0] = 0;
+ uih->playc->morphtimes[1] = 0;
+ uih->playc->morphjuliatimes[0] = 0;
+ uih->playc->morphjuliatimes[1] = 0;
+ uih->playc->morphangletimes[0] = 0;
+ uih->playc->morphangletimes[1] = 0;
+ uih->playc->morphlinetimes[0] = 0;
+ uih->playc->morphlinetimes[1] = 0;
+ }
+ if (mkdefaultpalette(uih->zengine->fractalc->palette) != 0
+ || uih->recalculatemode || uih->fcontext->version != ver) {
+ uih_newimage(uih);
+ }
+}
+
+
+void uih_freecontext(uih_context * c)
+{
+ struct filter *f;
+ int i;
+#ifdef SFFE_USING
+ /* sffe_free(&c->cparser); */
+ sffe_free(&c->parser);
+ if (c->pinit)
+ sffe_free(&c->pinit);
+#endif
+ if (c->emulator != NULL)
+ uih_noconstantframetime(c);
+ for (i = 0; i < UNDOLEVEL; i++)
+ if (c->undo.undos[i])
+ free(c->undo.undos[i]), c->undo.undos[i] = 0;
+ while (c->queue->first) {
+ f = c->queue->first;
+ removefilter(c->queue->first);
+ f->action->destroyinstance(f);
+ }
+ uih_destroymessages(c);
+ uih_destroytext(c);
+ uih_removew(c, c->cscreenwindow);
+ free(c->queue);
+ free_fractalc(c->fcontext);
+ free(c);
+}
+
+static struct filter *uih_getinstance(CONST struct filteraction *a)
+{
+ struct filter *f = createfilter(a);
+ f->data = uih;
+ f->name = "XaoS's user interface layer";
+ return (f);
+}
+
+static void uih_destroyinstance(struct filter *f)
+{
+ struct uih_context *c = (struct uih_context *) f->data;
+ if (c->autopilot)
+ uih_autopilot_off(c);
+ if (c->cycling)
+ uih_cycling_off(c);
+ tl_free_timer(c->maintimer);
+ tl_free_timer(c->calculatetimer);
+ tl_free_timer(c->doittimer);
+ if (c->save)
+ uih_save_disable(c);
+ if (c->play)
+ uih_replaydisable(c);
+ free(f);
+}
+
+static int wascycling;
+static int uih_require(struct filter *f, struct requirements *r)
+{
+ struct uih_context *uih;
+ uih = (struct uih_context *) f->data;
+ f->req = *r;
+ uih_clearwindows(uih);
+ if (uih->cycling)
+ uih_cycling_off(uih), wascycling = 1;
+ if (!(r->supportedmask & uih->image->palette->type))
+ return 0;
+ /*FIXME something should be done here :) */
+ return (1);
+}
+
+static int uih_initialize(struct filter *f, struct initdata *i)
+{
+ struct uih_context *uih;
+ int returnval;
+ uih = (struct uih_context *) f->data;
+ f->queue->saveimage = uih->image;
+ i->fractalc = uih->fcontext;
+ uih_setfont(uih);
+ tl_update_time();
+ f->image = uih->image;
+ f->wait_function = uih_waitfunc;
+ uih->times[0][0] = -1;
+ i->image = uih->image;
+ f->fractalc = i->fractalc;
+ f->image->palette->flags |= FINISHLATER;
+ i->fractalc->palette = uih->image->palette;
+ i->wait_function = uih_waitfunc;
+ /*FIXME datalost should be handled in better way */
+ if (uih->ddatalost)
+ i->flags |= DATALOST;
+ uih->tbreak = 2;
+ uih_invalidatepos(uih);
+ clean_autopilot(uih);
+ returnval = f->previous->action->initialize(f->previous, i);
+ if (wascycling)
+ uih_cycling_on(uih), wascycling = 0;
+ return returnval;
+}
+
+void uih_inhibittextsw(uih_context * c)
+{
+ c->inhibittextoutput ^= 1;
+ uih_updatemenus(c, "inhibittextoutput");
+}
+
+int uih_inhibittextselected(uih_context * c)
+{
+ if (c == NULL)
+ return 0;
+ return c->inhibittextoutput;
+}
diff --git a/src/ui-hlp/wstack.c b/src/ui-hlp/wstack.c
new file mode 100644
index 0000000..cfabab1
--- /dev/null
+++ b/src/ui-hlp/wstack.c
@@ -0,0 +1,528 @@
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#else
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#endif
+#include <fconfig.h>
+#include <filter.h>
+#include <ui_helper.h>
+#include <archaccel.h>
+#include "grlib.h"
+
+/* This is quite simple and ugly implementation of windows.
+ * it redraws all windows every frame and removes them before calculation
+ * it should be OK for small windows (like texts) used by ui_helper
+ * I plan to abuse it in ugly interface too, in case it will be fast enought
+ */
+
+static void
+uih_darkrectangle(struct image *image, int x, int y, int width, int height)
+{
+
+ int mask = 0;
+ unsigned int *current, *end;
+ if (x + width < 0 || y + height < 0 || y >= image->height
+ || x >= image->width)
+ return;
+ if (x + width >= image->width)
+ width = image->width - x;
+ if (x < 0)
+ width += x, x = 0;
+ if (width <= 0)
+ return;
+ if (y + height >= image->height)
+ height = image->height - y;
+ if (y < 0)
+ height += y, y = 0;
+ if (height <= 0)
+ return;
+ assert(x >= 0 && y >= 00 && width > 0 && height > 0
+ && x + width <= image->width && y + height <= image->height);
+ if (image->bytesperpixel == 2) {
+ int x1 = x / 2;
+ width = (x + width + 1) / 2 - x1;
+ x = x1;
+ }
+ if (image->bytesperpixel == 3) {
+ int x1 = x * 3 / 4;
+ width = (x + width + 2) * 3 / 4 - x1;
+ x = x1;
+ }
+ switch (image->palette->type) {
+ case TRUECOLOR:
+ case TRUECOLOR24:
+ mask =
+ ~((1 <<
+ (image->palette->info.truec.rshift + 7 -
+ image->palette->info.truec.rprec)) | (1 << (image->
+ palette->info.
+ truec.gshift +
+ 7 -
+ image->
+ palette->info.
+ truec.
+ gprec)) | (1 <<
+ (image->
+ palette->
+ info.
+ truec.
+ bshift
+ +
+ 7 -
+ image->
+ palette->
+ info.
+ truec.
+ bprec)));
+ break;
+ case TRUECOLOR16:
+ mask =
+ ((1 <<
+ (image->palette->info.truec.rshift + 7 -
+ image->palette->info.truec.rprec)) | (1 << (image->
+ palette->info.
+ truec.gshift +
+ 7 -
+ image->
+ palette->info.
+ truec.
+ gprec)) | (1 <<
+ (image->palette->info.truec.bshift
+ +
+ 7 -
+ image->palette->info.truec.bprec)));
+ mask = ~(mask | (mask << 16));
+ break;
+ }
+ height += y;
+ while (y < height) {
+ current = ((unsigned int *) image->currlines[y]) + x;
+ end = current + width;
+ while (current < end)
+ *current = (*current >> 1) & mask, current++;
+ y++;
+ }
+
+}
+
+void
+uih_drawborder(struct uih_context *uih, int x, int y, int width,
+ int height, int flags)
+{
+ int leftcolor;
+ int rightcolor;
+ int bgcolor;
+ if (uih->palette->type & BITMAPS) {
+ if (flags & BORDER_PRESSED) {
+ bgcolor = FGCOLOR(uih);
+ rightcolor = BGCOLOR(uih);
+ leftcolor = BGCOLOR(uih);
+ } else {
+ bgcolor = BGCOLOR(uih);
+ rightcolor = FGCOLOR(uih);
+ leftcolor = FGCOLOR(uih);
+ }
+ } else {
+ if (flags & BORDER_LIGHT) {
+ bgcolor = LIGHTGRAYCOLOR(uih);
+ rightcolor = BGCOLOR(uih);
+ leftcolor = LIGHTGRAYCOLOR2(uih);
+ } else {
+ bgcolor = DARKGRAYCOLOR(uih);
+ rightcolor = BGCOLOR(uih);
+ leftcolor = LIGHTGRAYCOLOR(uih);
+ }
+ if (flags & BORDER_PRESSED) {
+ int i = leftcolor;
+ leftcolor = rightcolor;
+ rightcolor = i;
+ }
+ if (uih->image->flags & AAIMAGE)
+ bgcolor = BGCOLOR(uih);
+ }
+ if (uih->image->bytesperpixel > 1 && (flags & BORDER_TRANSPARENT))
+ uih_darkrectangle(uih->image, x + 1, y + 1, width - 2,
+ height - 2) /*, leftcolor = GRAYCOLOR (uih) */ ;
+ else {
+ xrectangle(uih->image, x + 1, y + 1, width - 2, height - 2,
+ bgcolor);
+ }
+ xhline(uih->image, x, y, width - 1, leftcolor);
+ xhline(uih->image, x, y + height - 1, width - 1, rightcolor);
+ xvline(uih->image, x, y, height - 1, leftcolor);
+ xvline(uih->image, x + width - 1, y, height - 1, rightcolor);
+}
+
+struct uih_window *uih_registerw(struct uih_context *uih, uih_getposfunc
+ getpos, uih_drawfunc draw, void *data,
+ int flags)
+{
+ struct uih_window *w =
+ (struct uih_window *) calloc(1, sizeof(struct uih_window));
+ struct uih_window *w1;
+ assert(uih != NULL && getpos != NULL && draw != NULL && flags >= 0);
+ if (w == NULL)
+ return NULL;
+ uih_clearwindows(uih);
+ w1 = uih->wtop;
+ w->getpos = getpos;
+ w->draw = draw;
+ w->data = data;
+ w->flags = flags;
+ w->savedline = -1;
+ w->saveddata = NULL;
+ w->flags |= BORDER_TRANSPARENT | BORDER_PRESSED | BORDER_LIGHT;
+ w->next = NULL;
+ if (w1 == NULL) {
+ uih->wtop = w;
+ } else {
+ while (w1->next != NULL)
+ w1 = w1->next;
+ w1->next = w;
+ }
+ w->previous = w1;
+ w->x = -65536;
+ return w;
+}
+
+void
+uih_setline(struct uih_context *uih, struct uih_window *w, int color,
+ int x1, int y1, int x2, int y2)
+{
+ if (w->savedline != color || w->x != x1 || w->y != y1
+ || w->width != x2 - x1 || w->height != y2 - y1) {
+ uih_clearwindows(uih);
+ uih->display = 1;
+ w->savedline = color;
+ w->x = x1;
+ w->y = y1;
+ w->width = x2 - x1;
+ w->height = y2 - y1;
+ }
+}
+
+struct uih_window *uih_registerline(struct uih_context *uih, int color,
+ int x1, int y1, int x2, int y2)
+{
+ struct uih_window *w =
+ (struct uih_window *) calloc(1, sizeof(struct uih_window));
+ struct uih_window *w1;
+ if (w == NULL)
+ return NULL;
+ uih_clearwindows(uih);
+ w1 = uih->wtop;
+ uih->display = 1;
+ w->getpos = NULL;
+ w->savedline = color;
+ w->flags = 0;
+ w->x = x1;
+ w->y = y1;
+ w->width = x2 - x1;
+ w->height = y2 - y1;
+ w->saveddata = NULL;
+ w->next = NULL;
+ if (w1 == NULL) {
+ uih->wtop = w;
+ } else {
+ while (w1->next != NULL)
+ w1 = w1->next;
+ w1->next = w;
+ }
+ w->previous = w1;
+ return w;
+}
+
+void uih_removew(struct uih_context *uih, struct uih_window *w)
+{
+ uih_clearwindows(uih);
+ assert(uih->wtop != NULL);
+ assert(w != NULL);
+ uih->display = 1;
+
+ if (w->previous == NULL) {
+ assert(uih->wtop == w);
+ uih->wtop = w->next;
+ } else {
+ w->previous->next = w->next;
+ }
+ if (w->next != NULL) {
+ w->next->previous = w->previous;
+ }
+ free(w);
+}
+
+/*Remove all drawed windows from screen */
+void uih_clearwindows(struct uih_context *uih)
+{
+ struct uih_window *w = uih->wtop;
+ int savedline = 0;
+ int savedpos = 0;
+ int destwidth = uih->image->width * uih->image->bytesperpixel;
+ if (!uih->wdisplayed)
+ return;
+ if (!uih->image->bytesperpixel) {
+ destwidth = (w->x + uih->image->width + 7) / 8;
+ }
+ uih->wdisplayed = 0;
+ if (uih->wflipped)
+ uih->image->flip(uih->image), uih->wflipped = 0;
+ while (w) {
+ if (w->getpos == NULL) {
+ if (w->saveddata != NULL) {
+ xrestoreline(uih->image, w->saveddata, w->x, w->y,
+ w->width + w->x, w->height + w->y);
+ free(w->saveddata);
+ w->saveddata = NULL;
+ }
+ } else {
+ if (w->savedline != -1 || w->saveddata != NULL) {
+ int i;
+ int xskip = w->x * uih->image->bytesperpixel;
+ int width = w->width * uih->image->bytesperpixel;
+ if (!uih->image->bytesperpixel) {
+ xskip = w->x / 8;
+ width = (w->x + w->width + 7) / 8 - xskip;
+ }
+ assert(w->width);
+ assert(w->height);
+ assert(w->x >= 0);
+ assert(w->y >= 0);
+ assert(w->x + w->width <= uih->image->width);
+ assert(w->y + w->height <= uih->image->height);
+ if (w->savedline != -1) {
+ savedline = w->savedline;
+ savedpos = w->savedpos;
+ for (i = w->y; i < w->y + w->height; i++) {
+ unsigned char *data =
+ uih->image->currlines[i] + xskip;
+ assert(savedline < uih->image->height);
+ assert(savedline >= 0);
+ assert(savedpos >= 0 && savedpos <= destwidth);
+ if (width + savedpos > destwidth) {
+ int width1;
+ memcpy(data,
+ uih->image->oldlines[savedline] +
+ savedpos, destwidth - savedpos);
+ savedline++;
+ width1 = width - destwidth + savedpos;
+ memcpy(data + (destwidth - savedpos),
+ uih->image->oldlines[savedline],
+ width1);
+ savedpos = width1;
+ } else
+ memcpy(data,
+ uih->image->oldlines[savedline] +
+ savedpos, width), savedpos += width;
+ }
+ w->savedline = -1;
+ } else {
+ assert(w->saveddata);
+ for (i = w->y; i < w->y + w->height; i++) {
+ unsigned char *data =
+ uih->image->currlines[i] + xskip;
+ memcpy(data, w->saveddata + (i - w->y) * width,
+ width);
+ }
+ free(w->saveddata);
+ w->saveddata = NULL;
+ }
+ }
+ }
+ w = w->next;
+ }
+}
+
+void uih_drawwindows(struct uih_context *uih)
+{
+ struct uih_window *w = uih->wtop;
+ struct image *img = uih->image;
+ int size = 0;
+ int nocopy = 0;
+ int savedline = 0;
+ int savedpos = 0;
+ int destwidth = uih->image->width * uih->image->bytesperpixel;
+ if (!uih->image->bytesperpixel) {
+ destwidth = (w->x + uih->image->width + 7) / 8;
+ }
+ if (uih->wdisplayed)
+ return;
+ uih->wdisplayed = 1;
+ while (w) {
+ if (w->getpos != NULL) {
+ int test = w->x == -65536;
+ w->getpos(uih, &w->x, &w->y, &w->width, &w->height, w->data);
+ if (w->x < 0)
+ w->width -= w->x, w->x = 0;
+ if (w->y < 0)
+ w->height -= w->y, w->y = 0;
+ if (w->x > img->width)
+ w->width = 0, w->height = 0, w->x = 0;
+ if (w->y > img->height)
+ w->width = 0, w->height = 0, w->y = 0;
+ if (w->x + w->width > img->width)
+ w->width = img->width - w->x;
+ if (w->y + w->height > img->height)
+ w->height = img->height - w->y;
+ if (w->width < 0)
+ w->width = 0;
+ if (w->height < 0)
+ w->height = 0;
+ if (test) {
+ struct uih_window *w1 = uih->wtop;
+ while (w1) {
+ if (w != w1 && (w1->flags & DRAWBORDER) &&
+ ((((w1->x > w->x + 5
+ && w1->x + 5 < w->x + w->width)
+ || (w->x > w1->x + 5
+ && w->x + 5 < w1->x + w1->width))
+ &&
+ ((w1->y > w->y + 5
+ && w1->y + 5 < w->y + w->height)
+ || (w->y > w1->y + 5
+ && w->y + 5 < w1->y + w1->height)))
+ ||
+ (((w1->x + w1->width > w->x + 5
+ && w1->x + w1->width + 5 < w->x + w->width)
+ || (w->x + w->width > w1->x + 5
+ && w->x + w->width + 5 < w1->x + w1->width))
+ &&
+ ((w1->y + w1->height > w->y + 5
+ && w1->y + w1->height + 5 < w->y + w->height)
+ || (w->y + w->height > w1->y + 5
+ && w->y + w->height + 5 <
+ w1->y + w1->height))))) {
+ w->flags &= ~BORDER_TRANSPARENT;
+ break;
+ }
+ w1 = w1->next;
+ }
+ }
+ size += w->width * w->height;
+ if (w->x == 0 && w->y == 0 && w->width == img->width
+ && w->height == img->height)
+ nocopy = 1;
+ assert(w->width >= 0);
+ assert(w->height >= 0);
+ assert(w->x >= 0);
+ assert(w->y >= 0);
+ assert(w->x + w->width <= uih->image->width);
+ assert(w->y + w->height <= uih->image->height);
+ }
+ w = w->next;
+ }
+ if (size > img->width * img->height / 2) {
+ int i;
+ int width = img->width * img->bytesperpixel;
+ if (!width)
+ width = (img->width + 7) / 8;
+ uih->wflipped = 1;
+ if (!nocopy)
+ for (i = 0; i < img->height; i++)
+ memcpy(img->oldlines[i], img->currlines[i], width);
+ uih->image->flip(uih->image);
+ } else {
+ int savedminx = -1;
+ int savedmaxx = -1;
+ int savedminy = -1;
+ int savedmaxy = -1;
+ uih->wflipped = 0;
+ w = uih->wtop;
+ while (w) {
+ int i;
+ assert(w->saveddata == NULL);
+ if (w->getpos == NULL) {
+ if ((w->x < savedminx || w->y < savedminy
+ || w->x + w->width > savedmaxx
+ || w->x + w->height > savedmaxy
+ || w->x + w->width < savedminx
+ || w->y + w->height < savedminy || w->x > savedmaxx
+ || w->y > savedmaxy)) {
+ w->saveddata =
+ xsaveline(uih->image, w->x, w->y, w->width + w->x,
+ w->height + w->y);
+ }
+ } else {
+ assert(w->savedline == -1);
+ if (w->width && w->height
+ && (w->x < savedminx || w->y < savedminy
+ || w->x + w->width > savedmaxx
+ || w->y + w->height > savedmaxy)) {
+ int xskip = w->x * uih->image->bytesperpixel;
+ int width = w->width * uih->image->bytesperpixel;
+ savedminx = w->x;
+ savedminy = w->y;
+ savedmaxx = w->x + w->width;
+ savedmaxy = w->y + w->height;
+ if (!uih->image->bytesperpixel) {
+ xskip = w->x / 8;
+ width = (w->x + w->width + 7) / 8 - xskip;
+ }
+ if (uih->image->flags & PROTECTBUFFERS || 1) {
+ w->saveddata =
+ (char *) malloc(width * w->height + 1);
+ if (w->saveddata != NULL)
+ for (i = w->y; i < w->y + w->height; i++) {
+ unsigned char *data =
+ img->currlines[i] + xskip;
+ memcpy(w->saveddata + (i - w->y) * width,
+ data, width);
+ }
+
+ } else {
+ w->savedline = savedline;
+ w->savedpos = savedpos;
+ for (i = w->y; i < w->y + w->height; i++) {
+ unsigned char *data =
+ img->currlines[i] + xskip;
+ if (width + savedpos > destwidth) {
+ int width1;
+ memcpy(uih->image->oldlines[savedline] +
+ savedpos, data,
+ destwidth - savedpos);
+ savedline++;
+ width1 = width - destwidth + savedpos;
+ memcpy(uih->image->oldlines[savedline],
+ data + (destwidth - savedpos),
+ width1);
+ savedpos = width1;
+ } else
+ memcpy(uih->image->oldlines[savedline] +
+ savedpos, data, width), savedpos +=
+ width;
+ }
+ }
+ }
+ }
+ w = w->next;
+ }
+ }
+ w = uih->wtop;
+ while (w) {
+ if (w->getpos == NULL) {
+// This code unfortunately won't work for the Julia show, so
+// deactivated:
+#if 0
+ int lw = 0, lwi = 0, lwj = 0;
+ if (uih->image->width > 800 && uih->image->height > 600)
+ lw = 3;
+
+ for (; lwi <= lw; ++lwi)
+ for (; lwj <= lw; ++lwj)
+#endif
+#define lwi 0
+#define lwj 0
+ xline(uih->image, w->x + lwi, w->y + lwj,
+ w->width + w->x + lwi, w->height + w->y + lwj,
+ w->savedline);
+ } else if (w->width && w->height) {
+ if (w->flags & DRAWBORDER)
+ uih_drawborder(uih, w->x, w->y, w->width, w->height,
+ (BORDER_TRANSPARENT) & w->flags);
+ w->draw(uih, w->data);
+ }
+ w = w->next;
+ }
+}
diff --git a/src/ui/Makefile.in b/src/ui/Makefile.in
new file mode 100644
index 0000000..0db3230
--- /dev/null
+++ b/src/ui/Makefile.in
@@ -0,0 +1,51 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = \
+ drivers.c \
+ ui.c \
+ uihelp.c \
+ param.c \
+ fparams.c \
+ filesel.c \
+ uimenu.c \
+ pipecmd.c \
+ dialog.c
+
+OBJS = $(SRCS:.c=.o)
+
+TLIB = ../lib/libui.a
+
+
+all: $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $(OBJS)
+ $(RANLIB) $@
+
+keywords.c: keywords.gperf
+ gperf -t -p -D -C -a keywords.gperf > keywords.c
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/ui/dialog.c b/src/ui/dialog.c
new file mode 100644
index 0000000..d5c6aae
--- /dev/null
+++ b/src/ui/dialog.c
@@ -0,0 +1,1521 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#undef _EFENCE_
+#include <config.h>
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#include <ctype.h>
+#else
+#include <aconfig.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <math.h>
+#ifndef _MAC
+#include <sys/stat.h>
+#endif
+#endif
+#include <fconfig.h>
+#ifndef _plan9_
+#include <assert.h>
+#endif
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <ui.h>
+#include <xmenu.h>
+#include <grlib.h>
+#include "uiint.h"
+#include <xldio.h>
+#include <misc-f.h>
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+struct dialogitem;
+struct dialogtype {
+ void (*build) (struct dialogitem * item, CONST menudialog * entry);
+ int (*key) (struct dialogitem * item, int key);
+ void (*mouse) (struct dialogitem * item, int x, int y, int buttons,
+ int flags);
+ void (*destroy) (struct dialogitem * item, dialogparam * param);
+ void (*draw) (struct dialogitem * item);
+ void (*unselect) (struct dialogitem * item);
+};
+struct dialogitem {
+ int y;
+ int width, width1, height;
+ CONST menudialog *dialog;
+ void *data;
+ CONST struct dialogtype *type;
+};
+static struct opendialog {
+ int x, y, width, height;
+ int half;
+ int nitems;
+ CONST menudialog *dialog;
+ int mousereleased;
+ int mousegrab;
+ CONST menuitem *item;
+ int current;
+ struct dialogitem *items;
+ struct uih_window *window;
+} dialog;
+
+static dialogparam *qparam;
+static CONST menuitem *qitem;
+
+int dialogvisible;
+
+int yesnodialogvisible;
+static struct yesnodialog {
+ int width;
+ int questionwidth;
+ int mousereleased;
+ char *question;
+ void (*handler) (int yes);
+ int selected;
+ int pressed;
+ struct uih_window *window;
+} yesnodialog;
+
+// These 3 definitions are no longer used:
+static CONST char *CONST oktext = "OK";
+static CONST char *CONST canceltext = "Cancel";
+static CONST char *CONST helptext = "Help";
+
+static int okwidth;
+static int cancelwidth;
+#define SELECTED(item) ((item-dialog.items)==dialog.current)
+static void NEXT(void)
+{
+ dialog.items[dialog.current].type->unselect(dialog.items +
+ dialog.current);
+ dialog.current = (dialog.current + 1) % dialog.nitems;
+ uih->display = 1;
+}
+
+static void PREV(void)
+{
+ dialog.items[dialog.current].type->unselect(dialog.items +
+ dialog.current);
+ dialog.current =
+ dialog.current ? (dialog.current - 1) : dialog.nitems - 1;
+ uih->display = 1;
+}
+
+struct okdata {
+ int pressed;
+ int selected;
+};
+
+CONST char *CONST yestext = "Yes";
+CONST char *CONST notext = "No";
+#define YESNOX ((uih->image->width-yesnodialog.width)/2)
+#define YESNOHEIGHT (2*BUTTONHEIGHT+2*BORDERHEIGHT)
+#define YESNOY ((uih->image->height-YESNOHEIGHT)/2)
+void
+ui_drawbutton(CONST char *text, int pressed, int selected, int x1, int x2,
+ int y)
+{
+ int width = xtextwidth(uih->font, text);
+ /*printf("%s %i %i\n",text,pressed,selected); */
+ if (uih->palette->type & BITMAPS) {
+ uih_drawborder(uih, x1, y, x2 - x1, BUTTONHEIGHT,
+ (pressed != 0
+ || selected != 0) * BORDER_PRESSED | BORDER_LIGHT);
+ xprint(uih->image, uih->font, (x1 + x2 - width) / 2 + pressed,
+ y + BORDERHEIGHT + pressed, text, selected
+ || pressed ? BGCOLOR(uih) : FGCOLOR(uih), BGCOLOR(uih),
+ TEXT_PRESSED);
+ } else {
+ uih_drawborder(uih, x1, y, x2 - x1, BUTTONHEIGHT,
+ (pressed != 0) * BORDER_PRESSED | BORDER_LIGHT);
+ xprint(uih->image, uih->font, (x1 + x2 - width) / 2 + pressed,
+ y + BORDERHEIGHT + pressed, text,
+ selected ? SELCOLOR(uih) : FGCOLOR(uih), BGCOLOR(uih),
+ /*TEXT_PRESSED */ 0);
+ }
+}
+
+static void
+ui_yesnopos(struct uih_context *c, int *x, int *y, int *w, int *h,
+ void *data)
+{
+#ifdef _plan9_
+#define filevisible 0
+#endif
+ if (filevisible || helpvisible) {
+ *x = *y = *w = *h = 0;
+ return;
+ }
+ *w = yesnodialog.width;
+ *h = YESNOHEIGHT;
+ *x = YESNOX;
+ *y = YESNOY;
+}
+
+static void ui_drawyesno(struct uih_context *c, void *data)
+{
+ xprint(uih->image, uih->font,
+ YESNOX + (yesnodialog.width - yesnodialog.questionwidth) / 2,
+ YESNOY + BORDERHEIGHT, yesnodialog.question,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ ui_drawbutton(yestext, yesnodialog.pressed == 0,
+ yesnodialog.selected == 0, YESNOX + BORDERWIDTH + 1,
+ YESNOX + (yesnodialog.width) / 2 - 1,
+ YESNOY + BUTTONHEIGHT + BORDERHEIGHT);
+ ui_drawbutton(notext, yesnodialog.pressed == 1,
+ yesnodialog.selected == 1,
+ YESNOX + (yesnodialog.width) / 2 + 1,
+ YESNOX + yesnodialog.width - BORDERWIDTH - 1,
+ YESNOY + BUTTONHEIGHT + BORDERHEIGHT);
+}
+
+static void ui_closeyesno(int success)
+{
+ if (!yesnodialogvisible)
+ return;
+ free(yesnodialog.question);
+ yesnodialog.handler(success);
+ yesnodialogvisible = 0;
+ uih_removew(uih, yesnodialog.window);
+ uih->display = 1;
+}
+
+void ui_buildyesno(CONST char *question, void (*handler) (int yes))
+{
+ if (yesnodialogvisible)
+ ui_closeyesno(0);
+ yesnodialogvisible = 1;
+ yesnodialog.questionwidth = xtextwidth(uih->font, question);
+ yesnodialog.question = mystrdup(question);
+ yesnodialog.mousereleased = 0;
+ yesnodialog.width =
+ xtextwidth(uih->font, yestext) + xtextwidth(uih->font,
+ notext) +
+ 8 * BORDERWIDTH + 2;
+ if (yesnodialog.width < yesnodialog.questionwidth)
+ yesnodialog.width = yesnodialog.questionwidth;
+ yesnodialog.width += 2 * BORDERWIDTH;
+ yesnodialog.handler = handler;
+ yesnodialog.selected = 0;
+ yesnodialog.pressed = -1;
+ yesnodialog.window =
+ uih_registerw(uih, ui_yesnopos, ui_drawyesno, NULL, DRAWBORDER);
+ uih->display = 1;
+}
+
+static int ui_keyyesno(int key)
+{
+ if (!yesnodialogvisible)
+ return 0;
+ switch (key) {
+ case UIKEY_LEFT:
+ yesnodialog.selected ^= 1;
+ uih->display = 1;
+ return 1;
+ case UIKEY_UP:
+ return 1;
+ case UIKEY_RIGHT:
+ case UIKEY_TAB:
+ yesnodialog.selected ^= 1;
+ uih->display = 1;
+ return 1;
+ case UIKEY_DOWN:
+ return 1;
+ case 13:
+ case '\n':
+ ui_closeyesno(!yesnodialog.selected);
+ return 1;
+ case UIKEY_ESC:
+ ui_closeyesno(0);
+ return 1;
+ }
+ return 1;
+}
+
+static int ui_mouseyesno(int x, int y, int buttons, int flags)
+{
+ int mouseat = 0;
+ if (!yesnodialogvisible)
+ return 0;
+ if (!yesnodialog.mousereleased && (flags & MOUSE_RELEASE)) {
+ yesnodialog.mousereleased = 1;
+ return 1;
+ }
+ if (!yesnodialog.mousereleased && (flags & MOUSE_DRAG)) {
+ return 1;
+ }
+ yesnodialog.mousereleased = 1;
+ if (x < YESNOX || y < YESNOY || x > YESNOX + yesnodialog.width
+ || y > YESNOY + YESNOHEIGHT) {
+ if (flags & MOUSE_PRESS) {
+ ui_closeyesno(0);
+ } else {
+ if (yesnodialog.pressed != -1)
+ uih->display = 1;
+ yesnodialog.pressed = -1;
+ }
+ return 1;
+ }
+ if (x > YESNOX + yesnodialog.width / 2)
+ mouseat = 1;
+ if (flags & MOUSE_DRAG) {
+ if (yesnodialog.pressed != mouseat)
+ uih->display = 1;
+ if (yesnodialog.selected != mouseat)
+ uih->display = 1;
+ yesnodialog.selected = mouseat;
+ yesnodialog.pressed = mouseat;
+ } else {
+ if ((flags & MOUSE_MOVE) && yesnodialog.selected != mouseat)
+ uih->display = 1, yesnodialog.selected = mouseat;
+ if (yesnodialog.pressed != -1)
+ uih->display = 1;
+ yesnodialog.pressed = -1;
+ }
+ if (flags & MOUSE_RELEASE) {
+ ui_closeyesno(!mouseat);
+ }
+ return 1;
+}
+
+static void ui_buildok(struct dialogitem *item, CONST menudialog * entry)
+{
+ struct okdata *ok;
+ item->height = BUTTONHEIGHT;
+ okwidth = xtextwidth(uih->font, gettext("OK"));
+ cancelwidth = xtextwidth(uih->font, gettext("Cancel"));
+ item->width = okwidth + 2 * BORDERWIDTH + 2;
+ item->width1 = cancelwidth + 2 * BORDERWIDTH + 2;
+ if (item->width < item->width1)
+ item->width = item->width1;
+ if (item->width > item->width1)
+ item->width1 = item->width;
+ item->data = ok = (struct okdata *) malloc(sizeof(struct okdata));
+ ok->pressed = -1;
+ ok->selected = 0;
+}
+
+static void ui_destroyok(struct dialogitem *item, dialogparam * param)
+{
+ free(item->data);
+}
+
+static int ui_keyok(struct dialogitem *item, int key)
+{
+ struct okdata *ok = (struct okdata *) item->data;
+ switch (key) {
+ case UIKEY_LEFT:
+ if (ok->selected >= 1) {
+ ok->selected--;
+ uih->display = 1;
+ return 1;
+ }
+ case UIKEY_UP:
+ PREV();
+ return 1;
+ case UIKEY_RIGHT:
+ case UIKEY_TAB:
+ if (ok->selected < 2) {
+ ok->selected++;
+ uih->display = 1;
+ return 1;
+ }
+ case UIKEY_DOWN:
+ NEXT();
+ return 1;
+ case 13:
+ case '\n':
+ if (ok->selected <= 1)
+ ui_closedialog(!ok->selected);
+ else
+ ui_help(dialog.item->shortname);
+ return 1;
+ }
+ return 0;
+}
+
+static void
+ui_mouseok(struct dialogitem *item, int x, int y, int buttons, int flags)
+{
+ struct okdata *ok = (struct okdata *) item->data;
+ int mouseat = 0;
+ if (x > dialog.x + dialog.width / 3)
+ mouseat = 1;
+ if (x > dialog.x + 2 * dialog.width / 3)
+ mouseat = 2;
+ if (flags & MOUSE_DRAG) {
+ if (ok->pressed != mouseat)
+ uih->display = 1;
+ if (ok->selected != mouseat)
+ uih->display = 1;
+ ok->selected = mouseat;
+ ok->pressed = mouseat;
+ } else {
+ if ((flags & MOUSE_MOVE) && ok->selected != mouseat)
+ uih->display = 1, ok->selected = mouseat;
+ if (ok->pressed != -1)
+ uih->display = 1;
+ ok->pressed = -1;
+ }
+ if (flags & MOUSE_RELEASE) {
+ if (mouseat < 2)
+ ui_closedialog(!mouseat);
+ else
+ ui_help(dialog.item->shortname);
+ }
+}
+
+static void ui_drawok(struct dialogitem *item)
+{
+ struct okdata *ok = (struct okdata *) item->data;
+ ui_drawbutton(gettext("OK"), ok->pressed == 0, SELECTED(item)
+ && ok->selected == 0, dialog.x + BORDERWIDTH + 1,
+ dialog.x + (dialog.width) / 3 - 1, item->y);
+ ui_drawbutton(gettext("Cancel"), ok->pressed == 1, SELECTED(item)
+ && ok->selected == 1, dialog.x + (dialog.width) / 3 + 1,
+ dialog.x + 2 * dialog.width / 3 - BORDERWIDTH, item->y);
+ ui_drawbutton(gettext("Help"), ok->pressed == 2, SELECTED(item)
+ && ok->selected == 2, dialog.x + 2 * (dialog.width) / 3,
+ dialog.x + dialog.width - BORDERWIDTH - 1, item->y);
+}
+
+static void ui_unselectok(struct dialogitem *item)
+{
+ struct okdata *ok = (struct okdata *) item->data;
+ ok->pressed = -1;
+ ok->selected = 0;
+ uih->display = 1;
+}
+
+CONST static struct dialogtype okdialog = {
+ ui_buildok,
+ ui_keyok,
+ ui_mouseok,
+ ui_destroyok,
+ ui_drawok,
+ ui_unselectok
+};
+
+void ui_updatetext(struct ui_textdata *d)
+{
+ int again = 1;
+ int i;
+ int wi;
+ int len = (int) strlen(d->text);
+ if (d->start >= len)
+ d->start = 0;
+ if (d->cursor > len)
+ d->cursor = len;
+ if (d->cursor < d->start)
+ d->start = d->cursor;
+ do {
+ wi = 0;
+ for (i = 0; d->text[d->start + i]; i++) {
+ if (d->start + i == d->cursor)
+ d->cursorpos = wi;
+ wi += xtextcharw(uih->font, d->text[d->start + i]);
+ if (wi >= d->width) {
+ break;
+ }
+ }
+ if (d->start + i == d->cursor && wi < d->width)
+ d->cursorpos = wi;
+ if (d->start + i < d->cursor)
+ d->start++;
+ else
+ again = 0;
+ }
+ while (again);
+ d->ndisplayed = i;
+ while (again);
+}
+
+struct ui_textdata *ui_opentext(int x, int y, int width, CONST char *def)
+{
+ struct ui_textdata *d = (struct ui_textdata *) malloc(sizeof(*d));
+ char *text;
+ int size = 100;
+ if ((int) strlen(def) > size)
+ size = (int) strlen(def) * 2;
+ d->x = x;
+ d->y = y;
+ d->width = width;
+ text = (char *) malloc(size);
+ strcpy(text, def);
+ d->text = text;
+ d->cursor = 0;
+ d->cursorpos = 0;
+ d->start = 0;
+ d->ndisplayed = 0;
+ d->clear = 1;
+ d->size = size;
+ ui_updatetext(d);
+ return (d);
+}
+
+void ui_drawtext(struct ui_textdata *d, int active)
+{
+ char *c = (char *) malloc(d->ndisplayed + 2);
+ strncpy(c, d->text + d->start, d->ndisplayed);
+ c[d->ndisplayed] = 0;
+ xprint(uih->image, uih->font, d->x, d->y, c,
+ (uih->palette->type & BITMAPS) ? BGCOLOR(uih) : ((active
+ && d->clear) ?
+ SELCOLOR(uih) :
+ FGCOLOR(uih)),
+ BGCOLOR(uih),
+ (uih->palette->type & BITMAPS) ? TEXT_PRESSED : 0);
+ if (active) {
+ xdrawcursor(uih->image, d->x + d->cursorpos, d->y,
+ (uih->palette->
+ type & BITMAPS) ? BGCOLOR(uih) : SELCOLOR(uih),
+ xtextheight(uih->font));
+ }
+ free(c);
+}
+
+void ui_textmouse(struct ui_textdata *d, int x, int y)
+{
+ if (y > d->y && y < d->y + xtextheight(uih->font) && x > d->x) {
+ int w = 0;
+ int i;
+ int xp = d->x;
+ for (i = 0; i < d->ndisplayed + 1 && xp - w / 2 < x; i++) {
+ w = xtextcharw(uih->font, d->text[i + d->start]);
+ xp += w;
+ }
+ d->cursor = i + d->start - 1;
+ if (d->cursor < 0)
+ d->cursor = 0;
+ d->clear = 0;
+ ui_updatetext(d);
+ uih->display = 1;
+ }
+}
+
+void ui_closetext(struct ui_textdata *d)
+{
+ free(d->text);
+ free(d);
+}
+
+int ui_textkey(struct ui_textdata *d, int key)
+{
+ switch (key) {
+ case UIKEY_LEFT:
+ if (d->clear)
+ d->clear = 0;
+ if (d->cursor)
+ d->cursor--;
+ else
+ return 0;
+ ui_updatetext(d);
+ uih->display = 1;
+ return 1;
+ case UIKEY_RIGHT:
+ if (d->clear)
+ d->clear = 0;
+ if (d->cursor < (int) strlen(d->text))
+ d->cursor++;
+ else
+ return 0;
+ ui_updatetext(d);
+ uih->display = 1;
+ return 1;
+ case UIKEY_HOME:
+ if (d->clear)
+ d->clear = 0;
+ d->cursor = 0;
+ ui_updatetext(d);
+ uih->display = 1;
+ return 1;
+ case UIKEY_END:
+ if (d->clear)
+ d->clear = 0;
+ d->cursor = (int) strlen(d->text);
+ ui_updatetext(d);
+ uih->display = 1;
+ return 1;
+ case UIKEY_BACKSPACE:
+ if (d->clear)
+ d->text[0] = 0, d->clear = 0;
+ else if (d->cursor) {
+ int len, i;
+ len = (int) strlen(d->text);
+ for (i = d->cursor; i <= len; i++) {
+ d->text[i - 1] = d->text[i];
+ }
+ d->cursor--;
+ }
+ ui_updatetext(d);
+ uih->display = 1;
+ return 1;
+ }
+ if (isprint(key)) {
+ int i;
+ int len;
+ if (d->clear)
+ d->text[0] = 0, d->clear = 0;
+ if ((len = (int) strlen(d->text)) > d->size - 2) {
+ d->text = (char *) realloc(d->text, d->size * 2);
+ }
+ for (i = len; i >= d->cursor; i--) {
+ d->text[i + 1] = d->text[i];
+ }
+ d->text[d->cursor] = key;
+ d->cursor++;
+ ui_updatetext(d);
+ uih->display = 1;
+ return 1;
+ }
+ return 0;
+}
+
+static void
+ui_buildstring(struct dialogitem *item, CONST menudialog * entry)
+{
+ item->height = BUTTONHEIGHT;
+ item->width = xtextwidth(uih->font, item->dialog->question);
+ item->width1 = xtextcharw(uih->font, 'w') * 20;
+ item->data = ui_opentext(0, 0, 2043, item->dialog->defstr);
+}
+
+static void ui_destroystring(struct dialogitem *item, dialogparam * param)
+{
+ struct ui_textdata *text = (struct ui_textdata *) item->data;
+ param->dstring = mystrdup(text->text);
+ ui_closetext(text);
+}
+
+static void ui_drawquestion(struct dialogitem *item)
+{
+ if (uih->palette->type & BITMAPS) {
+ if (SELECTED(item))
+ xrectangle(uih->image, dialog.x + BORDERWIDTH, item->y,
+ dialog.half - dialog.x - 2 * BORDERWIDTH,
+ BUTTONHEIGHT, FGCOLOR(uih));
+ xprint(uih->image, uih->font, dialog.half - item->width,
+ item->y + BORDERHEIGHT, item->dialog->question,
+ SELECTED(item) ? BGCOLOR(uih) : FGCOLOR(uih),
+ BGCOLOR(uih), TEXT_PRESSED);
+ } else {
+ xprint(uih->image, uih->font, dialog.half - item->width,
+ item->y + BORDERHEIGHT, item->dialog->question,
+ SELECTED(item) ? SELCOLOR(uih) : FGCOLOR(uih), BGCOLOR(uih),
+ 0);
+ }
+}
+
+static void ui_drawstring(struct dialogitem *item)
+{
+ struct ui_textdata *text = (struct ui_textdata *) item->data;
+ if (text->width == 2043)
+ text->x = dialog.half + BORDERWIDTH, text->width =
+ dialog.width + dialog.x - dialog.half - 2 * BORDERWIDTH,
+ text->y = item->y + BORDERHEIGHT, ui_updatetext(text);
+ uih_drawborder(uih, dialog.half, item->y,
+ dialog.width - dialog.half + dialog.x - BORDERWIDTH,
+ BUTTONHEIGHT, BORDER_PRESSED | BORDER_LIGHT);
+ ui_drawtext(text, SELECTED(item));
+ ui_drawquestion(item);
+}
+
+static int ui_keystring(struct dialogitem *item, int key)
+{
+ struct ui_textdata *text = (struct ui_textdata *) item->data;
+ return (ui_textkey(text, key));
+}
+
+static void
+ui_mousestring(struct dialogitem *item, int x, int y, int buttons,
+ int flags)
+{
+ struct ui_textdata *text = (struct ui_textdata *) item->data;
+ if (flags & MOUSE_DRAG) {
+ ui_textmouse(text, x, y);
+ }
+}
+
+static void ui_unselectstring(struct dialogitem *item)
+{
+}
+
+CONST static struct dialogtype stringdialog = {
+ ui_buildstring,
+ ui_keystring,
+ ui_mousestring,
+ ui_destroystring,
+ ui_drawstring,
+ ui_unselectstring
+};
+
+static void ui_buildint(struct dialogitem *item, CONST menudialog * entry)
+{
+ char s[50];
+ item->height = BUTTONHEIGHT;
+ item->width = xtextwidth(uih->font, item->dialog->question);
+ item->width1 = xtextcharw(uih->font, 'w') * 5;
+ sprintf(s, "%i", item->dialog->defint);
+ item->data = ui_opentext(0, 0, 2043, s);
+}
+
+static void ui_destroyint(struct dialogitem *item, dialogparam * param)
+{
+ struct ui_textdata *text = (struct ui_textdata *) item->data;
+ param->dint = (int) atol(text->text);
+ ui_closetext(text);
+}
+
+CONST static struct dialogtype intdialog = {
+ ui_buildint,
+ ui_keystring,
+ ui_mousestring,
+ ui_destroyint,
+ ui_drawstring,
+ ui_unselectstring
+};
+
+static CONST char *ui_getextension(CONST char *ch)
+{
+ int i = 0;
+ while (ch[i]) {
+ if (ch[i] == '*')
+ return (ch + i + 1);
+ i++;
+ }
+ return ch + i;
+}
+
+number_t ui_getfloat(CONST char *c)
+{
+#ifdef HAVE_LONG_DOUBLE
+ long double param;
+#else
+ double param;
+#endif
+#ifdef HAVE_LONG_DOUBLE
+#ifndef USE_ATOLD
+#ifdef USE_XLDIO
+ param = x_strtold(c, NULL);
+ if (0)
+#else
+ if (sscanf(c, "%LG", &param) == 0)
+#endif
+#else
+ param = _atold(c);
+ if (0)
+#endif
+ {
+#else
+ if (sscanf(c, "%lG", &param) == 0) {
+#endif
+ return 0;
+ }
+ return (param);
+}
+
+#define BROWSEWIDTH /*(2*BORDERWIDTH+xtextcharw(uih->font,'B'))*/BUTTONHEIGHT
+struct ui_filedata {
+ struct ui_textdata *text;
+ int active;
+ int pressed;
+};
+
+static struct dialogitem *curritem;
+static void filecallback(CONST char *name, int succ)
+{
+ struct ui_filedata *text = (struct ui_filedata *) curritem->data;
+ if (succ) {
+ ui_closetext(text->text);
+ uih->display = 1;
+ text->text = ui_opentext(0, 0, 2043, name);
+ dialog.mousereleased = 0;
+ }
+ if (dialog.nitems == 2)
+ ui_closedialog(succ);
+}
+
+static void ui_buildfile(struct dialogitem *item, CONST menudialog * entry)
+{
+ char str[256];
+ struct ui_filedata *data =
+ (struct ui_filedata *) malloc(sizeof(*data));
+ int i = 0;
+ item->height = BUTTONHEIGHT;
+ item->width = xtextwidth(uih->font, item->dialog->question);
+ item->width1 = xtextcharw(uih->font, 'w') * 20;
+ while (item->dialog->defstr[i] != '*' && item->dialog->defstr[i] != 0)
+ str[i] = item->dialog->defstr[i], i++;
+ str[i] = 0;
+ item->data = data;
+ if (entry->type == DIALOG_OFILE)
+ data->text =
+ ui_opentext(0, 0, 2043,
+ ui_getfile(str,
+ ui_getextension(item->dialog->defstr)));
+ else
+ data->text = ui_opentext(0, 0, 2043, item->dialog->defstr);
+ data->active = 0;
+ data->pressed = 0;
+#ifndef _plan9_
+ if (dialog.nitems == 2) {
+ curritem = item;
+ ui_buildfilesel(data->text->text, "", filecallback);
+ }
+#endif
+}
+
+static void ui_destroyfile(struct dialogitem *item, dialogparam * param)
+{
+ struct ui_filedata *text = (struct ui_filedata *) item->data;
+#ifndef _plan9_
+ if (filevisible)
+ ui_closefilesel(0);
+#endif
+ param->dpath = mystrdup(text->text->text);
+ ui_closetext(text->text);
+ free(text);
+}
+
+static void ui_drawfile(struct dialogitem *item)
+{
+ struct ui_filedata *data = (struct ui_filedata *) item->data;
+ int wholesize =
+ dialog.width + dialog.x - dialog.half - 2 * BORDERWIDTH;
+ if (data->text->width == 2043) {
+ data->text->x = dialog.half + BORDERWIDTH,
+ data->text->width = wholesize - BROWSEWIDTH - 2 * BORDERWIDTH,
+ data->text->y = item->y + BORDERHEIGHT;
+ ui_updatetext(data->text);
+ }
+ uih_drawborder(uih, dialog.half, item->y, wholesize - BROWSEWIDTH,
+ BUTTONHEIGHT, BORDER_PRESSED | BORDER_LIGHT);
+ ui_drawtext(data->text, SELECTED(item) && !data->active);
+ xprint(uih->image, uih->font, dialog.half - item->width,
+ item->y + BORDERHEIGHT, item->dialog->question,
+ SELECTED(item) ? SELCOLOR(uih) : FGCOLOR(uih), BGCOLOR(uih), 0);
+ ui_drawquestion(item);
+ ui_drawbutton("B", data->pressed && SELECTED(item), SELECTED(item)
+ && data->active,
+ dialog.x + dialog.width - BROWSEWIDTH - BORDERWIDTH,
+ dialog.x + dialog.width - BORDERWIDTH, item->y);
+}
+
+static int ui_keyfile(struct dialogitem *item, int key)
+{
+ struct ui_filedata *text = (struct ui_filedata *) item->data;
+ int i = 0;
+ if (!text->active)
+ i = ui_textkey(text->text, key);
+ if (!i) {
+ if (key == '\t' || key == UIKEY_RIGHT) {
+ text->active++;
+ if (text->active > 1) {
+ text->active = 0;
+ return 0;
+ }
+ uih->display = 1;
+ return 1;
+ }
+ if (key == UIKEY_LEFT) {
+ text->active--;
+ if (text->active < 0) {
+ text->active = 1;
+ return 0;
+ }
+ return 1;
+ }
+#ifndef _plan9_
+ if ((key == 13 || key == '\n') && text->active) {
+ curritem = item;
+ ui_buildfilesel(text->text->text, "", filecallback);
+ return 1;
+ }
+#endif
+ }
+ return (i);
+}
+
+static void
+ui_mousefile(struct dialogitem *item, int x, int y, int buttons, int flags)
+{
+ struct ui_filedata *text = (struct ui_filedata *) item->data;
+ int i;
+ if (flags & MOUSE_MOVE) {
+ if (x < dialog.x + dialog.width - BORDERWIDTH - BROWSEWIDTH)
+ i = 0;
+ else
+ i = 1;
+ if (text->active != i)
+ text->active = i, uih->display = 1;
+ }
+#ifndef _plan9_
+ if ((flags & MOUSE_RELEASE) && text->pressed) {
+ text->pressed = 0;
+ uih->display = 1;
+ curritem = item;
+ ui_buildfilesel(text->text->text, "", filecallback);
+ return;
+ }
+#endif
+ if (flags & MOUSE_DRAG) {
+ if (x < dialog.x + dialog.width - BORDERWIDTH - BROWSEWIDTH) {
+ text->active = 0, ui_textmouse(text->text, x, y);
+ if (text->pressed)
+ text->pressed = 0, uih->display = 1;
+ } else if (!text->pressed) {
+ text->pressed = 1;
+ uih->display = 1;
+ }
+ }
+}
+
+static void ui_unselectfile(struct dialogitem *item)
+{
+ struct ui_filedata *text = (struct ui_filedata *) item->data;
+ if (text->active)
+ text->active = 0, uih->display = 1;
+ if (text->pressed)
+ text->pressed = 0, uih->display = 1;
+}
+
+CONST static struct dialogtype filedialog = {
+ ui_buildfile,
+ ui_keyfile,
+ ui_mousefile,
+ ui_destroyfile,
+ ui_drawfile,
+ ui_unselectfile
+};
+
+static void
+ui_buildfloat(struct dialogitem *item, CONST menudialog * entry)
+{
+ char s[50];
+ item->height = BUTTONHEIGHT;
+ item->width = xtextwidth(uih->font, item->dialog->question);
+ item->width1 = xtextcharw(uih->font, 'w') * 10;
+ sprintf(s, "%g", (double) item->dialog->deffloat);
+ item->data = ui_opentext(0, 0, 2043, s);
+}
+
+static void ui_destroyfloat(struct dialogitem *item, dialogparam * param)
+{
+ struct ui_textdata *text = (struct ui_textdata *) item->data;
+ param->number = ui_getfloat(text->text);
+ ui_closetext(text);
+}
+
+CONST static struct dialogtype floatdialog = {
+ ui_buildfloat,
+ ui_keystring,
+ ui_mousestring,
+ ui_destroyfloat,
+ ui_drawstring,
+ ui_unselectstring
+};
+
+struct ui_coorddata {
+ struct ui_textdata *text[2];
+ int active;
+};
+static void
+ui_buildcoord(struct dialogitem *item, CONST menudialog * entry)
+{
+ char s[50];
+ struct ui_coorddata *data =
+ (struct ui_coorddata *) malloc(sizeof(*data));
+ item->height = BUTTONHEIGHT;
+ item->width = xtextwidth(uih->font, item->dialog->question);
+ item->width1 = xtextcharw(uih->font, 'w') * 20;
+ item->data = data;
+ data->active = 0;
+ sprintf(s, "%g", (double) item->dialog->deffloat);
+ data->text[0] = ui_opentext(0, 0, 2043, s);
+ sprintf(s, "%g", (double) item->dialog->deffloat2);
+ data->text[1] = ui_opentext(0, 0, 2043, s);
+}
+
+static void ui_destroycoord(struct dialogitem *item, dialogparam * param)
+{
+ struct ui_coorddata *data = (struct ui_coorddata *) item->data;
+ param->dcoord[0] = ui_getfloat(data->text[0]->text);
+ param->dcoord[1] = ui_getfloat(data->text[1]->text);
+ ui_closetext(data->text[0]);
+ ui_closetext(data->text[1]);
+ free(data);
+}
+
+#define SPACESIZE xtextwidth(uih->font,"+")
+#define ENDSIZE xtextwidth(uih->font,"i")
+static void ui_drawcoord(struct dialogitem *item)
+{
+ struct ui_coorddata *data = (struct ui_coorddata *) item->data;
+ int wholesize =
+ dialog.width + dialog.x - dialog.half - 2 * BORDERWIDTH - ENDSIZE;
+ int half = (wholesize - SPACESIZE) / 2;
+ if (data->text[0]->width == 2043) {
+ data->text[0]->x = dialog.half + BORDERWIDTH,
+ data->text[0]->width = half - BORDERWIDTH,
+ data->text[0]->y = item->y + BORDERHEIGHT;
+ data->text[1]->x = dialog.half + half + SPACESIZE + BORDERWIDTH,
+ data->text[1]->width = half - BORDERWIDTH,
+ data->text[1]->y = item->y + BORDERHEIGHT;
+ ui_updatetext(data->text[0]);
+ ui_updatetext(data->text[1]);
+ }
+ uih_drawborder(uih, dialog.half, item->y, half, BUTTONHEIGHT,
+ BORDER_PRESSED | BORDER_LIGHT);
+ uih_drawborder(uih, dialog.half + half + SPACESIZE, item->y, half,
+ BUTTONHEIGHT, BORDER_PRESSED | BORDER_LIGHT);
+ ui_drawtext(data->text[0], SELECTED(item) && !data->active);
+ ui_drawtext(data->text[1], SELECTED(item) && data->active);
+ xprint(uih->image, uih->font, dialog.half + half,
+ item->y + BORDERHEIGHT, "+", FGCOLOR(uih),
+ BGCOLOR(uih), 0);
+ xprint(uih->image, uih->font,
+ dialog.x + dialog.width - BORDERWIDTH - ENDSIZE,
+ item->y + BORDERHEIGHT, "i", FGCOLOR(uih),
+ BGCOLOR(uih), 0);
+ ui_drawquestion(item);
+}
+
+static int ui_keycoord(struct dialogitem *item, int key)
+{
+ struct ui_coorddata *text = (struct ui_coorddata *) item->data;
+ int i = ui_textkey(text->text[text->active], key);
+ if (!i) {
+ if (key == '\t' || key == UIKEY_RIGHT) {
+ text->active++;
+ if (text->active > 1) {
+ text->active = 0;
+ return 0;
+ }
+ uih->display = 1;
+ if (key == UIKEY_RIGHT) {
+ text->text[1]->cursor = 0;
+ ui_updatetext(text->text[1]);
+ uih->display = 1;
+ }
+ return 1;
+ }
+ if (key == UIKEY_LEFT) {
+ text->active--;
+ if (text->active < 0) {
+ text->active = 1;
+ return 0;
+ }
+ text->text[0]->cursor = (int) strlen(text->text[0]->text);
+ ui_updatetext(text->text[0]);
+ uih->display = 1;
+ return 1;
+ }
+ }
+ return (i);
+}
+
+static void
+ui_mousecoord(struct dialogitem *item, int x, int y, int buttons,
+ int flags)
+{
+ struct ui_coorddata *text = (struct ui_coorddata *) item->data;
+ int i;
+ if (flags & MOUSE_MOVE) {
+ if (x < text->text[1]->x)
+ i = 0;
+ else
+ i = 1;
+ if (text->active != i)
+ text->active = i, uih->display = 1;
+ }
+ if (flags & MOUSE_DRAG) {
+ if (x < text->text[1]->x)
+ text->active = 0, ui_textmouse(text->text[0], x, y);
+ else
+ text->active = 1, ui_textmouse(text->text[1], x, y);
+ }
+}
+
+static void ui_unselectcoord(struct dialogitem *item)
+{
+ struct ui_coorddata *text = (struct ui_coorddata *) item->data;
+ text->active = 0;
+}
+
+CONST static struct dialogtype coorddialog = {
+ ui_buildcoord,
+ ui_keycoord,
+ ui_mousecoord,
+ ui_destroycoord,
+ ui_drawcoord,
+ ui_unselectcoord
+};
+
+struct ui_choicedata {
+ CONST char **texts;
+ int selected;
+ int n;
+
+ struct uih_window *menu;
+ int x, y, width, height;
+ int active;
+};
+static void
+ui_choicemenupos(struct uih_context *uih, int *x, int *y, int *width,
+ int *height, void *data)
+{
+ struct ui_choicedata *choice = (struct ui_choicedata *) data;
+ if (filevisible || helpvisible) {
+ *x = *y = *width = *height = 0;
+ return;
+ }
+ *x = choice->x;
+ *y = choice->y;
+ *width = choice->width;
+ *height = choice->height;
+}
+
+static void ui_drawchoicemenu(uih_context * uih, void *data)
+{
+ struct ui_choicedata *choice = (struct ui_choicedata *) data;
+ int i;
+ for (i = 0; i < choice->n; i++) {
+ xprint(uih->image, uih->font, choice->x + BORDERWIDTH,
+ choice->y + BORDERHEIGHT + i * xtextheight(uih->font),
+ choice->texts[i],
+ i == choice->active ? SELCOLOR(uih) : FGCOLOR(uih),
+ BGCOLOR(uih), 0);
+ }
+}
+
+static void
+ui_buildchoicemenu(struct uih_context *uih, struct ui_choicedata *choice,
+ int x, int y, int width)
+{
+ if (choice->menu != NULL)
+ return;
+ choice->width = width + 2 * BORDERWIDTH;
+ choice->x = x;
+ choice->height = xtextheight(uih->font) * choice->n + 2 * BORDERHEIGHT;
+ choice->active = choice->selected;
+ choice->y = y - choice->active * xtextheight(uih->font);
+ dialog.mousegrab = 1;
+ if (choice->x + choice->width > uih->image->width)
+ choice->x = uih->image->width - choice->width;
+ if (choice->y + choice->height > uih->image->height)
+ choice->y = uih->image->height - choice->height;
+ if (choice->x < 0)
+ choice->x = 0;
+ if (choice->y < 0)
+ choice->y = 0;
+ choice->menu =
+ uih_registerw(uih, ui_choicemenupos, ui_drawchoicemenu, choice,
+ DRAWBORDER);
+ uih->display = 1;
+}
+
+static void
+ui_closechoicemenu(struct uih_context *uih, struct ui_choicedata *choice)
+{
+ if (choice->menu == NULL)
+ return;
+ uih_removew(uih, choice->menu);
+ choice->menu = NULL;
+ uih->display = 1;
+ dialog.mousegrab = 0;
+ dialog.mousereleased = 0;
+}
+
+static void
+ui_buildchoice(struct dialogitem *item, CONST menudialog * entry)
+{
+ int i;
+ struct ui_choicedata *data =
+ (struct ui_choicedata *) malloc(sizeof(*data));
+ item->height = BUTTONHEIGHT;
+ item->width = xtextwidth(uih->font, item->dialog->question);
+ item->width1 = 0;
+ data->menu = NULL;
+
+ data->texts = (CONST char **) entry->defstr;
+ for (i = 0; data->texts[i] != NULL; i++) {
+ int w = xtextwidth(uih->font, data->texts[i]);
+ if (w > item->width1)
+ item->width1 = w;
+ }
+ item->width1 += 2 * BORDERWIDTH;
+ data->n = i;
+ data->selected = entry->defint;
+ item->data = data;
+}
+
+static void ui_destroychoice(struct dialogitem *item, dialogparam * param)
+{
+ struct ui_choicedata *data = (struct ui_choicedata *) item->data;
+ param->dint = data->selected;
+ ui_closechoicemenu(uih, data);
+ free(data);
+}
+
+static void ui_drawchoice(struct dialogitem *item)
+{
+ struct ui_choicedata *data = (struct ui_choicedata *) item->data;
+ uih_drawborder(uih, dialog.half, item->y, item->width1,
+ BUTTONHEIGHT | BORDER_LIGHT, 0);
+ xprint(uih->image, uih->font, dialog.half + BORDERWIDTH,
+ item->y + BORDERHEIGHT, data->texts[data->selected],
+ SELECTED(item) ? SELCOLOR(uih) : FGCOLOR(uih),
+ BGCOLOR(uih), 0);
+ ui_drawquestion(item);
+}
+
+static int ui_keychoice(struct dialogitem *item, int key)
+{
+ struct ui_choicedata *data = (struct ui_choicedata *) item->data;
+ if (!data->menu) {
+ switch (key) {
+ case ' ':
+ case '\n':
+ case 13:
+ case UIKEY_UP:
+ case UIKEY_DOWN:
+ case UIKEY_RIGHT:
+ ui_buildchoicemenu(uih, data, dialog.half, item->y,
+ item->width1);
+ return (1);
+ }
+ } else {
+ switch (key) {
+ case ' ':
+ case 13:
+ case '\n':
+ data->selected = data->active;
+ ui_closechoicemenu(uih, data);
+ return (1);
+ case UIKEY_DOWN:
+ data->active++;
+ data->active %= data->n;
+ uih->display = 1;
+ return (1);
+ case UIKEY_UP:
+ data->active--;
+ if (data->active < 0)
+ data->active = data->n - 1;
+ uih->display = 1;
+ return (1);
+ case UIKEY_ESC:
+ ui_closechoicemenu(uih, data);
+ return (1);
+ }
+ }
+ return 0;
+}
+
+static void
+ui_mousechoice(struct dialogitem *item, int x, int y, int buttons,
+ int flags)
+{
+ struct ui_choicedata *data = (struct ui_choicedata *) item->data;
+ int in;
+ if (data->menu != NULL) {
+ in = 0;
+ if (x > data->x && y > data->y && x < data->x + data->width
+ && y < data->y + data->height)
+ in = 1;
+ if ((flags & MOUSE_PRESS) && !in) {
+ ui_closechoicemenu(uih, data);
+ return;
+ }
+ if ((flags & MOUSE_MOVE) && in) {
+ in = (y - data->y) / xtextheight(uih->font);
+ if (in < 0)
+ in = 0;
+ if (in >= data->n)
+ in = data->n - 1;
+ if (data->active != in)
+ data->active = in, uih->display = 1;
+ }
+ if (flags & MOUSE_RELEASE) {
+ data->selected = data->active;
+ ui_closechoicemenu(uih, data);
+ return;
+ }
+ } else {
+ if (flags & MOUSE_PRESS && x > dialog.half)
+ ui_buildchoicemenu(uih, data, dialog.half, item->y,
+ item->width1);
+ }
+}
+
+static void ui_unselectchoice(struct dialogitem *item)
+{
+ struct ui_choicedata *data = (struct ui_choicedata *) item->data;
+ ui_closechoicemenu(uih, data);
+}
+
+CONST static struct dialogtype choicedialog = {
+ ui_buildchoice,
+ ui_keychoice,
+ ui_mousechoice,
+ ui_destroychoice,
+ ui_drawchoice,
+ ui_unselectchoice
+};
+
+static void
+ui_dialogpos(struct uih_context *c, int *x, int *y, int *width,
+ int *height, void *data)
+{
+ *x = dialog.x;
+ *y = dialog.y;
+ if (filevisible || helpvisible) {
+ *x = *y = *width = *height = 0;
+ return;
+ }
+ *width = dialog.width;
+ *height = dialog.height;
+}
+
+static void ui_dialogdraw(struct uih_context *c, void *data)
+{
+ int n;
+ for (n = 0; n < dialog.nitems; n++)
+ dialog.items[n].type->draw(dialog.items + n);
+}
+
+#define YSKIP 2
+void ui_builddialog(CONST menuitem * item)
+{
+ int n = 2;
+ int ypos;
+ int width1 = 0;
+ if (ui_nogui) {
+ printf("dialog \"%s\"\n", item->shortname);
+ return;
+ }
+ if (driver->gui_driver && driver->gui_driver->dialog) {
+ driver->gui_driver->dialog(uih, item->shortname);
+ return;
+ }
+ dialogvisible = 1;
+ dialog.width = 0;
+ dialog.height = 0;
+ dialog.dialog = menu_getdialog(uih, item);
+ dialog.item = item;
+ for (n = 0; dialog.dialog[n].question != NULL; n++);
+ n++;
+ dialog.nitems = n;
+ dialog.items =
+ (struct dialogitem *) malloc(sizeof(struct dialogitem) *
+ dialog.nitems);
+ dialog.mousereleased = 0;
+ dialog.items[dialog.nitems - 1].type = &okdialog;
+ for (n = 0; n < dialog.nitems; n++) {
+ if (n < dialog.nitems - 1) {
+ switch (dialog.dialog[n].type) {
+ case DIALOG_STRING:
+ case DIALOG_KEYSTRING:
+ dialog.items[n].type = &stringdialog;
+ break;
+ case DIALOG_INT:
+ dialog.items[n].type = &intdialog;
+ break;
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+ dialog.items[n].type = &filedialog;
+ break;
+ case DIALOG_FLOAT:
+ dialog.items[n].type = &floatdialog;
+ break;
+ case DIALOG_COORD:
+ dialog.items[n].type = &coorddialog;
+ break;
+ case DIALOG_CHOICE:
+ dialog.items[n].type = &choicedialog;
+ break;
+ default:
+ printf("uidialog:unknown type!\n");
+ exit(1);
+ }
+ }
+ dialog.items[n].dialog = dialog.dialog + n;
+ dialog.items[n].type->build(dialog.items + n, dialog.dialog + n);
+ dialog.height += dialog.items[n].height;
+ if (width1 < dialog.items[n].width1)
+ width1 = dialog.items[n].width1;
+ if (dialog.width < dialog.items[n].width)
+ dialog.width = dialog.items[n].width;
+ }
+ dialog.height += YSKIP * (n - 1);
+ n = xtextwidth(uih->font, gettext("OK")) + xtextwidth(uih->font,
+ gettext
+ ("Cancel")) +
+ xtextwidth(uih->font, gettext("Help")) + 10;
+ if (dialog.width < n)
+ dialog.width = n;
+ dialog.half = dialog.width + 2 * BORDERWIDTH;
+ dialog.width += 2 * BORDERWIDTH + width1;
+ dialog.height += 2 * BORDERHEIGHT;
+ dialog.current = 0;
+ dialog.x = (uih->image->width - dialog.width) / 2;
+ dialog.half += dialog.x;
+ dialog.y = (uih->image->height - dialog.height) / 2;
+ ypos = dialog.y + BORDERHEIGHT;
+ for (n = 0; n < dialog.nitems; n++) {
+ dialog.items[n].y = ypos;
+ ypos += dialog.items[n].height + YSKIP;
+ }
+ dialog.window =
+ uih_registerw(uih, ui_dialogpos, ui_dialogdraw, NULL, DRAWBORDER);
+ uih->display = 1;
+}
+
+static void ui_dialogquestion(int succesfull)
+{
+ if (succesfull)
+ ui_menuactivate(qitem, qparam);
+ else
+ menu_destroydialog(qitem, qparam, uih);
+}
+
+void ui_closedialog(int succesfull)
+{
+ int n = 2;
+ if (dialogvisible) {
+ dialogparam *param =
+ (dialogparam *) malloc(sizeof(dialogparam) * (dialog.nitems));
+ dialogvisible = 0;
+ uih_removew(uih, dialog.window);
+ uih->display = 1;
+ for (n = 0; n < dialog.nitems; n++) {
+ dialog.items[n].type->destroy(dialog.items + n, param + n);
+ }
+ free(dialog.items);
+ if (succesfull) {
+ for (n = 0; n < dialog.nitems - 1; n++)
+ if (dialog.dialog[n].type == DIALOG_OFILE
+ && xio_exist(param[n].dpath)) {
+ qparam = param;
+ qitem = dialog.item;
+ ui_buildyesno("File exist. Overwrite?",
+ ui_dialogquestion);
+ return;
+ }
+ ui_menuactivate(dialog.item, param);
+ } else
+ menu_destroydialog(dialog.item, param, uih);
+ }
+}
+
+int ui_dialogmouse(int x, int y, int mousebuttons, int flags)
+{
+ int i;
+ if (ui_mouseyesno(x, y, mousebuttons, flags))
+ return 1;
+ if (!dialogvisible)
+ return 0;
+ if (!dialog.mousereleased && (flags & MOUSE_RELEASE)) {
+ dialog.mousereleased = 1;
+ return 1;
+ }
+ if (!dialog.mousereleased && (flags & MOUSE_DRAG)) {
+ return 1;
+ }
+ dialog.mousereleased = 1;
+ if (dialog.mousegrab) {
+ dialog.items[dialog.current].type->mouse(dialog.items +
+ dialog.current, x, y,
+ mousebuttons, flags);
+ return 1;
+ }
+ if (dialog.x > x || dialog.y > y || dialog.x + dialog.width < x
+ || dialog.y + dialog.height < y) {
+ if (flags & MOUSE_PRESS) {
+ ui_closedialog(0);
+ return 1;
+ }
+ dialog.items[dialog.current].type->mouse(dialog.items +
+ dialog.current, x, y, 0,
+ 0);
+ return 1;
+ }
+ for (i = dialog.nitems - 1; i >= 0; i--)
+ if (dialog.items[i].y < y)
+ break;
+ if (i == -1) {
+ dialog.items[dialog.current].type->mouse(dialog.items +
+ dialog.current, x, y, 0,
+ 0);
+ return 1;
+ }
+ if (((flags & MOUSE_PRESS) || (flags & MOUSE_MOVE))
+ && dialog.current != i) {
+ dialog.items[dialog.current].type->unselect(dialog.items +
+ dialog.current);
+ dialog.current = i;
+ uih->display = 1;
+ }
+ dialog.items[i].type->mouse(dialog.items + i, x, y, mousebuttons,
+ flags);
+ return 1;
+}
+
+int ui_dialogkeys(int key)
+{
+ if (ui_keyyesno(key))
+ return 1;
+ if (!dialogvisible)
+ return 0;
+ if (key == UIKEY_ESC) {
+ ui_closedialog(0);
+ return 1;
+ }
+ if (!dialog.items[dialog.current].type->
+ key(dialog.items + dialog.current, key)) {
+ switch (key) {
+ case 'h':
+ ui_help(dialog.item->shortname);
+ return 1;
+ case UIKEY_TAB:
+ case UIKEY_DOWN:
+ case UIKEY_RIGHT:
+ NEXT();
+ break;
+ case UIKEY_UP:
+ case UIKEY_LEFT:
+ PREV();
+ break;
+ case 13:
+ case '\n':
+ ui_closedialog(1);
+ }
+ }
+ return 1;
+}
diff --git a/src/ui/drivers.c b/src/ui/drivers.c
new file mode 100644
index 0000000..f4954c6
--- /dev/null
+++ b/src/ui/drivers.c
@@ -0,0 +1,89 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+/*drivers registry */
+#include <config.h>
+#include <ui.h>
+extern CONST struct ui_driver svga_driver, x11_driver, dog_driver,
+ plan9_driver, plan9_driver, mac_driver, mac_full_driver, osx_driver,
+ osx_fullscreen_driver, os2vio_driver, cocoa_driver, qt_driver,
+ cocoa_fullscreen_driver, be_driver, be_direct_driver, be_screen_driver,
+ aalib_driver, gtk_driver, ggi_driver, win32_driver, dxw_driver,
+ dxf_driver, DGA_driver;
+CONST struct ui_driver *CONST drivers[] = {
+#ifdef WIN32_DRIVER
+ &win32_driver,
+#endif
+#ifdef DDRAW_DRIVER
+ &dxw_driver,
+ &dxf_driver,
+#endif
+#ifdef SVGA_DRIVER
+ &svga_driver,
+#endif
+#ifdef X11_DRIVER
+ &x11_driver,
+#endif
+#ifdef DGA_DRIVER
+ &DGA_driver,
+#endif
+#ifdef GTK_DRIVER
+ &gtk_driver,
+#endif
+#ifdef GGI_DRIVER
+ &ggi_driver,
+#endif
+#ifdef OS2VIO_DRIVER
+ &os2vio_driver,
+#endif
+#ifdef DOG_DRIVER
+ &dog_driver,
+#endif
+#ifdef PLAN9_DRIVER
+ &plan9_driver,
+#endif
+#ifdef AA_DRIVER
+ &aalib_driver,
+#endif
+#ifdef _MAC
+ &mac_driver,
+ &mac_full_driver,
+#endif
+#ifdef OSX_DRIVER
+ &osx_driver,
+ &osx_fullscreen_driver,
+#endif
+#ifdef COCOA_DRIVER
+ &cocoa_driver,
+ &cocoa_fullscreen_driver,
+#endif
+#ifdef QT_DRIVER
+ &qt_driver,
+#endif
+#ifdef BEOS_DRIVER
+ &be_driver,
+ &be_direct_driver,
+ &be_screen_driver,
+#endif
+ NULL
+};
+
+CONST int ndrivers = (sizeof(drivers) / sizeof(*drivers) - 1);
diff --git a/src/ui/filesel.c b/src/ui/filesel.c
new file mode 100644
index 0000000..24c1c83
--- /dev/null
+++ b/src/ui/filesel.c
@@ -0,0 +1,677 @@
+#ifndef _plan9_
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
+
+#include <config.h>
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <xmenu.h>
+#include <grlib.h>
+#include <ui.h>
+#include <xerror.h>
+#include <misc-f.h>
+#include "uiint.h"
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+static char **dirs;
+static char **sdirs;
+static int ndirs;
+static char **names;
+static char **snames;
+static int nnames;
+
+struct ui_textdata *dir, *filename;
+static char lastdir[256];
+static char *currdir;
+
+static struct uih_window *filew;
+static CONST char *mask;
+static void (*callback) (CONST char *name, int succ);
+int filevisible;
+static int filex, filey, filewidth, fileheight;
+
+#define ADIR 0
+#define AFILELIST 1
+#define ADIRLIST 2
+#define AFILE 3
+#define AOK 4
+
+#define DIRSTART (filey+BORDERHEIGHT)
+#define LISTSTART (DIRSTART+BUTTONHEIGHT+BORDERHEIGHT)
+#define LISTEND (FILESTART-BORDERHEIGHT)
+#define FILESTART (OKSTART-BORDERHEIGHT-BUTTONHEIGHT)
+#define OKSTART (filey+fileheight-BORDERHEIGHT-BUTTONHEIGHT)
+#define SCROLLWIDTH 10
+
+#define LISTWIDTH ((filewidth-10*BORDERWIDTH-2*SCROLLWIDTH)/2)
+
+#define NVISIBLE ((LISTEND-LISTSTART-2*BORDERHEIGHT)/xtextheight(uih->font))
+
+static int selectedname;
+static int selecteddir;
+static int namestart;
+static int dirstart;
+
+static int pressedbutton;
+static int activebutton;
+static int active;
+
+static void ui_freenames(void)
+{
+ int i;
+ selectedname = 0;
+ selecteddir = 0;
+ if (nnames) {
+ for (i = 0; i < nnames; i++)
+ free(names[i]), free(snames[i]);
+ free(names);
+ nnames = 0;
+ }
+ if (ndirs) {
+ for (i = 0; i < ndirs; i++)
+ free(dirs[i]), free(sdirs[i]);
+ free(dirs);
+ ndirs = 0;
+ }
+ if (snames)
+ free(snames), snames = NULL;
+ if (sdirs)
+ free(sdirs), sdirs = NULL;
+}
+
+static int compar(CONST void *a, CONST void *b)
+{
+ return (strcmp(*(CONST char **) a, *(CONST char **) b));
+}
+
+static char **ui_mksnames(int nnames, char **names, int width)
+{
+ char **snames = NULL;
+ int i;
+ if (nnames) {
+ qsort(names, nnames, sizeof(*names), /*(int (*)(CONST void *, CONST
+ void *))strcmp */ compar);
+ snames = (char **) malloc(sizeof(*snames) * nnames);
+ for (i = 0; i < nnames; i++) {
+ if (xtextwidth(uih->font, names[i]) <= width)
+ snames[i] = mystrdup(names[i]);
+ else {
+ int y;
+ int swidth = 0;
+ int len = (int) strlen(names[i]);
+ snames[i] = (char *) malloc(strlen(names[i]) + 2);
+ for (y = len - 4; y < len; y++)
+ swidth += xtextcharw(uih->font, names[i][y]);
+ swidth += xtextcharw(uih->font, '|');
+ y = 0;
+ while (swidth < width) {
+ snames[i][y] = names[i][y];
+ swidth += xtextcharw(uih->font, names[i][y]);
+ y++;
+ }
+ snames[i][y - 1] = '|';
+ snames[i][y] = 0;
+ strcat(snames[i], names[i] + len - 4);
+ }
+ }
+ }
+ return (snames);
+}
+
+static void ui_buildnames(int width)
+{
+ ui_freenames();
+ xio_getfiles(currdir, &names, &dirs, &nnames, &ndirs);
+ if (snames)
+ free(snames), snames = NULL;
+ if (sdirs)
+ free(sdirs), sdirs = NULL;
+ snames = ui_mksnames(nnames, names, width);
+ sdirs = ui_mksnames(ndirs, dirs, width);
+}
+
+void ui_closefilesel(int success)
+{
+ char *text =
+ (char *) malloc((int) strlen(filename->text) +
+ (int) strlen(currdir) + 3);
+ filevisible = 0;
+ uih_removew(uih, filew);
+ ui_freenames();
+ sprintf(text, "%s" XIO_PATHSEPSTR "%s", currdir, filename->text);
+ ui_closetext(dir);
+ ui_closetext(filename);
+ strcpy(lastdir, currdir);
+ free(currdir);
+ callback(text, success);
+ free(text);
+ uih->display = 1;
+ ui_freenames();
+}
+
+static void
+filepos(uih_context * c, int *x, int *y, int *w, int *h, void *data)
+{
+ *x = filex;
+ *y = filey;
+ *w = filewidth;
+ *h = fileheight;
+}
+
+static void drawfile(uih_context * c, void *data)
+{
+ int i;
+ int ypos;
+ int h = xtextheight(uih->font);
+ uih_drawborder(uih, filex + BORDERWIDTH, DIRSTART,
+ filewidth - 2 * BORDERWIDTH, BUTTONHEIGHT,
+ BORDER_PRESSED | BORDER_LIGHT);
+ uih_drawborder(uih, filex + BORDERWIDTH, FILESTART,
+ filewidth - 2 * BORDERWIDTH, BUTTONHEIGHT,
+ BORDER_PRESSED | BORDER_LIGHT);
+
+ ui_drawbutton("OK", (pressedbutton == 0), active == AOK
+ && activebutton == 0, filex + BORDERWIDTH,
+ filex + filewidth / 2 - BORDERWIDTH, OKSTART);
+ ui_drawbutton(gettext("Cancel"), (pressedbutton == 1), active == AOK
+ && activebutton == 1,
+ filex + filewidth / 2 + BORDERWIDTH,
+ filex + filewidth - BORDERWIDTH, OKSTART);
+
+ uih_drawborder(uih, filex + BORDERWIDTH, LISTSTART,
+ LISTWIDTH + 3 * BORDERWIDTH + SCROLLWIDTH,
+ LISTEND - LISTSTART, BORDER_PRESSED);
+ uih_drawborder(uih, filex + filewidth / 2 + BORDERWIDTH, LISTSTART,
+ LISTWIDTH + 3 * BORDERWIDTH + SCROLLWIDTH,
+ LISTEND - LISTSTART, BORDER_PRESSED);
+ ypos = LISTSTART + BORDERHEIGHT;
+ for (i = 0; ypos + h < LISTEND && i + namestart < nnames; i++) {
+ if (i + namestart == selectedname) {
+ xrectangle(uih->image, filex + 2 * BORDERWIDTH, ypos,
+ LISTWIDTH, h,
+ (uih->palette->
+ type & BITMAPS) ? BGCOLOR(uih) :
+ LIGHTGRAYCOLOR(uih));
+ }
+ if (uih->palette->type & BITMAPS)
+ xprint(uih->image, uih->font, filex + 2 * BORDERWIDTH, ypos,
+ snames[i + namestart],
+ i + namestart ==
+ selectedname ? FGCOLOR(uih) : BGCOLOR(uih),
+ BGCOLOR(uih), TEXT_PRESSED);
+ else
+ xprint(uih->image, uih->font, filex + 2 * BORDERWIDTH, ypos,
+ snames[i + namestart],
+ (i + namestart) == selectedname
+ && active == AFILELIST ? SELCOLOR(uih) : FGCOLOR(uih),
+ BGCOLOR(uih), 0);
+ ypos += h;
+ }
+ if (nnames) {
+ int xstart = (namestart) * (LISTEND - LISTSTART) / nnames;
+ int xend = (namestart + NVISIBLE) * (LISTEND - LISTSTART) / nnames;
+ if (xstart > (LISTEND - LISTSTART - 2 * BORDERHEIGHT))
+ xstart = LISTEND - LISTSTART - 2 * BORDERHEIGHT;
+ if (xend > (LISTEND - LISTSTART - 2 * BORDERHEIGHT))
+ xend = LISTEND - LISTSTART - 2 * BORDERHEIGHT;
+ uih_drawborder(uih, filex + LISTWIDTH + 3 * BORDERWIDTH, LISTSTART + xstart + BORDERHEIGHT, SCROLLWIDTH, xend - xstart, /*1|BORDER_LIGHT */
+ 0);
+ }
+
+ ypos = LISTSTART + BORDERHEIGHT;
+ for (i = 0; ypos + h < LISTEND && i + dirstart < ndirs; i++) {
+ if (i + dirstart == selecteddir) {
+ xrectangle(uih->image, filex + filewidth / 2 + 2 * BORDERWIDTH,
+ ypos, LISTWIDTH, h,
+ (uih->palette->type & BITMAPS) ? BGCOLOR(uih) :
+ LIGHTGRAYCOLOR(uih));
+ }
+ if (uih->palette->type & BITMAPS)
+ xprint(uih->image, uih->font,
+ filex + filewidth / 2 + 2 * BORDERWIDTH, ypos,
+ sdirs[i + dirstart],
+ i + dirstart ==
+ selecteddir ? FGCOLOR(uih) : BGCOLOR(uih), BGCOLOR(uih),
+ TEXT_PRESSED);
+ else
+ xprint(uih->image, uih->font,
+ filex + filewidth / 2 + 2 * BORDERWIDTH, ypos,
+ sdirs[i + dirstart],
+ (i + dirstart) == selecteddir
+ && active == ADIRLIST ? SELCOLOR(uih) : FGCOLOR(uih),
+ BGCOLOR(uih), 0);
+ ypos += h;
+ }
+ if (ndirs) {
+ int xstart = (dirstart) * (LISTEND - LISTSTART) / ndirs;
+ int xend = (dirstart + NVISIBLE) * (LISTEND - LISTSTART) / ndirs;
+ if (xstart > (LISTEND - LISTSTART - 2 * BORDERHEIGHT))
+ xstart = LISTEND - LISTSTART - 2 * BORDERHEIGHT;
+ if (xend > (LISTEND - LISTSTART - 2 * BORDERHEIGHT))
+ xend = LISTEND - LISTSTART - 2 * BORDERHEIGHT;
+ uih_drawborder(uih, filex + filewidth / 2 + LISTWIDTH + 3 * BORDERWIDTH, LISTSTART + xstart + BORDERHEIGHT, SCROLLWIDTH, xend - xstart, /*1|BORDER_LIGHT */
+ 0);
+ }
+ ui_drawtext(filename, active == AFILE);
+ ui_drawtext(dir, active == ADIR);
+}
+
+static void setname(int name)
+{
+ ui_closetext(filename);
+ filename =
+ ui_opentext(filex + 2 * BORDERWIDTH, FILESTART + BORDERHEIGHT,
+ filewidth - 4 * BORDERWIDTH, names[name]);
+}
+
+#ifdef _WIN32
+#define DRIVES
+#endif
+#ifdef DJGPP
+#define DRIVES
+#endif
+static void setdir(int name)
+{
+ char *dirstring = dirs[name];
+ char *s = NULL;
+ if (dirstring[0] == '.' && !dirstring[1]) {
+ /*do nothing */
+ s = mystrdup(currdir);
+ } else if (dirstring[0] && dirstring[1] && dirstring[0] == '.'
+ && dirstring[1] == '.' && !dirstring[2]) {
+ int i = (int) strlen(currdir);
+ s = (char *) malloc((int) strlen(dirstring) +
+ (int) strlen(currdir) + 2);
+ strcpy(s, currdir);
+ for (;
+ i >= 0 && s[i] != '/' && s[i] != '\\' && s[i] != XIO_PATHSEP;
+ i--);
+ if (i < 0)
+ free(s), s = NULL;
+ else
+ s[i] = 0;
+ }
+ if (s == NULL) {
+ int i = (int) strlen(currdir);
+ s = (char *) malloc((int) strlen(dirstring) +
+ (int) strlen(currdir) + 2);
+ strcpy(s, currdir);
+ if (currdir[i - 1] != '/' && currdir[i - 1] != '\\'
+ && currdir[i - 1] != XIO_PATHSEP)
+ strcat(s, XIO_PATHSEPSTR);
+ strcat(s, dirstring);
+ if (!s[0])
+ s[0] = XIO_PATHSEP, s[1] = 0;
+ }
+ free(currdir);
+#ifdef DRIVES
+ if (strlen(s) == 2
+ && ((s[0] >= 'a' && s[0] <= 'z') || (s[0] >= 'A' && s[0] <= 'Z'))
+ && s[1] == ':')
+ s[2] = XIO_PATHSEP, s[3] = 0;
+#endif
+ currdir = s;
+ ui_closetext(dir);
+ dir =
+ ui_opentext(filex + 2 * BORDERWIDTH, DIRSTART + BORDERHEIGHT,
+ filewidth - 4 * BORDERWIDTH, currdir);
+ ui_freenames();
+ ui_buildnames(LISTWIDTH);
+ dirstart = 0;
+ selecteddir = 0;
+ namestart = 0;
+ selectedname = 0;
+ uih->display = 1;
+}
+
+static void setexactdir(CONST char *dirstring)
+{
+ free(currdir);
+ currdir = mystrdup(dirstring);
+ ui_closetext(dir);
+ dir =
+ ui_opentext(filex + 2 * BORDERWIDTH, DIRSTART + BORDERHEIGHT,
+ filewidth - 4 * BORDERWIDTH, currdir);
+ ui_freenames();
+ ui_buildnames(LISTWIDTH);
+ dirstart = 0;
+ selecteddir = 0;
+ namestart = 0;
+ selectedname = 0;
+ uih->display = 1;
+}
+
+int ui_keyfilesel(int k)
+{
+ if (!filevisible)
+ return 0;
+ if (k == UIKEY_ESC)
+ ui_closefilesel(0);
+ else
+ switch (active) {
+ default:
+ active = AFILE;
+ uih->display = 1;
+ break;
+ case ADIR:
+ if (ui_textkey(dir, k))
+ break;
+ if (k == '\n' || k == 13) {
+ active = AFILE;
+ setexactdir(dir->text);
+ uih->display = 1;
+ }
+ if (k == UIKEY_UP) {
+ active = AOK;
+ uih->display = 1;
+ activebutton = 1;
+ }
+ if (k == '\t' || k == UIKEY_DOWN) {
+ active++;
+ uih->display = 1;
+ }
+ break;
+ case AFILELIST:
+ switch (k) {
+ case '\t':
+ case UIKEY_RIGHT:
+ uih->display = 1;
+ active = ADIRLIST;
+ break;
+ case UIKEY_LEFT:
+ uih->display = 1;
+ active = ADIR;
+ break;
+ case UIKEY_UP:
+ if (selectedname) {
+ uih->display = 1;
+ selectedname--;
+ if (selectedname < namestart)
+ namestart = selectedname;
+ }
+ break;
+ case UIKEY_DOWN:
+ if (selectedname < nnames - 1) {
+ uih->display = 1;
+ selectedname++;
+ if (selectedname >= namestart + NVISIBLE)
+ namestart = selectedname - NVISIBLE + 1;
+ }
+ break;
+ case UIKEY_HOME:
+ if (selectedname) {
+ uih->display = 1;
+ selectedname = namestart = 0;
+ }
+ break;
+ case UIKEY_END:
+ if (selectedname < nnames - 1) {
+ uih->display = 1;
+ selectedname = nnames - 1;;
+ if (selectedname >= namestart + NVISIBLE)
+ namestart = selectedname - NVISIBLE + 1;
+ }
+ break;
+ case '\n':
+ case 13:
+ setname(selectedname);
+ uih->display = 1;
+ active = AFILE;
+ break;
+ }
+ break;
+ case ADIRLIST:
+ switch (k) {
+ case '\t':
+ case UIKEY_RIGHT:
+ uih->display = 1;
+ active = AFILE;
+ break;
+ case UIKEY_LEFT:
+ uih->display = 1;
+ active = AFILELIST;
+ break;
+ case UIKEY_UP:
+ if (selecteddir) {
+ uih->display = 1;
+ selecteddir--;
+ if (selecteddir < dirstart)
+ dirstart = selecteddir;
+ }
+ break;
+ case UIKEY_DOWN:
+ if (selecteddir < ndirs - 1) {
+ uih->display = 1;
+ selecteddir++;
+ if (selecteddir >= dirstart + NVISIBLE)
+ dirstart = selecteddir - NVISIBLE + 1;
+ }
+ break;
+ case UIKEY_HOME:
+ if (selecteddir) {
+ uih->display = 1;
+ selecteddir = dirstart = 0;
+ }
+ break;
+ case UIKEY_END:
+ if (selecteddir < ndirs - 1) {
+ uih->display = 1;
+ selecteddir = ndirs - 1;;
+ if (selecteddir >= dirstart + NVISIBLE)
+ dirstart = selecteddir - NVISIBLE + 1;
+ }
+ break;
+ case '\n':
+ case 13:
+ setdir(selecteddir);
+ uih->display = 1;
+ break;
+ }
+ break;
+ case AFILE:
+ if (ui_textkey(filename, k))
+ break;
+ if (k == '\t' || k == UIKEY_DOWN) {
+ active++;
+ uih->display = 1;
+ activebutton = 0;
+ }
+ if (k == UIKEY_UP) {
+ active--;
+ uih->display = 1;
+ }
+
+ if (k == '\n' || k == 13) {
+ ui_closefilesel(1);
+ }
+ break;
+ case AOK:
+ if (k == '\n' || k == 13)
+ ui_closefilesel(!activebutton);
+ if (k == '\t' || k == UIKEY_RIGHT || k == UIKEY_DOWN) {
+ uih->display = 1;
+ activebutton++;
+ if (activebutton > 2) {
+ activebutton = 0;
+ active = ADIR;
+ }
+ }
+ if (k == UIKEY_LEFT || k == UIKEY_UP) {
+ uih->display = 1;
+ activebutton--;
+ if (activebutton < 0) {
+ activebutton = 0;
+ active = AFILE;
+ }
+ }
+ }
+ return 1;
+}
+
+int ui_mousefilesel(int x, int y, int buttons, int flags)
+{
+ static int grabbed = -1;
+ if (!filevisible)
+ return 0;
+ if (grabbed >= 0 && (flags & MOUSE_DRAG)) {
+ if (!grabbed) {
+ int pos;
+ pos =
+ (y - LISTSTART) * nnames / (LISTEND - LISTSTART -
+ 2 * BORDERHEIGHT);
+ if (pos >= nnames - NVISIBLE)
+ pos = nnames - NVISIBLE;
+ if (pos < 0)
+ pos = 0;
+ if (pos != namestart) {
+ namestart = pos;
+ uih->display = 1;
+ if (selectedname < pos)
+ selectedname = pos;
+ if (selectedname >= pos + NVISIBLE)
+ selectedname = pos + NVISIBLE - 1;
+ }
+ } else {
+ int pos;
+ pos =
+ (y - LISTSTART) * ndirs / (LISTEND - LISTSTART -
+ 2 * BORDERHEIGHT);
+ if (pos >= ndirs - NVISIBLE)
+ pos = ndirs - NVISIBLE;
+ if (pos < 0)
+ pos = 0;
+ if (pos != dirstart) {
+ dirstart = pos;
+ uih->display = 1;
+ if (selecteddir < pos)
+ selecteddir = pos;
+ if (selecteddir >= pos + NVISIBLE)
+ selecteddir = pos + NVISIBLE - 1;
+ }
+ }
+ } else
+ grabbed = -1;
+ if (x < filex || y < filey || x > filex + filewidth
+ || y > filex + fileheight) {
+ if (flags & MOUSE_PRESS)
+ ui_closefilesel(0);
+ return 1;
+ }
+ if (y < LISTSTART) {
+ if (pressedbutton != -1)
+ pressedbutton = -1, uih->display = 1;
+ if ((flags & MOUSE_MOVE) && active != ADIR)
+ active = ADIR, uih->display = 1;
+ if (flags & MOUSE_PRESS)
+ ui_textmouse(dir, x, y);
+ } else if (y < LISTEND) {
+ int mouseat = 0;
+ if (pressedbutton != -1)
+ pressedbutton = -1, uih->display = 1;
+ if (x > filex + filewidth / 2)
+ mouseat = 1, x -= filewidth / 2;
+ x -= filex;
+ if (flags & MOUSE_MOVE) {
+ if (!mouseat && active != AFILELIST)
+ active = AFILELIST, uih->display = 1;
+ if (mouseat && active != ADIRLIST)
+ active = ADIRLIST, uih->display = 1;
+ }
+ if (x > LISTWIDTH && (flags & MOUSE_PRESS))
+ grabbed = mouseat;
+ else {
+ if (flags & MOUSE_PRESS) {
+ int atitem =
+ (y - LISTSTART -
+ BORDERHEIGHT) / xtextheight(uih->font);
+ if (atitem < 0)
+ atitem = 0;
+ if (!mouseat) {
+ atitem += namestart;
+ if (atitem < nnames) {
+ if (atitem == selectedname
+ && !strcmp(names[selectedname],
+ filename->text)) {
+ ui_closefilesel(1);
+ } else {
+ selectedname = atitem;
+ uih->display = 1;
+ setname(selectedname);
+ }
+ }
+ } else {
+ atitem += dirstart;
+ if (atitem < ndirs) {
+ selecteddir = atitem;
+ uih->display = 1;
+ setdir(selecteddir);
+ }
+ }
+ }
+ }
+ } else if (y < OKSTART) {
+ if (pressedbutton != -1)
+ pressedbutton = -1, uih->display = 1;
+ /*exit(1); */
+ if ((flags & MOUSE_MOVE) && active != AFILE)
+ active = AFILE, uih->display = 1;
+ if (flags & MOUSE_PRESS)
+ ui_textmouse(filename, x, y);
+ } else {
+ int mouseat = 0;
+ if (x > filex + filewidth / 2)
+ mouseat = 1;
+ if (flags & MOUSE_PRESS) {
+ if (active != AOK)
+ active = AOK, uih->display = 1;
+ if (activebutton != mouseat || pressedbutton != mouseat)
+ activebutton = pressedbutton = mouseat, uih->display = 1;
+ }
+ if ((flags & MOUSE_MOVE) && pressedbutton != mouseat)
+ uih->display = 1, pressedbutton = -1, active =
+ AOK, activebutton = mouseat;
+ if ((flags & MOUSE_RELEASE) && pressedbutton == mouseat)
+ ui_closefilesel(!mouseat);
+ }
+ return 1;
+}
+
+void
+ui_buildfilesel(CONST char *f, CONST char *m,
+ void (*c) (CONST char *, int))
+{
+ if (filevisible) {
+ x_fatalerror("Internal error!");
+ }
+ pressedbutton = activebutton = active = -1;
+ if (lastdir[0] == 0)
+ getcwd(lastdir, 256);
+ lastdir[255] = 0;
+ currdir = mystrdup(lastdir);
+ callback = c;
+ active = AFILE;
+ filex = 0;
+ filey = 0;
+ filewidth = uih->image->width;
+ fileheight = uih->image->height;
+ namestart = dirstart = 0;
+ mask = m;
+ dir =
+ ui_opentext(filex + 2 * BORDERWIDTH, DIRSTART + BORDERHEIGHT,
+ filewidth - 4 * BORDERWIDTH, lastdir);
+ filename =
+ ui_opentext(filex + 2 * BORDERWIDTH, FILESTART + BORDERHEIGHT,
+ filewidth - 4 * BORDERWIDTH, f);
+ filevisible = 1;
+ ui_buildnames(LISTWIDTH);
+ filew = uih_registerw(uih, filepos, drawfile, 0, DRAWBORDER);
+}
+#endif
diff --git a/src/ui/fparams.c b/src/ui/fparams.c
new file mode 100644
index 0000000..0befa7a
--- /dev/null
+++ b/src/ui/fparams.c
@@ -0,0 +1,112 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <config.h>
+#ifndef _plan9_
+#include <fconfig.h>
+#include <string.h>
+#include <stdlib.h>
+#ifdef DESTICKY
+#include <unistd.h>
+#endif
+#else
+#include <u.h>
+#include <libc.h>
+#endif
+#include <filter.h>
+#include <ui_helper.h>
+#include <ui.h>
+#include <param.h>
+#include <xmenu.h>
+#include <plane.h>
+#include <xerror.h>
+#include "uiint.h"
+
+
+static char *defrender = NULL;
+static CONST char *rbasename = "anim";
+static int alias = 0;
+static int slowmode = 0;
+static char *imgtype;
+static char *defsize;
+static float framerate;
+static int letterspersec = 20;
+static int defvectors;
+static int iframedist;
+CONST struct params ui_fractal_params[] = {
+
+ {"", P_HELP, NULL, "Animation rendering:"},
+ {"-render", P_STRING, &defrender,
+ "Render animation into seqence of .png files"},
+ {"-basename", P_STRING, &rbasename,
+ "Name for .png files (XaoS will add 4 digit number and extension"},
+ {"-size", P_STRING, &defsize, "widthxheight"},
+ {"-renderimage", P_STRING, &imgtype, "256 or truecolor"},
+ {"-renderframerate", P_FLOAT, &framerate, "framerate"},
+ {"-antialiasing", P_SWITCH, &alias,
+ "Perform antialiasing (slow, requires quite lot of memory)"},
+ {"-alwaysrecalc", P_SWITCH, &slowmode,
+ "Always recalculate whole image (slowes down rendering, increases quality)"},
+ {"-rendervectors", P_SWITCH, &defvectors,
+ "Render motion vectors (should be used for MPEG encoding)"},
+ {"-iframedist", P_NUMBER, &iframedist,
+ "Recommended distance between I frames in pat file (should be used for MPEG encoding)"},
+ {NULL, 0, NULL, NULL}
+};
+
+int ui_dorender_params(void)
+{
+ if (defrender != NULL) {
+ int imagetype = TRUECOLOR24;
+ int width = 640, height = 480;
+#ifdef DESTICKY
+ seteuid(getuid()); /* Don't need supervisor rights anymore. */
+ setegid(getgid());
+#endif
+#ifndef STRUECOLOR24
+ if (imagetype == TRUECOLOR24)
+ imagetype = TRUECOLOR;
+#endif
+ if (imgtype != NULL) {
+ if (!strcmp("256", imgtype))
+ imagetype = C256;
+ else if (!strcmp("truecolor", imgtype)) {
+ x_fatalerror("Unknown image type:%s", imgtype);
+ }
+ }
+ if (defsize != NULL &&
+ !sscanf(defsize, "%ix%i", &width, &height) &&
+ (width <= 0 || height <= 0)) {
+ x_fatalerror("Invalid size (use for example 320x200");
+ }
+ if (framerate <= 0)
+ framerate = 30;
+ uih_renderanimation(NULL, rbasename, defrender, width, height,
+ ui_get_windowwidth(width) / width,
+ ui_get_windowheight(height) / height,
+ (int) (1000000 / framerate), imagetype, alias,
+ slowmode, letterspersec, NULL, defvectors,
+ iframedist);
+ return 1;
+ }
+ return 0;
+}
diff --git a/src/ui/param.c b/src/ui/param.c
new file mode 100644
index 0000000..eb10a9d
--- /dev/null
+++ b/src/ui/param.c
@@ -0,0 +1,172 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#else
+#include <string.h>
+#include <stdlib.h>
+#include <stdio.h>
+#endif
+#include <config.h>
+#include <param.h>
+#include <xmenu.h>
+#include <version.h>
+#include <xerror.h>
+#define MAXPARAMS 40
+static CONST struct params *params[40];
+int nparams;
+
+int params_parser(int argc, char **argv)
+{
+ int i, p = 0, d;
+ int ie = 0;
+ int is;
+ CONST struct params *par = NULL;
+ int error = 0;
+ int found;
+ for (i = 1; i < argc && !error; i++) {
+ found = 0;
+#ifdef MACOSX
+ if (strncmp("-psn", argv[i], 4) == 0)
+ continue;
+#endif
+ if (!strcmp("-help", argv[i])) {
+ error = 1;
+ break;
+ }
+ for (d = 0; d < nparams; d++) {
+ par = params[d];
+ for (p = 0; par[p].name != NULL && !error; p++) {
+ if (!strcmp(par[p].name, argv[i])) {
+ found = 1;
+ is = i;
+ switch (par[p].type) {
+ case P_SWITCH:
+ *((int *) par[p].value) = 1;
+ break;
+ case P_NUMBER:
+ {
+ int n;
+ if (i == argc - 1) {
+ x_error
+ ("parameter %s requires numeric value.",
+ argv[i]);
+ error = 1;
+ break;
+ }
+ if (sscanf(argv[i + 1], "%i", &n) != 1) {
+ x_error("parameter for %s is not number.",
+ argv[i]);
+ error = 1;
+ break;
+ }
+ *((int *) par[p].value) = n;
+ i++;
+ }
+ break;
+ case P_FLOAT:
+ {
+ float n;
+ if (i == argc - 1) {
+ x_error
+ ("parameter %s requires floating point numeric value.",
+ argv[i]);
+ error = 1;
+ break;
+ }
+ if (sscanf(argv[i + 1], "%f", &n) != 1) {
+ x_error
+ ("parameter for %s is not floating point number.",
+ argv[i]);
+ error = 1;
+ break;
+ }
+ *((float *) par[p].value) = n;
+ i++;
+ }
+ break;
+ case P_STRING:
+ {
+ if (i == argc - 1) {
+ x_error
+ ("parameter %s requires string value.",
+ argv[i]);
+ error = 1;
+ break;
+ }
+ i++;
+ *((char **) par[p].value) = *(argv + i);
+ }
+ }
+ ie = i;
+ i = is;
+ }
+ }
+ }
+ if (d == nparams && !found) {
+ i = menu_processargs(i, argc, argv);
+ if (i < 0) {
+ error = 1;
+ break;
+ } else
+ i++;
+ } else
+ i = ie;
+ }
+ if (error) {
+ const char *name[] = {
+ "",
+ "number",
+ "string",
+ "f.point"
+ };
+#ifndef _plan9_
+ printf(" XaoS" XaoS_VERSION " help text\n");
+ printf
+ (" (This help is genereated automagically. I am sorry for all inconvencies)\n\n");
+#endif
+ printf("option string param description\n\n");
+ for (d = 0; d < nparams; d++) {
+ par = params[d];
+ for (p = 0; par[p].name != NULL; p++) {
+ if (par[p].type == P_HELP)
+ printf("\n%s\n\n", par[p].help);
+ else if (!par[p].type)
+ printf(" %-14s %s\n", par[p].name, par[p].help);
+ else
+ printf(" %-14s %s\n%14s %s\n", par[p].name,
+ name[par[p].type], "", par[p].help);
+ }
+ if (p == 0)
+ printf(" No options avaiable for now\n");
+ }
+ menu_printhelp();
+ return 0;
+ }
+ return (1);
+}
+
+void params_register(CONST struct params *par)
+{
+ params[nparams++] = par;
+}
diff --git a/src/ui/pipecmd.c b/src/ui/pipecmd.c
new file mode 100644
index 0000000..f0f4c66
--- /dev/null
+++ b/src/ui/pipecmd.c
@@ -0,0 +1,113 @@
+#include <config.h>
+#ifndef _plan9
+#include <stdlib.h>
+#include <unistd.h>
+#include <fcntl.h>
+#ifndef _MAC
+#include <sys/types.h>
+#endif
+#include <fconfig.h>
+#include <filter.h>
+#include <fractal.h>
+#include <string.h>
+#include <ui_helper.h>
+#include <ui.h>
+#include <timers.h>
+#include <xmenu.h>
+#include "uiint.h"
+#ifdef COMPILE_PIPE
+static int pipefd = -1;
+tl_timer *pipetimer;
+static char pipecommand[256];
+static int commandpos;
+static int textmode = 0;
+static int backslash = 0;
+static int nest = -1;
+#define add(cmd) (pipecommand[commandpos++]=cmd)
+static void ui_pipe_handler(void *data, int q)
+{
+#ifdef O_NONBLOCK
+ char buf[100];
+ int n = (int) read(pipefd, buf, 100);
+ int i;
+ if (n > 0) {
+ buf[n] = 0;
+ }
+ for (i = 0; i < n; i++) {
+ if (backslash) {
+ add(buf[i]);
+ continue;
+ }
+ if (textmode) {
+ if (buf[i] == '\\') {
+ add(buf[i]);
+ backslash = 1;
+ continue;
+ }
+ if (buf[i] == '"') {
+ add(buf[i]);
+ textmode = 0;
+ continue;
+ }
+ add(buf[i]);
+ } else {
+ add(buf[i]);
+ if (buf[i] == '"')
+ textmode = 1;
+ if (buf[i] == ')')
+ nest--;
+ if (buf[i] == '(') {
+ if (nest == -1)
+ nest = 1;
+ else
+ nest++;
+ }
+ if (!nest) {
+ add(0);
+ uih_command(uih, pipecommand);
+ nest = -1;
+ commandpos = 0;
+ }
+ }
+ }
+#endif
+}
+
+void ui_pipe_init(CONST char *name)
+{
+#ifdef O_NONBLOCK
+ if ((int) strlen(name) == 1 && name[0] == '-') {
+ pipefd = 0;
+ fcntl(pipefd, F_SETFL, O_NONBLOCK);
+ } else {
+ pipefd = open(name, O_NONBLOCK);
+ if (pipefd == -1) {
+ perror(name);
+ exit(1);
+ }
+ }
+ pipetimer = tl_create_timer();
+ tl_set_multihandler(pipetimer, ui_pipe_handler, NULL);
+ tl_reset_timer(pipetimer);
+ tl_set_interval(pipetimer, 100000);
+ tl_add_timer(syncgroup, pipetimer);
+#else
+ printf
+ ("Fatal error - constant O_NONBLOCK used for non-blocking IO in the pipe handling"
+ "is unknown at the moment of compilation. The non-blocking IO will not work. "
+ "Please ask authors...\n");
+ exit(0);
+#endif
+}
+
+static void ui_pipe_close(void)
+{
+#ifdef O_NONBLOCK
+ if (pipefd == -1)
+ return;
+ close(pipefd);
+ tl_remove_timer(pipetimer);
+#endif
+}
+#endif
+#endif
diff --git a/src/ui/ui-drv/aa/Makefile.in b/src/ui/ui-drv/aa/Makefile.in
new file mode 100644
index 0000000..c49da4a
--- /dev/null
+++ b/src/ui/ui-drv/aa/Makefile.in
@@ -0,0 +1,39 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = ui_aa.c
+
+OBJS = $(SRCS:.c=.o)
+
+TLIB = @LIBPATH@/libuiaa.a
+
+
+all: $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $(OBJS)
+ $(RANLIB) $@
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/ui/ui-drv/aa/ui_aa.c b/src/ui/ui-drv/aa/ui_aa.c
new file mode 100644
index 0000000..22aa0fc
--- /dev/null
+++ b/src/ui/ui-drv/aa/ui_aa.c
@@ -0,0 +1,724 @@
+#include "aconfig.h"
+#ifdef AA_DRIVER
+#include <string.h>
+#include <malloc.h>
+#include <aalib.h>
+#include <ui.h>
+#include <unistd.h>
+#include <xmenu.h>
+#include <archaccel.h>
+struct ui_driver aalib_driver;
+static aa_palette palette;
+static aa_palette aapalette;
+static int useaapalette;
+#define c context
+static aa_context *c;
+static unsigned char *secondary;
+static int mouse;
+static int nomouse;
+static void aa_build_menus (void);
+static void aa_remove_menus (void);
+extern unsigned char *aa_chardata;
+extern unsigned char *aa_colordata;
+extern int aa_cursorx, aa_cursory;
+
+
+
+static void
+aa_print (int x, int y, CONST char *text)
+{
+ aa_puts (c, x / 2, y / 2, AA_SPECIAL, text);
+}
+
+static void
+aa_display (void)
+{
+ int i;
+ aa_renderpalette (c, useaapalette ? aapalette : palette,
+ &aa_defrenderparams, 0, 0, aa_scrwidth (c),
+ aa_scrheight (c));
+ for (i = 0; i < aa_scrwidth (c) * aa_scrheight (c); i++)
+ {
+ if (aa_colordata[i] != 255)
+ aa_text (c)[i] = aa_chardata[i], aa_attrs (c)[i] = aa_colordata[i];
+ }
+}
+static void
+aa_set_palette (ui_palette pal, int start, int end)
+{
+ int i;
+ for (i = start; i <= end; i++)
+ aa_setpalette (palette, i, pal[i - start][0], pal[i - start][1],
+ pal[i - start][2]);
+ aa_display ();
+ aa_flush (c);
+}
+
+static void
+aa_flip_buffers (void)
+{
+ unsigned char *tmp;
+ tmp = secondary;
+ secondary = c->imagebuffer;
+ c->imagebuffer = tmp;
+}
+
+static void
+aa_free_buffers (char *b1, char *b2)
+{
+ free (aa_chardata);
+ free (aa_colordata);
+ free (secondary);
+}
+
+static int
+aa_alloc_buffers (char **b1, char **b2)
+{
+ secondary = malloc (aa_imgwidth (c) * aa_imgheight (c));
+ *(unsigned char **) b2 = secondary;
+ *(unsigned char **) b1 = c->imagebuffer;
+ aa_chardata = malloc (aa_scrwidth (c) * aa_scrheight (c));
+ aa_colordata = malloc (aa_scrwidth (c) * aa_scrheight (c));
+ return aa_imgwidth (c); /* bytes per scanline */
+}
+
+static void
+aa_getsize (int *w, int *h)
+{
+ aa_resize (c);
+ *w = aa_imgwidth (c);
+ *h = aa_imgheight (c);
+}
+
+static int mousex, mousey, mouseb;
+static void
+aa_processevents (int wait, int *mx, int *my, int *mb, int *k)
+{
+ int ch;
+ static int keys;
+ do
+ {
+ if ((ch = aa_getevent (c, wait)) != AA_NONE && ch != AA_MOUSE
+ && ch != AA_RESIZE && ch < 256)
+ ui_key (ch);
+ switch (ch)
+ {
+ case AA_BACKSPACE:
+ ui_key (UIKEY_BACKSPACE);
+ break;
+ case AA_ESC:
+ ui_key (UIKEY_ESC);
+ break;
+ case AA_RESIZE:
+ ui_resize ();
+ break;
+ case AA_MOUSE:
+ aa_getmouse (c, &mousex, &mousey, &mouseb);
+ break;
+ case AA_LEFT:
+ ui_key (UIKEY_LEFT);
+ if (c->kbddriver->flags & AA_SENDRELEASE)
+ keys |= 1;
+ break;
+ case AA_LEFT | AA_RELEASE:
+ keys &= ~1;
+ break;
+ case AA_RIGHT:
+ ui_key (UIKEY_RIGHT);
+ if (c->kbddriver->flags & AA_SENDRELEASE)
+ keys |= 2;
+ break;
+ case AA_RIGHT | AA_RELEASE:
+ keys &= ~2;
+ break;
+ case AA_UP:
+ ui_key (UIKEY_UP);
+ if (c->kbddriver->flags & AA_SENDRELEASE)
+ keys |= 4;
+ break;
+ case AA_UP | AA_RELEASE:
+ keys &= ~4;
+ break;
+ case AA_DOWN:
+ ui_key (UIKEY_DOWN);
+ if (c->kbddriver->flags & AA_SENDRELEASE)
+ keys |= 8;
+ break;
+ case AA_DOWN | AA_RELEASE:
+ keys &= ~8;
+ break;
+ }
+ wait = 0;
+ }
+ while (ch != AA_NONE);
+ *mx = mousex * 2;
+ *my = mousey * 2;
+ *k = keys;
+ *mb = 0;
+ if (mouseb & AA_BUTTON1)
+ *mb |= BUTTON1;
+ if (mouseb & AA_BUTTON2)
+ *mb |= BUTTON2;
+ if (mouseb & AA_BUTTON3)
+ *mb |= BUTTON3;
+ return;
+}
+
+#define NATTRS 7
+static char *aadriver = NULL;
+static char *kbddriver = NULL;
+static char *mousedriver = NULL;
+static char *deffont = NULL;
+static int width, height, minwidth, minheight, maxwidth, maxheight, recwidth,
+ recheight;
+static int enable[NATTRS + 2], disable[NATTRS + 2];
+static int extended, inverse, bright = 0, contrast = 0;
+static float aa_gamma, dimmul, boldmul;
+static int dithering[3];
+static int randomval = 0;
+static int masks[] =
+ { AA_NORMAL_MASK, AA_DIM_MASK, AA_BOLD_MASK, AA_BOLDFONT_MASK,
+ AA_REVERSE_MASK, AA_ALL, AA_EIGHT
+};
+
+#ifdef DESTICKY
+extern int euid, egid;
+#endif
+static int
+aa_initialize (void)
+{
+ int i, y;
+ aa_parseoptions (NULL, NULL, NULL, NULL); /*parse environment first */
+
+ if (deffont != NULL)
+ {
+ for (y = 0; aa_fonts[y] != NULL; y++)
+ {
+ if (!strcmp (deffont, aa_fonts[y]->name)
+ || !strcmp (deffont, aa_fonts[y]->shortname))
+ {
+ aa_defparams.font = aa_fonts[y];
+ break;
+ }
+ }
+ }
+
+ if (extended)
+ aa_defparams.supported |= AA_EXTENDED;
+
+ for (i = 0; i < NATTRS; i++)
+ {
+ if (enable[i])
+ aa_defparams.supported |= masks[i];
+ if (disable[i])
+ aa_defparams.supported &= ~masks[i];
+ }
+
+ for (i = 0; i < 3; i++)
+ if (dithering[i])
+ aa_defrenderparams.dither = i;
+ if (randomval)
+ aa_defrenderparams.randomval = randomval;
+ if (bright)
+ aa_defrenderparams.bright = bright;
+ if (contrast)
+ aa_defrenderparams.contrast = contrast;
+ if (aa_gamma)
+ aa_defrenderparams.gamma = aa_gamma;
+
+ if (width)
+ aa_defparams.width = width;
+ if (height)
+ aa_defparams.height = height;
+ if (minwidth)
+ aa_defparams.minwidth = minwidth;
+ if (minheight)
+ aa_defparams.minheight = minheight;
+ if (maxwidth)
+ aa_defparams.maxwidth = maxwidth;
+ if (maxheight)
+ aa_defparams.maxheight = maxheight;
+ if (recwidth)
+ aa_defparams.recwidth = recwidth;
+ if (recheight)
+ aa_defparams.recheight = recheight;
+
+ if (aadriver != NULL)
+ aa_recommendhidisplay (aadriver);
+ if (kbddriver != NULL)
+ aa_recommendhikbd (kbddriver);
+ if (mousedriver != NULL)
+ aa_recommendhimouse (mousedriver);
+ if (dimmul)
+ aa_defparams.dimmul = dimmul;
+ if (boldmul)
+ aa_defparams.boldmul = boldmul;
+ if (inverse)
+ aa_defrenderparams.inversion = 1;
+
+#ifdef DESTICKY
+ seteuid (euid); /* We need supervisor rights to open mouse. */
+ setegid (egid);
+#endif
+ c = aa_autoinit (&aa_defparams);
+#ifdef DESTICKY
+ seteuid (getuid ()); /* Don't need supervisor rights anymore. */
+ setegid (getgid ());
+#endif
+
+ if (c == NULL)
+ return 0;
+ aa_autoinitkbd (c, AA_SENDRELEASE);
+ if (!nomouse)
+ mouse = aa_autoinitmouse (c, AA_MOUSEALLMASK);
+
+ aalib_driver.width = aa_mmwidth (c) / 10.0;
+ aalib_driver.height = aa_mmheight (c) / 10.0;
+ aa_build_menus ();
+ return (1);
+}
+
+static void
+aa_uninitialise (void)
+{
+ aa_close (c);
+ aa_remove_menus ();
+}
+
+static void
+aa_get_mouse (int *x, int *y, int *b)
+{
+ if (mouse)
+ aa_getmouse (c, &mousex, &mousey, &mouseb);
+ *x = mousex * 2;
+ *y = mousey * 2;
+ *b = 0;
+ if (mouseb & AA_BUTTON1)
+ *b |= BUTTON1;
+ if (mouseb & AA_BUTTON2)
+ *b |= BUTTON2;
+ if (mouseb & AA_BUTTON3)
+ *b |= BUTTON3;
+}
+
+static void
+aa_mousetype (int type)
+{
+#if (AA_LIB_VERSION>1||AA_LIB_MINNOR>0)
+ if (type == REPLAYMOUSE)
+ aa_hidemouse (c);
+ else
+ aa_showmouse (c);
+#endif
+}
+
+
+#if AA_LIB_VERSION==1 && AA_LIB_MINNOR==0
+#define SUPPORTED c->driver->params.supported
+#else
+#define SUPPORTED c->driverparams.supported
+#endif
+
+
+static int driver;
+static int font;
+static int mask;
+
+static void
+aa_save5 (void)
+{
+ struct aa_hardware_params p = aa_defparams;
+ struct aa_context *sc;
+ struct aa_savedata data;
+ int i;
+ char *name;
+ char extension[100];
+ if (aa_formats[driver]->flags & AA_USE_PAGES)
+ strcpy (extension, "_0_0");
+ else
+ extension[0] = 0;
+ strcat (extension, aa_formats[driver]->extension);
+
+#ifdef DJGPP
+ name = ui_getfile ("fr", extension);
+ /*fit into ugly 8char. limit */
+#else
+ name = ui_getfile ("fract", extension);
+#endif
+
+ if (name == NULL)
+ {
+ aa_print (0, 0, "Save driver initialization failed");
+ aa_flush (c);
+ sleep (3);
+ return;
+ }
+ for (i = 0; name[i] != '.' && name[i] != '_'; i++);
+ name[i] = 0;
+ strcat (name, "%c%e");
+
+ p.minwidth = p.maxwidth = 0;
+ p.minheight = p.maxheight = 0;
+ p.width = aa_scrwidth (c);
+ p.height = aa_scrheight (c);
+ p.supported = mask;
+ if (aa_formats[driver]->font == NULL)
+ p.font = aa_fonts[font];
+
+ data.format = aa_formats[driver];
+ data.name = name;
+ sc = aa_init (&save_d, &p, &data);
+ if (sc == NULL)
+ {
+ aa_print (0, 0, "Save driver initialization failed");
+ aa_flush (c);
+ sleep (3);
+ return;
+ }
+ memcpy (sc->imagebuffer, c->imagebuffer,
+ (aa_imgwidth (c) - 1) * aa_imgheight (c));
+ aa_renderpalette (sc, useaapalette ? aapalette : palette,
+ &aa_defrenderparams, 0, 0, aa_scrwidth (c),
+ aa_scrheight (c));
+ aa_flush (sc);
+ aa_close (sc);
+}
+
+static void
+aa_swinversion (struct uih_context *c)
+{
+ aa_defrenderparams.inversion ^= 1;
+}
+static int
+aa_inversion (struct uih_context *c)
+{
+ return (aa_defrenderparams.inversion);
+}
+static int aacurpalette = 0;
+static void
+aa_setXpalette (struct uih_context *c, int m)
+{
+ int i, s;
+ if (!m)
+ {
+ useaapalette = 0;
+ aa_display ();
+ return;
+ }
+ useaapalette = 1;
+ aacurpalette = m;
+ s = 1 << m;
+ s--;
+ for (i = 0; i < 255; i++)
+ {
+ aapalette[i] = (i & (s)) * 255 / s;
+ }
+}
+static int
+aa_getpalette (struct uih_context *c, int m)
+{
+ if (!useaapalette)
+ return (!m);
+ return (m == aacurpalette);
+}
+static void
+aa_dither (struct uih_context *c, int m)
+{
+ aa_defrenderparams.dither = m;
+}
+static int
+aa_getdither (struct uih_context *c, int mode)
+{
+ return ((int) aa_defrenderparams.dither == (int) mode);
+}
+
+
+static void
+aa_sfont (struct uih_context *co, int i)
+{
+ aa_setfont (c, aa_fonts[i]);
+}
+CONST static char *CONST name[] = {
+ "normal characters ",
+ "half bright(dim) ",
+ "double bright(bold) ",
+ "bold font ",
+ "reversed ",
+ "reserved characters ",
+ "non ascii characters ",
+ "leave menu",
+};
+CONST static char *CONST ttext[] = {
+ "Use XaoS palette",
+ "Black and white stripes",
+ "4 gray palette",
+ "16 gray palette",
+ "32 gray palette",
+ "64 gray palette",
+ "128 gray palette",
+ "256 gray palette"
+};
+static CONST int attribs[] = {
+ AA_NORMAL_MASK,
+ AA_DIM_MASK,
+ AA_BOLD_MASK,
+ AA_BOLDFONT_MASK,
+ AA_REVERSE_MASK,
+ AA_ALL,
+ AA_EIGHT,
+ 0
+};
+
+#define MYNATTRS (sizeof(name)/sizeof(char *))
+static void
+aa_swattr (struct uih_context *co, int m)
+{
+ int mask;
+ if (m < (int) MYNATTRS - 1)
+ {
+ mask = c->params.supported;
+ mask ^= attribs[m];
+ aa_setsupported (c, mask);
+ ui_menu ("aa_attr");
+ }
+}
+static int
+aa_getattr (struct uih_context *co, int m)
+{
+ return (c->params.supported & attribs[m]);
+}
+static int
+aa_getsave3 (struct uih_context *c, int m)
+{
+ return (mask & attribs[m]);
+}
+static void
+aa_save3 (struct uih_context *co, int m)
+{
+ if (m < (int) MYNATTRS - 1)
+ {
+ mask ^= attribs[m];
+ mask &= aa_formats[driver]->supported;
+ ui_menu ("aa_save3");
+ }
+ else
+ aa_save5 ();
+}
+static void
+aa_save2 (struct uih_context *cc, int m)
+{
+ aa_display ();
+ font = m;
+ mask = aa_formats[driver]->supported & c->params.supported;
+ if (!mask)
+ mask = aa_formats[driver]->supported;
+ ui_menu ("aa_save3");
+}
+static void
+aa_save (struct uih_context *c, int m)
+{
+ driver = m;
+ if (aa_formats[m]->font != NULL)
+ aa_save3 (NULL, 0);
+ else
+ ui_menu ("aa_save2");
+}
+
+#define UI (MENUFLAG_NOOPTION|MENUFLAG_NOPLAY)
+static CONST menuitem menuitems[] = {
+ SUBMENU ("file", NULL, "Save as text file", "aa_format"),
+ SUBMENU ("ui", NULL, "Attributes", "aa_attr"),
+ SUBMENU ("ui", NULL, "Font", "aa_font"),
+ MENUNOPCB ("ui", NULL, "Inversion", "aainversion", UI, aa_swinversion,
+ aa_inversion),
+ SUBMENU ("ui", NULL, "Dithering mode", "aa_dithering"),
+ SUBMENU ("", NULL, "Font for saved file", "aa_save2"),
+ SUBMENU ("", NULL, "Save attributes", "aa_save3"),
+ SUBMENU ("palettemenu", NULL, "Text palette", "aa_palette"),
+};
+
+static menuitem *fontmenus;
+static menuitem *fontmenus2;
+static menuitem *formatmenus;
+static int nfonts, nformats;
+static void
+aa_build_menus ()
+{
+ int i;
+ menu_add (menuitems, NITEMS (menuitems));
+ menu_genernumbered (sizeof (ttext) / sizeof (char *), "aa_palette", ttext,
+ NULL, MENU_INT, MENUFLAG_RADIO, aa_setXpalette,
+ aa_getpalette, "palettemenu");
+ menu_genernumbered (AA_DITHERTYPES, "aa_dithering",
+ (CONST char *CONST * CONST) aa_dithernames, NULL,
+ MENU_INT, MENUFLAG_RADIO, aa_dither, aa_getdither,
+ "dither");
+ menu_genernumbered (MYNATTRS, "aa_attr", name, NULL, MENU_INT,
+ MENUFLAG_RADIO, aa_swattr, aa_getattr, "attribute");
+ menu_genernumbered (MYNATTRS, "aa_save3", name, NULL, MENU_INT,
+ MENUFLAG_RADIO, aa_save3, aa_getsave3, "save");
+ for (i = 0; aa_fonts[i] != NULL; i++);
+ nfonts = i;
+ fontmenus = malloc (sizeof (menuitem) * i);
+ fontmenus2 = malloc (sizeof (menuitem) * i);
+ for (i = 0; aa_fonts[i] != NULL; i++)
+ {
+ char s[256];
+ sprintf (s, "font%i%s", i, aa_fonts[i]->shortname);
+ fontmenus[i].name = aa_fonts[i]->name;
+ fontmenus[i].shortname = strdup (s);
+ fontmenus[i].menuname = "aa_font";
+ fontmenus[i].key = NULL;
+ fontmenus[i].type = MENU_INT;
+ fontmenus[i].flags = UI;
+ fontmenus[i].iparam = i;
+ fontmenus[i].function = (void (*)(void)) aa_sfont;
+ fontmenus2[i].name = aa_fonts[i]->name;
+ fontmenus2[i].shortname = fontmenus[i].shortname;
+ fontmenus2[i].menuname = "aa_save2";
+ fontmenus2[i].key = NULL;
+ fontmenus2[i].type = MENU_INT;
+ fontmenus2[i].flags = UI;
+ fontmenus2[i].iparam = i;
+ fontmenus2[i].function = (void (*)(void)) aa_save2;
+ }
+ menu_add (fontmenus, nfonts);
+ menu_add (fontmenus2, nfonts);
+ for (i = 0; aa_formats[i] != NULL; i++);
+ nformats = i;
+ formatmenus = malloc (sizeof (menuitem) * i);
+ for (i = 0; aa_formats[i] != NULL; i++)
+ {
+ formatmenus[i].name = aa_formats[i]->formatname;
+ formatmenus[i].shortname = aa_formats[i]->formatname;
+ formatmenus[i].menuname = "aa_format";
+ formatmenus[i].key = NULL;
+ formatmenus[i].type = MENU_INT;
+ formatmenus[i].flags = UI;
+ formatmenus[i].iparam = i;
+ formatmenus[i].function = (void (*)(void)) aa_save;
+ }
+ menu_add (formatmenus, nformats);
+}
+static void
+aa_remove_menus ()
+{
+ int i;
+ menu_delnumbered (sizeof (ttext) / sizeof (char *), "palettemenu");
+ menu_delnumbered (AA_DITHERTYPES, "dither");
+ menu_delnumbered (MYNATTRS, "attribute");
+ menu_delnumbered (MYNATTRS, "save");
+ menu_delete (menuitems, NITEMS (menuitems));
+ menu_delete (fontmenus, nfonts);
+ menu_delete (fontmenus2, nfonts);
+ free (fontmenus2);
+ menu_delete (formatmenus, nformats);
+ free (formatmenus);
+ for (i = 0; aa_fonts[i] != NULL; i++)
+ {
+ free ((char *) fontmenus[i].shortname);
+ }
+ free (fontmenus);
+}
+static int cursorvisible = 1;
+static void
+aa_fflush (void)
+{
+ if (aa_cursorx < 0)
+ {
+ if (cursorvisible)
+ {
+ aa_gotoxy (c, 0, 0);
+ aa_hidecursor (c);
+ cursorvisible = 0;
+ }
+ }
+ else
+ {
+ aa_gotoxy (c, aa_cursorx, aa_cursory);
+ if (!cursorvisible)
+ aa_showcursor (c), cursorvisible = 1;
+ }
+ aa_flush (c);
+}
+
+static CONST struct params params[] = {
+ {"", P_HELP, NULL, "AA driver options:"},
+ {"-aadriver", P_STRING, &aadriver, "Select display driver used by aa-lib"},
+ {"-kbddriver", P_STRING, &kbddriver,
+ "Select keyboard driver used by aa-lib"},
+ {"-mousedriver", P_STRING, &mousedriver,
+ "Select keyboard driver used by aa-lib"},
+ {"-font", P_STRING, &deffont, "Select font"},
+ {"-width", P_NUMBER, &width, "Set width"},
+ {"-height", P_NUMBER, &height, "Set height"},
+ {"-minwidth", P_NUMBER, &minwidth, "Set minimal allowed width"},
+ {"-minheight", P_NUMBER, &minheight, "Set minimal allowed height"},
+ {"-maxwidth", P_NUMBER, &maxwidth, "Set maximal allowed width"},
+ {"-maxheight", P_NUMBER, &maxheight, "Set maximal allowed height"},
+ {"-recwidth", P_NUMBER, &recwidth, "Set recommended width"},
+ {"-recheight", P_NUMBER, &recheight, "Set recommended height"},
+ {"-normal", P_SWITCH, enable, "enable usage of narmal characters"},
+ {"-nonormal", P_SWITCH, disable, "disable usage of narmal characters"},
+ {"-dim", P_SWITCH, enable + 1,
+ "enable usage of dim(half bright) characters"},
+ {"-nodim", P_SWITCH, disable + 1,
+ "disable usage of dim(half bright) characters"},
+ {"-bold", P_SWITCH, enable + 2,
+ "enable usage of bold(double bright) characters"},
+ {"-nobold", P_SWITCH, disable + 2,
+ "disable usage of bold(double bright) characters"},
+ {"-boldfont", P_SWITCH, enable + 3, "enable usage of boldfont characters"},
+ {"-noboldfont", P_SWITCH, disable + 3,
+ "disable usage of boldfont characters"},
+ {"-reverse", P_SWITCH, enable + 4, "enable usage of reversed characters"},
+ {"-noreverse", P_SWITCH, disable + 4,
+ "disable usage of reversed characters"},
+ {"-all", P_SWITCH, enable + 5, "enable usage of reserved characters"},
+ {"-eight", P_SWITCH, enable + 6, "enable usage of non ansii characters"},
+ {"-extended", P_SWITCH, &extended,
+ "enable usage of extended character set"},
+ {"-inverse", P_SWITCH, &inverse, "enable inverse"},
+ {"-bright", P_NUMBER, &bright, "set bright (0-255)"},
+ {"-contrast", P_NUMBER, &contrast, "set contrast (0-255)"},
+ {"-gamma", P_FLOAT, &aa_gamma, "set famma (0-1)"},
+ {"-nodither", P_SWITCH, dithering, "Disable dithering"},
+ {"-floyd_steinberg", P_SWITCH, dithering + 2,
+ "Enable floyd steinberg dithering"},
+ {"-error_distribution", P_SWITCH, dithering + 1,
+ "Enable error distribution dithering"},
+ {"-random", P_NUMBER, &randomval, "Set random dithering value"},
+ {"-dimmul", P_FLOAT, &dimmul, "Multiply factor for dim color (5.3)"},
+ {"-boldmul", P_FLOAT, &boldmul, "Multiply factor for bold color (5.3)"},
+ {"-nomouse", P_SWITCH, &nomouse, "Disable mouse"},
+ {NULL, 0, NULL, NULL}
+};
+
+struct ui_driver aalib_driver = {
+ "aa",
+ aa_initialize,
+ aa_getsize,
+ aa_processevents,
+ aa_get_mouse,
+ aa_uninitialise,
+ NULL, /*You should implement just one */
+ aa_set_palette, /*of these and add NULL as second */
+ aa_print,
+ aa_display,
+ aa_alloc_buffers,
+ aa_free_buffers,
+ aa_flip_buffers,
+ aa_mousetype,
+ aa_fflush,
+ 2, /*text width */
+ 2, /*text height */
+ params,
+ PALETTE_REDISPLAYS | SCREENSIZE | UPDATE_AFTER_RESIZE | AALIB, /*flags...see ui.h */
+ 0.0, 0.0, /*width/height of screen in centimeters */
+ 0, 0, /*resolution of screen for windowed systems */
+ UI_C256, /*Image type */
+ 0, 255, 255 /*start, end of palette and maximum allocatable */
+ /*entries */
+};
+
+#endif
diff --git a/src/ui/ui-drv/cocoa/AppController.h b/src/ui/ui-drv/cocoa/AppController.h
new file mode 100644
index 0000000..324eaff
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/AppController.h
@@ -0,0 +1,59 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#import <Cocoa/Cocoa.h>
+#import <Carbon/Carbon.h>
+
+#import "FractalView.h"
+#include "ui.h"
+@ class VideatorProxy;
+
+@interface AppController:NSObject {
+ FractalView *view;
+ NSWindow *window;
+ BOOL applicationIsLaunched;
+}
+
+#pragma mark Accessors
+-(FractalView *) view;
+
+#pragma mark Driver Initialization
+-(void) initLocale;
+-(int) initDriver:(struct ui_driver *)driver fullscreen:(BOOL) fullscreen;
+-(void) uninitDriver;
+
+#pragma mark Menus
+-(void) localizeApplicationMenu;
+-(void) performMenuAction:(NSMenuItem *) sender;
+-(NSString *) keyEquivalentForName:(NSString *) name;
+-(void) buildMenuWithContext:(struct uih_context *)context name:(CONST char *) name;
+-(void) buildMenuWithContext:(struct uih_context *)context name:(CONST char *)menuName parent:(NSMenu *) parentMenu;
+-(void) buildMenuWithContext:(struct uih_context *)context name:(CONST char *)menuName parent:(NSMenu *)parentMenu isNumbered:(BOOL) isNumbered;
+-(void) showPopUpMenuWithContext:(struct uih_context *)context name:(CONST char *) name;
+
+#pragma mark Dialogs
+-(void) showDialogWithContext:(struct uih_context *)context name:(CONST char *) name;
+
+#pragma mark Help
+-(void) showHelpWithContext:(struct uih_context *)context name:(CONST char *) name;
+@end extern AppController *controller;
diff --git a/src/ui/ui-drv/cocoa/AppController.m b/src/ui/ui-drv/cocoa/AppController.m
new file mode 100644
index 0000000..6f03b97
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/AppController.m
@@ -0,0 +1,542 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#import "AppController.h"
+#import "CustomDialog.h"
+#import "VideatorProxy.h"
+#import "ui.h"
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#include <locale.h>
+#define _(string) gettext(string)
+#else
+#define _(string) (string)
+#endif
+
+/*
+ * This category overrides standard NSWindow behavior which prevents a window
+ * from receiving keyboard events unless it has a titlebar. Without this, the
+ * keyboard doesn't work in full screen mode.
+ */
+@implementation NSWindow (CanBecomeKeyWindowOverride)
+- (BOOL)canBecomeKeyWindow {
+ return YES;
+}
+@end
+
+
+AppController *controller;
+
+@implementation AppController
+
+
+#pragma mark Initialization
+- (id)init {
+ self = [super init];
+ if (self) {
+ applicationIsLaunched = NO;
+ [self initLocale];
+ }
+ return self;
+}
+
+#pragma mark Accessors
+
+- (FractalView *)view {
+ return view;
+}
+
+#pragma mark Driver Initialization
+
+- (void)initLocale {
+ /*
+ * The LANG environment variables used by gettext to determine the locale
+ * are not normally set on Mac OS X, so we use the Cocoa API to retrieve
+ * the list of preferred languages and set the LANG variable accordingly.
+ */
+
+ NSString *myLocalePath = [[[NSBundle mainBundle] resourcePath]
+ stringByAppendingPathComponent:@"locale"];
+
+#ifdef USE_LOCALEPATH
+ /*
+ * This is a global variable defined in ui.h, which the main function uses
+ * to locate the locale files when USE_LOCALEPATH is defined. If it is
+ * undefined, the main function will use the hard coded locale path instead.
+ */
+ localepath = (char *)[myLocalePath UTF8String];
+#endif
+
+ /*
+ * Each of the locales we support is stored in its own subdirectory in the
+ * Resources/locale directory. The name of the directory corresponds to the
+ * ISO code for the locale. Therefore, a list of the files in this
+ * directory conveniently serves as a list of supported locales.
+ */
+ NSMutableArray *supportedLanguages = [[[NSFileManager defaultManager]
+ directoryContentsAtPath:myLocalePath]
+ mutableCopy];
+
+ /* English is supported by default, so there isn't a locale directory for
+ * it. But in order to match it with the user's preferred languages, it
+ * still has to be in the array of supported languages.
+ */
+ [supportedLanguages addObject:@"en"];
+
+ /*
+ * The AppleLanguages user default returns an array of languages sorted
+ * according to the User's settings in the International Preference Panel.
+ * We find the best match between the supported and preferred locales
+ * and set the LANG variable to that.
+ */
+ NSUserDefaults * defaults = [NSUserDefaults standardUserDefaults];
+ NSArray *preferredLanguages = [defaults objectForKey:@"AppleLanguages"];
+ NSString *lang = [preferredLanguages firstObjectCommonWithArray:supportedLanguages];
+ if (lang) setenv("LANG", [lang UTF8String], /*overwrite? */ 0);
+
+ [supportedLanguages release];
+}
+
+- (int)initDriver:(struct ui_driver *)driver
+ fullscreen:(BOOL)fullscreen {
+ /*
+ * Calculate the pixel size in cm. userSpaceScaleFactor returns:
+ * pixels per per point
+ * pixels per inch = pixels per point * 72.0
+ * inches per pixel = 1 / pixels per inch
+ * cm per pixel = inches per pixel * 2.54
+ */
+ CGDirectDisplayID displayID = (CGDirectDisplayID)[[[[NSScreen mainScreen] deviceDescription] objectForKey:@"NSScreenNumber"] intValue];
+ CGSize displaySize = CGDisplayScreenSize(displayID);
+ NSSize displayResolution = [[NSScreen mainScreen] frame].size;
+ driver->width = (displaySize.width/displayResolution.width)/10;
+ driver->height = (displaySize.height/displayResolution.height)/10;
+
+ if (fullscreen) {
+ /*
+ * SetSystemUIMode is the easiest way to make a full screen application.
+ * It's Carbon, but it should be 64-bit safe. kUIModeAllHidden hides
+ * the dock and menuBar and kUIOptionAutoShowMenuBar causes the menubar
+ * to automatically slide in when the user moves the mouse to the top
+ * edge of the screen.
+ */
+ SetSystemUIMode(kUIModeAllHidden, kUIOptionAutoShowMenuBar);
+ window = [[NSWindow alloc] initWithContentRect:[[NSScreen mainScreen] frame]
+ styleMask:NSBorderlessWindowMask
+ backing:NSBackingStoreBuffered
+ defer:YES];
+ } else {
+ window = [[NSWindow alloc] initWithContentRect:NSMakeRect(50, 50, 640, 480)
+ styleMask:(NSTitledWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSResizableWindowMask)
+ backing:NSBackingStoreBuffered
+ defer:YES];
+ [window setFrameAutosaveName:@"XaoSWindow"];
+ }
+
+ view = [[FractalView alloc] initWithFrame:[[window contentView] frame]];
+ [view setAutoresizingMask:(NSViewWidthSizable | NSViewHeightSizable)];
+ [[window contentView] addSubview:view];
+ [window makeFirstResponder:view];
+ [window setDelegate:self];
+ [window setTitle:@"XaoS"];
+ [window makeKeyAndOrderFront:self];
+ [NSApp setDelegate:self];
+
+ /*
+ * These tasks should only be done once, when the application first launches
+ * but for various reasons, they can't be done until after the main run
+ * loop has started. That's why we put them in the driver init code.
+ */
+ if (!applicationIsLaunched) {
+ [self localizeApplicationMenu];
+ [NSApp finishLaunching];
+ applicationIsLaunched = YES;
+ }
+
+ return 1; // 1 for success; 0 for failure
+}
+
+- (void)uninitDriver {
+ SetSystemUIMode(kUIModeNormal, 0);
+ [view release];
+ [window release];
+}
+
+#pragma mark Menus
+
+- (void)localizeApplicationMenu {
+ /*
+ * Internationalize XaoS application menu. We do this via code instead
+ * of within the nib because this allows all i18n to be cross-platform and
+ * self-contained within the po file instead of spread across many places.
+ */
+ NSMenu *appMenu = [[[NSApp mainMenu] itemAtIndex:0] submenu];
+
+ [[appMenu itemWithTitle:@"About XaoS"]
+ setTitle:[NSString stringWithUTF8String:_("About XaoS")]];
+
+ [[appMenu itemWithTitle:@"Services"]
+ setTitle:[NSString stringWithUTF8String:_("Services")]];
+
+ [[appMenu itemWithTitle:@"Hide XaoS"]
+ setTitle:[NSString stringWithUTF8String:_("Hide XaoS")]];
+
+ [[appMenu itemWithTitle:@"Hide Others"]
+ setTitle:[NSString stringWithUTF8String:_("Hide Others")]];
+
+ [[appMenu itemWithTitle:@"Show All"]
+ setTitle:[NSString stringWithUTF8String:_("Show All")]];
+
+ [[appMenu itemWithTitle:@"Quit XaoS"]
+ setTitle:[NSString stringWithUTF8String:_("Quit XaoS")]];
+}
+
+- (void)performMenuAction:(NSMenuItem *)sender {
+ /*
+ * Find the XaoS menu item associated with the sending Cocoa menu item
+ * then invoke the callback to perform that action.
+ */
+ NSString *name = [sender representedObject];
+ CONST menuitem *item = menu_findcommand([name UTF8String]);
+
+ ui_menuactivate(item, NULL);
+}
+
+- (NSString *)keyEquivalentForName:(NSString *)name {
+ // If you want more command-keys, just add them here based on their name:
+ if ([name isEqualToString:@"undo"]) return @"z";
+ if ([name isEqualToString:@"redo"]) return @"Z";
+ if ([name isEqualToString:@"loadpos"]) return @"o";
+ if ([name isEqualToString:@"savepos"]) return @"s";
+ return @"";
+}
+
+- (void)buildMenuWithContext:(struct uih_context *)context
+ name:(CONST char *)name {
+ NSMenu *menu = [NSApp mainMenu];
+ while ([menu numberOfItems] > 1)
+ [menu removeItemAtIndex:1];
+ [self buildMenuWithContext:context name:name parent:menu];
+}
+
+- (void)buildMenuWithContext:(struct uih_context *)context
+ name:(CONST char *)menuName
+ parent:(NSMenu *)parentMenu {
+ [self buildMenuWithContext:context
+ name:menuName
+ parent:parentMenu
+ isNumbered:NO];
+}
+
+- (void)buildMenuWithContext:(struct uih_context *)context
+ name:(CONST char *)menuName
+ parent:(NSMenu *)parentMenu
+ isNumbered:(BOOL)isNumbered {
+ int i, n;
+ CONST menuitem *item;
+ for (i=0,n=1; (item = menu_item(menuName, i)) != NULL; i++) {
+ if (item->type == MENU_SEPARATOR) {
+ [parentMenu addItem:[NSMenuItem separatorItem]];
+ } else {
+ NSString *menuTitle = [NSString stringWithUTF8String:item->name];
+
+ /*
+ * Add elipses to menu items that open dialogs in order to conform
+ * with the Apple Human Interface Guidelines.
+ */
+ if (item->type == MENU_CUSTOMDIALOG || item->type == MENU_DIALOG)
+ menuTitle = [menuTitle stringByAppendingString:@"..."];
+
+ NSString *menuShortName = [NSString stringWithUTF8String:item->shortname];
+ NSString *keyEquiv = [self keyEquivalentForName:menuShortName];
+
+ /*
+ * Add classic XaoS key accelerator to name in parenthesis, unless
+ * this is the main menu. This allows both Mac-style and Xaos-style
+ * key equivalents to co-exist.
+ */
+ if (item->key && parentMenu != [NSApp mainMenu])
+ menuTitle = [NSString stringWithFormat:@"%@ (%s)", menuTitle, item->key];
+
+ NSMenuItem *newItem = [[NSMenuItem allocWithZone:[NSMenu menuZone]] initWithTitle:menuTitle action:nil keyEquivalent:keyEquiv];
+
+ /*
+ * If this is a numbered pop-up menu, override the default key
+ * accelerator with a number or letter based on the position in
+ * the menu.
+ */
+ if (isNumbered && item->type != MENU_SUBMENU) {
+ if (n < 10)
+ keyEquiv = [NSString stringWithFormat:@"%d", n];
+ else if (n == 10)
+ keyEquiv = @"0";
+ else if (n < 36)
+ keyEquiv = [NSString stringWithFormat:@"%c", 'a' + n - 11];
+
+ [newItem setKeyEquivalent:keyEquiv];
+ [newItem setKeyEquivalentModifierMask:0];
+ n++;
+ }
+
+ if (item->type == MENU_SUBMENU) {
+ /* Recursively build submenus */
+ NSMenu *newMenu = [[NSMenu allocWithZone:[NSMenu menuZone]] initWithTitle:menuTitle];
+ [newMenu setDelegate:self];
+ [newItem setSubmenu:newMenu];
+ [self buildMenuWithContext:context name:item->shortname parent:newMenu];
+
+ /* Conditionally add special items to certain menus */
+
+ /*
+ * These items are necessary to provide the expected keyboard
+ * equivalents for cut & paste operations in custom dialogs
+ * and to conform to the human interface guidelines
+ */
+ if ([menuShortName isEqualToString:@"edit"]) {
+ [newMenu addItem:[NSMenuItem separatorItem]];
+ [newMenu addItemWithTitle:[NSString stringWithUTF8String:_("Cut")]
+ action:@selector(cut:) keyEquivalent:@"x"];
+
+ [newMenu addItemWithTitle:[NSString stringWithUTF8String:_("Copy")]
+ action:@selector(copy:) keyEquivalent:@"c"];
+
+ [newMenu addItemWithTitle:[NSString stringWithUTF8String:_("Paste")]
+ action:@selector(paste:) keyEquivalent:@"v"];
+
+ [newMenu addItemWithTitle:[NSString stringWithUTF8String:_("Delete")]
+ action:@selector(delete:) keyEquivalent:@""];
+
+ [newMenu addItemWithTitle:[NSString stringWithUTF8String:_("Select All")]
+ action:@selector(selectAll:) keyEquivalent:@"a"];
+ }
+
+ /*
+ * These items in the window menu are necessary to provide expected
+ * keyboard equivalents for menu operations such as minimizing and
+ * to conform with the human interface guidelnes.
+ */
+ if ([menuShortName isEqualToString:@"window"]) {
+ [newMenu addItemWithTitle:[NSString stringWithUTF8String:_("Minimize")]
+ action:@selector(performMiniaturize:) keyEquivalent:@"m"];
+
+ [newMenu addItemWithTitle:[NSString stringWithUTF8String:_("Zoom")]
+ action:@selector(performZoom:) keyEquivalent:@""];
+
+ [newMenu addItem:[NSMenuItem separatorItem]];
+
+ [newMenu addItemWithTitle:[NSString stringWithUTF8String:_("Bring All to Front")]
+ action:@selector(arrangeInFront:) keyEquivalent:@""];
+ }
+
+ /*
+ * The close menu item in the File menu is necessary to provide
+ * the expected Command-W close window keyboard equivalent and
+ * to conform with the human interface guidelines.
+ */
+ if ([menuShortName isEqualToString:@"file"]) {
+ int i = [newMenu indexOfItemWithRepresentedObject:@"savepos"];
+ [newMenu insertItemWithTitle:[NSString stringWithUTF8String:_("Close")]
+ action:@selector(performClose:)
+ keyEquivalent:@"w"
+ atIndex:i];
+ [newMenu insertItem:[NSMenuItem separatorItem] atIndex:i];
+ }
+
+ /*
+ * Add Videator Output menu item in the UI menu just below
+ * VJ Mode. This will toggle sending video feed to Videator.
+ */
+#ifdef VIDEATOR_SUPPORT
+ if ([menuShortName isEqualToString:@"ui"]) {
+ int i = [newMenu indexOfItemWithRepresentedObject:@"inhibittextoutput"]+1;
+ NSMenuItem *item = [newMenu insertItemWithTitle:[NSString stringWithUTF8String:_("Videator Output")]
+ action:@selector(toggleVideator:)
+ keyEquivalent:@""
+ atIndex:i];
+ [item setTarget:[view videatorProxy]];
+ [item setRepresentedObject:@"videator"];
+ }
+#endif
+
+ [newMenu release];
+ } else {
+ /*
+ * Set action for leaf menu items to generic callback function
+ * and save the short name as the item's represented object. When
+ * the callback is activated, it will find the XaoS menu item
+ * to activate based on the represented object.
+ */
+ [newItem setTarget:self];
+ [newItem setAction:@selector(performMenuAction:)];
+ [newItem setRepresentedObject:menuShortName];
+ if (item->flags & (MENUFLAG_RADIO | MENUFLAG_CHECKBOX) && menu_enabled (item, context))
+ [newItem setState:NSOnState];
+ }
+
+ [parentMenu addItem:newItem];
+ [newItem release];
+ }
+ }
+}
+
+- (void)menuNeedsUpdate:(NSMenu *)menu {
+ CONST struct menuitem *xaosItem;
+ NSMenuItem *menuItem;
+ NSEnumerator *itemEnumerator = [[menu itemArray] objectEnumerator];
+ while (menuItem = [itemEnumerator nextObject]) {
+ if ([menuItem representedObject]) {
+ xaosItem = menu_findcommand([[menuItem representedObject] UTF8String]);
+ if (xaosItem)
+ [menuItem setState:(menu_enabled(xaosItem, globaluih) ? NSOnState : NSOffState)];
+#ifdef VIDEATOR_SUPPORT
+ else if ([[menuItem representedObject] isEqualToString:@"videator"])
+ [menuItem setState:([[view videatorProxy] videatorEnabled] ? NSOnState : NSOffState)];
+#endif
+ }
+ }
+}
+
+- (void)showPopUpMenuWithContext:(struct uih_context *)context
+ name:(CONST char *)name {
+ NSMenu *popUpMenu = [[NSMenu alloc] initWithTitle:@"Popup Menu"];
+ NSPopUpButtonCell *popUpButtonCell = [[NSPopUpButtonCell alloc] initTextCell:@"" pullsDown:NO];
+ NSRect frame = {{0.0, 0.0}, {0.0, 0.0}};
+ frame.origin = [window mouseLocationOutsideOfEventStream];
+ [self buildMenuWithContext:context name:name parent:popUpMenu isNumbered:YES];
+ int state = [[popUpMenu itemAtIndex:0] state];
+ [popUpButtonCell setMenu:popUpMenu];
+ [[popUpMenu itemAtIndex:0] setState:state];
+ [popUpButtonCell performClickWithFrame:frame inView:view];
+ [popUpButtonCell release];
+ [popUpMenu release];
+}
+
+#pragma mark Dialogs
+
+- (void)showDialogWithContext:(struct uih_context *)context
+ name:(CONST char *)name {
+ CONST menuitem *item = menu_findcommand (name);
+ if (!item) return;
+
+ CONST menudialog *dialog = menu_getdialog (context, item);
+ if (!dialog) return;
+
+ int nitems;
+ for (nitems = 0; dialog[nitems].question; nitems++);
+
+ if (nitems == 1 && (dialog[0].type == DIALOG_IFILE || dialog[0].type == DIALOG_OFILE)) {
+ NSString *extension = [[NSString stringWithUTF8String:dialog[0].defstr] pathExtension];
+
+ NSString *fileName = nil;
+ switch(dialog[0].type) {
+ case DIALOG_IFILE:
+ {
+ NSOpenPanel *oPanel = [NSOpenPanel openPanel];
+
+ int result = [oPanel runModalForDirectory:nil
+ file:nil
+ types:[NSArray arrayWithObject:extension]];
+
+ if (result == NSOKButton)
+ fileName = [oPanel filename];
+ break;
+ }
+ case DIALOG_OFILE:
+ {
+ NSSavePanel *sPanel = [NSSavePanel savePanel];
+ [sPanel setRequiredFileType:extension];
+
+ int result = [sPanel runModalForDirectory:nil file:@"untitled"];
+
+ if (result == NSOKButton)
+ fileName = [sPanel filename];
+ break;
+ }
+ }
+
+ [window makeKeyAndOrderFront:self];
+
+ if (fileName) {
+ dialogparam *param = malloc (sizeof (dialogparam));
+ param->dstring = strdup([fileName UTF8String]);
+ ui_menuactivate (item, param);
+ }
+
+ } else {
+ CustomDialog *customDialog = [[CustomDialog alloc] initWithContext:context
+ menuItem:item
+ dialog:dialog];
+ [NSApp beginSheet:customDialog
+ modalForWindow:window
+ modalDelegate:nil
+ didEndSelector:nil
+ contextInfo:nil];
+ [NSApp runModalForWindow:customDialog];
+ [NSApp endSheet:customDialog];
+ [customDialog orderOut:self];
+ [window makeKeyAndOrderFront:self];
+
+ if ([customDialog params])
+ ui_menuactivate(item, [customDialog params]);
+
+ [customDialog release];
+ }
+}
+
+#pragma mark Help
+
+- (void)showHelpWithContext:(struct uih_context *)context
+ name:(CONST char *)name {
+ NSString *anchor = [NSString stringWithUTF8String:name];
+ [[NSHelpManager sharedHelpManager] openHelpAnchor:anchor inBook:@"XaoS Help"];
+}
+
+#pragma mark Window Delegates
+
+- (void)windowWillClose:(NSNotification *)notification {
+ [NSApp terminate:self];
+}
+
+- (void)windowDidResize:(NSNotification *)notification {
+ // Handle maximize/zoom, but ignore live resizing
+ if (![view inLiveResize])
+ ui_resize();
+}
+
+#pragma mark Application Delegates
+
+- (BOOL)application:(NSApplication *)theApplication
+ openFile:(NSString *)filename {
+ if ([[filename pathExtension] isEqualToString:@"xpf"]) {
+ uih_loadfile(globaluih, [filename UTF8String]);
+ return YES;
+ } else if ([[filename pathExtension] isEqualToString:@"xaf"]) {
+ uih_playfile(globaluih, [filename UTF8String]);
+ return YES;
+ } else {
+ return NO;
+ }
+}
+
+@end \ No newline at end of file
diff --git a/src/ui/ui-drv/cocoa/CustomDialog.h b/src/ui/ui-drv/cocoa/CustomDialog.h
new file mode 100644
index 0000000..2821022
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/CustomDialog.h
@@ -0,0 +1,38 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#import <Cocoa/Cocoa.h>
+#include "ui.h"
+
+@ interface CustomDialog:NSWindow {
+ struct uih_context *context;
+ CONST menuitem *item;
+ CONST menudialog *dialog;
+ dialogparam *params;
+ NSMutableDictionary *controls;
+}
+
+-(id) initWithContext:(struct uih_context *)context menuItem:(CONST menuitem *)item dialog:(CONST menudialog *) dialog;
+-(dialogparam *) params;
+
+@end
diff --git a/src/ui/ui-drv/cocoa/CustomDialog.m b/src/ui/ui-drv/cocoa/CustomDialog.m
new file mode 100644
index 0000000..5cac7df
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/CustomDialog.m
@@ -0,0 +1,433 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#import "CustomDialog.h"
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#include <locale.h>
+#define _(string) gettext(string)
+#else
+#define _(string) (string)
+#endif
+
+#define MARGIN 20
+#define SPACING 8
+
+@implementation CustomDialog
+
+#pragma mark Initialization
+
+- (id)initWithContext:(struct uih_context *)myContext
+ menuItem:(CONST menuitem *)myItem
+ dialog:(CONST menudialog *)myDialog {
+
+ NSRect windowRect = NSMakeRect(200, 200, 300, 107);
+ NSRect helpButtonRect = NSMakeRect(20, 20, 25, 25);
+ NSRect cancelButtonRect = NSMakeRect(128, 20, 75, 25);
+ NSRect okButtonRect = NSMakeRect(210, 20, 75, 25);
+ NSRect labelRect = NSMakeRect(20, 67, 62, 17);
+ NSRect controlRect = NSMakeRect(90, 65, 190, 22);
+ NSRect coordRect = NSMakeRect(90, 65, 85, 22);
+
+ self = [super initWithContentRect:windowRect
+ styleMask:NSTitledWindowMask
+ backing:NSBackingStoreBuffered
+ defer:YES];
+
+ if (self) {
+ context = myContext;
+ item = myItem;
+ dialog = myDialog;
+
+ [self setTitle:[NSString stringWithUTF8String:item->name]];
+
+ controls = [[NSMutableDictionary alloc] initWithCapacity:10];
+
+ NSMutableArray *labels = [[NSMutableArray alloc] initWithCapacity:10];
+
+ int maxLabelWidth = 0, maxControlWidth = 0, nitems = 0, i = 0;
+
+ for (nitems = 0; dialog[nitems].question; nitems++);
+
+ for (i = 0; i < nitems; i++) {
+ NSTextField *label = [[NSTextField alloc] initWithFrame:labelRect];
+ NSString *question = [NSString stringWithUTF8String:dialog[i].question];
+ [label setEditable:NO];
+ [label setBezeled:NO];
+ [label setDrawsBackground:NO];
+ [label setStringValue:question];
+
+ [label sizeToFit];
+ if ([label frame].size.width > maxLabelWidth)
+ maxLabelWidth = [label frame].size.width;
+
+ [[self contentView] addSubview:label];
+ [labels addObject:label];
+ [label release];
+
+ switch (dialog[i].type) {
+ case DIALOG_INT:
+ case DIALOG_FLOAT:
+ case DIALOG_STRING:
+ case DIALOG_KEYSTRING:
+ {
+ NSTextField *textField = [[NSTextField alloc] initWithFrame:controlRect];
+ [textField setEditable:YES];
+ [textField setBezeled:YES];
+ [textField setBezelStyle:NSTextFieldSquareBezel];
+ [[textField cell] setScrollable:YES];
+ switch (dialog[i].type) {
+ case DIALOG_INT:
+ [textField setIntValue:dialog[i].defint];
+ break;
+ case DIALOG_FLOAT:
+ [textField setDoubleValue:dialog[i].deffloat];
+ break;
+ case DIALOG_STRING:
+ [textField setStringValue:[NSString stringWithUTF8String:dialog[i].defstr]];
+ break;
+ case DIALOG_KEYSTRING:
+ [textField setStringValue:[NSString stringWithUTF8String:dialog[i].defstr]];
+ break;
+ }
+
+ if ([textField frame].size.width > maxControlWidth)
+ maxControlWidth = [textField frame].size.width;
+
+ [[self contentView] addSubview:textField];
+ [controls setValue:textField forKey:question];
+ [textField release];
+
+ break;
+ }
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+ {
+ NSTextField *textField = [[NSTextField alloc] initWithFrame:controlRect];
+ [textField setEditable:NO];
+ [textField setBezeled:YES];
+ [textField setBezelStyle:NSTextFieldSquareBezel];
+ [[textField cell] setScrollable:YES];
+ [textField setStringValue:[NSString stringWithUTF8String:dialog[i].defstr]];
+ [[textField cell] setRepresentedObject:[NSString stringWithUTF8String:dialog[i].defstr]];
+
+ if ([textField frame].size.width > maxControlWidth)
+ maxControlWidth = [textField frame].size.width;
+
+ [[self contentView] addSubview:textField];
+ [controls setValue:textField forKey:question];
+
+ NSButton *chooseButton = [[NSButton alloc] initWithFrame:okButtonRect];
+ [chooseButton setTitle:[NSString stringWithUTF8String:_("Choose")]];
+ [chooseButton setButtonType:NSMomentaryPushInButton];
+ [chooseButton setBezelStyle:NSRoundedBezelStyle];
+ [chooseButton setTarget:self];
+ if (dialog[i].type == DIALOG_IFILE)
+ [chooseButton setAction:@selector(chooseInput:)];
+ else
+ [chooseButton setAction:@selector(chooseOutput:)];
+ [[chooseButton cell] setRepresentedObject:textField];
+
+ [[self contentView] addSubview:chooseButton];
+ [controls setValue:chooseButton forKey:[question stringByAppendingString:@"choose"]];
+
+ if ([textField frame].size.width + SPACING + [chooseButton frame].size.width > maxControlWidth)
+ maxControlWidth = [textField frame].size.width + SPACING + [chooseButton frame].size.width;
+
+ [chooseButton release];
+ [textField release];
+ break;
+ }
+ case DIALOG_CHOICE:
+ {
+
+ NSPopUpButton *popupButton = [[NSPopUpButton alloc] initWithFrame:controlRect];
+
+ NSMenu *menu = [[NSMenu alloc] initWithTitle:@""];
+ CONST char **str = (CONST char **) dialog[i].defstr;
+ int y;
+ for (y = 0; str[y] != NULL; y++)
+ {
+ NSMenuItem *menuItem = [[NSMenuItem alloc] initWithTitle:[NSString stringWithUTF8String:str[y]] action:nil keyEquivalent:@""];
+ [menu addItem:menuItem];
+ [menuItem release];
+ }
+ [popupButton setMenu:menu];
+ [menu release];
+ [popupButton selectItemAtIndex:dialog[i].defint];
+
+ [popupButton sizeToFit];
+ if ([popupButton frame].size.width > maxControlWidth)
+ maxControlWidth = [popupButton frame].size.width;
+
+ [[self contentView] addSubview:popupButton];
+ [controls setValue:popupButton forKey:question];
+ [popupButton release];
+
+ break;
+ }
+ case DIALOG_ONOFF:
+ {
+ break;
+ }
+ case DIALOG_COORD:
+ {
+ int coordWidth = 0;
+ NSTextField *textField = [[NSTextField alloc] initWithFrame:coordRect];
+ [textField setEditable:YES];
+ [textField setBezeled:YES];
+ [textField setBezelStyle:NSTextFieldSquareBezel];
+ [[textField cell] setScrollable:YES];
+ [textField setDoubleValue:dialog[i].deffloat];
+
+ coordWidth += [textField frame].size.width;
+
+ [[self contentView] addSubview:textField];
+ [controls setValue:textField forKey:question];
+ [textField release];
+
+ textField = [[NSTextField alloc] initWithFrame:labelRect];
+ [textField setEditable:NO];
+ [textField setBezeled:NO];
+ [textField setDrawsBackground:NO];
+ [textField setStringValue:@"+"];
+
+ [textField sizeToFit];
+ coordWidth += [textField frame].size.width;
+
+ [[self contentView] addSubview:textField];
+ [controls setValue:textField forKey:[question stringByAppendingString:@"+"]];
+ [textField release];
+
+ textField = [[NSTextField alloc] initWithFrame:coordRect];
+ [textField setEditable:YES];
+ [textField setBezeled:YES];
+ [textField setBezelStyle:NSTextFieldSquareBezel];
+ [[textField cell] setScrollable:YES];
+ [textField setDoubleValue:dialog[i].deffloat2];
+
+ coordWidth += [textField frame].size.width;
+
+ [[self contentView] addSubview:textField];
+ [controls setValue:textField forKey:[question stringByAppendingString:@"2"]];
+ [textField release];
+
+ textField = [[NSTextField alloc] initWithFrame:labelRect];
+ [textField setEditable:NO];
+ [textField setBezeled:NO];
+ [textField setDrawsBackground:NO];
+ [textField setStringValue:@"i"];
+
+ [textField sizeToFit];
+ coordWidth += [textField frame].size.width;
+
+ [[self contentView] addSubview:textField];
+ [controls setValue:textField forKey:[question stringByAppendingString:@"i"]];
+ [textField release];
+
+ if (coordWidth > maxControlWidth)
+ maxControlWidth = coordWidth;
+ }
+ }
+ if (MARGIN + maxLabelWidth + SPACING + maxControlWidth + MARGIN > windowRect.size.width)
+ windowRect.size.width = MARGIN + maxLabelWidth + SPACING + maxControlWidth + MARGIN;
+ }
+
+ controlRect.origin.x = labelRect.origin.x + maxLabelWidth + SPACING;
+
+ for (i = nitems-1; i >= 0; i--) {
+ NSTextField *label = [labels objectAtIndex:i];
+ NSControl *control = [controls objectForKey:[label stringValue]];
+ [label setFrameOrigin:labelRect.origin];
+
+ [control setFrameOrigin:controlRect.origin];
+
+ switch (dialog[i].type) {
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+ {
+ NSButton *chooseButton = [controls objectForKey:[[label stringValue] stringByAppendingString:@"choose"]];
+ [chooseButton setFrameOrigin:NSMakePoint([control frame].origin.x + [control frame].size.width + SPACING, [control frame].origin.y - 2)];
+ break;
+ }
+ case DIALOG_COORD:
+ {
+ NSRect controlRect2 = controlRect;
+ controlRect2.origin.x += [control frame].size.width;
+ control = [controls objectForKey:[[label stringValue] stringByAppendingString:@"+"]];
+ [control setFrameOrigin:controlRect2.origin];
+ controlRect2.origin.x += [control frame].size.width;
+ control = [controls objectForKey:[[label stringValue] stringByAppendingString:@"2"]];
+ [control setFrameOrigin:controlRect2.origin];
+ controlRect2.origin.x += [control frame].size.width;
+ control = [controls objectForKey:[[label stringValue] stringByAppendingString:@"i"]];
+ [control setFrameOrigin:controlRect2.origin];
+ control = [controls objectForKey:[label stringValue]];
+ }
+ }
+
+ labelRect.origin.y += SPACING + [control frame].size.height;
+ controlRect.origin.y += SPACING + [control frame].size.height;
+ }
+
+ controlRect.origin.y += MARGIN;
+
+ windowRect.size.height = controlRect.origin.y;
+
+ okButtonRect.origin.x += windowRect.size.width - [self frame].size.width;
+ cancelButtonRect.origin.x += windowRect.size.width - [self frame].size.width;
+
+ NSButton *okButton = [[NSButton alloc] initWithFrame:okButtonRect];
+ [okButton setTitle:[NSString stringWithUTF8String:_("OK")]];
+ [okButton setButtonType:NSMomentaryPushInButton];
+ [okButton setBezelStyle:NSRoundedBezelStyle];
+ [okButton setKeyEquivalent:@"\r"];
+ [okButton setTarget:self];
+ [okButton setAction:@selector(execute:)];
+ [okButton sizeToFit];
+ [[self contentView] addSubview:okButton];
+
+ NSButton *cancelButton = [[NSButton alloc] initWithFrame:cancelButtonRect];
+ [cancelButton setTitle:[NSString stringWithUTF8String:_("Cancel")]];
+ [cancelButton setButtonType:NSMomentaryPushInButton];
+ [cancelButton setBezelStyle:NSRoundedBezelStyle];
+ [cancelButton setTarget:self];
+ [cancelButton setAction:@selector(cancel:)];
+ [cancelButton sizeToFit];
+ [[self contentView] addSubview:cancelButton];
+
+ NSButton *helpButton = [[NSButton alloc] initWithFrame:helpButtonRect];
+ [helpButton setTitle:@""];
+ [helpButton setButtonType:NSMomentaryPushInButton];
+ [helpButton setBezelStyle:NSHelpButtonBezelStyle];
+ [helpButton setTarget:self];
+ [helpButton setAction:@selector(help:)];
+ [[self contentView] addSubview:helpButton];
+ [helpButton release];
+
+ okButtonRect.size.width = MAX([okButton frame].size.width + 2, [cancelButton frame].size.width) + 2 * SPACING;
+ cancelButtonRect.size.width = okButtonRect.size.width;
+
+ okButtonRect.origin.x = windowRect.size.width - MARGIN - okButtonRect.size.width;
+ cancelButtonRect.origin.x = okButtonRect.origin.x - SPACING - cancelButtonRect.size.width;
+
+ [okButton setFrame:okButtonRect];
+ [cancelButton setFrame:cancelButtonRect];
+
+ [cancelButton release];
+ [okButton release];
+
+ [self setContentSize:windowRect.size];
+ }
+ return self;
+}
+
+# pragma mark Targets
+
+- (IBAction)execute:(id)sender {
+ int nitems;
+ for (nitems = 0; dialog[nitems].question; nitems++);
+ params = malloc (sizeof (*params) * nitems);
+
+ int i;
+ for (i = 0; i < nitems; i++) {
+ NSString *question = [NSString stringWithUTF8String:dialog[i].question];
+ NSControl *control;
+ switch (dialog[i].type) {
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+ case DIALOG_STRING:
+ case DIALOG_KEYSTRING:
+ control = [controls objectForKey:question];
+ params[i].dstring = strdup ([[control stringValue] UTF8String]);
+ break;
+ case DIALOG_INT:
+ control = [controls objectForKey:question];
+ params[i].dint = [control intValue];
+ break;
+ case DIALOG_FLOAT:
+ control = [controls objectForKey:question];
+ params[i].number = [control floatValue];
+ break;
+ case DIALOG_COORD:
+ control = [controls objectForKey:question];
+ params[i].dcoord[0] = [control floatValue];
+ control = [controls objectForKey:[question stringByAppendingString:@"2"]];
+ params[i].dcoord[1] = [control floatValue];
+ break;
+ case DIALOG_CHOICE:
+ control = [controls objectForKey:question];
+ params[i].dint = [(NSPopUpButtonCell *)control indexOfSelectedItem];
+ break;
+ }
+ }
+ [NSApp stopModal];
+}
+
+- (IBAction)cancel:(id)sender {
+ params = NULL;
+ [NSApp stopModal];
+}
+
+- (IBAction)help:(id)sender {
+ ui_help(item->shortname);
+}
+
+- (IBAction)chooseInput:(id)sender {
+ NSTextField *target = [[sender cell] representedObject];
+ NSString *extension = [[[target cell] representedObject] pathExtension];
+ NSOpenPanel *oPanel = [NSOpenPanel openPanel];
+
+ int result = [oPanel runModalForDirectory:nil
+ file:nil
+ types:[NSArray arrayWithObject:extension]];
+
+ if (result == NSOKButton)
+ [target setStringValue:[oPanel filename]];
+}
+
+- (IBAction)chooseOutput:(id)sender {
+ NSTextField *target = [[sender cell] representedObject];
+ NSString *extension = [[[target cell] representedObject] pathExtension];
+ NSSavePanel *sPanel = [NSSavePanel savePanel];
+ [sPanel setRequiredFileType:extension];
+
+ int result = [sPanel runModalForDirectory:nil file:[target stringValue]];
+ if (result == NSOKButton)
+ [target setStringValue:[sPanel filename]];
+}
+
+#pragma mark Accessors
+
+- (dialogparam *)params {
+ return params;
+}
+
+#pragma mark Deallocation
+
+- (void)dealloc {
+ [controls release];
+ [super dealloc];
+}
+@end
diff --git a/src/ui/ui-drv/cocoa/English.lproj/Credits.html b/src/ui/ui-drv/cocoa/English.lproj/Credits.html
new file mode 100644
index 0000000..d38d9cd
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/English.lproj/Credits.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
+<html>
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
+ <meta http-equiv="Content-Style-Type" content="text/css">
+ <title></title>
+ <meta name="Generator" content="Cocoa HTML Writer">
+ <meta name="CocoaVersion" content="824.41">
+ <style type="text/css">
+ body {
+ font-family: "Lucida Grande", Arial, sans-serif;
+ font-size: 8pt;
+ text-align: center;
+ }
+ </style>
+</head>
+<body>
+<p>XaoS is free software; you can redistribute it and/or modify it under the
+terms of the<br>
+<a href="help:anchor=gpl%20bookID=XaoS%20Help">GNU General Public License</a>.
+</p>
+<p><a href="help:anchor=about%20bookID=XaoS%20Help">Credits</a></p>
+<p><a href="help:anchor=devel%20bookID=XaoS%20Help">How to Help</a></p>
+<p><a href="http://xaos.sourceforge.net/">XaoS Website</a></p>
+</body>
+</html>
diff --git a/src/ui/ui-drv/cocoa/English.lproj/InfoPlist.strings b/src/ui/ui-drv/cocoa/English.lproj/InfoPlist.strings
new file mode 100644
index 0000000..42b5784
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/English.lproj/InfoPlist.strings
Binary files differ
diff --git a/src/ui/ui-drv/cocoa/English.lproj/MainMenu.nib/designable.nib b/src/ui/ui-drv/cocoa/English.lproj/MainMenu.nib/designable.nib
new file mode 100644
index 0000000..5d0aa75
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/English.lproj/MainMenu.nib/designable.nib
@@ -0,0 +1,498 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.01">
+ <data>
+ <int key="IBDocument.SystemTarget">0</int>
+ <string key="IBDocument.SystemVersion">9C7010</string>
+ <string key="IBDocument.InterfaceBuilderVersion">629</string>
+ <string key="IBDocument.AppKitVersion">949.26</string>
+ <string key="IBDocument.HIToolboxVersion">352.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="29"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string id="617114957">com.apple.InterfaceBuilderKit</string>
+ <string id="578961457">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1021">
+ <string key="NSClassName" id="1039455869">NSApplication</string>
+ </object>
+ <object class="NSCustomObject" id="1014">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1050">
+ <reference key="NSClassName" ref="1039455869"/>
+ </object>
+ <object class="NSMenu" id="649796088">
+ <string key="NSTitle">AMainMenu</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="694149608">
+ <reference key="NSMenu" ref="649796088"/>
+ <string key="NSTitle" id="163516152">XaoS</string>
+ <string key="NSKeyEquiv" id="1003"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <object class="NSCustomResource" key="NSOnImage" id="621373611">
+ <string key="NSClassName" id="963292957">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage" id="481733502">
+ <reference key="NSClassName" ref="963292957"/>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="110575045">
+ <reference key="NSTitle" ref="163516152"/>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="238522557">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">About XaoS</string>
+ <reference key="NSKeyEquiv" ref="1003"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="621373611"/>
+ <reference key="NSMixedImage" ref="481733502"/>
+ </object>
+ <object class="NSMenuItem" id="304266470">
+ <reference key="NSMenu" ref="110575045"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <reference key="NSTitle" ref="1003"/>
+ <reference key="NSKeyEquiv" ref="1003"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="621373611"/>
+ <reference key="NSMixedImage" ref="481733502"/>
+ </object>
+ <object class="NSMenuItem" id="1046388886">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle" id="487627014">Services</string>
+ <reference key="NSKeyEquiv" ref="1003"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="621373611"/>
+ <reference key="NSMixedImage" ref="481733502"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="752062318">
+ <reference key="NSTitle" ref="487627014"/>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <string key="NSName">_NSServicesMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="646227648">
+ <reference key="NSMenu" ref="110575045"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <reference key="NSTitle" ref="1003"/>
+ <reference key="NSKeyEquiv" ref="1003"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="621373611"/>
+ <reference key="NSMixedImage" ref="481733502"/>
+ </object>
+ <object class="NSMenuItem" id="755159360">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">Hide XaoS</string>
+ <string key="NSKeyEquiv" id="712247123">h</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="621373611"/>
+ <reference key="NSMixedImage" ref="481733502"/>
+ </object>
+ <object class="NSMenuItem" id="342932134">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">Hide Others</string>
+ <reference key="NSKeyEquiv" ref="712247123"/>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="621373611"/>
+ <reference key="NSMixedImage" ref="481733502"/>
+ </object>
+ <object class="NSMenuItem" id="908899353">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">Show All</string>
+ <reference key="NSKeyEquiv" ref="1003"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="621373611"/>
+ <reference key="NSMixedImage" ref="481733502"/>
+ </object>
+ <object class="NSMenuItem" id="1056857174">
+ <reference key="NSMenu" ref="110575045"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <reference key="NSTitle" ref="1003"/>
+ <reference key="NSKeyEquiv" ref="1003"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="621373611"/>
+ <reference key="NSMixedImage" ref="481733502"/>
+ </object>
+ <object class="NSMenuItem" id="632727374">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">Quit XaoS</string>
+ <string key="NSKeyEquiv">q</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="621373611"/>
+ <reference key="NSMixedImage" ref="481733502"/>
+ </object>
+ </object>
+ <string key="NSName">_NSAppleMenu</string>
+ </object>
+ </object>
+ </object>
+ <string key="NSName">_NSMainMenu</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">orderFrontStandardAboutPanel:</string>
+ <reference key="source" ref="1021"/>
+ <reference key="destination" ref="238522557"/>
+ </object>
+ <int key="connectionID">142</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hide:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="755159360"/>
+ </object>
+ <int key="connectionID">367</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hideOtherApplications:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="342932134"/>
+ </object>
+ <int key="connectionID">368</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">terminate:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="632727374"/>
+ </object>
+ <int key="connectionID">369</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">unhideAllApplications:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="908899353"/>
+ </object>
+ <int key="connectionID">370</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="1049">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1048"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1021"/>
+ <reference key="parent" ref="1049"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="1014"/>
+ <reference key="parent" ref="1049"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1050"/>
+ <reference key="parent" ref="1049"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">29</int>
+ <reference key="object" ref="649796088"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="694149608"/>
+ </object>
+ <reference key="parent" ref="1049"/>
+ <string key="objectName">MainMenu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">56</int>
+ <reference key="object" ref="694149608"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="110575045"/>
+ </object>
+ <reference key="parent" ref="649796088"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">57</int>
+ <reference key="object" ref="110575045"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="238522557"/>
+ <reference ref="755159360"/>
+ <reference ref="908899353"/>
+ <reference ref="632727374"/>
+ <reference ref="646227648"/>
+ <reference ref="304266470"/>
+ <reference ref="1046388886"/>
+ <reference ref="1056857174"/>
+ <reference ref="342932134"/>
+ </object>
+ <reference key="parent" ref="694149608"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">58</int>
+ <reference key="object" ref="238522557"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">134</int>
+ <reference key="object" ref="755159360"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">150</int>
+ <reference key="object" ref="908899353"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">136</int>
+ <reference key="object" ref="632727374"/>
+ <reference key="parent" ref="110575045"/>
+ <string key="objectName">1111</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">144</int>
+ <reference key="object" ref="646227648"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">236</int>
+ <reference key="object" ref="304266470"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">131</int>
+ <reference key="object" ref="1046388886"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="752062318"/>
+ </object>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">149</int>
+ <reference key="object" ref="1056857174"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">145</int>
+ <reference key="object" ref="342932134"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">130</int>
+ <reference key="object" ref="752062318"/>
+ <reference key="parent" ref="1046388886"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.IBPluginDependency</string>
+ <string>-3.IBPluginDependency</string>
+ <string>130.IBPluginDependency</string>
+ <string>130.ImportedFromIB2</string>
+ <string>130.editorWindowContentRectSynchronizationRect</string>
+ <string>131.IBPluginDependency</string>
+ <string>131.ImportedFromIB2</string>
+ <string>134.IBPluginDependency</string>
+ <string>134.ImportedFromIB2</string>
+ <string>136.IBPluginDependency</string>
+ <string>136.ImportedFromIB2</string>
+ <string>144.IBPluginDependency</string>
+ <string>144.ImportedFromIB2</string>
+ <string>145.IBPluginDependency</string>
+ <string>145.ImportedFromIB2</string>
+ <string>149.IBPluginDependency</string>
+ <string>149.ImportedFromIB2</string>
+ <string>150.IBPluginDependency</string>
+ <string>150.ImportedFromIB2</string>
+ <string>236.IBPluginDependency</string>
+ <string>236.ImportedFromIB2</string>
+ <string>29.IBPluginDependency</string>
+ <string>29.ImportedFromIB2</string>
+ <string>29.WindowOrigin</string>
+ <string>29.editorWindowContentRectSynchronizationRect</string>
+ <string>56.IBPluginDependency</string>
+ <string>56.ImportedFromIB2</string>
+ <string>57.IBPluginDependency</string>
+ <string>57.ImportedFromIB2</string>
+ <string>57.editorWindowContentRectSynchronizationRect</string>
+ <string>58.IBPluginDependency</string>
+ <string>58.ImportedFromIB2</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="578961457"/>
+ <reference ref="617114957"/>
+ <reference ref="617114957"/>
+ <reference ref="578961457"/>
+ <integer value="1" id="9"/>
+ <string>{{436, 809}, {64, 6}}</string>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <string>{74, 862}</string>
+ <string>{{6, 836}, {77, 20}}</string>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ <string>{{18, 683}, {174, 153}}</string>
+ <reference ref="578961457"/>
+ <reference ref="9"/>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">374</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../../XaoS.xcodeproj</string>
+ <int key="IBDocument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CdsJ3QnfCeEJ4wnlCecJ6QnrCfQJ
+9goXChkKGwodCh8KIQojCiUKJwopCisKLQovCjEKMwo1Cj4KQAphCmMKZQpnCmkKawptCm8KcQpzCnUK
+dwp5CnsKfQp/CpIKlwqwCrkKwwrPCuYK8wr/CxcLMQs9C0kLWwtyC3sLfQt+C4cLiQuKC5MLlQvAC8IL
+xAvGC8gLygvMC84L0AvSC9QL1gvYC9oL3AveC+AL4gvkC+YL6AvxC/MMHgwgDCIMJAwmDCgMKgwsDC4M
+MAwyDDQMNgw4DDoMPAw+DEAMQgxEDEYMSAxKDEwMTwxRDFMMVQxYDFoMXAxfDGgMagxsDG4McAxzDHUM
+eAx6DIMMhQyGDI8MkQySDJsMnQyeDKcMrAAAAAAAAAICAAAAAAAAAcUAAAAAAAAAAAAAAAAAAAy7A</bytes>
+ </object>
+ </data>
+</archive>
diff --git a/src/ui/ui-drv/cocoa/English.lproj/MainMenu.nib/keyedobjects.nib b/src/ui/ui-drv/cocoa/English.lproj/MainMenu.nib/keyedobjects.nib
new file mode 100644
index 0000000..8659a00
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/English.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ
diff --git a/src/ui/ui-drv/cocoa/FractalView.h b/src/ui/ui-drv/cocoa/FractalView.h
new file mode 100644
index 0000000..34957ab
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/FractalView.h
@@ -0,0 +1,70 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#import <Cocoa/Cocoa.h>
+
+#include "ui.h"
+
+#ifdef VIDEATOR_SUPPORT
+@ class VideatorProxy;
+#endif
+
+@interface FractalView:NSView {
+ int mouseX, mouseY;
+ int mouseButton, rightMouseButton, otherMouseButton, mouseScrollWheel;
+ int keysDown;
+ int cursorType;
+
+ int currentBuffer;
+ NSBitmapImageRep *imageRep[2];
+
+ NSString *messageText;
+ NSPoint messageLocation;
+
+#ifdef VIDEATOR_SUPPORT
+ VideatorProxy *videatorProxy;
+#endif
+}
+
+#pragma mark Buffers
+-(int) allocBuffer1:(char **)b1 buffer2:(char **) b2;
+-(void) freeBuffers;
+-(void) flipBuffers;
+
+#pragma mark Accessors
+
+#ifdef VIDEATOR_SUPPORT
+-(VideatorProxy *) videatorProxy;
+#endif
+-(void) getWidth:(int *)w height:(int *) h;
+-(void) getMouseX:(int *)mx mouseY:(int *)my mouseButton:(int *) mb;
+-(void) getMouseX:(int *)mx mouseY:(int *)my mouseButton:(int *)mb keys:(int *) k;
+
+#pragma mark Cursor
+-(void) setCursorType:(int) type;
+
+#pragma mark Text
+-(void) printText:(CONST char *)text atX:(int)x y:(int) y;
+- (NSDictionary *) textAttributes;
+
+@end
diff --git a/src/ui/ui-drv/cocoa/FractalView.m b/src/ui/ui-drv/cocoa/FractalView.m
new file mode 100644
index 0000000..6a3b458
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/FractalView.m
@@ -0,0 +1,347 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#import "FractalView.h"
+#ifdef VIDEATOR_SUPPORT
+#import "VideatorProxy.h"
+#endif
+
+@interface NSObject(AppDelegateStuff)
+
+- (void)keyPressed:(NSString *)key;
+
+@end
+
+@implementation FractalView
+
+#pragma mark Initialization
+
+- (id)initWithFrame:(NSRect)frame {
+ self = [super initWithFrame:frame];
+ if (self) {
+#ifdef VIDEATOR_SUPPORT
+ videatorProxy = [[VideatorProxy alloc] init];
+#endif
+ }
+ return self;
+}
+
+- (void)dealloc {
+#ifdef VIDEATOR_SUPPORT
+ [videatorProxy release];
+#endif
+ [super dealloc];
+}
+
+#pragma mark Drawing
+
+- (BOOL)isOpaque {
+ return YES;
+}
+
+- (void)drawRect:(NSRect)rect {
+ if (imageRep[currentBuffer]) {
+ [imageRep[currentBuffer] drawInRect:[self bounds]];
+ }
+
+ if (messageText) {
+ [messageText drawAtPoint:messageLocation withAttributes:[self textAttributes]];
+ [messageText release];
+ messageText = nil;
+ }
+
+#ifdef VIDEATOR_SUPPORT
+ [videatorProxy sendImageRep:imageRep[currentBuffer]];
+#endif
+}
+
+#pragma mark Resize Handling
+
+- (void)viewDidEndLiveResize {
+ ui_resize();
+}
+
+#pragma mark Mouse Event Handling
+
+- (void)calculateMouseLocationFromEvent:(NSEvent *)theEvent {
+ NSPoint mouseLoc = [self convertPoint:[theEvent locationInWindow] fromView:nil];
+ mouseX = mouseLoc.x;
+ mouseY = [self bounds].size.height - mouseLoc.y;
+}
+
+- (void)mouseDown:(NSEvent *)theEvent {
+ [self calculateMouseLocationFromEvent:theEvent];
+
+ // Emulate 3 buttons based on modifier keys
+ mouseScrollWheel = 0;
+ if ([theEvent modifierFlags] & NSControlKeyMask) {
+ mouseButton = BUTTON3;
+ } else if ([theEvent modifierFlags] & NSShiftKeyMask) {
+ mouseButton = BUTTON2;
+ } else {
+ mouseButton = BUTTON1;
+ }
+}
+
+- (void)mouseUp:(NSEvent *)theEvent {
+ mouseButton = 0;
+}
+
+- (void)mouseDragged:(NSEvent *)theEvent {
+ [self calculateMouseLocationFromEvent:theEvent];
+}
+
+- (void)rightMouseDown:(NSEvent *)theEvent {
+ [self calculateMouseLocationFromEvent:theEvent];
+ mouseScrollWheel = 0;
+ rightMouseButton = BUTTON3;
+}
+
+- (void)rightMouseUp:(NSEvent *)theEvent {
+ rightMouseButton = 0;
+}
+
+- (void)rightMouseDragged:(NSEvent *)theEvent {
+ [self calculateMouseLocationFromEvent:theEvent];
+}
+
+- (void)otherMouseDown:(NSEvent *)theEvent {
+ [self calculateMouseLocationFromEvent:theEvent];
+ mouseScrollWheel = 0;
+ otherMouseButton = BUTTON2;
+}
+
+- (void)otherMouseUp:(NSEvent *)theEvent {
+ otherMouseButton = 0;
+}
+
+- (void)otherMouseDragged:(NSEvent *)theEvent {
+ [self calculateMouseLocationFromEvent:theEvent];
+}
+
+- (void)scrollWheel:(NSEvent *)theEvent {
+ // Only scroll if no mouse buttons are held
+ if ((mouseButton | rightMouseButton | otherMouseButton) == 0) {
+ mouseScrollWheel = BUTTON2;
+ mouseX += [theEvent deltaX];
+ mouseY += [theEvent deltaY];
+ }
+}
+
+#pragma mark Keyboard Event Handling
+
+- (void)flagsChanged:(NSEvent *)theEvent {
+ // Emulate 3 buttons based on modifier keys
+ if (mouseButton) {
+ if ([theEvent modifierFlags] & NSControlKeyMask) {
+ mouseButton = BUTTON3;
+ } else if ([theEvent modifierFlags] & NSShiftKeyMask) {
+ mouseButton = BUTTON2;
+ } else {
+ mouseButton = BUTTON1;
+ }
+ }
+}
+
+- (void)keyDown:(NSEvent *)e {
+ NSString *characters = [e characters];
+ if ([characters length] == 0) return;
+
+ unichar keyChar = [characters characterAtIndex:0];
+ switch(keyChar) {
+ case NSLeftArrowFunctionKey:
+ keysDown |= 1;
+ ui_key(UIKEY_LEFT);
+ break;
+ case NSRightArrowFunctionKey:
+ keysDown |= 2;
+ ui_key(UIKEY_RIGHT);
+ break;
+ case NSUpArrowFunctionKey:
+ keysDown |= 4;
+ ui_key(UIKEY_UP);
+ break;
+ case NSDownArrowFunctionKey:
+ keysDown |= 8;
+ ui_key(UIKEY_DOWN);
+ break;
+ case NSBackspaceCharacter:
+ ui_key(UIKEY_BACKSPACE);
+ break;
+ case NSEndFunctionKey:
+ ui_key(UIKEY_END);
+ break;
+ case '\033': // Escape
+ ui_key(UIKEY_ESC);
+ break;
+ case NSHomeFunctionKey:
+ ui_key(UIKEY_HOME);
+ break;
+ case NSPageDownFunctionKey:
+ ui_key(UIKEY_PGDOWN);
+ break;
+ case NSPageUpFunctionKey:
+ ui_key(UIKEY_PGUP);
+ break;
+ case NSTabCharacter:
+ ui_key(UIKEY_TAB);
+ break;
+ default:
+ ui_key(keyChar);
+ }
+}
+
+- (void)keyUp:(NSEvent *)e {
+ NSString *characters = [e characters];
+ if ([characters length] == 0) return;
+
+ unichar keyChar = [characters characterAtIndex:0];
+ switch(keyChar) {
+ case NSLeftArrowFunctionKey:
+ keysDown &= ~1;
+ break;
+ case NSRightArrowFunctionKey:
+ keysDown &= ~2;
+ break;
+ case NSUpArrowFunctionKey:
+ keysDown &= ~4;
+ break;
+ case NSDownArrowFunctionKey:
+ keysDown &= ~8;
+ break;
+ }
+}
+
+#pragma mark Accessors
+
+#ifdef VIDEATOR_SUPPORT
+- (VideatorProxy *)videatorProxy {
+ return videatorProxy;
+}
+#endif
+
+- (void)getWidth:(int *)w height:(int *)h {
+ NSRect bounds = [self bounds];
+ *w = bounds.size.width;
+ *h = bounds.size.height;
+}
+
+- (void)getMouseX:(int *)mx mouseY:(int *)my mouseButton:(int *)mb {
+ *mx = mouseX;
+ *my = mouseY;
+ *mb = mouseButton | rightMouseButton | otherMouseButton | mouseScrollWheel;
+}
+
+- (void)getMouseX:(int *)mx mouseY:(int *)my mouseButton:(int *)mb keys:(int *)k
+{
+ [self getMouseX:mx mouseY:my mouseButton:mb];
+ *k = keysDown;
+}
+
+#pragma mark Cursor
+
+- (void)setCursorType:(int)type {
+ cursorType = type;
+ [[self window] invalidateCursorRectsForView:self];
+}
+
+- (void)resetCursorRects {
+ /* BUG - cursor changes back to arrow when mouse is clicked
+ if (cursorType == VJMOUSE) {
+ NSCursor *cursor = [[NSCursor alloc] initWithImage:[NSImage imageNamed:@"performanceCursor"] hotSpot:NSMakePoint(1.0,1.0)];
+ [cursor setOnMouseEntered:YES];
+ [self addCursorRect:[self bounds] cursor:cursor];
+ [cursor release];
+ } */
+}
+
+
+#pragma mark Text
+
+- (NSDictionary *)textAttributes {
+
+ NSMutableDictionary *attrsDictionary = [NSMutableDictionary dictionaryWithObject:[NSColor whiteColor]
+ forKey:NSForegroundColorAttributeName];
+
+ NSShadow *dockStyleTextShadow = [[NSShadow alloc] init];
+ [dockStyleTextShadow setShadowOffset:NSMakeSize(2, -2)];
+ [dockStyleTextShadow setShadowBlurRadius:1];
+ [dockStyleTextShadow setShadowColor:[NSColor blackColor]];
+ [attrsDictionary setValue:[NSFont boldSystemFontOfSize:12.0] forKey:NSFontAttributeName];
+ [attrsDictionary setValue:dockStyleTextShadow forKey:NSShadowAttributeName];
+ [dockStyleTextShadow autorelease];
+
+ return attrsDictionary;
+}
+
+
+- (void)printText:(CONST char *)text atX:(int)x y:(int)y {
+ messageText = [[NSString stringWithUTF8String:text] retain];
+ messageLocation = NSMakePoint(x + 15, [self bounds].size.height - y);
+ [self setNeedsDisplay:YES];
+}
+
+#pragma mark Buffers
+
+- (int)allocBuffer1:(char **)b1 buffer2:(char **)b2 {
+ currentBuffer = 0;
+ NSRect bounds = [self bounds];
+ imageRep[0] = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
+ pixelsWide:bounds.size.width
+ pixelsHigh:bounds.size.height
+ bitsPerSample:8
+ samplesPerPixel:3
+ hasAlpha:NO
+ isPlanar:NO
+ colorSpaceName:NSDeviceRGBColorSpace
+ bytesPerRow:0
+ bitsPerPixel:32];
+
+ *b1 = (char *)[imageRep[0] bitmapData];
+
+ imageRep[1] = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:NULL
+ pixelsWide:bounds.size.width
+ pixelsHigh:bounds.size.height
+ bitsPerSample:8
+ samplesPerPixel:3
+ hasAlpha:NO
+ isPlanar:NO
+ colorSpaceName:NSDeviceRGBColorSpace
+ bytesPerRow:0
+ bitsPerPixel:32];
+
+ *b2 = (char *)[imageRep[1] bitmapData];
+ NSLog(@"bytesPerRow = %d", [imageRep[0] bytesPerRow]);
+ return [imageRep[0] bytesPerRow];
+}
+
+- (void)freeBuffers {
+ [imageRep[0] release];
+ [imageRep[1] release];
+}
+
+- (void)flipBuffers {
+ currentBuffer ^= 1;
+}
+
+@end
diff --git a/src/ui/ui-drv/cocoa/HowToBuild.txt b/src/ui/ui-drv/cocoa/HowToBuild.txt
new file mode 100644
index 0000000..90209f1
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/HowToBuild.txt
@@ -0,0 +1,47 @@
+XaoS for Mac OS X (Cocoa)
+Build Instructions
+
+By J.B. Langston III
+
+Here are instructions for getting the XaoS Xcode project to build successfully
+assuming you have downloaded a released source tarball or gotten the source
+from CVS:
+
+A) Build dependencies
+
+ 1) Download the latest libpng from
+
+ ftp://ftp.simplesystems.org/pub/libpng/png/src/
+
+ 2) Configure libpng for universal binaries with the following command:
+
+ env CFLAGS="-O -g -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -mmacosx-version-min=10.4" \
+ LDFLAGS="-arch i386 -arch ppc" \
+ ./configure --prefix=$XAOS_ROOT/src/ui/ui-drv/cocoa/thirdparty --disable-dependency-tracking
+
+ Be sure to replace $XAOS_ROOT with the root of your XaoS source folder.
+
+ For more information about building open source libraries as universal binaries:
+ http://developer.apple.com/technotes/tn2005/tn2137.html
+
+ 3) Make and install libpng:
+
+ make && make install
+
+ 4) Download the latest gsl from
+
+ ftp://ftp.gnu.org/gnu/gsl/
+
+ 5) Repeat steps 2 and 3 for gsl
+
+ 6) Download the latest gettext from
+
+ ftp://ftp.gnu.org/gnu/gettext/
+
+ 7) Repeat steps 2 and 3 for gettext
+
+B) Build XaoS
+
+ You should now be able to build XaoS from the Xcode project.
+
+Have fun! If you have questions, feel free to e-mail me: jb-langston at austin dot rr dot com \ No newline at end of file
diff --git a/src/ui/ui-drv/cocoa/Info.plist b/src/ui/ui-drv/cocoa/Info.plist
new file mode 100644
index 0000000..7dc86fd
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/Info.plist
@@ -0,0 +1,69 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>English</string>
+ <key>CFBundleDocumentTypes</key>
+ <array>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>xaf</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>XaoSDocument</string>
+ <key>CFBundleTypeName</key>
+ <string>XaoS Animation File</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSTypeIsPackage</key>
+ <false/>
+ <key>NSPersistentStoreTypeKey</key>
+ <string>XML</string>
+ </dict>
+ <dict>
+ <key>CFBundleTypeExtensions</key>
+ <array>
+ <string>xpf</string>
+ </array>
+ <key>CFBundleTypeIconFile</key>
+ <string>XaoSDocument</string>
+ <key>CFBundleTypeName</key>
+ <string>XaoS Position File</string>
+ <key>CFBundleTypeRole</key>
+ <string>Editor</string>
+ <key>LSTypeIsPackage</key>
+ <false/>
+ <key>NSPersistentStoreTypeKey</key>
+ <string>XML</string>
+ </dict>
+ </array>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleHelpBookFolder</key>
+ <string>XaoSHelp</string>
+ <key>CFBundleHelpBookName</key>
+ <string>XaoSHelp</string>
+ <key>CFBundleIconFile</key>
+ <string>XaoS</string>
+ <key>CFBundleIdentifier</key>
+ <string>net.sourceforge.xaos.XaoS</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>3.5</string>
+ <key>NSAppleScriptEnabled</key>
+ <string>YES</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/src/ui/ui-drv/cocoa/Japanese.lproj/InfoPlist.strings b/src/ui/ui-drv/cocoa/Japanese.lproj/InfoPlist.strings
new file mode 100644
index 0000000..8a78ff4
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/Japanese.lproj/InfoPlist.strings
Binary files differ
diff --git a/src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/classes.nib b/src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/classes.nib
new file mode 100644
index 0000000..b9b4b09
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/classes.nib
@@ -0,0 +1,4 @@
+{
+ IBClasses = ({CLASS = FirstResponder; LANGUAGE = ObjC; SUPERCLASS = NSObject; });
+ IBVersion = 1;
+} \ No newline at end of file
diff --git a/src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/info.nib b/src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/info.nib
new file mode 100644
index 0000000..4c74210
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/info.nib
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>IBDocumentLocation</key>
+ <string>94 103 356 240 0 0 1280 1002 </string>
+ <key>IBEditorPositions</key>
+ <dict>
+ <key>29</key>
+ <string>93 343 318 44 0 0 1280 1002 </string>
+ </dict>
+ <key>IBFramework Version</key>
+ <string>403.0</string>
+ <key>IBSystem Version</key>
+ <string>8A278</string>
+</dict>
+</plist>
diff --git a/src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/keyedobjects.nib b/src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/keyedobjects.nib
new file mode 100644
index 0000000..ee1187e
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/Japanese.lproj/MainMenu.nib/keyedobjects.nib
Binary files differ
diff --git a/src/ui/ui-drv/cocoa/Read Me.rtf b/src/ui/ui-drv/cocoa/Read Me.rtf
new file mode 100644
index 0000000..b005745
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/Read Me.rtf
@@ -0,0 +1,193 @@
+{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf270
+{\fonttbl\f0\fnil\fcharset0 LucidaGrande;}
+{\colortbl;\red255\green255\blue255;}
+{\*\listtable{\list\listtemplateid1\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid1}
+{\list\listtemplateid2\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid2}
+{\list\listtemplateid3\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid3}
+{\list\listtemplateid4\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid4}
+{\list\listtemplateid5\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid5}
+{\list\listtemplateid6\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid6}
+{\list\listtemplateid7\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid7}
+{\list\listtemplateid8\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{hyphen\}}{\leveltext\leveltemplateid1\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid8}
+{\list\listtemplateid9\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid9}
+{\list\listtemplateid10\listhybrid{\listlevel\levelnfc23\levelnfcn23\leveljc2\leveljcn2\levelfollow0\levelstartat1\levelspace360\levelindent0{\*\levelmarker \{disc\}}{\leveltext\leveltemplateid0\'02\'05.;}{\levelnumbers\'01;}}{\listname ;}\listid10}}
+{\*\listoverridetable{\listoverride\listid1\listoverridecount0\ls1}{\listoverride\listid2\listoverridecount0\ls2}{\listoverride\listid3\listoverridecount0\ls3}{\listoverride\listid4\listoverridecount0\ls4}{\listoverride\listid5\listoverridecount0\ls5}{\listoverride\listid6\listoverridecount0\ls6}{\listoverride\listid7\listoverridecount0\ls7}{\listoverride\listid8\listoverridecount0\ls8}{\listoverride\listid9\listoverridecount0\ls9}{\listoverride\listid10\listoverridecount0\ls10}}
+\vieww9000\viewh8400\viewkind0
+\deftab720
+\pard\pardeftab720\sa80\ql\qnatural
+
+\f0\b\fs24 \cf0 XaoS Real-Time Fractal Zoomer for Mac OS X, Version 3.4\
+\pard\pardeftab720\ql\qnatural
+
+\b0 \cf0 \
+Originally written by Jan Hubicka and Thomas Marsh\
+Currently maintained by Zoltan Kovacs (kovzol@math.u-szeged.hu)\
+Ported to Mac OS X By J.B. Langston III (jb-langston@austin.rr.com)\
+\'a0\
+Current version: \
+XaoS Homepage: {\field{\*\fldinst{HYPERLINK "http://xaos.sf.net/"}}{\fldrslt http://xaos.sf.net/}}\
+\'a0\
+\pard\pardeftab720\sa80\ql\qnatural
+
+\b \cf0 About\
+\pard\pardeftab720\sa80\ql\qnatural
+
+\b0 \cf0 XaoS is an incredible program that lets you explore fractals by zooming in and out in real time.\'a0 If you\'92ve only used static fractal viewers like Fractint or UltraFractal before, zooming into a fractal as a real time animation is incredible.\'a0 XaoS was originally written by Jan Hubicka and Thomas Marsh, and is currently maintained by Zoltan Kovacs. I contributed the Mac OS X user interface and made binaries available for ease of use. XaoS is free software available under the terms of the GNU General Public License.\
+\pard\pardeftab720\ql\qnatural
+\cf0 \
+\pard\pardeftab720\sa80\ql\qnatural
+
+\b \cf0 Installation and Usage\
+\pard\pardeftab720\ql\qnatural
+
+\b0 \cf0 After downloading the XaoS binary, just copy it to your applications folder and run the program. Basic usage is really pretty simple.\'a0\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural
+\ls1\ilvl0\cf0 {\listtext \'95 }Point your mouse at the part of the image you want to zoom in on, and hold down the mouse button.\'a0 Away you go!\'a0\
+{\listtext \'95 }To zoom back out, hold down the control key and click.\'a0 Or, right click with a two-button mouse.\'a0\
+{\listtext \'95 }To pan, hold down the shift key and drag. On a three-button mouse, drag with the center button.\'a0 If you have a mouse with a scroll wheel, pressing down on the scroll wheel usually works like the center button.\
+{\listtext \'95 }To go full-screen, select UI->Drivers->Mac OS X Fullscreen Driver from the menu. In full screen mode, the menu is only displayed when you move the mouse near the top of the screen. After going full screen, you can quit by pressing \uc0\u8984 Q, or you can go back to windowed mode by selecting UI->Drivers->Mac OS X Windowed Driver.\
+\pard\pardeftab720\ql\qnatural
+\cf0 \'a0\
+To learn more, check out the tutorials from the Help menu.\'a0 They are really informative and a lot of fun to watch.\'a0 For more in-depth information, use the online help.\
+\'a0\
+\pard\pardeftab720\ql\qnatural
+
+\b \cf0 Known Issues\
+\pard\pardeftab720\ql\qnatural
+
+\b0 \cf0 The following are known issues with the current version of XaoS for Mac OS X.\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural
+\ls2\ilvl0\cf0 {\listtext \'95 }Catseye fractal does not render properly.\'a0 \uc0\u8232 Workaround: Set the bailout to just over 4 (e.g., 4.000000001). After changing this setting, the fractal renders as expected.\
+\pard\pardeftab720\ql\qnatural
+\cf0 \
+\pard\pardeftab720\sa80\ql\qnatural
+
+\b \cf0 Revision History\
+\pard\pardeftab720\sa80\ql\qnatural
+
+\b0 \cf0 3.4\
+Release Date: 6/1/2008\
+\pard\tx560\pardeftab720\ql\qnatural
+\cf0 \
+This is a huge release for Mac users. The Mac user interface has been completely rewritten in Cocoa and improved in a number of ways:\
+\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\sa80\ql\qnatural
+\ls3\ilvl0\cf0 {\listtext \'95 }Standard Aqua dialog boxes instead of the strange-looking Unixy things in previous versions. Fields in dialog boxes now support cut and paste as you would expect.\
+{\listtext \'95 }Pop-up menus are now displayed using standard Aqua menus\
+{\listtext \'95 }Menu bar in full-screen mode is now the standard Mac OS X menu bar. It automatically slides into view when you move your mouse to the top of the screen and slides out when you move away from it.\
+{\listtext \'95 }XaoS now has a standard Aqua about dialog box, which displays links to license and credits in help file.\
+{\listtext \'95 }Help is now displayed via Mac OS X's standard help viewer. Tutorials can still be launched via links in the help viewer.\
+{\listtext \'95 }Support for opening xpf (Saved Position) and xaf (Saved Animation) files directly from Finder via drag and drop and by double-clicking. XaoS now includes its own document icon for these files as well.\
+{\listtext \'95 }Support for basic AppleScriptability via the standard script dictionary. Includes things like opening files and manipulating the window, but no XaoS-specific functionality.\
+{\listtext \'95 }Support for panning the fractal with the mouse scroll wheel or trackpad two-finger gestures.\
+\pard\tx560\pardeftab720\ql\qnatural
+\cf0 \
+In addition to the user interface improvements, XaoS for Mac has the following improvements:\
+\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\sa80\ql\qnatural
+\ls4\ilvl0\cf0 {\listtext \'95 }Now uses greater precision (long double) for calculations to enable much deeper zooms.\
+{\listtext \'95 }In addition to English, XaoS for Mac OS X now supports the following languages: Czech, French, German, Hungarian, Italian, Romanian, and Spanish.\
+{\listtext \'95 }Integration with Stone Design's Videator (http://stone.com/Videator/). XaoS can now send live a live video stream to Videator, which can then do post-processing using Mac OS X's core video technology. This is great for VJing (live video performance art). See http://stone.com/Videator/VJ.html for more details.\
+{\listtext \'95 }New Italian translation courtesy of Sergio Zanchetta\
+{\listtext \'95 }Updated German translation by Andreas Madritsch\
+{\listtext \'95 }Bug fix to prevent Edge Detection and Pseudo 3D filter from rendering the image completely black.\
+{\listtext \'95 }Bug fix to prevent garbled characters when using non-English languages on modern systems using UTF-8\
+{\listtext \'95 }Bug fix to prevent XaoS from crashing after using the Render Animation functionality\
+{\listtext \'95 }Bug fix to prevent incorrect colors on smooth coloring modes with certain video modes\
+\pard\pardeftab720\sa80\ql\qnatural
+\cf0 \
+3.3\
+Release Date: 3/13/2008\
+\
+Changes since 3.2.2:\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\sa80\ql\qnatural
+\ls5\ilvl0\cf0 {\listtext \'95 }Added user formula support using SFFE/GSL library.\
+{\listtext \'95 }Fixed bug where colors display incorrectly on Intel Macs after switching from full screen back to windowed driver.\
+{\listtext \'95 }Upgraded libpng to 1.2.25.\
+{\listtext \'95 }Included libgsl 1.10.\
+{\listtext \'95 }Updated build instructions with easier third party library build process.\
+{\listtext \'95 }Added performance mode, which inhibits text display (useful for VJing).\
+{\listtext \'95 }Fixed bug where color cycling would stop when moving from forward cycling to reverse.\
+\pard\pardeftab720\sa80\ql\qnatural
+\cf0 \
+3.2.2 \
+Release Date: 9/26/2006\
+\
+Changes since Beta 4:\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\sa80\ql\qnatural
+\ls6\ilvl0\cf0 {\listtext \'95 }Fixed bug which was preventing XaoS from rendering images over 2500x2500\
+{\listtext \'95 }Added fullscreen driver\
+{\listtext \'95 }Upgraded libpng to 1.2.12\
+\pard\pardeftab720\sa80\ql\qnatural
+\cf0 \
+3.2.1 Beta 4\
+\pard\pardeftab720\ql\qnatural
+\cf0 Release Date: 7/8/2006\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural
+\ls7\ilvl0\cf0 \
+\pard\pardeftab720\ql\qnatural
+\cf0 Changes since Beta 3:\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural
+\ls8\ilvl0\cf0 {\listtext \'95 }Fixed bug with colors on Intel Macs (default colors previously showed yellow instead of blue)\
+{\listtext \'95 }Fixed bug that prevented render animation option from working correctly\
+{\listtext \'95 }Added -windowsize and -autoscreensize command line arguments\
+\pard\tx940\tx1440\pardeftab720\li1440\fi-1440\ql\qnatural
+\ls8\ilvl1\cf0 -windowsize allows you to specify the window size on the command line\
+ -autoscreensize causes XaoS to attempt to automatically detect the pysical screen size\
+\pard\pardeftab720\sa80\ql\qnatural
+\cf0 \
+3.2.1 Beta 3\
+\pard\pardeftab720\ql\qnatural
+\cf0 Release Date: 6/27/2006\
+\
+Changes since Beta 2:\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural
+\ls9\ilvl0\cf0 {\listtext \'95 }Support saving to png. libpng is included as a private framework.\
+{\listtext \'95 }Changed icon to match XaoS default image\
+{\listtext \'95 }Provide standard Mac OS keyboard shortcuts for applicable functions -- redo, undo, save, load\
+{\listtext \'95 }Repackaged as a disk image with Readme fil\
+\
+\pard\pardeftab720\sa80\ql\qnatural
+\cf0 3.2.1 Beta 2\
+\pard\pardeftab720\ql\qnatural
+\cf0 Release Date: 6/20/2006\
+\
+Changes since Beta 1:\
+\pard\tx220\tx720\pardeftab720\li720\fi-720\ql\qnatural
+\ls10\ilvl0\cf0 {\listtext \'95 }Keyboard input has been implemented for all keys supported by XaoS.\
+{\listtext \'95 }Fixed bug where window events were not handled if driver was reinitialized.\
+{\listtext \'95 }Tutorials now play back.\
+{\listtext \'95 }Random examples now load.\
+{\listtext \'95 }Since Mac OS X doesn't allow single menu items directly in the menubar, I put "Stop Replay" for animation mode in the UI menu\
+{\listtext \'95 }Mac OS X applications have their own quit command in the Application menu.\'a0 So I removed the quit menu and preceeding separator from the file menu.\
+{\listtext \'95 }Swapped order of UI and Help menus in animation mode to comply with Human Interface Guidelines.\
+\pard\pardeftab720\ql\qnatural
+\cf0 \'a0\
+\pard\pardeftab720\sa80\ql\qnatural
+\cf0 3.2.1 Beta 1\
+\pard\pardeftab720\ql\qnatural
+\cf0 Release Date: 6/15/2006\
+\'a0\
+This was the original public release of XaoS for Mac OS X.\
+\
+\pard\pardeftab720\ql\qnatural
+
+\b \cf0 Included Software
+\b0 \
+\
+libpng 1.2.25\
+http://libpng.org/pub/png/libpng.html\
+\
+GNU Scientific Library 1.10 \
+http://www.gnu.org/software/gsl/\
+\
+
+\b About Free Software\
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardeftab720\ql\qnatural\pardirnatural
+
+\b0 \cf0 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by\
+the Free Software Foundation; either version 2 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 General Public License along with this program; it is displayable from the program's online help feature. If not, you can find it on the Internet at http://www.gnu.org or you can write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.} \ No newline at end of file
diff --git a/src/ui/ui-drv/cocoa/Readme Cocoa b/src/ui/ui-drv/cocoa/Readme Cocoa
new file mode 100644
index 0000000..3e92f34
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/Readme Cocoa
@@ -0,0 +1,390 @@
+2006-10-23 - Andrew Stone (andrew@stone.com)
+ - to build for Videator: -DVIDEATOR_SUPPORT
+ - added this file
+ - added Credits.html
+ - modified InfoPlist.strings
+ - MainMenu.nib
+ - changed NewApplication to XaoS
+ - changed window title to indicate this version of XaoS talks to Videator
+
+ - AppController.m: added distributed notification with imageRep
+ - FractalView.m: added method to return current imageRep
+2006-10-25
+ - ui_cocoa.m now byte swaps color masks
+
+2006-10-26
+ - hot keys working
+ - tutorial and help working ala carbon
+
+2006-11-29 - J.B. Langston
+
+Committing additional changes submitted 10/30 by Andrew Stone:
+
+ - support for arrow keys
+ up/down change zoom speed
+ right/left: if cycling - change
+ if auto-rotation - change speed of rotation
+
+ - UI -> Performance Mode
+ This will turn off the echoing of messages to the screen
+
+ - going from cycle forward and backward no longer toggles cycling off
+
+ - BUG FIX: window now regains key status after after dialog
+
+2008-03-14 - J.B. Langston
+
+ - Fixed bug with smooth color modes on PowerPC Macs (filter.h)
+
+2008-03-17 - J.B. Langston
+
+ - Added user formula support using SFFE/libgsl
+
+ - Added support for libpng to Cocoa
+
+ - Added build instructions to Cocoa project
+
+2008-03-18 - J.B. Langston
+
+ - Moved Videator support into separate VideatorProxy class and updated with
+ Andrew's latest changes - UNTESTED
+
+ - Replaced funky bit-swapping code; now use #if __BIG_ENDIAN__ to set color
+ masks correctly
+
+ - Removed unnecessary xstdio_osx.c and made executable-relative paths work
+ with standard xstdio.c
+
+ - Added Enter key equivalent for OK button on custom dialogs
+
+ - Added call to resize image when maximizing window
+
+ - Added call to terminate app on window close
+
+ - Enabled long double support for deeper zooms
+
+ - Added event handling for middle and right mouse buttons
+
+ - Added event handling for scroll wheel panning
+
+ - Added copyright headers to all files
+
+ - Changed [view setNeedsDisplay:YES] to [view display] to draw immediately
+ in order to eliminate jerky zooming motion
+
+ - Added support to print status text
+
+ - Made save and open panels use last selected directory instead of always
+ going back to home directory
+
+ - Made window regains key status after open/save dialog
+
+ - Removed "-Videator Enabled" from titlebar
+
+ - Fixes to custom dialogs to correctly display long doubles and allow
+ horizontal scrolling instead of wrapping values
+
+2008-03-20
+
+ REFACTORING/CLEANUP
+
+ - Added autorelease pools to all driver functions, wrapping all controller calls
+
+ - removed autorelease pools from inside controller methods
+
+ - Removed Preferences nib, controller, menu item, and associated icons
+ (Videator support will be toggled via menu item in UI menu)
+
+ - changed driver and function name to cocoa_* instead of osx_*
+
+ - Added MACOSX define that can trigger shared functionality for Cocoa/Carbon drivers
+
+ - Removed separate fullscreen driver
+
+ - Removed wrapper functions from controller; now call view functions directly
+
+ - Added functions for driver init and uninit to controller
+
+ - Added pragma marks to categorize functions in controller and view
+
+ - Moved videator hook to view's drawRect:
+
+ - Added wait date to event handling to prevent busy waiting
+
+ HELP SUPPORT
+
+ - Created Apple Help conversion script
+
+ - Added help settings to Info.plist
+
+ - Updated showHelpWithContext:name: method to show main help page
+
+ - Added help conversion script to pre-compile script build phase
+
+2008-03-31
+
+ DIALOGS
+
+ - Add copy/paste functionality for custom dialogs
+
+ HELP
+
+ - Update help conversion script to automatically generate index
+
+ - Update help to use stylesheets
+
+2008-04-04
+
+ I18N
+
+ - Add reference to gettext library, and script command to copy it
+
+ - Add code to detect default locale and set LANG variable accordingly
+
+
+2008-04-05
+
+ MENUS
+
+ - Added Window menu and associated menu items
+
+ I18N
+
+ - Fixed bug where key equivalents were not found when foreign languages
+ were selected
+
+ - I18nized cut/copy/paste/etc. menu items, and OK/Cancel dialog buttons
+
+2008-04-06
+
+ I18N
+
+ - Add code to convert user's native text encoding (usually UTF-8) to
+ Latin1/2 to prevent garbled text through built-in text handling system
+
+ - Automate po/mo file build and packaging
+
+ - Add code to set locale directory correctly relative to executable path
+
+ MENUS
+
+ - Implement popup menus
+
+ - I18nize menu items in application menu
+
+ HELP
+
+ - fix bug in help conversion that results in missing headers for some files
+
+ - Add help applescript to automatically launch tutorials
+
+2008-04-07
+
+ MENUS
+
+ - Implement menu delegate to check/uncheck menu items when displayed
+
+ DIALOGS
+
+ - Hook up choose file button on custom dialogs
+
+2008-04-09
+
+ FULL SCREEN
+
+ - Implement fullscreen code
+
+ - Add menu item to UI menu to toggle fullscreen mode
+
+ - Change render basename type from to DIALOG_STRING to DIALOG_OFILE
+
+ DRIVER
+
+ - Add driver initialization code
+
+ - Add driver uninitialization code
+
+ MISC
+
+ - Conditionalize custom script build phases so they do not do unnecessary work
+
+2008-04-10
+
+ I18N
+
+ - Added italian translation
+
+ MISC
+
+ - Rebuilt Xcode project to fix issues with debugger and interface builder
+
+ - Incremented Cocoa version number from 3.3 to 3.4
+
+ HELP
+
+ - Got rid of space in help file name
+
+2008-04-14
+
+ I18N
+
+ - Make OK/Cancel buttons on custom dialogs autosize to fit i18n labels
+
+ MISC
+
+ - Change Performance Mode to VJ mode (changed shortcut from P to v)
+ (performance mode might be confused with performance enhancement)
+
+ - Added document icon
+
+ - Added Close menu item to file menu
+
+ - Fixed regression where window did not retain key status after dialog
+
+ - Add cursor changing code in cocoa driver
+
+ - Add hook to change cursor during performance mode
+
+2008-04-16
+
+ HELP
+
+ - Add css element to make dt elements bold
+
+ - Add anchors for usrform and usrformInit to help file
+
+ I18N
+
+ - Updated italian po and catalog
+
+ - Added Italian to configure.in ALL_LINGUAS
+
+ MISC
+
+ - Refine about dialog box
+
+ - Add comments and cleanup
+
+ - Changed version to 3.4pre1 in configure.in
+
+2008-04-17
+
+ BUGS
+
+ - Fix crash after animation rendering
+
+ Analysis: changes introduced for sffe made the uih variable from ui.c
+ global in ui.h so that the sffe parser can be accessed from custom
+ formula code in formulas.c. Uih was previously declared static in render.c
+ because the animation renderer maintains its own context. SFFE changed
+ this from static to extern so the uih in render.c was pointing to the same
+ uih in ui.c, instead of to a different structure. When animations were
+ rendered, the uih in ui.h got clobbered, and the next function that tried
+ to use it caused a segfault.
+
+ Fix:
+ 1. Change name of global uih pointer defined in ui.h from uih to globaluih.
+ 2. Change sffe code to access globaluih pointer instead of uih
+ 3. Add code to main function to set both uih and globaluih to point at the same structure
+ 4. Change code in cocoa driver to use globaluih as well
+
+ - Fix bug that causes XaoS to crash when using non-native (ugly) dialog
+ code for Render Animation dialog with open file dialog for basename
+
+ Analysis: There was a loop in ui_buildfile in dialog.c, that tried to
+ find a "*" in the default filename, and if it didn't find one, it would
+ run right off the end of the buffer and continue until a seg fault occurred.
+
+ Fix: the loop now checks for both "*" or a nul terminator as the exit
+ condition. If it doesn't find an asterisk, it still stops at the end
+ of the string.
+
+ - Make custom dialog boxes slide out of view before executing menu function
+
+ This prevents the dialog from hanging around after clicking OK during long
+ running operations such as rendering animations
+
+ - Add code to prevent rendering animation if absolute path is not specified
+ for Basename. This prevents files from being accidentally written to the
+ hard drive's root directory
+
+2008-04-23
+
+ I18N
+
+ - Changes to -initLocale: do not overwrite LANG if it is already set
+
+ - Added AppController.m and CustomDialog.m in i18n/Makefile.in.in
+
+ - Regenerated po and pot files with new strings from cocoa driver
+
+ MISC
+
+ - Conditionalize window menu with #ifdef MACOSX
+
+2008-04-24
+
+ - Add enable/disable menu item for Videator
+
+ - Move Close menu item to proper place in File menu
+
+ - Reindent code
+
+ - Cleanups to eliminate warnings
+
+ - Conditionalize videator code
+
+2008-04-26
+
+ - Update video encoding section to recommend ffmpeg, mencoder
+
+ - Move Berkeley MPEG encoder information to historical section
+
+ - Create help section to explain how to get support
+
+ - Add library copyright information to credits help section
+
+ - Update Development help section with recent contribution instructions
+
+ - Add Mac OS X help section
+
+ - Add links to Videator in Mac OS X help section
+
+2008-05-15
+
+ - Fix diacritical mark rendering on Mac OS X Tiger
+
+ - Update Italian translation
+
+ - Fix problem with localized application menu
+
+ - Add link to XaoS Website in About dialog
+
+2008-05-20
+
+ - Fix black screen with edge detection filters
+
+ - Fix black screen with pseudo-3d filter
+
+ - Fix black screen with hsv coloring modes
+
+ - Automatically save window position and size
+
+ - Update help file to remove workarounds for fixed issues
+
+2008-05-22
+
+ - Increment version numbers
+
+
+TODO:
+
+* bugs
+
+ - Fix catseye rendering (shows empty circle without increasing bailout)
+ - Cursor changing code only works until the user clicks a button
+
+* acs features
+ - Implement fast palette save/recall
+ - Implement autokeys on startup
+
diff --git a/src/ui/ui-drv/cocoa/VideatorProxy.h b/src/ui/ui-drv/cocoa/VideatorProxy.h
new file mode 100644
index 0000000..f4187ee
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/VideatorProxy.h
@@ -0,0 +1,42 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ * Videator Support by Andrew Stone (Stone Design)
+ * For information about Videator, visit http://www.stone.com/Videator
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifdef VIDEATOR_SUPPORT
+#import <Cocoa/Cocoa.h>
+
+@ interface VideatorProxy:NSObject {
+ BOOL _wantsThrottle;
+ NSDate *_lastFrameCreatedDate;
+ id _videatorProxy;
+ NSCalendarDate *_killDate;
+ BOOL _videatorEnabled;
+}
+
+-(void) sendImageRep:(NSBitmapImageRep *) imageRep;
+-(void) toggleVideator:(id) sender;
+-(BOOL) videatorEnabled;
+
+@end
+#endif
diff --git a/src/ui/ui-drv/cocoa/VideatorProxy.m b/src/ui/ui-drv/cocoa/VideatorProxy.m
new file mode 100644
index 0000000..506ac48
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/VideatorProxy.m
@@ -0,0 +1,157 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ * Videator Support by Andrew Stone (Stone Design)
+ * For information about Videator, visit http://www.stone.com/Videator
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <aconfig.h>
+#ifdef VIDEATOR_SUPPORT
+#import "VideatorProxy.h"
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <netdb.h>
+#include <libc.h>
+
+NSString *cheapHostName() {
+ NSString *host = @"localhost";
+ char s[_POSIX_HOST_NAME_MAX+1];
+ s[0] = '\0';
+ if (gethostname(s, _POSIX_HOST_NAME_MAX) == 0) {
+ if (strlen(s) > 0)
+ host = [[[NSString alloc] initWithUTF8String:s]autorelease];
+ }
+ return host;
+}
+
+#define VideatorServer ([NSString stringWithFormat:@"VideatorServer-%@",cheapHostName()])
+#define FRAME_REFRESH_THRESHOLD 0.04
+
+@protocol VideatorVendedProtocol
+// to notify in main thread
+- (void)runUpdateAlert:(NSString *)latestVersionNumber;
+// XaoS
+- (BOOL)wantsXaoSImage;
+- (void)setXaosImageData:(NSData *)bmData;
+// automator mode to check its not hung
+- (BOOL)heartBeat;
+@end
+
+
+@implementation VideatorProxy
+
++ (void)setupDefaults
+{
+ NSString *userDefaultsValuesPath;
+ NSDictionary *userDefaultsValuesDict;
+ NSDictionary *initialValuesDict;
+ NSArray *resettableUserDefaultsKeys;
+
+ userDefaultsValuesPath=[[NSBundle mainBundle] pathForResource:@"UserDefaults"
+ ofType:@"plist"];
+ userDefaultsValuesDict=[NSDictionary dictionaryWithContentsOfFile:userDefaultsValuesPath];
+
+ [[NSUserDefaults standardUserDefaults] registerDefaults:userDefaultsValuesDict];
+
+ resettableUserDefaultsKeys=[NSArray arrayWithObjects:@"EnableVideator",nil];
+ initialValuesDict=[userDefaultsValuesDict dictionaryWithValuesForKeys:resettableUserDefaultsKeys];
+
+ [[NSUserDefaultsController sharedUserDefaultsController] setInitialValues:initialValuesDict];
+}
+
++ (void)initialize {
+ [self setupDefaults];
+}
+
+- (id)init {
+ self = [super init];
+ if (self) {
+ _videatorEnabled = [[NSUserDefaults standardUserDefaults] boolForKey:@"EnableVideator"];
+ }
+ return self;
+}
+
+- (void)toggleVideator:(id)sender {
+ _videatorEnabled ^= 1;
+ [[NSUserDefaults standardUserDefaults] setBool:_videatorEnabled forKey:@"EnableVideator"];
+}
+
+- (BOOL)videatorEnabled {
+ return _videatorEnabled;
+}
+
+- (void)connectionDidDie:(NSNotification *)n {
+ _videatorProxy = nil;
+ _killDate = [[NSCalendarDate date] retain];
+ NSLog(@"Videator is dead... ...Long Live Videator!");
+}
+
+- (void)getProxy {
+
+ // do not try and reconnect to an application that is terminating:
+ if (_killDate && [_killDate timeIntervalSinceNow] > -10.0) return;
+ else _killDate = nil;
+
+ _videatorProxy = [[NSConnection rootProxyForConnectionWithRegisteredName:VideatorServer host:nil] retain];
+ // if we can't find it, no big deal:
+ if (_videatorProxy != nil) {
+ [_videatorProxy setProtocolForProxy:@protocol(VideatorVendedProtocol)];
+ [[NSDistributedNotificationCenter defaultCenter] addObserver:self selector:@selector(connectionDidDie:) name:@"VideatorWillTerminate" object:nil];
+ }
+}
+
+- (void)sendImageRep:(NSBitmapImageRep *)imageRep {
+ // simply return if user does not want this
+ if (!_videatorEnabled) return;
+
+ // Andrew's Videator hook - costs almost nothing since the view maintains the bitmapImageRep in hand -
+ // We call it here because other mechanisms might cause a redraw in the view but we don't want that overhead
+ // unless we've been notified that there really was a change:
+ // HOWEVER we can only shove so much stuff down the pipe - let's try 30 frames per second threshold
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ NSDate *now = [NSDate date];
+
+
+ if (_wantsThrottle) {
+ static float _FRAME_REFRESH_THRESHOLD = 0.0;
+ if (_FRAME_REFRESH_THRESHOLD == 0.0) {
+ _FRAME_REFRESH_THRESHOLD = [[NSUserDefaults standardUserDefaults] floatForKey:@"RefreshThreshold"];
+ if (_FRAME_REFRESH_THRESHOLD == 0.0) _FRAME_REFRESH_THRESHOLD = FRAME_REFRESH_THRESHOLD;
+ }
+ if (_lastFrameCreatedDate && [now timeIntervalSinceDate:_lastFrameCreatedDate] < _FRAME_REFRESH_THRESHOLD) return;
+ [_lastFrameCreatedDate release];
+ _lastFrameCreatedDate = [now retain];
+ }
+
+ if (!_videatorProxy) [self getProxy];
+ NS_DURING
+ if (_videatorProxy!=nil /* DO NOT WAIT FOR THE ROUNDTRIP && [_videatorProxy wantsXaoSImage] */)
+ [_videatorProxy setXaosImageData:[imageRep TIFFRepresentationUsingCompression:NSTIFFCompressionLZW factor:0]];
+ NS_HANDLER
+
+ NS_ENDHANDLER
+
+ [pool release];
+}
+
+@end
+#endif \ No newline at end of file
diff --git a/src/ui/ui-drv/cocoa/XaoS.icns b/src/ui/ui-drv/cocoa/XaoS.icns
new file mode 100644
index 0000000..e03d0cb
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/XaoS.icns
Binary files differ
diff --git a/src/ui/ui-drv/cocoa/XaoS.xcodeproj/project.pbxproj b/src/ui/ui-drv/cocoa/XaoS.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..fd7e096
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/XaoS.xcodeproj/project.pbxproj
@@ -0,0 +1,831 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 44;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; };
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+ D90A09560DB42FD900B7AAFD /* performanceCursor.tiff in Resources */ = {isa = PBXBuildFile; fileRef = D90A09550DB42FD900B7AAFD /* performanceCursor.tiff */; };
+ D90A096A0DB4465100B7AAFD /* XaoSDocument.icns in Resources */ = {isa = PBXBuildFile; fileRef = D90A09690DB4465100B7AAFD /* XaoSDocument.icns */; };
+ D962B0AD101CA598003C66CE /* grlib_cocoa.m in Sources */ = {isa = PBXBuildFile; fileRef = D962B0AC101CA598003C66CE /* grlib_cocoa.m */; };
+ D962B20C101E9149003C66CE /* grlib.c in Sources */ = {isa = PBXBuildFile; fileRef = D962B20B101E9149003C66CE /* grlib.c */; };
+ D99B5B740DAEE9D100489809 /* ui_cocoa.m in Sources */ = {isa = PBXBuildFile; fileRef = D99B5B730DAEE9D100489809 /* ui_cocoa.m */; };
+ D99B5B7E0DAEE9E700489809 /* AppController.m in Sources */ = {isa = PBXBuildFile; fileRef = D99B5B770DAEE9E700489809 /* AppController.m */; };
+ D99B5B7F0DAEE9E700489809 /* FractalView.m in Sources */ = {isa = PBXBuildFile; fileRef = D99B5B790DAEE9E700489809 /* FractalView.m */; };
+ D99B5B800DAEE9E700489809 /* CustomDialog.m in Sources */ = {isa = PBXBuildFile; fileRef = D99B5B7B0DAEE9E700489809 /* CustomDialog.m */; };
+ D99B5B810DAEE9E700489809 /* VideatorProxy.m in Sources */ = {isa = PBXBuildFile; fileRef = D99B5B7D0DAEE9E700489809 /* VideatorProxy.m */; };
+ D99B5C040DAEEA2700489809 /* cmplx.asm in Sources */ = {isa = PBXBuildFile; fileRef = D99B5B890DAEEA2700489809 /* cmplx.asm */; };
+ D99B5C050DAEEA2700489809 /* sffe.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5B8A0DAEEA2700489809 /* sffe.c */; };
+ D99B5C060DAEEA2700489809 /* sffe_cmplx_asm.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5B8B0DAEEA2700489809 /* sffe_cmplx_asm.c */; };
+ D99B5C070DAEEA2700489809 /* sffe_cmplx_gsl.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5B8C0DAEEA2700489809 /* sffe_cmplx_gsl.c */; };
+ D99B5C160DAEEA2700489809 /* subwindow.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BC70DAEEA2700489809 /* subwindow.c */; };
+ D99B5C170DAEEA2700489809 /* palettef.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BC80DAEEA2700489809 /* palettef.c */; };
+ D99B5C180DAEEA2700489809 /* interlace.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BC90DAEEA2700489809 /* interlace.c */; };
+ D99B5C190DAEEA2700489809 /* edge2.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BCA0DAEEA2700489809 /* edge2.c */; };
+ D99B5C1A0DAEEA2700489809 /* fractal.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BCB0DAEEA2700489809 /* fractal.c */; };
+ D99B5C1B0DAEEA2700489809 /* rotate.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BCC0DAEEA2700489809 /* rotate.c */; };
+ D99B5C1C0DAEEA2700489809 /* itersmall.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BCD0DAEEA2700489809 /* itersmall.c */; };
+ D99B5C1D0DAEEA2700489809 /* blur.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BCE0DAEEA2700489809 /* blur.c */; };
+ D99B5C1E0DAEEA2700489809 /* anti.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BCF0DAEEA2700489809 /* anti.c */; };
+ D99B5C1F0DAEEA2700489809 /* stereogram.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD00DAEEA2700489809 /* stereogram.c */; };
+ D99B5C200DAEEA2700489809 /* edge.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD10DAEEA2700489809 /* edge.c */; };
+ D99B5C210DAEEA2700489809 /* zoom.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD20DAEEA2700489809 /* zoom.c */; };
+ D99B5C220DAEEA2700489809 /* star.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD30DAEEA2700489809 /* star.c */; };
+ D99B5C230DAEEA2700489809 /* formulas.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD40DAEEA2700489809 /* formulas.c */; };
+ D99B5C240DAEEA2700489809 /* emboss.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD50DAEEA2700489809 /* emboss.c */; };
+ D99B5C250DAEEA2700489809 /* julia.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD60DAEEA2700489809 /* julia.c */; };
+ D99B5C260DAEEA2700489809 /* btrace.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD70DAEEA2700489809 /* btrace.c */; };
+ D99B5C270DAEEA2700489809 /* i386.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD80DAEEA2700489809 /* i386.c */; };
+ D99B5C280DAEEA2700489809 /* dither.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BD90DAEEA2700489809 /* dither.c */; };
+ D99B5C290DAEEA2700489809 /* 3d.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BDA0DAEEA2700489809 /* 3d.c */; };
+ D99B5C2A0DAEEA2700489809 /* plane.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BDB0DAEEA2700489809 /* plane.c */; };
+ D99B5C2B0DAEEA2700489809 /* filter.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BDD0DAEEA2700489809 /* filter.c */; };
+ D99B5C2C0DAEEA2700489809 /* palette.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BDE0DAEEA2700489809 /* palette.c */; };
+ D99B5C2D0DAEEA2700489809 /* random.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BDF0DAEEA2700489809 /* random.c */; };
+ D99B5C2F0DAEEA2700489809 /* font.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BE10DAEEA2700489809 /* font.c */; };
+ D99B5C300DAEEA2700489809 /* image.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BE20DAEEA2700489809 /* image.c */; };
+ D99B5C310DAEEA2700489809 /* drivers.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BE40DAEEA2700489809 /* drivers.c */; };
+ D99B5C320DAEEA2700489809 /* dialog.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BE50DAEEA2700489809 /* dialog.c */; };
+ D99B5C330DAEEA2700489809 /* uihelp.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BE60DAEEA2700489809 /* uihelp.c */; };
+ D99B5C340DAEEA2700489809 /* uimenu.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BE70DAEEA2700489809 /* uimenu.c */; };
+ D99B5C350DAEEA2700489809 /* fparams.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BE80DAEEA2700489809 /* fparams.c */; };
+ D99B5C360DAEEA2700489809 /* ui.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BE90DAEEA2700489809 /* ui.c */; };
+ D99B5C370DAEEA2700489809 /* param.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BEA0DAEEA2700489809 /* param.c */; };
+ D99B5C380DAEEA2700489809 /* filesel.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BEB0DAEEA2700489809 /* filesel.c */; };
+ D99B5C390DAEEA2700489809 /* pipecmd.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BEC0DAEEA2700489809 /* pipecmd.c */; };
+ D99B5C3A0DAEEA2700489809 /* save.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BEE0DAEEA2700489809 /* save.c */; };
+ D99B5C3B0DAEEA2700489809 /* menu.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BEF0DAEEA2700489809 /* menu.c */; };
+ D99B5C3C0DAEEA2700489809 /* wstack.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BF00DAEEA2700489809 /* wstack.c */; };
+ D99B5C3D0DAEEA2700489809 /* playtext.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BF10DAEEA2700489809 /* playtext.c */; };
+ D99B5C3E0DAEEA2700489809 /* render.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BF20DAEEA2700489809 /* render.c */; };
+ D99B5C3F0DAEEA2700489809 /* play.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BF30DAEEA2700489809 /* play.c */; };
+ D99B5C400DAEEA2700489809 /* messg.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BF40DAEEA2700489809 /* messg.c */; };
+ D99B5C410DAEEA2700489809 /* ui_helper.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BF50DAEEA2700489809 /* ui_helper.c */; };
+ D99B5C420DAEEA2700489809 /* autopilot.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BF60DAEEA2700489809 /* autopilot.c */; };
+ D99B5C430DAEEA2700489809 /* xmenu.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BF80DAEEA2700489809 /* xmenu.c */; };
+ D99B5C440DAEEA2700489809 /* png.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BF90DAEEA2700489809 /* png.c */; };
+ D99B5C450DAEEA2700489809 /* xstring.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BFA0DAEEA2700489809 /* xstring.c */; };
+ D99B5C460DAEEA2700489809 /* xshl.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BFB0DAEEA2700489809 /* xshl.c */; };
+ D99B5C470DAEEA2700489809 /* xldio.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BFC0DAEEA2700489809 /* xldio.c */; };
+ D99B5C480DAEEA2700489809 /* help.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BFD0DAEEA2700489809 /* help.c */; };
+ D99B5C490DAEEA2700489809 /* xerror.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BFE0DAEEA2700489809 /* xerror.c */; };
+ D99B5C4A0DAEEA2700489809 /* thread.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5BFF0DAEEA2700489809 /* thread.c */; };
+ D99B5C4B0DAEEA2700489809 /* timers.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5C000DAEEA2700489809 /* timers.c */; };
+ D99B5C4D0DAEEA2700489809 /* xstdio.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5C020DAEEA2700489809 /* xstdio.c */; };
+ D99B5C4E0DAEEA2700489809 /* catalog.c in Sources */ = {isa = PBXBuildFile; fileRef = D99B5C030DAEEA2700489809 /* catalog.c */; };
+ D99B5C500DAEEA6900489809 /* XaoS.icns in Resources */ = {isa = PBXBuildFile; fileRef = D99B5C4F0DAEEA6900489809 /* XaoS.icns */; };
+ D99B5E070DAEEB1200489809 /* XaoSHelp in Resources */ = {isa = PBXBuildFile; fileRef = D99B5D700DAEEB1200489809 /* XaoSHelp */; };
+ D99B5E0C0DAEEB4C00489809 /* libintl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D99B5E090DAEEB4C00489809 /* libintl.dylib */; };
+ D99B5E0D0DAEEB4C00489809 /* libgsl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D99B5E0A0DAEEB4C00489809 /* libgsl.dylib */; };
+ D99B5E0E0DAEEB4C00489809 /* libpng.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D99B5E0B0DAEEB4C00489809 /* libpng.dylib */; };
+ D99B5E1D0DAEEBD400489809 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D99B5E1C0DAEEBD400489809 /* Carbon.framework */; };
+ D99B5E200DAEEC0E00489809 /* libintl.dylib in Copy Embedded Frameworks and Libraries */ = {isa = PBXBuildFile; fileRef = D99B5E090DAEEB4C00489809 /* libintl.dylib */; };
+ D99B5E210DAEEC0E00489809 /* libgsl.dylib in Copy Embedded Frameworks and Libraries */ = {isa = PBXBuildFile; fileRef = D99B5E0A0DAEEB4C00489809 /* libgsl.dylib */; };
+ D99B5E220DAEEC0E00489809 /* libpng.dylib in Copy Embedded Frameworks and Libraries */ = {isa = PBXBuildFile; fileRef = D99B5E0B0DAEEB4C00489809 /* libpng.dylib */; };
+ D99B5E690DAEF3A400489809 /* Credits.html in Resources */ = {isa = PBXBuildFile; fileRef = D99B5E670DAEF3A400489809 /* Credits.html */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ D99B5E1F0DAEEC0D00489809 /* Copy Embedded Frameworks and Libraries */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ D99B5E200DAEEC0E00489809 /* libintl.dylib in Copy Embedded Frameworks and Libraries */,
+ D99B5E210DAEEC0E00489809 /* libgsl.dylib in Copy Embedded Frameworks and Libraries */,
+ D99B5E220DAEEC0E00489809 /* libpng.dylib in Copy Embedded Frameworks and Libraries */,
+ );
+ name = "Copy Embedded Frameworks and Libraries";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+ 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = "<group>"; };
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 32CA4F630368D1EE00C91783 /* XaoS_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = XaoS_Prefix.pch; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 8D1107320486CEB800E47090 /* XaoS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = XaoS.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ D90A09550DB42FD900B7AAFD /* performanceCursor.tiff */ = {isa = PBXFileReference; lastKnownFileType = image.tiff; path = performanceCursor.tiff; sourceTree = "<group>"; };
+ D90A09690DB4465100B7AAFD /* XaoSDocument.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = XaoSDocument.icns; sourceTree = "<group>"; };
+ D95DA721101FE23800826B31 /* config.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = config.h; sourceTree = "<group>"; };
+ D962B0AC101CA598003C66CE /* grlib_cocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = grlib_cocoa.m; sourceTree = "<group>"; };
+ D962B20B101E9149003C66CE /* grlib.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = grlib.c; path = ../../../filter/grlib.c; sourceTree = SOURCE_ROOT; };
+ D99B5B710DAEE9D100489809 /* aconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = aconfig.h; sourceTree = "<group>"; };
+ D99B5B720DAEE9D100489809 /* version.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = version.h; sourceTree = "<group>"; };
+ D99B5B730DAEE9D100489809 /* ui_cocoa.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ui_cocoa.m; sourceTree = "<group>"; };
+ D99B5B760DAEE9E700489809 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = "<group>"; };
+ D99B5B770DAEE9E700489809 /* AppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AppController.m; sourceTree = "<group>"; };
+ D99B5B780DAEE9E700489809 /* FractalView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FractalView.h; sourceTree = "<group>"; };
+ D99B5B790DAEE9E700489809 /* FractalView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = FractalView.m; sourceTree = "<group>"; };
+ D99B5B7A0DAEE9E700489809 /* CustomDialog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CustomDialog.h; sourceTree = "<group>"; };
+ D99B5B7B0DAEE9E700489809 /* CustomDialog.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CustomDialog.m; sourceTree = "<group>"; };
+ D99B5B7C0DAEE9E700489809 /* VideatorProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VideatorProxy.h; sourceTree = "<group>"; };
+ D99B5B7D0DAEE9E700489809 /* VideatorProxy.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VideatorProxy.m; sourceTree = "<group>"; };
+ D99B5B820DAEEA0800489809 /* Readme Cocoa */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = "Readme Cocoa"; sourceTree = "<group>"; };
+ D99B5B830DAEEA0800489809 /* HowToBuild.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = HowToBuild.txt; sourceTree = "<group>"; };
+ D99B5B890DAEEA2700489809 /* cmplx.asm */ = {isa = PBXFileReference; explicitFileType = sourcecode.nasm; fileEncoding = 4; path = cmplx.asm; sourceTree = "<group>"; };
+ D99B5B8A0DAEEA2700489809 /* sffe.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sffe.c; sourceTree = "<group>"; };
+ D99B5B8B0DAEEA2700489809 /* sffe_cmplx_asm.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sffe_cmplx_asm.c; sourceTree = "<group>"; };
+ D99B5B8C0DAEEA2700489809 /* sffe_cmplx_gsl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; path = sffe_cmplx_gsl.c; sourceTree = "<group>"; };
+ D99B5B8F0DAEEA2700489809 /* archaccel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = archaccel.h; sourceTree = "<group>"; };
+ D99B5B900DAEEA2700489809 /* btrace.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = btrace.h; sourceTree = "<group>"; };
+ D99B5B910DAEEA2700489809 /* c256.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = c256.h; sourceTree = "<group>"; };
+ D99B5B920DAEEA2700489809 /* catalog.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = catalog.h; sourceTree = "<group>"; };
+ D99B5B930DAEEA2700489809 /* complex.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = complex.h; sourceTree = "<group>"; };
+ D99B5BA10DAEEA2700489809 /* cursor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = cursor.h; sourceTree = "<group>"; };
+ D99B5BA20DAEEA2700489809 /* fconfig.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fconfig.h; sourceTree = "<group>"; };
+ D99B5BA30DAEEA2700489809 /* filter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = filter.h; sourceTree = "<group>"; };
+ D99B5BA40DAEEA2700489809 /* formulas.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = formulas.h; sourceTree = "<group>"; };
+ D99B5BA50DAEEA2700489809 /* fractal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = fractal.h; sourceTree = "<group>"; };
+ D99B5BA60DAEEA2700489809 /* gccaccel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gccaccel.h; sourceTree = "<group>"; };
+ D99B5BA70DAEEA2700489809 /* gccbuild.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = gccbuild.h; sourceTree = "<group>"; };
+ D99B5BA80DAEEA2700489809 /* generic.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = generic.h; sourceTree = "<group>"; };
+ D99B5BA90DAEEA2700489809 /* grlib.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = grlib.h; sourceTree = "<group>"; };
+ D99B5BAA0DAEEA2700489809 /* hicolor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = hicolor.h; sourceTree = "<group>"; };
+ D99B5BAC0DAEEA2700489809 /* __math.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = __math.h; sourceTree = "<group>"; };
+ D99B5BAD0DAEEA2700489809 /* ctrl87.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ctrl87.h; sourceTree = "<group>"; };
+ D99B5BAE0DAEEA2700489809 /* sstring.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = sstring.h; sourceTree = "<group>"; };
+ D99B5BB30DAEEA2700489809 /* misc-f.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "misc-f.h"; sourceTree = "<group>"; };
+ D99B5BB40DAEEA2700489809 /* param.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = param.h; sourceTree = "<group>"; };
+ D99B5BB50DAEEA2700489809 /* pixel_t.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = pixel_t.h; sourceTree = "<group>"; };
+ D99B5BB60DAEEA2700489809 /* plane.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = plane.h; sourceTree = "<group>"; };
+ D99B5BB80DAEEA2700489809 /* timers.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = timers.h; sourceTree = "<group>"; };
+ D99B5BB90DAEEA2700489809 /* true24.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = true24.h; sourceTree = "<group>"; };
+ D99B5BBA0DAEEA2700489809 /* truecolor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = truecolor.h; sourceTree = "<group>"; };
+ D99B5BBB0DAEEA2700489809 /* ui.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ui.h; sourceTree = "<group>"; };
+ D99B5BBC0DAEEA2700489809 /* ui_helper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ui_helper.h; sourceTree = "<group>"; };
+ D99B5BBE0DAEEA2700489809 /* version.h.in */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = version.h.in; sourceTree = "<group>"; };
+ D99B5BBF0DAEEA2700489809 /* xerror.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xerror.h; sourceTree = "<group>"; };
+ D99B5BC00DAEEA2700489809 /* xio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xio.h; sourceTree = "<group>"; };
+ D99B5BC10DAEEA2700489809 /* xldio.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xldio.h; sourceTree = "<group>"; };
+ D99B5BC20DAEEA2700489809 /* xmenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xmenu.h; sourceTree = "<group>"; };
+ D99B5BC30DAEEA2700489809 /* xshl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xshl.h; sourceTree = "<group>"; };
+ D99B5BC40DAEEA2700489809 /* xthread.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = xthread.h; sourceTree = "<group>"; };
+ D99B5BC50DAEEA2700489809 /* zoom.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = zoom.h; sourceTree = "<group>"; };
+ D99B5BC70DAEEA2700489809 /* subwindow.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = subwindow.c; path = ../../../engine/subwindow.c; sourceTree = SOURCE_ROOT; };
+ D99B5BC80DAEEA2700489809 /* palettef.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = palettef.c; path = ../../../engine/palettef.c; sourceTree = SOURCE_ROOT; };
+ D99B5BC90DAEEA2700489809 /* interlace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = interlace.c; path = ../../../engine/interlace.c; sourceTree = SOURCE_ROOT; };
+ D99B5BCA0DAEEA2700489809 /* edge2.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = edge2.c; path = ../../../engine/edge2.c; sourceTree = SOURCE_ROOT; };
+ D99B5BCB0DAEEA2700489809 /* fractal.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fractal.c; path = ../../../engine/fractal.c; sourceTree = SOURCE_ROOT; };
+ D99B5BCC0DAEEA2700489809 /* rotate.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = rotate.c; path = ../../../engine/rotate.c; sourceTree = SOURCE_ROOT; };
+ D99B5BCD0DAEEA2700489809 /* itersmall.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = itersmall.c; path = ../../../engine/itersmall.c; sourceTree = SOURCE_ROOT; };
+ D99B5BCE0DAEEA2700489809 /* blur.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = blur.c; path = ../../../engine/blur.c; sourceTree = SOURCE_ROOT; };
+ D99B5BCF0DAEEA2700489809 /* anti.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = anti.c; path = ../../../engine/anti.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD00DAEEA2700489809 /* stereogram.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = stereogram.c; path = ../../../engine/stereogram.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD10DAEEA2700489809 /* edge.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = edge.c; path = ../../../engine/edge.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD20DAEEA2700489809 /* zoom.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = zoom.c; path = ../../../engine/zoom.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD30DAEEA2700489809 /* star.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = star.c; path = ../../../engine/star.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD40DAEEA2700489809 /* formulas.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = formulas.c; path = ../../../engine/formulas.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD50DAEEA2700489809 /* emboss.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = emboss.c; path = ../../../engine/emboss.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD60DAEEA2700489809 /* julia.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = julia.c; path = ../../../engine/julia.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD70DAEEA2700489809 /* btrace.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = btrace.c; path = ../../../engine/btrace.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD80DAEEA2700489809 /* i386.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = i386.c; path = ../../../engine/i386.c; sourceTree = SOURCE_ROOT; };
+ D99B5BD90DAEEA2700489809 /* dither.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dither.c; path = ../../../engine/dither.c; sourceTree = SOURCE_ROOT; };
+ D99B5BDA0DAEEA2700489809 /* 3d.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = 3d.c; path = ../../../engine/3d.c; sourceTree = SOURCE_ROOT; };
+ D99B5BDB0DAEEA2700489809 /* plane.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = plane.c; path = ../../../engine/plane.c; sourceTree = SOURCE_ROOT; };
+ D99B5BDD0DAEEA2700489809 /* filter.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = filter.c; path = ../../../filter/filter.c; sourceTree = SOURCE_ROOT; };
+ D99B5BDE0DAEEA2700489809 /* palette.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = palette.c; path = ../../../filter/palette.c; sourceTree = SOURCE_ROOT; };
+ D99B5BDF0DAEEA2700489809 /* random.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = random.c; path = ../../../filter/random.c; sourceTree = SOURCE_ROOT; };
+ D99B5BE10DAEEA2700489809 /* font.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = font.c; path = ../../../filter/font.c; sourceTree = SOURCE_ROOT; };
+ D99B5BE20DAEEA2700489809 /* image.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = image.c; path = ../../../filter/image.c; sourceTree = SOURCE_ROOT; };
+ D99B5BE40DAEEA2700489809 /* drivers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = drivers.c; path = ../../drivers.c; sourceTree = SOURCE_ROOT; };
+ D99B5BE50DAEEA2700489809 /* dialog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = dialog.c; path = ../../dialog.c; sourceTree = SOURCE_ROOT; };
+ D99B5BE60DAEEA2700489809 /* uihelp.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = uihelp.c; path = ../../uihelp.c; sourceTree = SOURCE_ROOT; };
+ D99B5BE70DAEEA2700489809 /* uimenu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = uimenu.c; path = ../../uimenu.c; sourceTree = SOURCE_ROOT; };
+ D99B5BE80DAEEA2700489809 /* fparams.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = fparams.c; path = ../../fparams.c; sourceTree = SOURCE_ROOT; };
+ D99B5BE90DAEEA2700489809 /* ui.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ui.c; path = ../../ui.c; sourceTree = SOURCE_ROOT; };
+ D99B5BEA0DAEEA2700489809 /* param.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = param.c; path = ../../param.c; sourceTree = SOURCE_ROOT; };
+ D99B5BEB0DAEEA2700489809 /* filesel.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = filesel.c; path = ../../filesel.c; sourceTree = SOURCE_ROOT; };
+ D99B5BEC0DAEEA2700489809 /* pipecmd.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = pipecmd.c; path = ../../pipecmd.c; sourceTree = SOURCE_ROOT; };
+ D99B5BEE0DAEEA2700489809 /* save.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = save.c; path = "../../../ui-hlp/save.c"; sourceTree = SOURCE_ROOT; };
+ D99B5BEF0DAEEA2700489809 /* menu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = menu.c; path = "../../../ui-hlp/menu.c"; sourceTree = SOURCE_ROOT; };
+ D99B5BF00DAEEA2700489809 /* wstack.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = wstack.c; path = "../../../ui-hlp/wstack.c"; sourceTree = SOURCE_ROOT; };
+ D99B5BF10DAEEA2700489809 /* playtext.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = playtext.c; path = "../../../ui-hlp/playtext.c"; sourceTree = SOURCE_ROOT; };
+ D99B5BF20DAEEA2700489809 /* render.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = render.c; path = "../../../ui-hlp/render.c"; sourceTree = SOURCE_ROOT; };
+ D99B5BF30DAEEA2700489809 /* play.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = play.c; path = "../../../ui-hlp/play.c"; sourceTree = SOURCE_ROOT; };
+ D99B5BF40DAEEA2700489809 /* messg.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = messg.c; path = "../../../ui-hlp/messg.c"; sourceTree = SOURCE_ROOT; };
+ D99B5BF50DAEEA2700489809 /* ui_helper.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = ui_helper.c; path = "../../../ui-hlp/ui_helper.c"; sourceTree = SOURCE_ROOT; };
+ D99B5BF60DAEEA2700489809 /* autopilot.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = autopilot.c; path = "../../../ui-hlp/autopilot.c"; sourceTree = SOURCE_ROOT; };
+ D99B5BF80DAEEA2700489809 /* xmenu.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xmenu.c; path = ../../../util/xmenu.c; sourceTree = SOURCE_ROOT; };
+ D99B5BF90DAEEA2700489809 /* png.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = png.c; path = ../../../util/png.c; sourceTree = SOURCE_ROOT; };
+ D99B5BFA0DAEEA2700489809 /* xstring.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xstring.c; path = ../../../util/xstring.c; sourceTree = SOURCE_ROOT; };
+ D99B5BFB0DAEEA2700489809 /* xshl.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xshl.c; path = ../../../util/xshl.c; sourceTree = SOURCE_ROOT; };
+ D99B5BFC0DAEEA2700489809 /* xldio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xldio.c; path = ../../../util/xldio.c; sourceTree = SOURCE_ROOT; };
+ D99B5BFD0DAEEA2700489809 /* help.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = help.c; path = ../../../util/help.c; sourceTree = SOURCE_ROOT; };
+ D99B5BFE0DAEEA2700489809 /* xerror.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xerror.c; path = ../../../util/xerror.c; sourceTree = SOURCE_ROOT; };
+ D99B5BFF0DAEEA2700489809 /* thread.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = thread.c; path = ../../../util/thread.c; sourceTree = SOURCE_ROOT; };
+ D99B5C000DAEEA2700489809 /* timers.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = timers.c; path = ../../../util/timers.c; sourceTree = SOURCE_ROOT; };
+ D99B5C020DAEEA2700489809 /* xstdio.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = xstdio.c; path = ../../../util/xstdio.c; sourceTree = SOURCE_ROOT; };
+ D99B5C030DAEEA2700489809 /* catalog.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = catalog.c; path = ../../../util/catalog.c; sourceTree = SOURCE_ROOT; };
+ D99B5C4F0DAEEA6900489809 /* XaoS.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = XaoS.icns; sourceTree = "<group>"; };
+ D99B5D700DAEEB1200489809 /* XaoSHelp */ = {isa = PBXFileReference; lastKnownFileType = folder; name = XaoSHelp; path = ../../../../help/XaoSHelp; sourceTree = SOURCE_ROOT; };
+ D99B5E090DAEEB4C00489809 /* libintl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libintl.dylib; sourceTree = "<group>"; };
+ D99B5E0A0DAEEB4C00489809 /* libgsl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libgsl.dylib; sourceTree = "<group>"; };
+ D99B5E0B0DAEEB4C00489809 /* libpng.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = libpng.dylib; sourceTree = "<group>"; };
+ D99B5E1C0DAEEBD400489809 /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
+ D99B5E680DAEF3A400489809 /* English */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.html; name = English; path = English.lproj/Credits.html; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+ D99B5E1D0DAEEBD400489809 /* Carbon.framework in Frameworks */,
+ D99B5E0C0DAEEB4C00489809 /* libintl.dylib in Frameworks */,
+ D99B5E0D0DAEEB4C00489809 /* libgsl.dylib in Frameworks */,
+ D99B5E0E0DAEEB4C00489809 /* libpng.dylib in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5B760DAEE9E700489809 /* AppController.h */,
+ D99B5B770DAEE9E700489809 /* AppController.m */,
+ D99B5B780DAEE9E700489809 /* FractalView.h */,
+ D99B5B790DAEE9E700489809 /* FractalView.m */,
+ D99B5B7A0DAEE9E700489809 /* CustomDialog.h */,
+ D99B5B7B0DAEE9E700489809 /* CustomDialog.m */,
+ D99B5B7C0DAEE9E700489809 /* VideatorProxy.h */,
+ D99B5B7D0DAEE9E700489809 /* VideatorProxy.m */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5E1C0DAEEBD400489809 /* Carbon.framework */,
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* XaoS.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* XaoS */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5B820DAEEA0800489809 /* Readme Cocoa */,
+ D99B5B830DAEEA0800489809 /* HowToBuild.txt */,
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ D99B5B860DAEEA2700489809 /* Shared Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ D99B5E080DAEEB2B00489809 /* Embedded Frameworks and Libraries */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = XaoS;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* XaoS_Prefix.pch */,
+ D99B5B710DAEE9D100489809 /* aconfig.h */,
+ D99B5B720DAEE9D100489809 /* version.h */,
+ D99B5B730DAEE9D100489809 /* ui_cocoa.m */,
+ D962B0AC101CA598003C66CE /* grlib_cocoa.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5E670DAEF3A400489809 /* Credits.html */,
+ 8D1107310486CEB800E47090 /* Info.plist */,
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+ 29B97318FDCFA39411CA2CEA /* MainMenu.nib */,
+ D99B5C4F0DAEEA6900489809 /* XaoS.icns */,
+ D90A09690DB4465100B7AAFD /* XaoSDocument.icns */,
+ D90A09550DB42FD900B7AAFD /* performanceCursor.tiff */,
+ D99B5D700DAEEB1200489809 /* XaoSHelp */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ D99B5B860DAEEA2700489809 /* Shared Sources */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5BF70DAEEA2700489809 /* util */,
+ D99B5BED0DAEEA2700489809 /* ui-hlp */,
+ D99B5BE30DAEEA2700489809 /* ui */,
+ D99B5BDC0DAEEA2700489809 /* filter */,
+ D99B5BC60DAEEA2700489809 /* engine */,
+ D99B5B870DAEEA2700489809 /* sffe */,
+ D99B5B8D0DAEEA2700489809 /* include */,
+ );
+ name = "Shared Sources";
+ sourceTree = "<group>";
+ };
+ D99B5B870DAEEA2700489809 /* sffe */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5B880DAEEA2700489809 /* asm */,
+ D99B5B8A0DAEEA2700489809 /* sffe.c */,
+ D99B5B8B0DAEEA2700489809 /* sffe_cmplx_asm.c */,
+ D99B5B8C0DAEEA2700489809 /* sffe_cmplx_gsl.c */,
+ );
+ name = sffe;
+ path = ../../../sffe;
+ sourceTree = SOURCE_ROOT;
+ };
+ D99B5B880DAEEA2700489809 /* asm */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5B890DAEEA2700489809 /* cmplx.asm */,
+ );
+ path = asm;
+ sourceTree = "<group>";
+ };
+ D99B5B8D0DAEEA2700489809 /* include */ = {
+ isa = PBXGroup;
+ children = (
+ D95DA721101FE23800826B31 /* config.h */,
+ D99B5B8F0DAEEA2700489809 /* archaccel.h */,
+ D99B5B900DAEEA2700489809 /* btrace.h */,
+ D99B5B910DAEEA2700489809 /* c256.h */,
+ D99B5B920DAEEA2700489809 /* catalog.h */,
+ D99B5B930DAEEA2700489809 /* complex.h */,
+ D99B5BA10DAEEA2700489809 /* cursor.h */,
+ D99B5BA20DAEEA2700489809 /* fconfig.h */,
+ D99B5BA30DAEEA2700489809 /* filter.h */,
+ D99B5BA40DAEEA2700489809 /* formulas.h */,
+ D99B5BA50DAEEA2700489809 /* fractal.h */,
+ D99B5BA60DAEEA2700489809 /* gccaccel.h */,
+ D99B5BA70DAEEA2700489809 /* gccbuild.h */,
+ D99B5BA80DAEEA2700489809 /* generic.h */,
+ D99B5BA90DAEEA2700489809 /* grlib.h */,
+ D99B5BAA0DAEEA2700489809 /* hicolor.h */,
+ D99B5BAB0DAEEA2700489809 /* i386 */,
+ D99B5BB30DAEEA2700489809 /* misc-f.h */,
+ D99B5BB40DAEEA2700489809 /* param.h */,
+ D99B5BB50DAEEA2700489809 /* pixel_t.h */,
+ D99B5BB60DAEEA2700489809 /* plane.h */,
+ D99B5BB80DAEEA2700489809 /* timers.h */,
+ D99B5BB90DAEEA2700489809 /* true24.h */,
+ D99B5BBA0DAEEA2700489809 /* truecolor.h */,
+ D99B5BBB0DAEEA2700489809 /* ui.h */,
+ D99B5BBC0DAEEA2700489809 /* ui_helper.h */,
+ D99B5BBE0DAEEA2700489809 /* version.h.in */,
+ D99B5BBF0DAEEA2700489809 /* xerror.h */,
+ D99B5BC00DAEEA2700489809 /* xio.h */,
+ D99B5BC10DAEEA2700489809 /* xldio.h */,
+ D99B5BC20DAEEA2700489809 /* xmenu.h */,
+ D99B5BC30DAEEA2700489809 /* xshl.h */,
+ D99B5BC40DAEEA2700489809 /* xthread.h */,
+ D99B5BC50DAEEA2700489809 /* zoom.h */,
+ );
+ name = include;
+ path = ../../../include;
+ sourceTree = SOURCE_ROOT;
+ };
+ D99B5BAB0DAEEA2700489809 /* i386 */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5BAC0DAEEA2700489809 /* __math.h */,
+ D99B5BAD0DAEEA2700489809 /* ctrl87.h */,
+ D99B5BAE0DAEEA2700489809 /* sstring.h */,
+ );
+ path = i386;
+ sourceTree = "<group>";
+ };
+ D99B5BC60DAEEA2700489809 /* engine */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5BC70DAEEA2700489809 /* subwindow.c */,
+ D99B5BC80DAEEA2700489809 /* palettef.c */,
+ D99B5BC90DAEEA2700489809 /* interlace.c */,
+ D99B5BCA0DAEEA2700489809 /* edge2.c */,
+ D99B5BCB0DAEEA2700489809 /* fractal.c */,
+ D99B5BCC0DAEEA2700489809 /* rotate.c */,
+ D99B5BCD0DAEEA2700489809 /* itersmall.c */,
+ D99B5BCE0DAEEA2700489809 /* blur.c */,
+ D99B5BCF0DAEEA2700489809 /* anti.c */,
+ D99B5BD00DAEEA2700489809 /* stereogram.c */,
+ D99B5BD10DAEEA2700489809 /* edge.c */,
+ D99B5BD20DAEEA2700489809 /* zoom.c */,
+ D99B5BD30DAEEA2700489809 /* star.c */,
+ D99B5BD40DAEEA2700489809 /* formulas.c */,
+ D99B5BD50DAEEA2700489809 /* emboss.c */,
+ D99B5BD60DAEEA2700489809 /* julia.c */,
+ D99B5BD70DAEEA2700489809 /* btrace.c */,
+ D99B5BD80DAEEA2700489809 /* i386.c */,
+ D99B5BD90DAEEA2700489809 /* dither.c */,
+ D99B5BDA0DAEEA2700489809 /* 3d.c */,
+ D99B5BDB0DAEEA2700489809 /* plane.c */,
+ );
+ name = engine;
+ sourceTree = "<group>";
+ };
+ D99B5BDC0DAEEA2700489809 /* filter */ = {
+ isa = PBXGroup;
+ children = (
+ D962B20B101E9149003C66CE /* grlib.c */,
+ D99B5BDD0DAEEA2700489809 /* filter.c */,
+ D99B5BDE0DAEEA2700489809 /* palette.c */,
+ D99B5BDF0DAEEA2700489809 /* random.c */,
+ D99B5BE10DAEEA2700489809 /* font.c */,
+ D99B5BE20DAEEA2700489809 /* image.c */,
+ );
+ name = filter;
+ sourceTree = "<group>";
+ };
+ D99B5BE30DAEEA2700489809 /* ui */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5BE40DAEEA2700489809 /* drivers.c */,
+ D99B5BE50DAEEA2700489809 /* dialog.c */,
+ D99B5BE60DAEEA2700489809 /* uihelp.c */,
+ D99B5BE70DAEEA2700489809 /* uimenu.c */,
+ D99B5BE80DAEEA2700489809 /* fparams.c */,
+ D99B5BE90DAEEA2700489809 /* ui.c */,
+ D99B5BEA0DAEEA2700489809 /* param.c */,
+ D99B5BEB0DAEEA2700489809 /* filesel.c */,
+ D99B5BEC0DAEEA2700489809 /* pipecmd.c */,
+ );
+ name = ui;
+ sourceTree = "<group>";
+ };
+ D99B5BED0DAEEA2700489809 /* ui-hlp */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5BEE0DAEEA2700489809 /* save.c */,
+ D99B5BEF0DAEEA2700489809 /* menu.c */,
+ D99B5BF00DAEEA2700489809 /* wstack.c */,
+ D99B5BF10DAEEA2700489809 /* playtext.c */,
+ D99B5BF20DAEEA2700489809 /* render.c */,
+ D99B5BF30DAEEA2700489809 /* play.c */,
+ D99B5BF40DAEEA2700489809 /* messg.c */,
+ D99B5BF50DAEEA2700489809 /* ui_helper.c */,
+ D99B5BF60DAEEA2700489809 /* autopilot.c */,
+ );
+ name = "ui-hlp";
+ sourceTree = "<group>";
+ };
+ D99B5BF70DAEEA2700489809 /* util */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5BF80DAEEA2700489809 /* xmenu.c */,
+ D99B5BF90DAEEA2700489809 /* png.c */,
+ D99B5BFA0DAEEA2700489809 /* xstring.c */,
+ D99B5BFB0DAEEA2700489809 /* xshl.c */,
+ D99B5BFC0DAEEA2700489809 /* xldio.c */,
+ D99B5BFD0DAEEA2700489809 /* help.c */,
+ D99B5BFE0DAEEA2700489809 /* xerror.c */,
+ D99B5BFF0DAEEA2700489809 /* thread.c */,
+ D99B5C000DAEEA2700489809 /* timers.c */,
+ D99B5C020DAEEA2700489809 /* xstdio.c */,
+ D99B5C030DAEEA2700489809 /* catalog.c */,
+ );
+ name = util;
+ sourceTree = "<group>";
+ };
+ D99B5E080DAEEB2B00489809 /* Embedded Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ D99B5E090DAEEB4C00489809 /* libintl.dylib */,
+ D99B5E0A0DAEEB4C00489809 /* libgsl.dylib */,
+ D99B5E0B0DAEEB4C00489809 /* libpng.dylib */,
+ );
+ name = "Embedded Frameworks and Libraries";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D1107260486CEB800E47090 /* XaoS */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "XaoS" */;
+ buildPhases = (
+ D99B5E110DAEEB6800489809 /* Pre-Compile Script */,
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ D99B5E1F0DAEEC0D00489809 /* Copy Embedded Frameworks and Libraries */,
+ D99B5E240DAEEC2200489809 /* Post-Compile Script */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = XaoS;
+ productInstallPath = "$(HOME)/Applications";
+ productName = XaoS;
+ productReference = 8D1107320486CEB800E47090 /* XaoS.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "XaoS" */;
+ compatibilityVersion = "Xcode 3.0";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* XaoS */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* XaoS */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */,
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+ D99B5C500DAEEA6900489809 /* XaoS.icns in Resources */,
+ D99B5E070DAEEB1200489809 /* XaoSHelp in Resources */,
+ D99B5E690DAEF3A400489809 /* Credits.html in Resources */,
+ D90A09560DB42FD900B7AAFD /* performanceCursor.tiff in Resources */,
+ D90A096A0DB4465100B7AAFD /* XaoSDocument.icns in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ D99B5E110DAEEB6800489809 /* Pre-Compile Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Pre-Compile Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# create config.h from config.autoconf (normally done by makefile)\nif [ $PROJECT_DIR/../../../include/config/config.autoconf -nt $PROJECT_DIR/../../../include/config.h ]; then\n\tln -sf $PROJECT_DIR/../../../include/config/config.autoconf $PROJECT_DIR/../../../include/config.h\nfi\n\n# change libraries to use executable-relative paths\nif [ $PROJECT_DIR/thirdparty/lib/libpng.dylib -nt $PROJECT_DIR/libpng.dylib ]; then\n\tcp $PROJECT_DIR/thirdparty/lib/libpng.dylib $PROJECT_DIR/libpng.dylib\n\tinstall_name_tool -id @executable_path/../Frameworks/libpng.dylib $PROJECT_DIR/libpng.dylib\nfi\n\nif [ $PROJECT_DIR/thirdparty/lib/libgsl.dylib -nt $PROJECT_DIR/libgsl.dylib ]; then\n\tcp $PROJECT_DIR/thirdparty/lib/libgsl.dylib $PROJECT_DIR/libgsl.dylib\n\tinstall_name_tool -id @executable_path/../Frameworks/libgsl.dylib $PROJECT_DIR/libgsl.dylib\nfi\n\nif [ $PROJECT_DIR/thirdparty/lib/libintl.dylib -nt $PROJECT_DIR/libintl.dylib ]; then\n\tcp $PROJECT_DIR/thirdparty/lib/libintl.dylib $PROJECT_DIR/libintl.dylib\n\tinstall_name_tool -id @executable_path/../Frameworks/libintl.dylib $PROJECT_DIR/libintl.dylib\nfi\n\n# build apple help\nif [ $PROJECT_DIR/../../../../help/xaos.hlp -nt $PROJECT_DIR/../../../../help/XaoSHelp ]; then\n\tcd $PROJECT_DIR/../../../../help\n\t./applehelpconv\n\tcd $PROJECT_DIR\nfi\n\n";
+ };
+ D99B5E240DAEEC2200489809 /* Post-Compile Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Post-Compile Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "# Make resource subdirectories\nmkdir $BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/tutorial\nmkdir $BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/examples\nmkdir $BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/catalogs\nmkdir $BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/help\nmkdir $BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/locale\n\n# Copy resources from project source directories\ncp $PROJECT_DIR/../../../../tutorial/*.x[ah]f $BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/tutorial\ncp $PROJECT_DIR/../../../../examples/*/*.x[ap]f $BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/examples\ncp $PROJECT_DIR/../../../../catalogs/*.cat $BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/catalogs\ncp $PROJECT_DIR/../../../../help/xaos.hlp $BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/help\n\n# Build message catalogs and copy to app bundle\ncd $PROJECT_DIR/../../../i18n\nlocaledir=$BUILT_PRODUCTS_DIR/XaoS.app/Contents/Resources/locale\npofiles=`ls *.po`\nmsgfmt=$PROJECT_DIR/thirdparty/bin/msgfmt\nfor pofile in $pofiles; do\n\tlang=`basename $pofile .po`\n\tmofile=${lang}.mo\n\tif [ $pofile -nt $mofile ]; then\n\t\t$msgfmt -o $mofile -c -v --statistics $pofile\n\tfi\n\tmkdir -p $localedir/$lang/LC_MESSAGES\n\tcp $mofile $localedir/$lang/LC_MESSAGES/xaos.mo\ndone\ncd $PROJECT_DIR";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D99B5B740DAEE9D100489809 /* ui_cocoa.m in Sources */,
+ D99B5B7E0DAEE9E700489809 /* AppController.m in Sources */,
+ D99B5B7F0DAEE9E700489809 /* FractalView.m in Sources */,
+ D99B5B800DAEE9E700489809 /* CustomDialog.m in Sources */,
+ D99B5B810DAEE9E700489809 /* VideatorProxy.m in Sources */,
+ D99B5C040DAEEA2700489809 /* cmplx.asm in Sources */,
+ D99B5C050DAEEA2700489809 /* sffe.c in Sources */,
+ D99B5C060DAEEA2700489809 /* sffe_cmplx_asm.c in Sources */,
+ D99B5C070DAEEA2700489809 /* sffe_cmplx_gsl.c in Sources */,
+ D99B5C160DAEEA2700489809 /* subwindow.c in Sources */,
+ D99B5C170DAEEA2700489809 /* palettef.c in Sources */,
+ D99B5C180DAEEA2700489809 /* interlace.c in Sources */,
+ D99B5C190DAEEA2700489809 /* edge2.c in Sources */,
+ D99B5C1A0DAEEA2700489809 /* fractal.c in Sources */,
+ D99B5C1B0DAEEA2700489809 /* rotate.c in Sources */,
+ D99B5C1C0DAEEA2700489809 /* itersmall.c in Sources */,
+ D99B5C1D0DAEEA2700489809 /* blur.c in Sources */,
+ D99B5C1E0DAEEA2700489809 /* anti.c in Sources */,
+ D99B5C1F0DAEEA2700489809 /* stereogram.c in Sources */,
+ D99B5C200DAEEA2700489809 /* edge.c in Sources */,
+ D99B5C210DAEEA2700489809 /* zoom.c in Sources */,
+ D99B5C220DAEEA2700489809 /* star.c in Sources */,
+ D99B5C230DAEEA2700489809 /* formulas.c in Sources */,
+ D99B5C240DAEEA2700489809 /* emboss.c in Sources */,
+ D99B5C250DAEEA2700489809 /* julia.c in Sources */,
+ D99B5C260DAEEA2700489809 /* btrace.c in Sources */,
+ D99B5C270DAEEA2700489809 /* i386.c in Sources */,
+ D99B5C280DAEEA2700489809 /* dither.c in Sources */,
+ D99B5C290DAEEA2700489809 /* 3d.c in Sources */,
+ D99B5C2A0DAEEA2700489809 /* plane.c in Sources */,
+ D99B5C2B0DAEEA2700489809 /* filter.c in Sources */,
+ D99B5C2C0DAEEA2700489809 /* palette.c in Sources */,
+ D99B5C2D0DAEEA2700489809 /* random.c in Sources */,
+ D99B5C2F0DAEEA2700489809 /* font.c in Sources */,
+ D99B5C300DAEEA2700489809 /* image.c in Sources */,
+ D99B5C310DAEEA2700489809 /* drivers.c in Sources */,
+ D99B5C320DAEEA2700489809 /* dialog.c in Sources */,
+ D99B5C330DAEEA2700489809 /* uihelp.c in Sources */,
+ D99B5C340DAEEA2700489809 /* uimenu.c in Sources */,
+ D99B5C350DAEEA2700489809 /* fparams.c in Sources */,
+ D99B5C360DAEEA2700489809 /* ui.c in Sources */,
+ D99B5C370DAEEA2700489809 /* param.c in Sources */,
+ D99B5C380DAEEA2700489809 /* filesel.c in Sources */,
+ D99B5C390DAEEA2700489809 /* pipecmd.c in Sources */,
+ D99B5C3A0DAEEA2700489809 /* save.c in Sources */,
+ D99B5C3B0DAEEA2700489809 /* menu.c in Sources */,
+ D99B5C3C0DAEEA2700489809 /* wstack.c in Sources */,
+ D99B5C3D0DAEEA2700489809 /* playtext.c in Sources */,
+ D99B5C3E0DAEEA2700489809 /* render.c in Sources */,
+ D99B5C3F0DAEEA2700489809 /* play.c in Sources */,
+ D99B5C400DAEEA2700489809 /* messg.c in Sources */,
+ D99B5C410DAEEA2700489809 /* ui_helper.c in Sources */,
+ D99B5C420DAEEA2700489809 /* autopilot.c in Sources */,
+ D99B5C430DAEEA2700489809 /* xmenu.c in Sources */,
+ D99B5C440DAEEA2700489809 /* png.c in Sources */,
+ D99B5C450DAEEA2700489809 /* xstring.c in Sources */,
+ D99B5C460DAEEA2700489809 /* xshl.c in Sources */,
+ D99B5C470DAEEA2700489809 /* xldio.c in Sources */,
+ D99B5C480DAEEA2700489809 /* help.c in Sources */,
+ D99B5C490DAEEA2700489809 /* xerror.c in Sources */,
+ D99B5C4A0DAEEA2700489809 /* thread.c in Sources */,
+ D99B5C4B0DAEEA2700489809 /* timers.c in Sources */,
+ D99B5C4D0DAEEA2700489809 /* xstdio.c in Sources */,
+ D99B5C4E0DAEEA2700489809 /* catalog.c in Sources */,
+ D962B0AD101CA598003C66CE /* grlib_cocoa.m in Sources */,
+ D962B20C101E9149003C66CE /* grlib.c in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C165DFE840E0CC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 29B97319FDCFA39411CA2CEA /* English */,
+ );
+ name = MainMenu.nib;
+ sourceTree = "<group>";
+ };
+ D99B5E670DAEF3A400489809 /* Credits.html */ = {
+ isa = PBXVariantGroup;
+ children = (
+ D99B5E680DAEF3A400489809 /* English */,
+ );
+ name = Credits.html;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C01FCF4B08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ COPY_PHASE_STRIP = NO;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = XaoS_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)\"",
+ "\"$(SRCROOT)/thirdparty/lib\"",
+ );
+ PRODUCT_NAME = XaoS;
+ WRAPPER_EXTENSION = app;
+ ZERO_LINK = YES;
+ };
+ name = Debug;
+ };
+ C01FCF4C08A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = XaoS_Prefix.pch;
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)\"",
+ "\"$(SRCROOT)/thirdparty/lib\"",
+ );
+ PRODUCT_NAME = XaoS;
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = ./thirdparty/include;
+ OTHER_LDFLAGS = "-liconv";
+ PREBINDING = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
+ USER_HEADER_SEARCH_PATHS = ../../../include;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = (
+ ppc,
+ i386,
+ );
+ GCC_FAST_MATH = YES;
+ GCC_OPTIMIZATION_LEVEL = 3;
+ GCC_UNROLL_LOOPS = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ HEADER_SEARCH_PATHS = ./thirdparty/include;
+ OTHER_CFLAGS = "";
+ OTHER_LDFLAGS = "-liconv";
+ PREBINDING = NO;
+ SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.4u.sdk";
+ USER_HEADER_SEARCH_PATHS = ../../../include;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "XaoS" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4B08A954540054247B /* Debug */,
+ C01FCF4C08A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "XaoS" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/src/ui/ui-drv/cocoa/XaoSDocument.icns b/src/ui/ui-drv/cocoa/XaoSDocument.icns
new file mode 100644
index 0000000..a827ad7
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/XaoSDocument.icns
Binary files differ
diff --git a/src/ui/ui-drv/cocoa/XaoS_Prefix.pch b/src/ui/ui-drv/cocoa/XaoS_Prefix.pch
new file mode 100644
index 0000000..b52a674
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/XaoS_Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'XaoS' target in the 'XaoS' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
diff --git a/src/ui/ui-drv/cocoa/aconfig.h b/src/ui/ui-drv/cocoa/aconfig.h
new file mode 100644
index 0000000..d6127b6
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/aconfig.h
@@ -0,0 +1,123 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef ACONFIG_H
+#define ACONFIG_H
+/* #undef HAVE_PTHREAD_SIGHANDLER */
+
+
+//#define DEBUG
+#define VIDEATOR_SUPPORT
+
+/* Triggers Mac OS X-specific behavior in common sources */
+#define MACOSX
+
+/* Cocoa driver needs to do some pre-initialization in its own main function */
+#define MAIN_FUNCTION XaoS_main
+
+/* XaoS xio library uses \01 to indicate paths relative to the executable */
+#define DATAPATH "\01/../Resources"
+#define USE_LOCALEPATH 1
+
+/* Using alloca causes stack overflows on large images */
+/* #undef C_ALLOCA */
+/* #define HAVE_ALLOCA 1 */
+/* #define HAVE_ALLOCA_H 1 */
+
+/* #undef const */
+#define USE_PTHREAD 1
+
+#define HAVE_FABSL 1
+/* #undef HAVE__FABSL */
+/* #undef HAVE___FABSL */
+#define HAVE_FTIME 1
+#define USE_PNG 1
+#define HAVE_FINITE 1
+#define HAVE_SELECT 1
+
+/* Long double is too slow on PowerPC; only enable for i386 build */
+#ifdef __i386__
+#define HAVE_LONG_DOUBLE 1
+#endif
+
+/* #undef HAVE_REDRAWWIN */
+/* #undef HAVE_WREDRAWLN */
+#define USE_NCURSES 1
+/* #undef inline */
+/* #undef _POSIX_SOURCE */
+#define STDC_HEADERS 1
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+#define HAVE_GETTIMEOFDAY 1
+/* #undef HAVE_USLEEP */
+/* #undef HAVE_TERMATTRS */
+/* #undef HAVE_MOUSEMASK */
+#define HAVE_SETITIMER 1
+/* Define if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+/* Define if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+/* #define MITSHM 1 */
+/* #undef CURSES_DRIVER */
+/* #undef BEOS_DRIVER */
+/* #undef AA_DRIVER */
+/* #undef GGI_DRIVER */
+/* #undef X11_DRIVER */
+/* #undef DGA_DRIVER */
+/* #undef SVGA_DRIVER */
+/* #undef WIN32_DRIVER */
+/* #undef DDRAW_DRIVER */
+/* #undef OSX_DRIVER */
+#define COCOA_DRIVER 1
+#define SIZEOF_SHORT 2
+#define SIZEOF_INT 4
+#define SIZEOF_LONG 4
+#define HAVE_GETTEXT 1
+#define NO_MALLOC_H 1
+
+/* Enable SFFE; use ASM for i386 and GSL for PowerPC */
+#define SFFE_USING 1
+#ifdef __i386__
+#define SFFE_CMPLX_ASM 1
+#else
+#define SFFE_CMPLX_GSL 1
+#endif
+
+/* Define colors based on hardware endianness */
+#if __BIG_ENDIAN__
+#define RMASK 0xff000000
+#define GMASK 0x00ff0000
+#define BMASK 0x0000ff00
+#else
+#define RMASK 0x000000ff
+#define GMASK 0x0000ff00
+#define BMASK 0x00ff0000
+#endif
+
+/* Use platform-provided text rendering instead of built-in */
+#define PLATFORM_TEXT_RENDERING 1
+
+
+#endif
diff --git a/src/ui/ui-drv/cocoa/grlib_cocoa.m b/src/ui/ui-drv/cocoa/grlib_cocoa.m
new file mode 100644
index 0000000..3fedb0c
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/grlib_cocoa.m
@@ -0,0 +1,142 @@
+#include <config.h>
+#ifdef PLATFORM_TEXT_RENDERING
+
+#import <Cocoa/Cocoa.h>
+
+#include <fconfig.h>
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <grlib.h>
+
+NSMutableDictionary *textAttributes(int fgcolor, int bgcolor) {
+
+ float red, green, blue;
+
+ NSMutableDictionary *attrsDictionary = [NSMutableDictionary
+ dictionaryWithCapacity:5];
+
+ [attrsDictionary setValue:[NSColor whiteColor]
+ forKey:NSForegroundColorAttributeName];
+
+ [attrsDictionary setValue:[NSFont
+ boldSystemFontOfSize:[NSFont systemFontSize]]
+ forKey:NSFontAttributeName];
+
+ //NSLog(@"%x", fgcolor);
+ red = (fgcolor & RMASK) / 255.0;
+ green = (fgcolor & GMASK) / 255.0;
+ blue = (fgcolor & BMASK) / 255.0;
+ [attrsDictionary setValue:[NSColor colorWithDeviceRed:red
+ green:green
+ blue:blue
+ alpha:1.0]
+ forKey:NSForegroundColorAttributeName];
+
+ red = (bgcolor & RMASK) / 255.0;
+ green = (bgcolor & GMASK) / 255.0;
+ blue = (bgcolor & BMASK) / 255.0;
+ NSShadow *textShadow = [[NSShadow alloc] init];
+ [textShadow setShadowColor:[NSColor colorWithDeviceRed:red
+ green:green
+ blue:blue
+ alpha:1.0]];
+ [textShadow setShadowOffset:NSMakeSize(2, -2)];
+ [textShadow setShadowBlurRadius:1];
+
+ [attrsDictionary setValue:textShadow forKey:NSShadowAttributeName];
+ [textShadow autorelease];
+
+ return attrsDictionary;
+}
+
+
+int
+xprint(struct image *image, CONST struct xfont *current, int x, int y,
+ CONST char *text, int fgcolor, int bgcolor, int mode)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSBitmapImageRep *imageRep = [[NSBitmapImageRep alloc]
+ initWithBitmapDataPlanes:image->currlines
+ pixelsWide:image->width
+ pixelsHigh:image->height
+ bitsPerSample:8
+ samplesPerPixel:3
+ hasAlpha:NO
+ isPlanar:NO
+ colorSpaceName:NSDeviceRGBColorSpace
+ bytesPerRow:0
+ bitsPerPixel:32];
+
+ [NSGraphicsContext saveGraphicsState];
+ NSGraphicsContext *context = [NSGraphicsContext
+ graphicsContextWithBitmapImageRep:imageRep];
+ [NSGraphicsContext setCurrentContext:context];
+
+ NSString *messageText = [[[NSString stringWithUTF8String:text]
+ componentsSeparatedByString:@"\n"]
+ objectAtIndex:0];
+ //NSLog(messageText);
+
+ NSMutableDictionary *attrsDictionary = textAttributes(fgcolor, bgcolor);
+
+ NSSize textSize = [messageText sizeWithAttributes:attrsDictionary];
+ [messageText drawAtPoint:NSMakePoint(x, image->height - y - textSize.height)
+ withAttributes:attrsDictionary];
+
+ [NSGraphicsContext restoreGraphicsState];
+
+ /*
+ * The calling functions expect the return value to be the number of
+ * bytes in the string, not the number of characters (this is not always
+ * equal for UTF-8 strings). Therefore, we don't use [messageText length].
+ */
+ int bytesUsed = [messageText
+ lengthOfBytesUsingEncoding:NSUTF8StringEncoding];
+
+ [imageRep release];
+ [pool release];
+
+ return bytesUsed;
+}
+
+int xtextwidth(CONST struct xfont *font, CONST char *text)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSString *messageText = [[[NSString stringWithUTF8String:text]
+ componentsSeparatedByString:@"\n"]
+ objectAtIndex:0];
+
+ NSMutableDictionary *attrsDictionary = textAttributes(0, 0);
+
+ NSSize textSize = [messageText sizeWithAttributes:attrsDictionary];
+
+ [pool release];
+ return ceil(textSize.width) + 2;
+}
+
+int xtextheight(CONST struct xfont *font) {
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSString *messageText = @"Test String";
+
+ NSMutableDictionary *attrsDictionary = textAttributes(0, 0);
+ NSSize textSize = [messageText sizeWithAttributes:attrsDictionary];
+ [pool release];
+ return ceil(textSize.height) + 2;
+}
+
+int xtextcharw(CONST struct xfont *font, CONST char c)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+
+ NSString *messageText = [NSString stringWithFormat:@"%c", c];
+
+ NSMutableDictionary *attrsDictionary = textAttributes(0, 0);
+ NSSize textSize = [messageText sizeWithAttributes:attrsDictionary];
+ [pool release];
+ return ceil(textSize.width) + 2;
+}
+#endif \ No newline at end of file
diff --git a/src/ui/ui-drv/cocoa/performanceCursor.tiff b/src/ui/ui-drv/cocoa/performanceCursor.tiff
new file mode 100644
index 0000000..fe7faf4
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/performanceCursor.tiff
Binary files differ
diff --git a/src/ui/ui-drv/cocoa/ui_cocoa.m b/src/ui/ui-drv/cocoa/ui_cocoa.m
new file mode 100644
index 0000000..0e107dc
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/ui_cocoa.m
@@ -0,0 +1,267 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * Cocoa Driver by J.B. Langston III (jb-langston@austin.rr.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#import "AppController.h"
+
+#include "ui.h"
+
+struct ui_driver cocoa_driver, cocoa_fullscreen_driver;
+
+#ifdef USE_LOCALEPATH
+char *localepath;
+#endif
+
+static void
+cocoa_printText(int x, int y, CONST char *text)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [[controller view] printText:text atX:x y:y];
+ [pool release];
+}
+
+static void
+cocoa_refreshDisplay()
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [[controller view] display];
+ [pool release];
+}
+
+static void
+cocoa_flipBuffers ()
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [[controller view] flipBuffers];
+ [pool release];
+}
+
+static void
+cocoa_freeBuffers (char *b1, char *b2)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [[controller view] freeBuffers];
+ [pool release];
+}
+
+static int
+cocoa_allocBuffers (char **b1, char **b2)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ int rowLength = [[controller view] allocBuffer1:b1 buffer2:b2];
+ [pool release];
+ return rowLength;
+}
+
+static void
+cocoa_getImageSize (int *w, int *h)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [[controller view] getWidth:w height:h];
+ [pool release];
+}
+
+static void
+cocoa_processEvents (int wait, int *mx, int *my, int *mb, int *k)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ //NSDate *eventDate = wait ? [NSDate distantFuture] : [NSDate distantPast];
+ NSEvent *event = [NSApp nextEventMatchingMask: NSAnyEventMask
+ untilDate: nil //eventDate
+ inMode: NSDefaultRunLoopMode
+ dequeue: YES];
+ if (event != nil) {
+ [NSApp sendEvent: event];
+ }
+ [[controller view] getMouseX:mx mouseY:my mouseButton:mb keys:k];
+ [pool release];
+}
+
+
+static int
+cocoa_initDriver ()
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ int status = [controller initDriver:&cocoa_driver fullscreen:NO];
+ [pool release];
+ return status;
+}
+
+static int
+cocoa_initFullScreenDriver ()
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ int status = [controller initDriver:&cocoa_fullscreen_driver fullscreen:YES];
+ [pool release];
+ return status;
+}
+
+static void
+cocoa_uninitDriver ()
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [controller uninitDriver];
+ [pool release];
+}
+
+static void
+cocoa_getMouse (int *x, int *y, int *b)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [[controller view] getMouseX:x mouseY:y mouseButton:b];
+ [pool release];
+}
+
+
+static void
+cocoa_setCursorType (int type)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [[controller view] setCursorType:type];
+ [pool release];
+}
+
+static void
+cocoa_buildMenu (struct uih_context *uih, CONST char *name)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [controller buildMenuWithContext:uih name:name];
+ [pool release];
+}
+
+static void
+cocoa_showPopUpMenu (struct uih_context *c, CONST char *name)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [controller showPopUpMenuWithContext:c name:name];
+ [pool release];
+}
+
+
+static void
+cocoa_showDialog (struct uih_context *c, CONST char *name)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [controller showDialogWithContext:c name:name];
+ [pool release];
+}
+
+static void
+cocoa_showHelp (struct uih_context *c, CONST char *name)
+{
+ NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
+ [controller showHelpWithContext:c name:name];
+ [pool release];
+}
+
+int
+main(int argc, char* argv[])
+{
+ NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
+ [NSApplication sharedApplication];
+ [NSBundle loadNibNamed:@"MainMenu" owner:NSApp];
+ controller = [[AppController alloc] init];
+ [pool release];
+ return MAIN_FUNCTION(argc, argv);
+}
+
+struct gui_driver cocoa_gui_driver = {
+/* setrootmenu */ cocoa_buildMenu,
+/* enabledisable */ NULL,
+/* menu */ cocoa_showPopUpMenu,
+/* dialog */ cocoa_showDialog,
+/* help */ cocoa_showHelp
+};
+
+
+static struct params cocoa_params[] = {
+{NULL, 0, NULL, NULL}
+};
+
+struct ui_driver cocoa_driver = {
+/* name */ "Mac OS X Windowed Driver",
+/* init */ cocoa_initDriver,
+/* getsize */ cocoa_getImageSize,
+/* processevents */ cocoa_processEvents,
+/* getmouse */ cocoa_getMouse,
+/* uninit */ cocoa_uninitDriver,
+/* set_color */ NULL,
+/* set_range */ NULL,
+/* print */ cocoa_printText,
+/* display */ cocoa_refreshDisplay,
+/* alloc_buffers */ cocoa_allocBuffers,
+/* free_buffers */ cocoa_freeBuffers,
+/* filp_buffers */ cocoa_flipBuffers,
+/* mousetype */ cocoa_setCursorType,
+/* flush */ NULL,
+/* textwidth */ 12,
+/* textheight */ 12,
+/* params */ cocoa_params,
+/* flags */ PIXELSIZE,
+/* width */ 0.0,
+/* height */ 0.0,
+/* maxwidth */ 0,
+/* maxheight */ 0,
+/* imagetype */ UI_TRUECOLOR,
+/* palettestart */ 0,
+/* paletteend */ 256,
+/* maxentries */ 255,
+/* rmask */ RMASK,
+/* gmask */ GMASK,
+/* bmask */ BMASK,
+/* gui_driver */ &cocoa_gui_driver
+};
+
+struct ui_driver cocoa_fullscreen_driver = {
+/* name */ "Mac OS X Full Screen Driver",
+/* init */ cocoa_initFullScreenDriver,
+/* getsize */ cocoa_getImageSize,
+/* processevents */ cocoa_processEvents,
+/* getmouse */ cocoa_getMouse,
+/* uninit */ cocoa_uninitDriver,
+/* set_color */ NULL,
+/* set_range */ NULL,
+/* print */ cocoa_printText,
+/* display */ cocoa_refreshDisplay,
+/* alloc_buffers */ cocoa_allocBuffers,
+/* free_buffers */ cocoa_freeBuffers,
+/* filp_buffers */ cocoa_flipBuffers,
+/* mousetype */ cocoa_setCursorType,
+/* flush */ NULL,
+/* textwidth */ 12,
+/* textheight */ 12,
+/* params */ cocoa_params,
+/* flags */ PIXELSIZE | FULLSCREEN,
+/* width */ 0.0,
+/* height */ 0.0,
+/* maxwidth */ 0,
+/* maxheight */ 0,
+/* imagetype */ UI_TRUECOLOR,
+/* palettestart */ 0,
+/* paletteend */ 256,
+/* maxentries */ 255,
+/* rmask */ RMASK,
+/* gmask */ GMASK,
+/* bmask */ BMASK,
+/* gui_driver */ &cocoa_gui_driver
+};
+/* DONT FORGET TO ADD DOCUMENTATION ABOUT YOUR DRIVER INTO xaos.hlp FILE!*/
diff --git a/src/ui/ui-drv/cocoa/version.h b/src/ui/ui-drv/cocoa/version.h
new file mode 100644
index 0000000..719d117
--- /dev/null
+++ b/src/ui/ui-drv/cocoa/version.h
@@ -0,0 +1,22 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#define XaoS_VERSION "3.5"
diff --git a/src/ui/ui-drv/gtk/Makefile.in b/src/ui/ui-drv/gtk/Makefile.in
new file mode 100644
index 0000000..e5ca90f
--- /dev/null
+++ b/src/ui/ui-drv/gtk/Makefile.in
@@ -0,0 +1,39 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+#AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = ui_gtk.c
+
+OBJS = $(SRCS:.c=.o)
+
+TLIB = @LIBPATH@/libuigtk.a
+
+
+all: $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $^
+ $(RANLIB) $@
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/ui/ui-drv/gtk/ui_gtk.c b/src/ui/ui-drv/gtk/ui_gtk.c
new file mode 100644
index 0000000..294b9e0
--- /dev/null
+++ b/src/ui/ui-drv/gtk/ui_gtk.c
@@ -0,0 +1,764 @@
+#include "aconfig.h"
+#ifdef GTK_DRIVER
+/*includes */
+#include <cairo.h>
+#include <gtk/gtk.h>
+#include <gdk/gdkkeysyms.h>
+#include <stdlib.h>
+#include <string.h>
+#include <math.h>
+
+#include <filter.h>
+#include <grlib.h>
+#include <ui.h>
+
+int width = 640;
+int height = 480;
+
+int mouse_x = 0;
+int mouse_y = 0;
+int mouse_buttons = 0;
+int keys = 0;
+
+GtkWidget *drawing_area;
+GtkWidget *menu_bar;
+GtkWidget *window;
+GHashTable *menuitem_table = NULL;
+
+int current_surface;
+cairo_surface_t *surface[2];
+
+static void window_destroyed(GtkWidget * widget, gpointer data) {
+ ui_quit();
+}
+
+static gboolean mouse_moved(GtkWidget * widget, GdkEventMotion * event,
+ gpointer data) {
+ mouse_x = event->x;
+ mouse_y = event->y;
+ return TRUE;
+}
+
+static gboolean key_pressed(GtkWidget * widget, GdkEventKey * event,
+ gpointer data) {
+ guint32 key;
+
+ switch (event->keyval) {
+ case GDK_Left:
+ keys |= 1;
+ ui_key(UIKEY_LEFT);
+ break;
+ case GDK_Right:
+ keys |= 2;
+ ui_key(UIKEY_RIGHT);
+ break;
+ case GDK_Up:
+ keys |= 4;
+ ui_key(UIKEY_UP);
+ break;
+ case GDK_Down:
+ keys |= 8;
+ ui_key(UIKEY_DOWN);
+ break;
+ case GDK_Page_Up:
+ keys |= 4;
+ ui_key(UIKEY_PGUP);
+ break;
+ case GDK_Page_Down:
+ keys |= 8;
+ ui_key(UIKEY_PGDOWN);
+ break;
+ case GDK_BackSpace:
+ ui_key(UIKEY_BACKSPACE);
+ break;
+ case GDK_Escape:
+ ui_key(UIKEY_ESC);
+ break;
+ case GDK_Home:
+ ui_key(UIKEY_HOME);
+ break;
+ case GDK_End:
+ ui_key(UIKEY_END);
+ break;
+ case GDK_Tab:
+ ui_key(UIKEY_TAB);
+ break;
+ default:
+ key = gdk_keyval_to_unicode(event->keyval);
+ ui_key(key);
+ }
+ return TRUE;
+}
+
+static gboolean key_released(GtkWidget * widget, GdkEventKey * event,
+ gpointer data) {
+ switch (event->keyval) {
+ case GDK_Left:
+ keys &= ~1;
+ break;
+ case GDK_Right:
+ keys &= ~2;
+ break;
+ case GDK_Up:
+ keys &= ~4;
+ break;
+ case GDK_Down:
+ keys &= ~8;
+ break;
+ case GDK_Page_Up:
+ keys &= ~4;
+ break;
+ case GDK_Page_Down:
+ keys &= ~8;
+ break;
+ }
+ return TRUE;
+}
+
+static gboolean button_pressed(GtkWidget * widget, GdkEventButton * event,
+ gpointer data) {
+ switch (event->button) {
+ case 1:
+ mouse_buttons |= BUTTON1;
+ break;
+ case 2:
+ mouse_buttons |= BUTTON2;
+ break;
+ case 3:
+ mouse_buttons |= BUTTON3;
+ break;
+ }
+ return TRUE;
+}
+
+static gboolean button_released(GtkWidget * widget, GdkEventButton * event,
+ gpointer data) {
+ switch (event->button) {
+ case 1:
+ mouse_buttons &= ~BUTTON1;
+ break;
+ case 2:
+ mouse_buttons &= ~BUTTON2;
+ break;
+ case 3:
+ mouse_buttons &= ~BUTTON3;
+ break;
+ }
+ return TRUE;
+}
+
+static gboolean drawing_area_resized(GtkWidget * widget,
+ GdkEventConfigure * event) {
+ if (surface[0] && surface[1]) {
+ width = event->width;
+ height = event->height;
+ ui_resize();
+ }
+
+ return FALSE;
+}
+
+static gboolean drawing_area_exposed(GtkWidget * widget,
+ GdkEventExpose * event, gpointer data) {
+ cairo_t *cr;
+
+ cr = gdk_cairo_create(widget->window);
+
+ cairo_set_source_surface(cr, surface[current_surface], 0, 0);
+ cairo_paint(cr);
+
+ cairo_destroy(cr);
+
+ return FALSE;
+}
+
+void menuitem_activated(GtkMenuItem * item, gpointer data) {
+ /*
+ * gtk emits activate signal when radio buttons are deactivated as well.
+ * we want to ignore these signals.
+ */
+
+ if (!GTK_IS_RADIO_MENU_ITEM(item) || gtk_check_menu_item_get_active(
+ GTK_CHECK_MENU_ITEM(item)))
+ ui_menuactivate((CONST menuitem *) data, NULL);
+}
+
+static void build_menu(struct uih_context *uih, CONST char *name,
+ GtkWidget * parent) {
+ CONST menuitem *item;
+ gchar *menulabel;
+ GtkWidget *menuitem;
+ GtkWidget *submenu;
+ GSList *group = NULL;
+
+ int i;
+
+ for (i = 0; (item = menu_item(name, i)) != NULL; i++) {
+ if (item->type == MENU_SEPARATOR)
+ menuitem = gtk_separator_menu_item_new();
+ else {
+ if (item->type == MENU_CUSTOMDIALOG || item->type == MENU_DIALOG)
+ menulabel = g_strconcat(item->name, "...", NULL);
+ else
+ menulabel = g_strdup(item->name);
+
+ if (item->flags & MENUFLAG_CHECKBOX)
+ menuitem = gtk_check_menu_item_new_with_label(menulabel);
+ else if (item->flags & MENUFLAG_RADIO) {
+ menuitem = gtk_radio_menu_item_new_with_label(group, menulabel);
+ group = gtk_radio_menu_item_get_group(GTK_RADIO_MENU_ITEM
+ (menuitem));
+ } else
+ menuitem = gtk_menu_item_new_with_label(menulabel);
+
+ if (menu_enabled(item, uih))
+ gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM
+ (menuitem), TRUE);
+
+ g_free(menulabel);
+
+ g_hash_table_insert(menuitem_table, (gpointer) item->shortname,
+ menuitem);
+ }
+
+ gtk_menu_shell_append(GTK_MENU_SHELL(parent), menuitem);
+ gtk_widget_show(menuitem);
+
+ if (item->type == MENU_SUBMENU) {
+ submenu = gtk_menu_new();
+ build_menu(uih, item->shortname, submenu);
+ gtk_menu_item_set_submenu(GTK_MENU_ITEM(menuitem), submenu);
+ } else {
+ g_signal_connect(G_OBJECT(menuitem), "activate",
+ G_CALLBACK(menuitem_activated),
+ (gpointer) item);
+ }
+ }
+}
+
+static void dorootmenu(struct uih_context *uih, CONST char *name) {
+ if (menuitem_table)
+ g_hash_table_destroy(menuitem_table);
+
+ gtk_container_foreach(GTK_CONTAINER(menu_bar),
+ (GtkCallback) gtk_widget_destroy, NULL);
+
+ menuitem_table = g_hash_table_new(g_str_hash, g_str_equal);
+ build_menu(uih, name, menu_bar);
+}
+
+static void dialog(struct uih_context *uih, CONST char *name) {
+ CONST menuitem *item = menu_findcommand(name);
+ if (!item)
+ return; CONST
+ menudialog *dialog = menu_getdialog(uih, item);
+ if (!dialog)
+ return;
+
+ int nitems;
+ for (nitems = 0; dialog[nitems].question; nitems++)
+ ;
+
+ if (nitems == 1 && (dialog[0].type == DIALOG_IFILE || dialog[0].type
+ == DIALOG_OFILE)) {
+
+ GtkFileChooserAction action;
+ gchar *title;
+ switch (dialog[0].type) {
+ case DIALOG_IFILE:
+ action = GTK_FILE_CHOOSER_ACTION_OPEN;
+ title = "Open File";
+ break;
+ case DIALOG_OFILE:
+ action = GTK_FILE_CHOOSER_ACTION_SAVE;
+ title = "Save as...";
+ break;
+ }
+
+ GtkWidget *chooser = gtk_file_chooser_dialog_new(title, GTK_WINDOW
+ (window), action, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
+
+ GtkFileFilter *filter = gtk_file_filter_new();
+ // TODO: Set default extension for save dialog
+ gtk_file_filter_add_pattern(filter, g_strrstr(dialog[0].defstr, "*"));
+ gtk_file_chooser_set_filter(GTK_FILE_CHOOSER(chooser), filter);
+
+ gint result = gtk_dialog_run(GTK_DIALOG(chooser));
+
+ if (result == GTK_RESPONSE_OK) {
+ gchar *filename = gtk_file_chooser_get_filename(
+ GTK_FILE_CHOOSER(chooser));
+ dialogparam *param = malloc(sizeof(dialogparam));
+ param->dstring = strdup(filename);
+ ui_menuactivate(item, param);
+ }
+ gtk_widget_destroy(chooser);
+
+ } else {
+ GtkWidget *window, *table;
+ GHashTable *widget_hash = g_hash_table_new(g_str_hash, g_str_equal);
+
+ window = gtk_dialog_new_with_buttons("XaoS", NULL, GTK_DIALOG_MODAL,
+ GTK_STOCK_OK, GTK_RESPONSE_OK, GTK_STOCK_CANCEL,
+ GTK_RESPONSE_CANCEL, GTK_STOCK_HELP, GTK_RESPONSE_HELP, NULL);
+
+ gtk_dialog_set_default_response(GTK_DIALOG(window), GTK_RESPONSE_OK);
+
+ table = gtk_table_new(nitems, 5, FALSE);
+ gtk_container_set_border_width(GTK_CONTAINER(table), 5);
+ gtk_table_set_row_spacings(GTK_TABLE(table), 5);
+ gtk_table_set_col_spacings(GTK_TABLE(table), 5);
+
+ int i;
+ for (i = 0; i < nitems; i++) {
+ GtkWidget *label = gtk_label_new(dialog[i].question);
+ GtkWidget *align = gtk_alignment_new(0, 0.5, 0, 0);
+ gtk_container_add(GTK_CONTAINER(align), GTK_WIDGET(label));
+ gtk_table_attach_defaults(GTK_TABLE(table), align, 0, 1, i, i + 1);
+
+ switch (dialog[i].type) {
+ case DIALOG_COORD: {
+ GtkWidget *widget;
+ gchar *value;
+ widget = gtk_entry_new();
+ value = g_strdup_printf("%f", dialog[i].deffloat);
+ gtk_entry_set_text(GTK_ENTRY(widget), value);
+ g_free(value);
+ gtk_table_attach_defaults(GTK_TABLE(table), widget, 1, 2, i, i
+ + 1);
+
+ g_hash_table_insert(widget_hash, dialog[i].question, widget);
+
+ widget = gtk_label_new("+");
+ gtk_table_attach_defaults(GTK_TABLE(table), widget, 2, 3, i, i
+ + 1);
+
+ widget = gtk_entry_new();
+ value = g_strdup_printf("%f", dialog[i].deffloat2);
+ gtk_entry_set_text(GTK_ENTRY(widget), value);
+ gtk_table_attach_defaults(GTK_TABLE(table), widget, 3, 4, i, i
+ + 1);
+ g_free(value);
+
+ gchar *key = g_strconcat(dialog[i].question, "2", NULL);
+ g_hash_table_insert(widget_hash, key, widget);
+ //g_free(key);
+
+ widget = gtk_label_new("i");
+ gtk_table_attach_defaults(GTK_TABLE(table), widget, 4, 5, i, i
+ + 1);
+
+ break;
+ }
+ case DIALOG_IFILE:
+ case DIALOG_OFILE: {
+ GtkFileChooserAction action;
+ gchar *title;
+ switch (dialog[i].type) {
+ case DIALOG_IFILE:
+ action = GTK_FILE_CHOOSER_ACTION_OPEN;
+ title = "Open File";
+ break;
+ case DIALOG_OFILE:
+ action = GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER;
+ title = "Save as...";
+ break;
+ }
+
+ // TODO: Set default chooser value
+ GtkWidget *chooser = gtk_file_chooser_button_new(title, action);
+ gtk_table_attach_defaults(GTK_TABLE(table), chooser, 1, 4, i, i
+ + 1);
+
+ g_hash_table_insert(widget_hash, dialog[i].question, chooser);
+ break;
+ }
+ case DIALOG_CHOICE: {
+ GtkWidget *combo = gtk_combo_box_new_text();
+ CONST
+ char **str = (CONST char **) dialog[i].defstr;
+ int y;
+ for (y = 0; str[y] != NULL; y++)
+ gtk_combo_box_append_text(GTK_COMBO_BOX(combo), str[y]);
+ gtk_combo_box_set_active(GTK_COMBO_BOX(combo), dialog[i].defint);
+ gtk_table_attach_defaults(GTK_TABLE(table), combo, 1, 4, i, i
+ + 1);
+
+ g_hash_table_insert(widget_hash, dialog[i].question, combo);
+ break;
+
+ }
+ default: {
+ GtkWidget *entry = gtk_entry_new();
+ gchar *value;
+ switch (dialog[i].type) {
+ case DIALOG_INT:
+ value = g_strdup_printf("%d", dialog[i].defint);
+ break;
+ case DIALOG_FLOAT:
+ value = g_strdup_printf("%f", dialog[i].deffloat);
+ break;
+ case DIALOG_STRING:
+ case DIALOG_KEYSTRING:
+ value = g_strdup(dialog[i].defstr);
+ break;
+ }
+ gtk_entry_set_text(GTK_ENTRY(entry), value);
+ g_free(value);
+ gtk_table_attach_defaults(GTK_TABLE(table), entry, 1, 4, i, i
+ + 1);
+
+ g_hash_table_insert(widget_hash, dialog[i].question, entry);
+ break;
+ }
+ }
+
+ }
+
+ gtk_box_pack_start_defaults(GTK_BOX(GTK_DIALOG(window)->vbox), table);
+ gtk_widget_show_all(window);
+
+ gint result = gtk_dialog_run(GTK_DIALOG(window));
+
+ if (result == GTK_RESPONSE_OK) {
+ dialogparam *params = malloc(sizeof(dialogparam) * nitems);
+
+ for (i = 0; i < nitems; i++) {
+ GtkWidget *widget = g_hash_table_lookup(widget_hash,
+ dialog[i]. question);
+ switch (dialog[i].type) {
+ case DIALOG_IFILE:
+ case DIALOG_OFILE: {
+ gchar *filename = gtk_file_chooser_get_filename(
+ GTK_FILE_CHOOSER(widget));
+ if (filename == NULL)
+ filename = "";
+ params[i].dstring = strdup(filename);
+ break;
+ }
+ case DIALOG_STRING:
+ case DIALOG_KEYSTRING:
+ params[i].dstring = strdup(gtk_entry_get_text(
+ GTK_ENTRY(widget)));
+ break;
+ case DIALOG_INT:
+ params[i].dint
+ = atoi(gtk_entry_get_text(GTK_ENTRY(widget)));
+ break;
+ case DIALOG_FLOAT:
+ // TODO: Should use long double conversion instead of atof
+ params[i].number = atof(gtk_entry_get_text(
+ GTK_ENTRY(widget)));
+ break;
+ case DIALOG_COORD:
+ params[i].dcoord[0] = atof(gtk_entry_get_text(
+ GTK_ENTRY(widget)));
+ gchar *key = g_strconcat(dialog[i].question, "2", NULL);
+ widget = g_hash_table_lookup(widget_hash, key);
+ g_free(key);
+ params[i].dcoord[1] = atof(gtk_entry_get_text(
+ GTK_ENTRY(widget)));
+ break;
+ case DIALOG_CHOICE:
+ params[i].dint = gtk_combo_box_get_active(
+ GTK_COMBO_BOX(widget));
+ break;
+ }
+ }
+
+ g_hash_table_destroy(widget_hash);
+ gtk_widget_destroy(window);
+ ui_menuactivate(item, params);
+
+ } else {
+ g_hash_table_destroy(widget_hash);
+ gtk_widget_destroy(window);
+ }
+ }
+
+}
+
+static void enabledisable(struct uih_context *uih, CONST char *name) {
+ if (menuitem_table) {
+ CONST struct menuitem *item = menu_findcommand(name);
+ GtkCheckMenuItem *menuitem = g_hash_table_lookup(menuitem_table, name);
+ g_signal_handlers_block_matched(menuitem, G_SIGNAL_MATCH_FUNC, 0, 0, 0,
+ menuitem_activated, 0);
+ gtk_check_menu_item_set_active(menuitem, menu_enabled(item, uih));
+ g_signal_handlers_unblock_matched(menuitem, G_SIGNAL_MATCH_FUNC, 0, 0,
+ 0, menuitem_activated, 0);
+ }
+}
+
+static void print(int x, int y, CONST char *text) {
+}
+
+static void display() {
+ gtk_widget_queue_draw(drawing_area);
+}
+
+static void flip_buffers() {
+ current_surface ^= 1;
+}
+
+void free_buffers(char *b1, char *b2) {
+ cairo_surface_destroy(surface[0]);
+ cairo_surface_destroy(surface[1]);
+ surface[0] = NULL;
+ surface[1] = NULL;
+}
+
+int alloc_buffers(char **b1, char **b2) {
+ surface[0] = cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
+ surface[1] = cairo_image_surface_create(CAIRO_FORMAT_RGB24, width, height);
+
+ *b1 = (char *) cairo_image_surface_get_data(surface[0]);
+ *b2 = (char *) cairo_image_surface_get_data(surface[1]);
+
+ current_surface = 0;
+
+ return cairo_image_surface_get_stride(surface[0]);
+}
+
+static void getsize(int *w, int *h) {
+ *w = width;
+ *h = height;
+}
+
+static void processevents(int wait, int *mx, int *my, int *mb, int *k) {
+ while (gtk_events_pending())
+ gtk_main_iteration_do(wait ? TRUE : FALSE);
+
+ *mx = mouse_x;
+ *my = mouse_y;
+ *mb = mouse_buttons;
+ *k = keys;
+}
+
+static int init() {
+ GtkWidget *vbox;
+
+ int argc = 0;
+ char **argv = NULL;
+
+ gtk_init(&argc, &argv);
+
+ window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
+ gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
+ gtk_window_set_default_size(GTK_WINDOW(window), 640, 480);
+ gtk_window_set_title(GTK_WINDOW(window), "XaoS");
+
+ g_signal_connect(G_OBJECT(window), "destroy",
+ G_CALLBACK(window_destroyed), NULL);
+
+ vbox = gtk_vbox_new(FALSE, 0);
+ gtk_container_add(GTK_CONTAINER(window), vbox);
+ gtk_widget_show(vbox);
+
+ menu_bar = gtk_menu_bar_new();
+ gtk_box_pack_start(GTK_BOX(vbox), menu_bar, FALSE, FALSE, 0);
+ gtk_widget_show(menu_bar);
+
+ drawing_area = gtk_drawing_area_new();
+ gtk_box_pack_end(GTK_BOX(vbox), drawing_area, TRUE, TRUE, 0);
+ gtk_widget_show(drawing_area);
+
+ GTK_WIDGET_SET_FLAGS(drawing_area, GTK_CAN_FOCUS);
+ gtk_widget_grab_focus(drawing_area);
+
+ gtk_widget_add_events(drawing_area, GDK_POINTER_MOTION_MASK
+ | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK
+ | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK);
+
+ g_signal_connect(G_OBJECT(drawing_area), "motion-notify-event",
+ G_CALLBACK(mouse_moved), NULL);
+
+ g_signal_connect(G_OBJECT(drawing_area), "button-press-event",
+ G_CALLBACK(button_pressed), NULL);
+
+ g_signal_connect(G_OBJECT(drawing_area), "button-release-event",
+ G_CALLBACK(button_released), NULL);
+
+ g_signal_connect(G_OBJECT(drawing_area), "key-press-event",
+ G_CALLBACK(key_pressed), NULL);
+
+ g_signal_connect(G_OBJECT(drawing_area), "key-release-event",
+ G_CALLBACK(key_released), NULL);
+
+ g_signal_connect(G_OBJECT(drawing_area), "expose-event",
+ G_CALLBACK(drawing_area_exposed), NULL);
+
+ g_signal_connect(G_OBJECT(drawing_area), "configure-event",
+ G_CALLBACK(drawing_area_resized), NULL);
+
+ gtk_widget_show_all(window);
+
+ return ( /*1 for sucess 0 for fail */1);
+}
+
+static void uninit() {
+ /*
+ * Disconnect window destroy event to prevent XaoS from
+ * quitting when switching drivers
+ */
+ g_signal_handlers_disconnect_matched(window, G_SIGNAL_MATCH_FUNC, 0, 0, 0,
+ window_destroyed, 0);
+
+ gtk_widget_destroy(window);
+}
+
+static void getmouse(int *x, int *y, int *b) {
+ *x = mouse_x;
+ *y = mouse_y;
+ *b = mouse_buttons;
+}
+
+static void mousetype(int type) {
+}
+
+static int skip(CONST char *text)
+{
+ int i = 0;
+ while (*text && *text != '\n')
+ i++, text++;
+ return (i);
+}
+
+#ifdef PLATFORM_TEXT_RENDERING
+
+int
+xprint(struct image *image, CONST struct xfont *current, int x, int y,
+ CONST char *text, int fgcolor, int bgcolor, int mode)
+{
+ cairo_t *cr = cairo_create(surface[image->currimage]);
+
+ cairo_select_font_face (cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
+ CAIRO_FONT_WEIGHT_BOLD);
+ cairo_set_font_size (cr, 18.0);
+
+ char line[BUFSIZ];
+ int pos = strcspn(text, "\n");
+ strncpy(line, text, pos);
+ line[pos] = '\0';
+
+ cairo_text_extents_t extents;
+ cairo_text_extents (cr, line, &extents);
+
+ cairo_set_source_rgb (cr, 0, 0, 0);
+ cairo_move_to (cr, x + 1, y + extents.height + 1);
+ cairo_show_text (cr, line);
+
+ cairo_set_source_rgb (cr, 1, 1, 1);
+ cairo_move_to (cr, x, y + extents.height);
+ cairo_show_text (cr, line);
+
+ cairo_destroy(cr);
+
+ return strlen(line);
+}
+
+int xtextwidth(CONST struct xfont *font, CONST char *text)
+{
+ cairo_t *cr = cairo_create(surface[current_surface]);
+
+ cairo_select_font_face (cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
+ CAIRO_FONT_WEIGHT_BOLD);
+ cairo_set_font_size (cr, 18.0);
+
+ char line[BUFSIZ];
+ int pos = strcspn(text, "\n");
+ strncpy(line, text, pos);
+ line[pos] = '\0';
+
+ cairo_text_extents_t extents;
+ cairo_text_extents (cr, line, &extents);
+
+ cairo_destroy(cr);
+
+ return ceil(extents.width) + 1;
+}
+
+int xtextheight(CONST struct xfont *font) {
+ cairo_t *cr = cairo_create(surface[current_surface]);
+
+ cairo_select_font_face (cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
+ CAIRO_FONT_WEIGHT_BOLD);
+ cairo_set_font_size (cr, 18.0);
+
+ cairo_text_extents_t extents;
+ cairo_text_extents (cr, "Wg'", &extents);
+
+ cairo_destroy(cr);
+
+ return ceil(extents.height) + 5;
+}
+
+int xtextcharw(CONST struct xfont *font, CONST char c)
+{
+ cairo_t *cr = cairo_create(surface[current_surface]);
+
+ cairo_select_font_face (cr, "Sans", CAIRO_FONT_SLANT_NORMAL,
+ CAIRO_FONT_WEIGHT_BOLD);
+ cairo_set_font_size (cr, 18.0);
+
+ char text[2];
+ sprintf(text, "%c", c);
+
+ cairo_text_extents_t extents;
+ cairo_text_extents (cr, text, &extents);
+
+ cairo_destroy(cr);
+
+ return ceil(extents.width) + 1;
+}
+
+#endif
+
+static struct params params[] = { { "", P_HELP, NULL, "GTK+ driver options:" },
+ { NULL, 0, NULL, NULL } };
+
+struct gui_driver gtk_gui_driver = {
+/* dorootmenu */dorootmenu,
+/* enabledisable */enabledisable,
+/* popup */NULL,
+/* dialog */dialog,
+/* help */NULL };
+
+struct ui_driver gtk_driver = {
+/* name */"GTK+ Driver",
+/* init */init,
+/* getsize */getsize,
+/* processevents */processevents,
+/* getmouse */getmouse,
+/* uninit */uninit,
+/* set_color */NULL,
+/* set_range */NULL,
+/* print */print,
+/* display */display,
+/* alloc_buffers */alloc_buffers,
+/* free_buffers */free_buffers,
+/* filp_buffers */flip_buffers,
+/* mousetype */mousetype,
+/* flush */NULL,
+/* textwidth */12,
+/* textheight */12,
+/* params */params,
+
+/* flags */RESOLUTION | PIXELSIZE | NOFLUSHDISPLAY | FULLSCREEN
+ | PALETTE_ROTATION | ROTATE_INSIDE_CALCULATION,
+
+/* width */0.01,
+/* height */0.01,
+/* maxwidth */0,
+/* maxheight */0,
+/* imagetype */UI_TRUECOLOR,
+/* palettestart */0,
+/* paletteend */0,
+/* maxentries */0,
+/* rmask */0x00ff0000,
+/* gmask */0x0000ff00,
+/* bmask */0x000000ff,
+/* gui_driver */&gtk_gui_driver };
+
+#endif
diff --git a/src/ui/ui-drv/qt/XaoS.icns b/src/ui/ui-drv/qt/XaoS.icns
new file mode 100644
index 0000000..e03d0cb
--- /dev/null
+++ b/src/ui/ui-drv/qt/XaoS.icns
Binary files differ
diff --git a/src/ui/ui-drv/qt/XaoS.pro b/src/ui/ui-drv/qt/XaoS.pro
new file mode 100644
index 0000000..1fddca6
--- /dev/null
+++ b/src/ui/ui-drv/qt/XaoS.pro
@@ -0,0 +1,29 @@
+# -------------------------------------------------
+# Project created by QtCreator 2009-10-29T19:21:55
+# -------------------------------------------------
+macx {
+ TARGET = XaoS
+ ICON = XaoS.icns
+}
+else:TARGET = xaos
+win32:RC_FILE = xaos.rc
+DESTDIR = $PWD/../../../../../bin
+TEMPLATE = app
+INCLUDEPATH += $$PWD \
+ $$PWD/../../../include
+SOURCES += main.cpp \
+ mainwindow.cpp \
+ fractalwidget.cpp \
+ customdialog.cpp
+HEADERS += mainwindow.h \
+ fractalwidget.h \
+ customdialog.h
+include($$PWD/../../../engine/engine.pri)
+include($$PWD/../../../filter/filter.pri)
+include($$PWD/../../../ui/ui.pri)
+include($$PWD/../../../ui/ui-drv/qt/qt.pri)
+include($$PWD/../../../ui-hlp/ui-hlp.pri)
+include($$PWD/../../../util/util.pri)
+include($$PWD/config.pri)
+include($$PWD/../../../sffe/sffe.pri)
+include($$PWD/../../../include/include.pri)
diff --git a/src/ui/ui-drv/qt/XaoS.qrc b/src/ui/ui-drv/qt/XaoS.qrc
new file mode 100644
index 0000000..1940908
--- /dev/null
+++ b/src/ui/ui-drv/qt/XaoS.qrc
@@ -0,0 +1,5 @@
+<RCC>
+ <qresource prefix="/" >
+ <file>images/xaosbig.png</file>
+ </qresource>
+</RCC>
diff --git a/src/ui/ui-drv/qt/aconfig.h b/src/ui/ui-drv/qt/aconfig.h
new file mode 100644
index 0000000..cb61b1d
--- /dev/null
+++ b/src/ui/ui-drv/qt/aconfig.h
@@ -0,0 +1,63 @@
+/* src/include/aconfig.h. Generated from aconfig.h.in by configure. */
+#ifndef ACONFIG_H
+#define ACONFIG_H
+/* #undef HAVE_PTHREAD_SIGHANDLER */
+#define DATAPATH "/usr/local/share/XaoS"
+/* #undef C_ALLOCA */
+/* #undef const */
+/* #undef USE_PTHREAD */
+/*Avoid stack frame explosion on Windoze*/
+#ifndef _WIN32
+/*BeOS crashes badly when large amounts of stack are consumed */
+#ifndef __BEOS__
+#define HAVE_ALLOCA 1
+/* #undef HAVE_ALLOCA_H */
+#endif
+#endif
+#define HAVE_FABSL 1
+/* #undef HAVE__FABSL */
+/* #undef HAVE___FABSL */
+#define HAVE_FTIME 1
+#define USE_PNG 1
+#define HAVE_FINITE 1
+/* #undef HAVE_SELECT */
+#define HAVE_LONG_DOUBLE 1
+/* #undef HAVE_REDRAWWIN */
+/* #undef HAVE_WREDRAWLN */
+/* #undef USE_NCURSES */
+/* #undef inline */
+/* #undef _POSIX_SOURCE */
+#define STDC_HEADERS 1
+/* Define if you can safely include both <sys/time.h> and <time.h>. */
+#define TIME_WITH_SYS_TIME 1
+#define HAVE_GETTIMEOFDAY 1
+/* #undef HAVE_USLEEP */
+/* #undef HAVE_TERMATTRS */
+/* #undef HAVE_MOUSEMASK */
+/* #undef HAVE_SETITIMER */
+/* Define if you have the <limits.h> header file. */
+#define HAVE_LIMITS_H 1
+/* Define if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+/* Define if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+/* #undef MITSHM */
+/* #undef CURSES_DRIVER */
+/* #undef BEOS_DRIVER */
+/* #undef AA_DRIVER */
+/* #undef GTK_DRIVER */
+#define QT_DRIVER 1
+/* #undef GGI_DRIVER */
+/* #undef X11_DRIVER */
+/* #undef DGA_DRIVER */
+/* #undef SVGA_DRIVER */
+/* #undef WIN32_DRIVER */
+/* #undef DDRAW_DRIVER */
+/* #undef HTML_HELP */
+#define SIZEOF_SHORT 2
+#define SIZEOF_INT 4
+#define SIZEOF_LONG 4
+/* #undef HAVE_GETTEXT */
+#define NO_MALLOC_H 1
+#define MAIN_FUNCTION ui_main
+#endif
diff --git a/src/ui/ui-drv/qt/config.h b/src/ui/ui-drv/qt/config.h
new file mode 100644
index 0000000..b358144
--- /dev/null
+++ b/src/ui/ui-drv/qt/config.h
@@ -0,0 +1,149 @@
+#ifndef CONFIG_H
+#define CONFIG_H
+#define HOMEDIR
+
+#ifdef __BEOS__
+#define MAIN_FUNCTION be_main
+#ifdef __POWERPC__
+# define SLOWCACHESYNC
+# ifdef __MWERKS__
+# define INLINEFABS(x) __fabs(x)
+# endif
+#endif
+#endif
+
+#ifdef _WIN32
+#define CONFIGFILE "XaoS.cfg"
+#else
+#define CONFIGFILE ".XaoSrc"
+#endif
+
+/*For compilers that don't support nameless unions, do a
+#define NONAMELESSUNION
+before #include <ddraw.h>*/
+#ifdef _WIN32
+#define NONAMELESSUNION
+#endif
+
+/*#define I_WAS_HERE */ /*uncoment this to disable changing of parameters by atoconf */
+
+#define FPOINT_TYPE long double
+ /*floating point math type on computers
+ with medium speed floating point math should
+ use float instead */
+#include <aconfig.h>
+#define USE_STDIO
+#if !defined(HAVE_LONG_DOUBLE)&&!defined(I_WAS_HERE)
+#undef FPOINT_TYPE
+#define FPOINT_TYPE double
+#endif
+#define CONST const
+#define INLINE inline
+
+/* BeOS have broken long double IO routines on i386. Use our replacements */
+#ifdef __BEOS__
+#ifdef __i386__
+#define USE_XLDIO
+#endif
+#endif
+
+/* Win32 don't support long double IO. Use our replacements if possible */
+#ifdef _WIN32
+#ifndef __GNUC__
+1
+/* You need to solve long double IO problems to compile XaoS on non-gcc
+ * compiler */
+#endif
+#define USE_XLDIO
+#endif
+
+#include "gccaccel.h"
+#ifdef HAVE_MOUSEMASK
+#define NCURSESMOUSE
+#endif
+#ifndef HAVE_LIMITS_H
+#define INT_MAX 2127423647
+#endif
+#ifdef SVGA_DRIVER
+#define DESTICKY
+#endif
+#ifdef COCOA_DRIVER
+#define SFIXEDCOLOR
+#define STRUECOLOR
+#define STRUECOLOR16
+#define STRUECOLOR24
+#define SMBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef QT_DRIVER
+#define SFIXEDCOLOR
+#define STRUECOLOR
+#define STRUECOLOR16
+#define STRUECOLOR24
+#define SMBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef GTK_DRIVER
+#define SFIXEDCOLOR
+#define STRUECOLOR
+#define STRUECOLOR16
+#define STRUECOLOR24
+#define SMBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef X11_DRIVER
+#define SFIXEDCOLOR
+#define STRUECOLOR
+#define STRUECOLOR16
+#define STRUECOLOR24
+#define SMBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef SVGA_DRIVER
+#undef STRUECOLOR16
+#define STRUECOLOR16
+#undef STRUECOLOR24
+#define STRUECOLOR24
+#endif
+#ifdef GGI_DRIVER
+#undef STRUECOLOR16
+#define STRUECOLOR16
+#undef STRUECOLOR24
+#define STRUECOLOR24
+#undef SLBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef BEOS_DRIVER
+#ifdef __cplusplus
+extern "C" {
+#endif
+#ifdef __GNUC__
+void be_exit_xaos(int i) __attribute__ ((__noreturn__));
+#else
+void be_exit_xaos(int i);
+#endif
+#ifdef __cplusplus
+}
+#endif
+#define exit_xaos(i) be_exit_xaos(i)
+#undef STRUECOLOR16
+#define STRUECOLOR16
+#undef SFIXEDCOLOR
+#define SFIXEDCOLOR
+#undef SMBITMAPS
+#define SMBITMAPS
+#undef SLBITMAPS
+#define SLBITMAPS
+#endif
+#ifdef WIN32_DRIVER
+#define MAIN_FUNCTION XaoS_main
+#undef STRUECOLOR16
+#define STRUECOLOR16
+#undef STRUECOLOR24
+#define STRUECOLOR24
+#endif
+#ifdef HAVE_SELECT
+#define COMPILE_PIPE
+#endif
+#endif /*CONFIG_H */
+
diff --git a/src/ui/ui-drv/qt/config.pri b/src/ui/ui-drv/qt/config.pri
new file mode 100644
index 0000000..f666345
--- /dev/null
+++ b/src/ui/ui-drv/qt/config.pri
@@ -0,0 +1,4 @@
+HEADERS += \
+ $$PWD/config.h \
+ $$PWD/aconfig.h \
+ $$PWD/version.h
diff --git a/src/ui/ui-drv/qt/customdialog.cpp b/src/ui/ui-drv/qt/customdialog.cpp
new file mode 100644
index 0000000..d25a7d4
--- /dev/null
+++ b/src/ui/ui-drv/qt/customdialog.cpp
@@ -0,0 +1,179 @@
+#include <QtGui>
+
+
+#include "customdialog.h"
+
+#include "ui.h"
+
+CustomDialog::CustomDialog(struct uih_context *uih, const menuitem *item, const menudialog *dialog, QWidget *parent)
+ : QDialog(parent)
+{
+ m_menuitem = item;
+ m_dialog = dialog;
+ m_parameters = 0;
+
+ setWindowTitle(item->name);
+
+ QBoxLayout *dialogLayout = new QBoxLayout(QBoxLayout::TopToBottom, this);
+ QFormLayout *formLayout = new QFormLayout();
+
+ for (int i = 0; dialog[i].question; i++) {
+
+ QString label(dialog[i].question);
+ if (dialog[i].type == DIALOG_COORD) {
+
+ QLineEdit *real = new QLineEdit(QString::number(dialog[i].deffloat, 'g'), this);
+ real->setObjectName(label + "real");
+ real->setValidator(new QDoubleValidator(real));
+
+ QLineEdit *imag = new QLineEdit(QString::number(dialog[i].deffloat2, 'g'), this);
+ imag->setObjectName(label + "imag");
+ imag->setValidator(new QDoubleValidator(imag));
+
+ QBoxLayout *layout = new QBoxLayout(QBoxLayout::LeftToRight);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->addWidget(real);
+ layout->addWidget(new QLabel("+", this));
+ layout->addWidget(imag);
+ layout->addWidget(new QLabel("i", this));
+
+ formLayout->addRow(label, layout);
+
+ } else if (dialog[i].type == DIALOG_IFILE || dialog[i].type == DIALOG_OFILE) {
+
+ QLineEdit *filename = new QLineEdit(dialog[i].defstr, this);
+ filename->setObjectName(label);
+
+ QToolButton *chooser = new QToolButton(this);
+ chooser->setObjectName(label);
+ chooser->setText("...");
+
+ if (dialog[i].type == DIALOG_IFILE)
+ connect(chooser, SIGNAL(clicked()), this, SLOT(chooseInputFile()));
+ else
+ connect(chooser, SIGNAL(clicked()), this, SLOT(chooseOutputFile()));
+
+ QBoxLayout *layout = new QBoxLayout(QBoxLayout::LeftToRight);
+ layout->setContentsMargins(0, 0, 0, 0);
+ layout->addWidget(filename);
+ layout->addWidget(chooser);
+
+ formLayout->addRow(label, layout);
+
+ } else if (dialog[i].type == DIALOG_CHOICE) {
+
+ QComboBox *combo = new QComboBox(this);
+ combo->setObjectName(label);
+
+ const char **str = (const char **)dialog[i].defstr;
+ for (int j = 0; str[j] != NULL; j++)
+ combo->addItem(str[j]);
+ combo->setCurrentIndex(dialog[i].defint);
+
+ formLayout->addRow(label, combo);
+
+ } else {
+
+ QLineEdit *field = new QLineEdit(this);
+ field->setObjectName(label);
+
+ if (dialog[i].type == DIALOG_INT) {
+ field->setText(QString::number(dialog[i].defint));
+ field->setValidator(new QIntValidator(field));
+ }
+ else if (dialog[i].type == DIALOG_FLOAT) {
+ field->setText(QString::number(dialog[i].deffloat, 'g'));
+ field->setValidator(new QDoubleValidator(field));
+ } else {
+ field->setText(dialog[i].defstr);
+ }
+
+ formLayout->addRow(label, field);
+
+ }
+ }
+
+ dialogLayout->addLayout(formLayout);
+
+ QDialogButtonBox *buttonBox = new QDialogButtonBox(
+ (QDialogButtonBox::Ok | QDialogButtonBox::Cancel | QDialogButtonBox::Help),
+ Qt::Horizontal, this);
+ connect(buttonBox, SIGNAL(accepted()), this, SLOT(accept()));
+ connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject()));
+ connect(buttonBox, SIGNAL(helpRequested()), this, SLOT(showHelp()));
+ dialogLayout->addWidget(buttonBox);
+
+ setLayout(dialogLayout);
+}
+
+void CustomDialog::accept()
+{
+ int nitems;
+ for (nitems = 0; m_dialog[nitems].question; nitems++);
+ m_parameters = (dialogparam *)malloc(sizeof (*m_parameters) * nitems);
+
+ for (int i = 0; i < nitems; i++) {
+ QString label(m_dialog[i].question);
+
+ if (m_dialog[i].type == DIALOG_COORD) {
+
+ QLineEdit *real = findChild<QLineEdit *>(label + "real");
+ QLineEdit *imag = findChild<QLineEdit *>(label + "imag");
+
+ m_parameters[i].dcoord[0] = real->text().toFloat();
+ m_parameters[i].dcoord[1] = imag->text().toFloat();
+
+ } else if (m_dialog[i].type == DIALOG_CHOICE) {
+
+ QComboBox *field = findChild<QComboBox *>(label);
+ m_parameters[i].dint = field->currentIndex();
+
+ } else {
+
+ QLineEdit *field = findChild<QLineEdit *>(label);
+
+ if (m_dialog[i].type == DIALOG_INT)
+ m_parameters[i].dint = field->text().toInt();
+ else if (m_dialog[i].type == DIALOG_FLOAT)
+ m_parameters[i].number = field->text().toFloat();
+ else
+ m_parameters[i].dstring = strdup(field->text().toUtf8());
+ }
+ }
+
+ QDialog::accept();
+}
+
+dialogparam *CustomDialog::parameters()
+{
+ return m_parameters;
+}
+
+void CustomDialog::chooseInputFile()
+{
+ QLineEdit *field = findChild<QLineEdit *>(sender()->objectName());
+
+ QString filter = "XaoS Files (*.xpf *.xaf)";
+ QString directory = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
+
+ QString fileName = QFileDialog::getOpenFileName(this, sender()->objectName(), directory, filter);
+ if (!fileName.isNull())
+ {
+ field->setText(fileName);
+ }
+}
+
+void CustomDialog::chooseOutputFile()
+{
+ QLineEdit *field = findChild<QLineEdit *>(sender()->objectName());
+ QString directory = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
+
+ QString fileName = QFileDialog::getSaveFileName(this, sender()->objectName(), directory);
+ if (!fileName.isNull())
+ field->setText(fileName);
+}
+
+void CustomDialog::showHelp()
+{
+ ui_help(m_menuitem->shortname);
+}
diff --git a/src/ui/ui-drv/qt/customdialog.h b/src/ui/ui-drv/qt/customdialog.h
new file mode 100644
index 0000000..168e24f
--- /dev/null
+++ b/src/ui/ui-drv/qt/customdialog.h
@@ -0,0 +1,29 @@
+#ifndef CUSTOMDIALOG_H
+#define CUSTOMDIALOG_H
+
+#include <QDialog>
+
+#include "ui.h"
+
+class CustomDialog : public QDialog
+{
+ Q_OBJECT
+
+private:
+ const menuitem *m_menuitem;
+ const menudialog *m_dialog;
+ dialogparam *m_parameters;
+
+private slots:
+ void chooseInputFile();
+ void chooseOutputFile();
+ void showHelp();
+
+public:
+ CustomDialog(struct uih_context *uih, const menuitem *item, const menudialog *dialog, QWidget *parent = 0);
+
+ void accept();
+ dialogparam *parameters();
+};
+
+#endif // CUSTOMDIALOG_H
diff --git a/src/ui/ui-drv/qt/fractalwidget.cpp b/src/ui/ui-drv/qt/fractalwidget.cpp
new file mode 100644
index 0000000..0fa1141
--- /dev/null
+++ b/src/ui/ui-drv/qt/fractalwidget.cpp
@@ -0,0 +1,228 @@
+#include "fractalwidget.h"
+
+#include "ui.h"
+
+#include <QtGui>
+
+FractalWidget::FractalWidget()
+{
+ m_mouseButtons = 0;
+ m_mousePosition = QPoint(0, 0);
+ m_keyCombination = 0;
+ m_activeImage = 0;
+ m_image[0] = m_image[1] = 0;
+
+ setFocusPolicy(Qt::WheelFocus);
+ setMouseTracking(true);
+}
+
+void FractalWidget::updateMouse(QMouseEvent *event)
+{
+ m_mousePosition = event->pos();
+ m_mouseButtons = event->buttons();
+ m_keyboardModifiers = event->modifiers();
+}
+
+void FractalWidget::mousePressEvent(QMouseEvent *event)
+{
+ updateMouse(event);
+}
+
+void FractalWidget::mouseReleaseEvent(QMouseEvent *event)
+{
+ updateMouse(event);
+}
+
+void FractalWidget::mouseMoveEvent(QMouseEvent *event)
+{
+ updateMouse(event);
+}
+
+void FractalWidget::wheelEvent(QWheelEvent *event)
+{
+}
+
+void FractalWidget::keyPressEvent(QKeyEvent *event)
+{
+ m_keyboardModifiers = event->modifiers();
+
+ switch (event->key()) {
+ case Qt::Key_Left:
+ m_keyCombination |= 1;
+ ui_key(UIKEY_LEFT);
+ break;
+ case Qt::Key_Right:
+ m_keyCombination |= 2;
+ ui_key(UIKEY_RIGHT);
+ break;
+ case Qt::Key_Up:
+ m_keyCombination |= 4;
+ ui_key(UIKEY_UP);
+ break;
+ case Qt::Key_Down:
+ m_keyCombination |= 8;
+ ui_key(UIKEY_DOWN);
+ break;
+ case Qt::Key_PageUp:
+ ui_key(UIKEY_PGUP);
+ break;
+ case Qt::Key_PageDown:
+ ui_key(UIKEY_PGDOWN);
+ break;
+ case Qt::Key_Backspace:
+ ui_key(UIKEY_BACKSPACE);
+ break;
+ case Qt::Key_Escape:
+ ui_key(UIKEY_ESC);
+ break;
+ case Qt::Key_Home:
+ ui_key(UIKEY_HOME);
+ break;
+ case Qt::Key_End:
+ ui_key(UIKEY_END);
+ break;
+ case Qt::Key_Tab:
+ ui_key(UIKEY_TAB);
+ break;
+ default:
+ if (!event->text().isEmpty())
+ ui_key(event->text().toAscii()[0]);
+ else
+ event->ignore();
+ }
+}
+
+void FractalWidget::keyReleaseEvent(QKeyEvent *event)
+{
+ m_keyboardModifiers = event->modifiers();
+
+ switch (event->key()) {
+ case Qt::Key_Left:
+ m_keyCombination &= ~1;
+ break;
+ case Qt::Key_Right:
+ m_keyCombination &= ~2;
+ break;
+ case Qt::Key_Up:
+ m_keyCombination &= ~4;
+ break;
+ case Qt::Key_Down:
+ m_keyCombination &= ~8;
+ break;
+ default:
+ event->ignore();
+ }
+}
+
+void FractalWidget::resizeEvent(QResizeEvent *event)
+{
+ if (m_image[0] && m_image[1])
+ ui_call_resize();
+}
+
+void FractalWidget::paintEvent (QPaintEvent *event)
+{
+ if (m_image[m_activeImage]) {
+ QPainter painter(this);
+ painter.drawImage(0, 0, *m_image[m_activeImage]);
+ }
+}
+
+void FractalWidget::createImages()
+{
+ m_image[0] = new QImage(width(), height(), QImage::Format_RGB32);
+ m_image[1] = new QImage(width(), height(), QImage::Format_RGB32);
+ m_activeImage = 0;
+}
+
+void FractalWidget::destroyImages()
+{
+ delete m_image[0];
+ delete m_image[1];
+}
+
+char *FractalWidget::imageBuffer1()
+{
+ return (char *)m_image[0]->bits();
+}
+
+char *FractalWidget::imageBuffer2()
+{
+ return (char *)m_image[1]->bits();
+}
+
+int FractalWidget::imageBytesPerLine()
+{
+ return m_image[0]->bytesPerLine();
+}
+
+void FractalWidget::switchActiveImage()
+{
+ m_activeImage ^= 1;
+}
+
+QPoint FractalWidget::mousePosition()
+{
+ return m_mousePosition;
+}
+
+int FractalWidget::mouseButtons()
+{
+
+ // Qt::MetaModifier maps to control key on Macs
+ Qt::KeyboardModifier controlModifier =
+#ifdef Q_WS_MAC
+ Qt::MetaModifier;
+#else
+ Qt::ControlModifier;
+#endif
+
+ int mouseButtons = 0;
+
+ // Modifier keys change behavior of left and right mouse buttons
+ if (m_keyboardModifiers & controlModifier) {
+ // Control key swaps left and right buttons
+ if (m_mouseButtons & Qt::LeftButton)
+ mouseButtons |= BUTTON3;
+ if (m_mouseButtons & Qt::RightButton)
+ mouseButtons |= BUTTON1;
+ } else if (m_keyboardModifiers & Qt::ShiftModifier) {
+ // Shift key makes left and right buttons emulate middle button
+ mouseButtons |= BUTTON2;
+ } else {
+ // Otherwise, mouse buttons map normally
+ if (m_mouseButtons & Qt::LeftButton)
+ mouseButtons |= BUTTON1;
+ if (m_mouseButtons & Qt::RightButton)
+ mouseButtons |= BUTTON3;
+ }
+
+ // Middle button is unaffected by modifier keys
+ if (m_mouseButtons & Qt::MidButton)
+ mouseButtons |= BUTTON2;
+
+ return mouseButtons;
+}
+
+int FractalWidget::keyCombination()
+{
+ return m_keyCombination;
+}
+
+void FractalWidget::setCursorType(int type)
+{
+ if (type == WAITMOUSE || type == REPLAYMOUSE)
+ setCursor(Qt::WaitCursor);
+ else
+ setCursor(Qt::ArrowCursor);
+}
+
+QSize FractalWidget::sizeHint() const
+{
+ return m_sizeHint;
+}
+
+void FractalWidget::setSizeHint(const QSize &size)
+{
+ m_sizeHint = size;
+}
diff --git a/src/ui/ui-drv/qt/fractalwidget.h b/src/ui/ui-drv/qt/fractalwidget.h
new file mode 100644
index 0000000..8fcdd8f
--- /dev/null
+++ b/src/ui/ui-drv/qt/fractalwidget.h
@@ -0,0 +1,57 @@
+#ifndef FRACTALWIDGET_H
+#define FRACTALWIDGET_H
+
+#include <QWidget>
+
+class QImage;
+class QPoint;
+
+class FractalWidget : public QWidget
+{
+ Q_OBJECT
+
+private:
+ QImage *m_image[2];
+ int m_activeImage;
+ QPoint m_mousePosition;
+ Qt::MouseButtons m_mouseButtons;
+ Qt::KeyboardModifiers m_keyboardModifiers;
+ int m_keyCombination;
+ QSize m_sizeHint;
+
+ void updateMouse(QMouseEvent *event);
+
+protected:
+ void mousePressEvent(QMouseEvent *event);
+ void mouseReleaseEvent(QMouseEvent *event);
+ void mouseMoveEvent(QMouseEvent *event);
+ void wheelEvent(QWheelEvent *event);
+ void keyPressEvent(QKeyEvent *event);
+ void keyReleaseEvent(QKeyEvent *event);
+ void paintEvent (QPaintEvent *event);
+ void resizeEvent(QResizeEvent *event);
+
+public:
+ FractalWidget();
+
+ void createImages();
+ void destroyImages();
+
+ char *imageBuffer1();
+ char *imageBuffer2();
+ int imageBytesPerLine();
+ QSize imageSize();
+
+ void switchActiveImage();
+
+ QPoint mousePosition();
+ int mouseButtons();
+ int keyCombination();
+
+ void setCursorType(int type);
+
+ QSize sizeHint() const;
+ void setSizeHint(const QSize &size);
+};
+
+#endif // FRACTALWIDGET_H
diff --git a/src/ui/ui-drv/qt/images/xaosbig.png b/src/ui/ui-drv/qt/images/xaosbig.png
new file mode 100644
index 0000000..ce38dc3
--- /dev/null
+++ b/src/ui/ui-drv/qt/images/xaosbig.png
Binary files differ
diff --git a/src/ui/ui-drv/qt/main.cpp b/src/ui/ui-drv/qt/main.cpp
new file mode 100644
index 0000000..5100312
--- /dev/null
+++ b/src/ui/ui-drv/qt/main.cpp
@@ -0,0 +1,180 @@
+#include <QtGui/QApplication>
+
+#include "mainwindow.h"
+#include "fractalwidget.h"
+
+#include "ui.h"
+#include "filter.h"
+#include "ui_helper.h"
+#include "version.h"
+
+
+MainWindow *window;
+FractalWidget *widget;
+
+int main(int argc, char *argv[])
+{
+ QCoreApplication::setApplicationName("XaoS");
+ QCoreApplication::setApplicationVersion(XaoS_VERSION);
+ QCoreApplication::setOrganizationName("XaoS Project");
+ QCoreApplication::setOrganizationDomain("xaos.sourceforge.net");
+
+ QApplication a(argc, argv);
+ MAIN_FUNCTION(argc, argv);
+ //return a.exec();
+}
+
+static int
+qt_initDriver ()
+{
+ window = new MainWindow();
+ widget = window->fractalWidget();
+ window->show();
+ return 1;
+}
+
+static void
+qt_uninitDriver ()
+{
+ delete window;
+}
+
+static int
+qt_allocBuffers (char **b1, char **b2)
+{
+ widget->createImages();
+ *b1 = widget->imageBuffer1();
+ *b2 = widget->imageBuffer2();
+ return widget->imageBytesPerLine();
+}
+
+static void
+qt_freeBuffers (char *b1, char *b2)
+{
+ widget->destroyImages();
+}
+
+static void
+qt_getImageSize (int *w, int *h)
+{
+ *w = widget->size().width();
+ *h = widget->size().height();
+}
+
+static void
+qt_flipBuffers ()
+{
+ widget->switchActiveImage();
+}
+
+static void
+qt_redrawImage()
+{
+ widget->update();
+}
+
+static void
+qt_processEvents (int wait, int *mx, int *my, int *mb, int *k)
+{
+ QCoreApplication::processEvents(wait ? QEventLoop::WaitForMoreEvents : QEventLoop::AllEvents);
+
+ *mx = widget->mousePosition().x();
+ *my = widget->mousePosition().y();
+ *mb = widget->mouseButtons();
+ *k = widget->keyCombination();
+}
+
+static void
+qt_getMouse (int *x, int *y, int *b)
+{
+ *x = widget->mousePosition().x();
+ *y = widget->mousePosition().y();
+ *b = widget->mouseButtons();
+}
+
+static void
+qt_printText(int x, int y, CONST char *text)
+{
+ window->showMessage(text);
+}
+
+static void
+qt_setCursorType (int type)
+{
+ widget->setCursorType(type);
+}
+
+static void
+qt_buildMenu (struct uih_context *uih, CONST char *name)
+{
+ window->buildMenu(uih, name);
+}
+
+static void
+qt_popupMenu (struct uih_context *uih, CONST char *name)
+{
+ window->popupMenu(uih, name);
+}
+
+static void
+qt_toggleMenu (struct uih_context *uih, CONST char *name)
+{
+ window->toggleMenu(uih, name);
+}
+
+static void
+qt_showDialog (struct uih_context *c, CONST char *name)
+{
+ window->showDialog(c, name);
+}
+
+static void
+qt_showHelp (struct uih_context *c, CONST char *name)
+{
+}
+
+struct gui_driver qt_gui_driver = {
+/* setrootmenu */ qt_buildMenu,
+/* enabledisable */ qt_toggleMenu,
+/* menu */ qt_popupMenu,
+/* dialog */ qt_showDialog,
+/* help */ NULL
+};
+
+static struct params qt_params[] = {
+{NULL, 0, NULL, NULL}
+};
+
+struct ui_driver qt_driver = {
+/* name */ "Qt Driver",
+/* init */ qt_initDriver,
+/* getsize */ qt_getImageSize,
+/* processevents */ qt_processEvents,
+/* getmouse */ qt_getMouse,
+/* uninit */ qt_uninitDriver,
+/* set_color */ NULL,
+/* set_range */ NULL,
+/* print */ qt_printText,
+/* display */ qt_redrawImage,
+/* alloc_buffers */ qt_allocBuffers,
+/* free_buffers */ qt_freeBuffers,
+/* filp_buffers */ qt_flipBuffers,
+/* mousetype */ qt_setCursorType,
+/* flush */ NULL,
+/* textwidth */ 12,
+/* textheight */ 12,
+/* params */ qt_params,
+/* flags */ PIXELSIZE,
+/* width */ 0.01,
+/* height */ 0.01,
+/* maxwidth */ 0,
+/* maxheight */ 0,
+/* imagetype */ UI_TRUECOLOR,
+/* palettestart */ 0,
+/* paletteend */ 256,
+/* maxentries */ 255,
+/* rmask */ 0xff0000,
+/* gmask */ 0x00ff00,
+/* bmask */ 0x0000ff,
+/* gui_driver */ &qt_gui_driver
+};
diff --git a/src/ui/ui-drv/qt/mainwindow.cpp b/src/ui/ui-drv/qt/mainwindow.cpp
new file mode 100644
index 0000000..aa03e66
--- /dev/null
+++ b/src/ui/ui-drv/qt/mainwindow.cpp
@@ -0,0 +1,172 @@
+#include "mainwindow.h"
+#include "fractalwidget.h"
+#include "customdialog.h"
+
+#include "ui.h"
+
+#include <QtGui>
+
+
+MainWindow::MainWindow(QWidget *parent)
+ : QMainWindow(parent)
+{
+ setWindowTitle(QCoreApplication::applicationName());
+
+ statusBar()->show();
+
+ m_fractalWidget = new FractalWidget();
+ setCentralWidget(m_fractalWidget);
+
+ readSettings();
+}
+
+MainWindow::~MainWindow()
+{
+}
+
+FractalWidget *MainWindow::fractalWidget()
+{
+ return m_fractalWidget;
+}
+
+void MainWindow::readSettings()
+{
+ QSettings settings;
+ QPoint pos = settings.value("windowPosition", QPoint(200, 200)).toPoint();
+ QSize size = settings.value("imageSize", QSize(640, 480)).toSize();
+ m_fractalWidget->setSizeHint(size);
+ move(pos);
+}
+
+void MainWindow::writeSettings()
+{
+ QSettings settings;
+ settings.setValue("windowPosition", pos());
+ settings.setValue("imageSize", size());
+}
+
+void MainWindow::closeEvent(QCloseEvent *event)
+{
+ writeSettings();
+ ui_quit();
+}
+
+void MainWindow::showMessage(const QString &message)
+{
+ statusBar()->showMessage(message, 5000);
+}
+
+QKeySequence::StandardKey MainWindow::keyForItem(const QString &name)
+{
+ if (name =="initstate") return QKeySequence::New;
+ if (name =="loadpos") return QKeySequence::Open;
+ if (name =="savepos") return QKeySequence::Save;
+ if (name =="undo") return QKeySequence::Undo;
+ if (name =="redo") return QKeySequence::Redo;
+ if (name =="recalculate") return QKeySequence::Refresh;
+ if (name =="help") return QKeySequence::HelpContents;
+
+ return QKeySequence::UnknownKey;
+}
+
+void MainWindow::buildMenu(struct uih_context *uih, const char *name)
+{
+ menuBar()->clear();
+
+ const menuitem *item;
+ for (int i = 0; (item = menu_item(name, i)) != NULL; i++) {
+ if (item->type == MENU_SUBMENU) {
+ QMenu *menu = menuBar()->addMenu(QString(item->name));
+ buildMenu(uih, item->shortname, menu);
+ }
+ }
+}
+
+void MainWindow::buildMenu(struct uih_context *uih, const char *name, QMenu *parent)
+{
+ QActionGroup *group = new QActionGroup(parent);
+
+ const menuitem *item;
+ for (int i = 0; (item = menu_item(name, i)) != NULL; i++) {
+
+ QString itemName(item->name);
+ if (item->type == MENU_DIALOG || item->type == MENU_CUSTOMDIALOG)
+ itemName += "...";
+
+ if (item->type == MENU_SEPARATOR) {
+ parent->addSeparator();
+ } else if (item->type == MENU_SUBMENU) {
+ QMenu *menu = parent->addMenu(item->name);
+ buildMenu(uih, item->shortname, menu);
+ } else {
+ QAction *action = new QAction(itemName, parent);
+ action->setShortcuts(keyForItem(item->shortname));
+ action->setObjectName(item->shortname);
+ if (item->flags & (MENUFLAG_RADIO | MENUFLAG_CHECKBOX)) {
+ action->setCheckable(true);
+ action->setChecked(menu_enabled(item, uih));
+ if (item->flags & MENUFLAG_RADIO)
+ action->setActionGroup(group);
+ }
+ connect(action, SIGNAL(triggered()), this, SLOT(activateMenuItem()));
+ parent->addAction(action);
+ }
+ }
+}
+
+void MainWindow::popupMenu(struct uih_context *uih, const char *name)
+{
+ QMenu *menu = new QMenu(this);
+ buildMenu(uih, name, menu);
+ menu->exec(QCursor::pos());
+ delete menu;
+}
+
+void MainWindow::toggleMenu(struct uih_context *uih, const char *name)
+{
+ const menuitem *item = menu_findcommand(name);
+ QAction *action = menuBar()->findChild<QAction *>(name);
+ if (action)
+ action->setChecked(menu_enabled(item, uih));
+}
+
+void MainWindow::activateMenuItem()
+{
+ QAction *action = qobject_cast<QAction *>(sender());
+ const menuitem *item = menu_findcommand(action->objectName().toAscii());
+ ui_menuactivate(item, NULL);
+}
+
+void MainWindow::showDialog(struct uih_context *uih, const char *name)
+{
+ const menuitem *item = menu_findcommand(name);
+ if (!item) return;
+
+ const menudialog *dialog = menu_getdialog(uih, item);
+ if (!dialog) return;
+
+ int nitems;
+ for (nitems = 0; dialog[nitems].question; nitems++);
+
+ if (nitems == 1 && (dialog[0].type == DIALOG_IFILE || dialog[0].type == DIALOG_OFILE)) {
+ QString filter = QString("*.%1").arg(QFileInfo(dialog[0].defstr).completeSuffix());
+ QString directory;// = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
+
+ QString fileName;
+ if (dialog[0].type == DIALOG_IFILE)
+ fileName = QFileDialog::getOpenFileName(this, item->name, directory, filter);
+ else if (dialog[0].type == DIALOG_OFILE)
+ fileName = QFileDialog::getSaveFileName(this, item->name, directory, filter);
+
+
+ if (!fileName.isNull()) {
+ dialogparam *param = (dialogparam *)malloc(sizeof(dialogparam));
+ param->dstring = strdup(fileName.toUtf8());
+ ui_menuactivate(item, param);
+ }
+ } else {
+ CustomDialog customDialog(uih, item, dialog, this);
+ if (customDialog.exec() == QDialog::Accepted)
+ ui_menuactivate(item, customDialog.parameters());
+ }
+}
diff --git a/src/ui/ui-drv/qt/mainwindow.h b/src/ui/ui-drv/qt/mainwindow.h
new file mode 100644
index 0000000..ffead6d
--- /dev/null
+++ b/src/ui/ui-drv/qt/mainwindow.h
@@ -0,0 +1,43 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QtGui/QMainWindow>
+
+class QImage;
+class FractalWidget;
+
+class MainWindow : public QMainWindow
+{
+ Q_OBJECT
+
+private:
+ FractalWidget *m_fractalWidget;
+
+ void readSettings();
+ void writeSettings();
+
+ static QKeySequence::StandardKey keyForItem(const QString &name);
+
+protected:
+ void closeEvent(QCloseEvent *event);
+
+private slots:
+ void activateMenuItem();
+
+ public:
+ MainWindow(QWidget *parent = 0);
+ ~MainWindow();
+
+ FractalWidget *fractalWidget();
+
+ void showMessage(const QString &message);
+
+ void buildMenu(struct uih_context *uih, const char *name);
+ void buildMenu(struct uih_context *uih, const char *name, QMenu *parent);
+ void popupMenu(struct uih_context *uih, const char *name);
+ void toggleMenu(struct uih_context *uih, const char *name);
+
+ void showDialog(struct uih_context *uih, const char *name);
+};
+
+#endif // MAINWINDOW_H
diff --git a/src/ui/ui-drv/qt/ui_qt.c b/src/ui/ui-drv/qt/ui_qt.c
new file mode 100644
index 0000000..1ac3b0a
--- /dev/null
+++ b/src/ui/ui-drv/qt/ui_qt.c
@@ -0,0 +1,99 @@
+#include "aconfig.h"
+#ifdef TEMPLATE_DRIVER
+/*includes */
+#include <ui.h>
+
+static int template_set_color(int r, int g, int b, int init)
+{
+ return ( /*pixel value or -1 for full palette */ -1);
+}
+
+static void template_setpalette(ui_palette pal, int start, int end)
+{
+}
+
+static void template_print(int x, int y, CONST char *text)
+{
+}
+
+static void template_display()
+{
+}
+
+static void template_flip_buffers()
+{
+}
+
+void template_free_buffers(char *b1, char *b2)
+{
+}
+
+int template_alloc_buffers(char **b1, char **b2)
+{
+ return 1; /* bytes per scanline */
+}
+
+static void template_getsize(int *w, int *h)
+{
+}
+
+static void
+template_processevents(int wait, int *mx, int *my, int *mb, int *k)
+{
+}
+
+static int template_init()
+{
+ return ( /*1 for sucess 0 for fail */ 1);
+}
+
+static void template_uninitialise()
+{
+}
+
+static void template_getmouse(int *x, int *y, int *b)
+{
+}
+
+
+static void template_mousetype(int type)
+{
+}
+
+static struct params params[] = {
+ {"", P_HELP, NULL, "Template driver options:"},
+ {"-flag", P_SWITCH, &variable, "Example flag..."},
+ {NULL, 0, NULL, NULL}
+};
+
+struct ui_driver template_driver = {
+ "Template",
+ template_init,
+ template_getsize,
+ template_processevents,
+ template_getmouse,
+ template_uninitialise,
+ template_set_color, /*You should implement just one */
+ template_set_palette, /*of these and add NULL as second */
+ template_print,
+ template_display,
+ template_alloc_buffers,
+ template_free_buffers,
+ template_flip_buffers,
+ template_mousetype, /*This should be NULL */
+ NULL, /*flush */
+ 8, /*text width */
+ 8, /*text height */
+ UGLYTEXTSIZE,
+ params,
+ 0, /*flags...see ui.h */
+ 0.0, 0.0, /*width/height of screen in centimeters */
+ 0, 0, /*resolution of screen for windowed systems */
+ UI_C256, /*Image type */
+ 0, 255, 255 /*start, end of palette and maximum allocatable */
+ /*entries */
+};
+
+/* DONT FORGET TO ADD DOCUMENTATION ABOUT YOUR DRIVER INTO xaos.hlp FILE!*/
+
+#endif
diff --git a/src/ui/ui-drv/qt/version.h b/src/ui/ui-drv/qt/version.h
new file mode 100644
index 0000000..94cd83e
--- /dev/null
+++ b/src/ui/ui-drv/qt/version.h
@@ -0,0 +1,23 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#define XaoS_VERSION "4.0"
diff --git a/src/ui/ui-drv/qt/xaos.ico b/src/ui/ui-drv/qt/xaos.ico
new file mode 100644
index 0000000..12347f5
--- /dev/null
+++ b/src/ui/ui-drv/qt/xaos.ico
Binary files differ
diff --git a/src/ui/ui-drv/qt/xaos.rc b/src/ui/ui-drv/qt/xaos.rc
new file mode 100644
index 0000000..6235fef
--- /dev/null
+++ b/src/ui/ui-drv/qt/xaos.rc
@@ -0,0 +1 @@
+IDI_ICON1 ICON DISCARDABLE "xaos.ico"
diff --git a/src/ui/ui-drv/template/Makefile.in b/src/ui/ui-drv/template/Makefile.in
new file mode 100644
index 0000000..185abd4
--- /dev/null
+++ b/src/ui/ui-drv/template/Makefile.in
@@ -0,0 +1,39 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+#AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = ui_template.c
+
+OBJS = $(SRCS:.c=.o)
+
+TLIB = @LIBPATH@/libuitemplate.a
+
+
+all: $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $^
+ $(RANLIB) $@
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/ui/ui-drv/template/ui_template.c b/src/ui/ui-drv/template/ui_template.c
new file mode 100644
index 0000000..1ac3b0a
--- /dev/null
+++ b/src/ui/ui-drv/template/ui_template.c
@@ -0,0 +1,99 @@
+#include "aconfig.h"
+#ifdef TEMPLATE_DRIVER
+/*includes */
+#include <ui.h>
+
+static int template_set_color(int r, int g, int b, int init)
+{
+ return ( /*pixel value or -1 for full palette */ -1);
+}
+
+static void template_setpalette(ui_palette pal, int start, int end)
+{
+}
+
+static void template_print(int x, int y, CONST char *text)
+{
+}
+
+static void template_display()
+{
+}
+
+static void template_flip_buffers()
+{
+}
+
+void template_free_buffers(char *b1, char *b2)
+{
+}
+
+int template_alloc_buffers(char **b1, char **b2)
+{
+ return 1; /* bytes per scanline */
+}
+
+static void template_getsize(int *w, int *h)
+{
+}
+
+static void
+template_processevents(int wait, int *mx, int *my, int *mb, int *k)
+{
+}
+
+static int template_init()
+{
+ return ( /*1 for sucess 0 for fail */ 1);
+}
+
+static void template_uninitialise()
+{
+}
+
+static void template_getmouse(int *x, int *y, int *b)
+{
+}
+
+
+static void template_mousetype(int type)
+{
+}
+
+static struct params params[] = {
+ {"", P_HELP, NULL, "Template driver options:"},
+ {"-flag", P_SWITCH, &variable, "Example flag..."},
+ {NULL, 0, NULL, NULL}
+};
+
+struct ui_driver template_driver = {
+ "Template",
+ template_init,
+ template_getsize,
+ template_processevents,
+ template_getmouse,
+ template_uninitialise,
+ template_set_color, /*You should implement just one */
+ template_set_palette, /*of these and add NULL as second */
+ template_print,
+ template_display,
+ template_alloc_buffers,
+ template_free_buffers,
+ template_flip_buffers,
+ template_mousetype, /*This should be NULL */
+ NULL, /*flush */
+ 8, /*text width */
+ 8, /*text height */
+ UGLYTEXTSIZE,
+ params,
+ 0, /*flags...see ui.h */
+ 0.0, 0.0, /*width/height of screen in centimeters */
+ 0, 0, /*resolution of screen for windowed systems */
+ UI_C256, /*Image type */
+ 0, 255, 255 /*start, end of palette and maximum allocatable */
+ /*entries */
+};
+
+/* DONT FORGET TO ADD DOCUMENTATION ABOUT YOUR DRIVER INTO xaos.hlp FILE!*/
+
+#endif
diff --git a/src/ui/ui-drv/win32/Makefile.in b/src/ui/ui-drv/win32/Makefile.in
new file mode 100644
index 0000000..f2cd8a0
--- /dev/null
+++ b/src/ui/ui-drv/win32/Makefile.in
@@ -0,0 +1,43 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = ui_win32.c dxguid.c winmenu.c windialo.c about.c
+
+OBJS = $(SRCS:.c=.o) #xaos.res
+
+TLIB = @LIBPATH@/libuiwin32.a
+
+
+all: ui_win32.o xaos.res $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $(OBJS)
+ $(RANLIB) $@
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+ rm -f xaos.res
+
+xaos.res: xaos.rc resource.h xaos.dlg
+ windres xaos.rc -O coff -o $@
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/ui/ui-drv/win32/about.c b/src/ui/ui-drv/win32/about.c
new file mode 100644
index 0000000..22b040d
--- /dev/null
+++ b/src/ui/ui-drv/win32/about.c
@@ -0,0 +1,239 @@
+#include <windows.h>
+#include "fconfig.h"
+#include "xerror.h"
+#include "ui_win32.h"
+#include "about.h"
+void CenterWindow(HWND hwndChild, HWND hwndParent)
+{
+ RECT rChild, rParent, rWorkArea;
+ int wChild, hChild, wParent, hParent;
+ int xNew, yNew;
+ BOOL bResult;
+
+ GetWindowRect(hwndChild, &rChild);
+ wChild = rChild.right - rChild.left;
+ hChild = rChild.bottom - rChild.top;
+
+ GetWindowRect(hwndParent, &rParent);
+ wParent = rParent.right - rParent.left;
+ hParent = rParent.bottom - rParent.top;
+
+ bResult = SystemParametersInfo(SPI_GETWORKAREA, // system parameter to query or set
+ sizeof(RECT), &rWorkArea, 0);
+ if (!bResult) {
+ rWorkArea.left = rWorkArea.top = 0;
+ rWorkArea.right = GetSystemMetrics(SM_CXSCREEN);
+ rWorkArea.bottom = GetSystemMetrics(SM_CYSCREEN);
+ }
+
+ xNew = rParent.left + ((wParent - wChild) / 2);
+ if (xNew < rWorkArea.left) {
+ xNew = rWorkArea.left;
+ } else if ((xNew + wChild) > rWorkArea.right) {
+ xNew = rWorkArea.right - wChild;
+ }
+
+ yNew = rParent.top + ((hParent - hChild) / 2);
+ if (yNew < rWorkArea.top) {
+ yNew = rWorkArea.top;
+ } else if ((yNew + hChild) > rWorkArea.bottom) {
+ yNew = rWorkArea.bottom - hChild;
+ }
+
+ SetWindowPos(hwndChild, NULL, xNew, yNew, 0, 0,
+ SWP_NOSIZE | SWP_NOZORDER);
+ return;
+}
+
+
+static LPTSTR GetStringRes(int id)
+{
+ static TCHAR buffer[MAX_PATH];
+
+ buffer[0] = 0;
+ LoadString(GetModuleHandle(NULL), id, buffer, MAX_PATH);
+ return buffer;
+}
+
+static LRESULT CALLBACK
+About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
+{
+ static HFONT hfontDlg; // Font for dialog text
+ static HFONT hFinePrint; // Font for 'fine print' in dialog
+ DWORD dwVerInfoSize; // Size of version information block
+ LPSTR lpVersion; // String pointer to 'version' text
+ DWORD dwVerHnd = 0; // An 'ignored' parameter, always '0'
+ UINT uVersionLen;
+ WORD wRootLen;
+ BOOL bRetCode;
+ int i;
+ char szFullPath[256];
+ char szResult[256];
+ char szGetName[256];
+ DWORD dwVersion;
+ char szVersion[40];
+ DWORD dwResult;
+
+ switch (message) {
+ case WM_INITDIALOG:
+ ShowWindow(hDlg, SW_HIDE);
+
+ if (PRIMARYLANGID(GetUserDefaultLangID()) == LANG_JAPANESE) {
+ hfontDlg =
+ CreateFont(14, 0, 0, 0, 0, 0, 0, 0, SHIFTJIS_CHARSET, 0, 0,
+ 0, VARIABLE_PITCH | FF_DONTCARE, "");
+ hFinePrint =
+ CreateFont(11, 0, 0, 0, 0, 0, 0, 0, SHIFTJIS_CHARSET, 0, 0,
+ 0, VARIABLE_PITCH | FF_DONTCARE, "");
+ } else {
+ hfontDlg = CreateFont(14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ VARIABLE_PITCH | FF_SWISS, "");
+ hFinePrint = CreateFont(11, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ VARIABLE_PITCH | FF_SWISS, "");
+ }
+
+ CenterWindow(hDlg, GetWindow(hDlg, GW_OWNER));
+ GetModuleFileName(hInstance, szFullPath, sizeof(szFullPath));
+#if 0
+ // Now lets dive in and pull out the version information:
+ dwVerInfoSize = GetFileVersionInfoSize(szFullPath, &dwVerHnd);
+ if (dwVerInfoSize) {
+ LPSTR lpstrVffInfo;
+ HANDLE hMem;
+ hMem = GlobalAlloc(GMEM_MOVEABLE, dwVerInfoSize);
+ lpstrVffInfo = GlobalLock(hMem);
+ GetFileVersionInfo(szFullPath, dwVerHnd, dwVerInfoSize,
+ lpstrVffInfo);
+ // The below 'hex' value looks a little confusing, but
+ // essentially what it is, is the hexidecimal representation
+ // of a couple different values that represent the language
+ // and character set that we are wanting string values for.
+ // 040904E4 is a very common one, because it means:
+ // US English, Windows MultiLingual characterset
+ // Or to pull it all apart:
+ // 04------ = SUBLANG_ENGLISH_USA
+ // --09---- = LANG_ENGLISH
+ // --11---- = LANG_JAPANESE
+ // ----04E4 = 1252 = Codepage for Windows:Multilingual
+
+ lstrcpy(szGetName, GetStringRes(IDS_VER_INFO_LANG));
+
+ wRootLen = (WORD) lstrlen(szGetName); // Save this position
+
+ // Set the title of the dialog:
+ lstrcat(szGetName, "ProductName");
+ bRetCode = VerQueryValue((LPVOID) lpstrVffInfo,
+ (LPSTR) szGetName,
+ (LPVOID) & lpVersion,
+ (UINT *) & uVersionLen);
+
+ // Notice order of version and string...
+ if (PRIMARYLANGID(GetUserDefaultLangID()) == LANG_JAPANESE) {
+ lstrcpy(szResult, lpVersion);
+ lstrcat(szResult, " ‚̃o[ƒWƒ‡ƒ“î•ñ");
+ } else {
+ lstrcpy(szResult, "About ");
+ lstrcat(szResult, lpVersion);
+ }
+
+ // -----------------------------------------------------
+
+ SetWindowText(hDlg, szResult);
+
+ // Walk through the dialog items that we want to replace:
+ for (i = DLG_VERFIRST; i <= DLG_VERLAST; i++) {
+ GetDlgItemText(hDlg, i, szResult, sizeof(szResult));
+ szGetName[wRootLen] = (char) 0;
+ lstrcat(szGetName, szResult);
+ uVersionLen = 0;
+ lpVersion = NULL;
+ x_message("lpstrVffInfo %s", lpstrVffInfo);
+ bRetCode = VerQueryValue((LPVOID) lpstrVffInfo,
+ (LPSTR) szGetName,
+ (LPVOID) & lpVersion,
+ (UINT *) & uVersionLen);
+
+ if (bRetCode && uVersionLen && lpVersion) {
+ // Replace dialog item text with version info
+ lstrcpy(szResult, lpVersion);
+ SetDlgItemText(hDlg, i, szResult);
+ } else {
+ dwResult = GetLastError();
+
+ wsprintf(szResult, GetStringRes(IDS_VERSION_ERROR),
+ dwResult);
+ SetDlgItemText(hDlg, i, szResult);
+ }
+ SendMessage(GetDlgItem(hDlg, i), WM_SETFONT,
+ /* (ULONG_PTR) */
+ (unsigned long *) ((i == DLG_VERLAST) ?
+ hFinePrint : hfontDlg),
+ TRUE);
+ } // for (i = DLG_VERFIRST; i <= DLG_VERLAST; i++)
+
+
+ GlobalUnlock(hMem);
+ GlobalFree(hMem);
+ } else {
+ // No version information available.
+ } // if (dwVerInfoSize)
+#endif
+ for (i = DLG_VERFIRST; i <= IDC_LICENSE; i++) {
+ SendMessage(GetDlgItem(hDlg, i), WM_SETFONT,
+ /* (ULONG_PTR) */
+ (unsigned long *) ((i == DLG_VERLAST) ? hFinePrint
+ : hfontDlg), TRUE);
+ } // for (i = DLG_VERFIRST; i <= DLG_VERLAST; i++)
+
+ SendMessage(GetDlgItem(hDlg, IDC_LABEL), WM_SETFONT,
+ (WPARAM) hfontDlg, (LPARAM) TRUE);
+
+ // We are using GetVersion rather then GetVersionEx
+ // because earlier versions of Windows NT and Win32s
+ // didn't include GetVersionEx:
+ dwVersion = GetVersion();
+
+ if (dwVersion < 0x80000000) {
+ // Windows NT
+ wsprintf(szVersion, "Microsoft Windows NT %u.%u (Build: %u)",
+ (DWORD) (LOBYTE(LOWORD(dwVersion))),
+ (DWORD) (HIBYTE(LOWORD(dwVersion))),
+ (DWORD) (HIWORD(dwVersion)));
+ } else if (LOBYTE(LOWORD(dwVersion)) < 4) {
+ // Win32s
+ wsprintf(szVersion, "Microsoft Win32s %u.%u (Build: %u)",
+ (DWORD) (LOBYTE(LOWORD(dwVersion))),
+ (DWORD) (HIBYTE(LOWORD(dwVersion))),
+ (DWORD) (HIWORD(dwVersion) & ~0x8000));
+ } else {
+ // Windows 95
+ wsprintf(szVersion, "Microsoft Windows 95 %u.%u",
+ (DWORD) (LOBYTE(LOWORD(dwVersion))),
+ (DWORD) (HIBYTE(LOWORD(dwVersion))));
+ }
+
+ SetWindowText(GetDlgItem(hDlg, IDC_OSVERSION), szVersion);
+ ShowWindow(hDlg, SW_SHOW);
+ return (TRUE);
+
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) {
+ EndDialog(hDlg, TRUE);
+ DeleteObject(hfontDlg);
+ DeleteObject(hFinePrint);
+ return (TRUE);
+ }
+ break;
+ }
+
+ return FALSE;
+}
+
+void AboutBox(void)
+{
+#ifdef DDRAW_DRIVER
+ if (directX == 1)
+ return;
+#endif
+ DialogBox(hInstance, "AboutBox", hWnd, (DLGPROC) About);
+}
diff --git a/src/ui/ui-drv/win32/about.h b/src/ui/ui-drv/win32/about.h
new file mode 100644
index 0000000..f42c873
--- /dev/null
+++ b/src/ui/ui-drv/win32/about.h
@@ -0,0 +1,20 @@
+#define IDC_STATIC -1
+
+#define DLG_VERFIRST 400
+#define IDC_COMPANY DLG_VERFIRST
+#define IDC_FILEDESC DLG_VERFIRST+1
+#define IDC_PRODVER DLG_VERFIRST+2
+#define IDC_COPYRIGHT DLG_VERFIRST+3
+#define IDC_OSVERSION DLG_VERFIRST+4
+#define IDC_TRADEMARK DLG_VERFIRST+5
+#define DLG_VERLAST DLG_VERFIRST+5
+#define IDC_LICENSE DLG_VERFIRST+6
+
+#define IDC_LABEL IDC_LICENSE+1
+
+
+#define IDS_APP_TITLE 500
+#define IDS_DISPLAYCHANGED 501
+#define IDS_VER_INFO_LANG 502
+#define IDS_VERSION_ERROR 503
+#define IDS_NO_HELP 504
diff --git a/src/ui/ui-drv/win32/about.rc b/src/ui/ui-drv/win32/about.rc
new file mode 100644
index 0000000..cb5d3a4
--- /dev/null
+++ b/src/ui/ui-drv/win32/about.rc
@@ -0,0 +1,19 @@
+ABOUTBOX DIALOG DISCARDABLE 22, 17, 197, 74+4*18
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "About"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ DEFPUSHBUTTON "OK",IDOK,162,2,32,14,WS_GROUP
+ ICON "BIG",IDC_STATIC,3,2,18,20
+ LTEXT "Free Sofware Foundation",IDC_COMPANY,30,2,130,8
+ LTEXT "XaoS - a realtime fractal zoomer",IDC_FILEDESC,30,10,121,8
+ RTEXT "3.5",IDC_PRODVER,136,10,17,8
+ LTEXT "Copyright 1996-2008 Jan Hubicka, Thomas Marsh and others",IDC_COPYRIGHT,30,18,167,8
+ LTEXT "OSVERSION",IDC_OSVERSION,46,34,138,8
+ LTEXT "This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. \n\nThis 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. \n\nYou should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.",IDC_LICENSE,3,49,192,5*18
+ LTEXT "Crashing on:",IDC_LABEL,4,34,40,8
+ CONTROL "",IDC_STATIC,"Static",SS_BLACKRECT,2,31,194,1
+ CONTROL "",IDC_STATIC,"Static",SS_BLACKRECT,2,44,194,1
+END
+
+
diff --git a/src/ui/ui-drv/win32/dxguid.c b/src/ui/ui-drv/win32/dxguid.c
new file mode 100644
index 0000000..5c6a2ae
--- /dev/null
+++ b/src/ui/ui-drv/win32/dxguid.c
@@ -0,0 +1,1102 @@
+#include <aconfig.h>
+#ifdef DDRAW_DRIVER
+#include <ddraw.h>
+#include <dinput.h>
+
+/* This is a replacement for microsofts dxguid.lib and parts of dinput.lib. */
+
+#undef DEFINE_GUID
+#define DEFINE_GUID(n,a,b,c,d,e,f,g,h,i,j,k) const GUID n = {a,b,c,{d,e,f,g,h,i,j,k}}
+
+/* DirectDraw */
+DEFINE_GUID(CLSID_DirectDraw, 0xD7B70EE0, 0x4340, 0x11CF, 0xB0, 0x63, 0x00,
+ 0x20, 0xAF, 0xC2, 0xCD, 0x35);
+DEFINE_GUID(CLSID_DirectDrawClipper, 0x593817A0, 0x7DB3, 0x11CF, 0xA2,
+ 0xDE, 0x00, 0xAA, 0x00, 0xb9, 0x33, 0x56);
+DEFINE_GUID(IID_IDirectDraw, 0x6C14DB80, 0xA733, 0x11CE, 0xA5, 0x21, 0x00,
+ 0x20, 0xAF, 0x0B, 0xE5, 0x60);
+DEFINE_GUID(IID_IDirectDraw2, 0xB3A6F3E0, 0x2B43, 0x11CF, 0xA2, 0xDE, 0x00,
+ 0xAA, 0x00, 0xB9, 0x33, 0x56);
+DEFINE_GUID(IID_IDirectDrawSurface, 0x6C14DB81, 0xA733, 0x11CE, 0xA5, 0x21,
+ 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
+DEFINE_GUID(IID_IDirectDrawSurface2, 0x57805885, 0x6eec, 0x11cf, 0x94,
+ 0x41, 0xa8, 0x23, 0x03, 0xc1, 0x0e, 0x27);
+DEFINE_GUID(IID_IDirectDrawSurface3, 0xDA044E00, 0x69B2, 0x11D0, 0xA1,
+ 0xD5, 0x00, 0xAA, 0x00, 0xB8, 0xDF, 0xBB);
+
+DEFINE_GUID(IID_IDirectDrawPalette, 0x6C14DB84, 0xA733, 0x11CE, 0xA5, 0x21,
+ 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
+DEFINE_GUID(IID_IDirectDrawClipper, 0x6C14DB85, 0xA733, 0x11CE, 0xA5, 0x21,
+ 0x00, 0x20, 0xAF, 0x0B, 0xE5, 0x60);
+DEFINE_GUID(IID_IDirectDrawColorControl, 0x4B9F0EE0, 0x0D7E, 0x11D0, 0x9B,
+ 0x06, 0x00, 0xA0, 0xC9, 0x03, 0xA3, 0xB8);
+
+DEFINE_GUID(IID_IDirectInputA, 0x89521360, 0xAA8A, 0x11CF, 0xBF, 0xC7,
+ 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(IID_IDirectInputW, 0x89521361, 0xAA8A, 0x11CF, 0xBF, 0xC7,
+ 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(IID_IDirectInput2A, 0x5944E662, 0xAA8A, 0x11CF, 0xBF, 0xC7,
+ 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(IID_IDirectInput2W, 0x5944E663, 0xAA8A, 0x11CF, 0xBF, 0xC7,
+ 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+
+DEFINE_GUID(IID_IDirectInputDeviceA, 0x5944E680, 0xC92E, 0x11CF, 0xBF,
+ 0xC7, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(IID_IDirectInputDeviceW, 0x5944E681, 0xC92E, 0x11CF, 0xBF,
+ 0xC7, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(IID_IDirectInputDevice2A, 0x5944E682, 0xC92E, 0x11CF, 0xBF,
+ 0xC7, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(IID_IDirectInputDevice2W, 0x5944E683, 0xC92E, 0x11CF, 0xBF,
+ 0xC7, 0x44, 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(IID_IDirectInputEffect, 0xE7E1F7C0, 0x88D2, 0x11D0, 0x9A, 0xD0,
+ 0x00, 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_XAxis, 0xA36D02E0, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44, 0x45,
+ 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_YAxis, 0xA36D02E1, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44, 0x45,
+ 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_ZAxis, 0xA36D02E2, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44, 0x45,
+ 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_RxAxis, 0xA36D02F4, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44,
+ 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_RyAxis, 0xA36D02F5, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44,
+ 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_RzAxis, 0xA36D02E3, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44,
+ 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_Slider, 0xA36D02E4, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44,
+ 0x45, 0x53, 0x54, 0x00, 0x00);
+
+DEFINE_GUID(GUID_Button, 0xA36D02F0, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44,
+ 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_Key, 0x55728220, 0xD33C, 0x11CF, 0xBF, 0xC7, 0x44, 0x45,
+ 0x53, 0x54, 0x00, 0x00);
+
+DEFINE_GUID(GUID_POV, 0xA36D02F2, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44, 0x45,
+ 0x53, 0x54, 0x00, 0x00);
+
+DEFINE_GUID(GUID_Unknown, 0xA36D02F3, 0xC9F3, 0x11CF, 0xBF, 0xC7, 0x44,
+ 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_SysMouse, 0x6F1D2B60, 0xD5A0, 0x11CF, 0xBF, 0xC7, 0x44,
+ 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_SysKeyboard, 0x6F1D2B61, 0xD5A0, 0x11CF, 0xBF, 0xC7, 0x44,
+ 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_Joystick, 0x6F1D2B70, 0xD5A0, 0x11CF, 0xBF, 0xC7, 0x44,
+ 0x45, 0x53, 0x54, 0x00, 0x00);
+DEFINE_GUID(GUID_ConstantForce, 0x13541C20, 0x8E33, 0x11D0, 0x9A, 0xD0,
+ 0x00, 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_RampForce, 0x13541C21, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00,
+ 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_Square, 0x13541C22, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00,
+ 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_Sine, 0x13541C23, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00, 0xA0,
+ 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_Triangle, 0x13541C24, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00,
+ 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_SawtoothUp, 0x13541C25, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00,
+ 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_SawtoothDown, 0x13541C26, 0x8E33, 0x11D0, 0x9A, 0xD0,
+ 0x00, 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_Spring, 0x13541C27, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00,
+ 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_Damper, 0x13541C28, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00,
+ 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_Inertia, 0x13541C29, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00,
+ 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_Friction, 0x13541C2A, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00,
+ 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+DEFINE_GUID(GUID_CustomForce, 0x13541C2B, 0x8E33, 0x11D0, 0x9A, 0xD0, 0x00,
+ 0xA0, 0xC9, 0xA0, 0x6E, 0x35);
+
+
+DIOBJECTDATAFORMAT rgodf_c_dfDIKeyboard[] = {
+ {&GUID_Key, 0, -2147483636, 0}
+ ,
+ {&GUID_Key, 1, -2147483380, 0}
+ ,
+ {&GUID_Key, 2, -2147483124, 0}
+ ,
+ {&GUID_Key, 3, -2147482868, 0}
+ ,
+ {&GUID_Key, 4, -2147482612, 0}
+ ,
+ {&GUID_Key, 5, -2147482356, 0}
+ ,
+ {&GUID_Key, 6, -2147482100, 0}
+ ,
+ {&GUID_Key, 7, -2147481844, 0}
+ ,
+ {&GUID_Key, 8, -2147481588, 0}
+ ,
+ {&GUID_Key, 9, -2147481332, 0}
+ ,
+ {&GUID_Key, 10, -2147481076, 0}
+ ,
+ {&GUID_Key, 11, -2147480820, 0}
+ ,
+ {&GUID_Key, 12, -2147480564, 0}
+ ,
+ {&GUID_Key, 13, -2147480308, 0}
+ ,
+ {&GUID_Key, 14, -2147480052, 0}
+ ,
+ {&GUID_Key, 15, -2147479796, 0}
+ ,
+ {&GUID_Key, 16, -2147479540, 0}
+ ,
+ {&GUID_Key, 17, -2147479284, 0}
+ ,
+ {&GUID_Key, 18, -2147479028, 0}
+ ,
+ {&GUID_Key, 19, -2147478772, 0}
+ ,
+ {&GUID_Key, 20, -2147478516, 0}
+ ,
+ {&GUID_Key, 21, -2147478260, 0}
+ ,
+ {&GUID_Key, 22, -2147478004, 0}
+ ,
+ {&GUID_Key, 23, -2147477748, 0}
+ ,
+ {&GUID_Key, 24, -2147477492, 0}
+ ,
+ {&GUID_Key, 25, -2147477236, 0}
+ ,
+ {&GUID_Key, 26, -2147476980, 0}
+ ,
+ {&GUID_Key, 27, -2147476724, 0}
+ ,
+ {&GUID_Key, 28, -2147476468, 0}
+ ,
+ {&GUID_Key, 29, -2147476212, 0}
+ ,
+ {&GUID_Key, 30, -2147475956, 0}
+ ,
+ {&GUID_Key, 31, -2147475700, 0}
+ ,
+ {&GUID_Key, 32, -2147475444, 0}
+ ,
+ {&GUID_Key, 33, -2147475188, 0}
+ ,
+ {&GUID_Key, 34, -2147474932, 0}
+ ,
+ {&GUID_Key, 35, -2147474676, 0}
+ ,
+ {&GUID_Key, 36, -2147474420, 0}
+ ,
+ {&GUID_Key, 37, -2147474164, 0}
+ ,
+ {&GUID_Key, 38, -2147473908, 0}
+ ,
+ {&GUID_Key, 39, -2147473652, 0}
+ ,
+ {&GUID_Key, 40, -2147473396, 0}
+ ,
+ {&GUID_Key, 41, -2147473140, 0}
+ ,
+ {&GUID_Key, 42, -2147472884, 0}
+ ,
+ {&GUID_Key, 43, -2147472628, 0}
+ ,
+ {&GUID_Key, 44, -2147472372, 0}
+ ,
+ {&GUID_Key, 45, -2147472116, 0}
+ ,
+ {&GUID_Key, 46, -2147471860, 0}
+ ,
+ {&GUID_Key, 47, -2147471604, 0}
+ ,
+ {&GUID_Key, 48, -2147471348, 0}
+ ,
+ {&GUID_Key, 49, -2147471092, 0}
+ ,
+ {&GUID_Key, 50, -2147470836, 0}
+ ,
+ {&GUID_Key, 51, -2147470580, 0}
+ ,
+ {&GUID_Key, 52, -2147470324, 0}
+ ,
+ {&GUID_Key, 53, -2147470068, 0}
+ ,
+ {&GUID_Key, 54, -2147469812, 0}
+ ,
+ {&GUID_Key, 55, -2147469556, 0}
+ ,
+ {&GUID_Key, 56, -2147469300, 0}
+ ,
+ {&GUID_Key, 57, -2147469044, 0}
+ ,
+ {&GUID_Key, 58, -2147468788, 0}
+ ,
+ {&GUID_Key, 59, -2147468532, 0}
+ ,
+ {&GUID_Key, 60, -2147468276, 0}
+ ,
+ {&GUID_Key, 61, -2147468020, 0}
+ ,
+ {&GUID_Key, 62, -2147467764, 0}
+ ,
+ {&GUID_Key, 63, -2147467508, 0}
+ ,
+ {&GUID_Key, 64, -2147467252, 0}
+ ,
+ {&GUID_Key, 65, -2147466996, 0}
+ ,
+ {&GUID_Key, 66, -2147466740, 0}
+ ,
+ {&GUID_Key, 67, -2147466484, 0}
+ ,
+ {&GUID_Key, 68, -2147466228, 0}
+ ,
+ {&GUID_Key, 69, -2147465972, 0}
+ ,
+ {&GUID_Key, 70, -2147465716, 0}
+ ,
+ {&GUID_Key, 71, -2147465460, 0}
+ ,
+ {&GUID_Key, 72, -2147465204, 0}
+ ,
+ {&GUID_Key, 73, -2147464948, 0}
+ ,
+ {&GUID_Key, 74, -2147464692, 0}
+ ,
+ {&GUID_Key, 75, -2147464436, 0}
+ ,
+ {&GUID_Key, 76, -2147464180, 0}
+ ,
+ {&GUID_Key, 77, -2147463924, 0}
+ ,
+ {&GUID_Key, 78, -2147463668, 0}
+ ,
+ {&GUID_Key, 79, -2147463412, 0}
+ ,
+ {&GUID_Key, 80, -2147463156, 0}
+ ,
+ {&GUID_Key, 81, -2147462900, 0}
+ ,
+ {&GUID_Key, 82, -2147462644, 0}
+ ,
+ {&GUID_Key, 83, -2147462388, 0}
+ ,
+ {&GUID_Key, 84, -2147462132, 0}
+ ,
+ {&GUID_Key, 85, -2147461876, 0}
+ ,
+ {&GUID_Key, 86, -2147461620, 0}
+ ,
+ {&GUID_Key, 87, -2147461364, 0}
+ ,
+ {&GUID_Key, 88, -2147461108, 0}
+ ,
+ {&GUID_Key, 89, -2147460852, 0}
+ ,
+ {&GUID_Key, 90, -2147460596, 0}
+ ,
+ {&GUID_Key, 91, -2147460340, 0}
+ ,
+ {&GUID_Key, 92, -2147460084, 0}
+ ,
+ {&GUID_Key, 93, -2147459828, 0}
+ ,
+ {&GUID_Key, 94, -2147459572, 0}
+ ,
+ {&GUID_Key, 95, -2147459316, 0}
+ ,
+ {&GUID_Key, 96, -2147459060, 0}
+ ,
+ {&GUID_Key, 97, -2147458804, 0}
+ ,
+ {&GUID_Key, 98, -2147458548, 0}
+ ,
+ {&GUID_Key, 99, -2147458292, 0}
+ ,
+ {&GUID_Key, 100, -2147458036, 0}
+ ,
+ {&GUID_Key, 101, -2147457780, 0}
+ ,
+ {&GUID_Key, 102, -2147457524, 0}
+ ,
+ {&GUID_Key, 103, -2147457268, 0}
+ ,
+ {&GUID_Key, 104, -2147457012, 0}
+ ,
+ {&GUID_Key, 105, -2147456756, 0}
+ ,
+ {&GUID_Key, 106, -2147456500, 0}
+ ,
+ {&GUID_Key, 107, -2147456244, 0}
+ ,
+ {&GUID_Key, 108, -2147455988, 0}
+ ,
+ {&GUID_Key, 109, -2147455732, 0}
+ ,
+ {&GUID_Key, 110, -2147455476, 0}
+ ,
+ {&GUID_Key, 111, -2147455220, 0}
+ ,
+ {&GUID_Key, 112, -2147454964, 0}
+ ,
+ {&GUID_Key, 113, -2147454708, 0}
+ ,
+ {&GUID_Key, 114, -2147454452, 0}
+ ,
+ {&GUID_Key, 115, -2147454196, 0}
+ ,
+ {&GUID_Key, 116, -2147453940, 0}
+ ,
+ {&GUID_Key, 117, -2147453684, 0}
+ ,
+ {&GUID_Key, 118, -2147453428, 0}
+ ,
+ {&GUID_Key, 119, -2147453172, 0}
+ ,
+ {&GUID_Key, 120, -2147452916, 0}
+ ,
+ {&GUID_Key, 121, -2147452660, 0}
+ ,
+ {&GUID_Key, 122, -2147452404, 0}
+ ,
+ {&GUID_Key, 123, -2147452148, 0}
+ ,
+ {&GUID_Key, 124, -2147451892, 0}
+ ,
+ {&GUID_Key, 125, -2147451636, 0}
+ ,
+ {&GUID_Key, 126, -2147451380, 0}
+ ,
+ {&GUID_Key, 127, -2147451124, 0}
+ ,
+ {&GUID_Key, 128, -2147450868, 0}
+ ,
+ {&GUID_Key, 129, -2147450612, 0}
+ ,
+ {&GUID_Key, 130, -2147450356, 0}
+ ,
+ {&GUID_Key, 131, -2147450100, 0}
+ ,
+ {&GUID_Key, 132, -2147449844, 0}
+ ,
+ {&GUID_Key, 133, -2147449588, 0}
+ ,
+ {&GUID_Key, 134, -2147449332, 0}
+ ,
+ {&GUID_Key, 135, -2147449076, 0}
+ ,
+ {&GUID_Key, 136, -2147448820, 0}
+ ,
+ {&GUID_Key, 137, -2147448564, 0}
+ ,
+ {&GUID_Key, 138, -2147448308, 0}
+ ,
+ {&GUID_Key, 139, -2147448052, 0}
+ ,
+ {&GUID_Key, 140, -2147447796, 0}
+ ,
+ {&GUID_Key, 141, -2147447540, 0}
+ ,
+ {&GUID_Key, 142, -2147447284, 0}
+ ,
+ {&GUID_Key, 143, -2147447028, 0}
+ ,
+ {&GUID_Key, 144, -2147446772, 0}
+ ,
+ {&GUID_Key, 145, -2147446516, 0}
+ ,
+ {&GUID_Key, 146, -2147446260, 0}
+ ,
+ {&GUID_Key, 147, -2147446004, 0}
+ ,
+ {&GUID_Key, 148, -2147445748, 0}
+ ,
+ {&GUID_Key, 149, -2147445492, 0}
+ ,
+ {&GUID_Key, 150, -2147445236, 0}
+ ,
+ {&GUID_Key, 151, -2147444980, 0}
+ ,
+ {&GUID_Key, 152, -2147444724, 0}
+ ,
+ {&GUID_Key, 153, -2147444468, 0}
+ ,
+ {&GUID_Key, 154, -2147444212, 0}
+ ,
+ {&GUID_Key, 155, -2147443956, 0}
+ ,
+ {&GUID_Key, 156, -2147443700, 0}
+ ,
+ {&GUID_Key, 157, -2147443444, 0}
+ ,
+ {&GUID_Key, 158, -2147443188, 0}
+ ,
+ {&GUID_Key, 159, -2147442932, 0}
+ ,
+ {&GUID_Key, 160, -2147442676, 0}
+ ,
+ {&GUID_Key, 161, -2147442420, 0}
+ ,
+ {&GUID_Key, 162, -2147442164, 0}
+ ,
+ {&GUID_Key, 163, -2147441908, 0}
+ ,
+ {&GUID_Key, 164, -2147441652, 0}
+ ,
+ {&GUID_Key, 165, -2147441396, 0}
+ ,
+ {&GUID_Key, 166, -2147441140, 0}
+ ,
+ {&GUID_Key, 167, -2147440884, 0}
+ ,
+ {&GUID_Key, 168, -2147440628, 0}
+ ,
+ {&GUID_Key, 169, -2147440372, 0}
+ ,
+ {&GUID_Key, 170, -2147440116, 0}
+ ,
+ {&GUID_Key, 171, -2147439860, 0}
+ ,
+ {&GUID_Key, 172, -2147439604, 0}
+ ,
+ {&GUID_Key, 173, -2147439348, 0}
+ ,
+ {&GUID_Key, 174, -2147439092, 0}
+ ,
+ {&GUID_Key, 175, -2147438836, 0}
+ ,
+ {&GUID_Key, 176, -2147438580, 0}
+ ,
+ {&GUID_Key, 177, -2147438324, 0}
+ ,
+ {&GUID_Key, 178, -2147438068, 0}
+ ,
+ {&GUID_Key, 179, -2147437812, 0}
+ ,
+ {&GUID_Key, 180, -2147437556, 0}
+ ,
+ {&GUID_Key, 181, -2147437300, 0}
+ ,
+ {&GUID_Key, 182, -2147437044, 0}
+ ,
+ {&GUID_Key, 183, -2147436788, 0}
+ ,
+ {&GUID_Key, 184, -2147436532, 0}
+ ,
+ {&GUID_Key, 185, -2147436276, 0}
+ ,
+ {&GUID_Key, 186, -2147436020, 0}
+ ,
+ {&GUID_Key, 187, -2147435764, 0}
+ ,
+ {&GUID_Key, 188, -2147435508, 0}
+ ,
+ {&GUID_Key, 189, -2147435252, 0}
+ ,
+ {&GUID_Key, 190, -2147434996, 0}
+ ,
+ {&GUID_Key, 191, -2147434740, 0}
+ ,
+ {&GUID_Key, 192, -2147434484, 0}
+ ,
+ {&GUID_Key, 193, -2147434228, 0}
+ ,
+ {&GUID_Key, 194, -2147433972, 0}
+ ,
+ {&GUID_Key, 195, -2147433716, 0}
+ ,
+ {&GUID_Key, 196, -2147433460, 0}
+ ,
+ {&GUID_Key, 197, -2147433204, 0}
+ ,
+ {&GUID_Key, 198, -2147432948, 0}
+ ,
+ {&GUID_Key, 199, -2147432692, 0}
+ ,
+ {&GUID_Key, 200, -2147432436, 0}
+ ,
+ {&GUID_Key, 201, -2147432180, 0}
+ ,
+ {&GUID_Key, 202, -2147431924, 0}
+ ,
+ {&GUID_Key, 203, -2147431668, 0}
+ ,
+ {&GUID_Key, 204, -2147431412, 0}
+ ,
+ {&GUID_Key, 205, -2147431156, 0}
+ ,
+ {&GUID_Key, 206, -2147430900, 0}
+ ,
+ {&GUID_Key, 207, -2147430644, 0}
+ ,
+ {&GUID_Key, 208, -2147430388, 0}
+ ,
+ {&GUID_Key, 209, -2147430132, 0}
+ ,
+ {&GUID_Key, 210, -2147429876, 0}
+ ,
+ {&GUID_Key, 211, -2147429620, 0}
+ ,
+ {&GUID_Key, 212, -2147429364, 0}
+ ,
+ {&GUID_Key, 213, -2147429108, 0}
+ ,
+ {&GUID_Key, 214, -2147428852, 0}
+ ,
+ {&GUID_Key, 215, -2147428596, 0}
+ ,
+ {&GUID_Key, 216, -2147428340, 0}
+ ,
+ {&GUID_Key, 217, -2147428084, 0}
+ ,
+ {&GUID_Key, 218, -2147427828, 0}
+ ,
+ {&GUID_Key, 219, -2147427572, 0}
+ ,
+ {&GUID_Key, 220, -2147427316, 0}
+ ,
+ {&GUID_Key, 221, -2147427060, 0}
+ ,
+ {&GUID_Key, 222, -2147426804, 0}
+ ,
+ {&GUID_Key, 223, -2147426548, 0}
+ ,
+ {&GUID_Key, 224, -2147426292, 0}
+ ,
+ {&GUID_Key, 225, -2147426036, 0}
+ ,
+ {&GUID_Key, 226, -2147425780, 0}
+ ,
+ {&GUID_Key, 227, -2147425524, 0}
+ ,
+ {&GUID_Key, 228, -2147425268, 0}
+ ,
+ {&GUID_Key, 229, -2147425012, 0}
+ ,
+ {&GUID_Key, 230, -2147424756, 0}
+ ,
+ {&GUID_Key, 231, -2147424500, 0}
+ ,
+ {&GUID_Key, 232, -2147424244, 0}
+ ,
+ {&GUID_Key, 233, -2147423988, 0}
+ ,
+ {&GUID_Key, 234, -2147423732, 0}
+ ,
+ {&GUID_Key, 235, -2147423476, 0}
+ ,
+ {&GUID_Key, 236, -2147423220, 0}
+ ,
+ {&GUID_Key, 237, -2147422964, 0}
+ ,
+ {&GUID_Key, 238, -2147422708, 0}
+ ,
+ {&GUID_Key, 239, -2147422452, 0}
+ ,
+ {&GUID_Key, 240, -2147422196, 0}
+ ,
+ {&GUID_Key, 241, -2147421940, 0}
+ ,
+ {&GUID_Key, 242, -2147421684, 0}
+ ,
+ {&GUID_Key, 243, -2147421428, 0}
+ ,
+ {&GUID_Key, 244, -2147421172, 0}
+ ,
+ {&GUID_Key, 245, -2147420916, 0}
+ ,
+ {&GUID_Key, 246, -2147420660, 0}
+ ,
+ {&GUID_Key, 247, -2147420404, 0}
+ ,
+ {&GUID_Key, 248, -2147420148, 0}
+ ,
+ {&GUID_Key, 249, -2147419892, 0}
+ ,
+ {&GUID_Key, 250, -2147419636, 0}
+ ,
+ {&GUID_Key, 251, -2147419380, 0}
+ ,
+ {&GUID_Key, 252, -2147419124, 0}
+ ,
+ {&GUID_Key, 253, -2147418868, 0}
+ ,
+ {&GUID_Key, 254, -2147418612, 0}
+ ,
+ {&GUID_Key, 255, -2147418356, 0}
+};
+
+const DIDATAFORMAT c_dfDIKeyboard = { 24,
+ 16,
+ 2,
+ 256,
+ 256,
+ rgodf_c_dfDIKeyboard
+};
+
+DIOBJECTDATAFORMAT rgodf_c_dfDIMouse[] = {
+ {&GUID_XAxis, 0, 16776963, 0}
+ ,
+ {&GUID_YAxis, 4, 16776963, 0}
+ ,
+ {&GUID_ZAxis, 8, -2130706685, 0}
+ ,
+ {0, 12, 16776972, 0}
+ ,
+ {0, 13, 16776972, 0}
+ ,
+ {0, 14, -2130706676, 0}
+ ,
+ {0, 15, -2130706676, 0}
+};
+
+const DIDATAFORMAT c_dfDIMouse = { 24,
+ 16,
+ 2,
+ 16,
+ 7,
+ rgodf_c_dfDIMouse
+};
+
+DIOBJECTDATAFORMAT rgodf_c_dfDIJoystick[] = {
+ {&GUID_XAxis, 0, -2130706685, 256}
+ ,
+ {&GUID_YAxis, 4, -2130706685, 256}
+ ,
+ {&GUID_ZAxis, 8, -2130706685, 256}
+ ,
+ {&GUID_RxAxis, 12, -2130706685, 256}
+ ,
+ {&GUID_RyAxis, 16, -2130706685, 256}
+ ,
+ {&GUID_RzAxis, 20, -2130706685, 256}
+ ,
+ {&GUID_Slider, 24, -2130706685, 256}
+ ,
+ {&GUID_Slider, 28, -2130706685, 256}
+ ,
+ {&GUID_POV, 32, -2130706672, 0}
+ ,
+ {&GUID_POV, 36, -2130706672, 0}
+ ,
+ {&GUID_POV, 40, -2130706672, 0}
+ ,
+ {&GUID_POV, 44, -2130706672, 0}
+ ,
+ {0, 48, -2130706676, 0}
+ ,
+ {0, 49, -2130706676, 0}
+ ,
+ {0, 50, -2130706676, 0}
+ ,
+ {0, 51, -2130706676, 0}
+ ,
+ {0, 52, -2130706676, 0}
+ ,
+ {0, 53, -2130706676, 0}
+ ,
+ {0, 54, -2130706676, 0}
+ ,
+ {0, 55, -2130706676, 0}
+ ,
+ {0, 56, -2130706676, 0}
+ ,
+ {0, 57, -2130706676, 0}
+ ,
+ {0, 58, -2130706676, 0}
+ ,
+ {0, 59, -2130706676, 0}
+ ,
+ {0, 60, -2130706676, 0}
+ ,
+ {0, 61, -2130706676, 0}
+ ,
+ {0, 62, -2130706676, 0}
+ ,
+ {0, 63, -2130706676, 0}
+ ,
+ {0, 64, -2130706676, 0}
+ ,
+ {0, 65, -2130706676, 0}
+ ,
+ {0, 66, -2130706676, 0}
+ ,
+ {0, 67, -2130706676, 0}
+ ,
+ {0, 68, -2130706676, 0}
+ ,
+ {0, 69, -2130706676, 0}
+ ,
+ {0, 70, -2130706676, 0}
+ ,
+ {0, 71, -2130706676, 0}
+ ,
+ {0, 72, -2130706676, 0}
+ ,
+ {0, 73, -2130706676, 0}
+ ,
+ {0, 74, -2130706676, 0}
+ ,
+ {0, 75, -2130706676, 0}
+ ,
+ {0, 76, -2130706676, 0}
+ ,
+ {0, 77, -2130706676, 0}
+ ,
+ {0, 78, -2130706676, 0}
+ ,
+ {0, 79, -2130706676, 0}
+};
+
+const DIDATAFORMAT c_dfDIJoystick = { 24,
+ 16,
+ 1,
+ 80,
+ 44,
+ rgodf_c_dfDIJoystick
+};
+
+DIOBJECTDATAFORMAT rgodf_c_dfDIJoystick2[] = {
+ {&GUID_XAxis, 0, -2130706685, 256}
+ ,
+ {&GUID_YAxis, 4, -2130706685, 256}
+ ,
+ {&GUID_ZAxis, 8, -2130706685, 256}
+ ,
+ {&GUID_RxAxis, 12, -2130706685, 256}
+ ,
+ {&GUID_RyAxis, 16, -2130706685, 256}
+ ,
+ {&GUID_RzAxis, 20, -2130706685, 256}
+ ,
+ {&GUID_Slider, 24, -2130706685, 256}
+ ,
+ {&GUID_Slider, 28, -2130706685, 256}
+ ,
+ {&GUID_POV, 32, -2130706672, 0}
+ ,
+ {&GUID_POV, 36, -2130706672, 0}
+ ,
+ {&GUID_POV, 40, -2130706672, 0}
+ ,
+ {&GUID_POV, 44, -2130706672, 0}
+ ,
+ {0, 48, -2130706676, 0}
+ ,
+ {0, 49, -2130706676, 0}
+ ,
+ {0, 50, -2130706676, 0}
+ ,
+ {0, 51, -2130706676, 0}
+ ,
+ {0, 52, -2130706676, 0}
+ ,
+ {0, 53, -2130706676, 0}
+ ,
+ {0, 54, -2130706676, 0}
+ ,
+ {0, 55, -2130706676, 0}
+ ,
+ {0, 56, -2130706676, 0}
+ ,
+ {0, 57, -2130706676, 0}
+ ,
+ {0, 58, -2130706676, 0}
+ ,
+ {0, 59, -2130706676, 0}
+ ,
+ {0, 60, -2130706676, 0}
+ ,
+ {0, 61, -2130706676, 0}
+ ,
+ {0, 62, -2130706676, 0}
+ ,
+ {0, 63, -2130706676, 0}
+ ,
+ {0, 64, -2130706676, 0}
+ ,
+ {0, 65, -2130706676, 0}
+ ,
+ {0, 66, -2130706676, 0}
+ ,
+ {0, 67, -2130706676, 0}
+ ,
+ {0, 68, -2130706676, 0}
+ ,
+ {0, 69, -2130706676, 0}
+ ,
+ {0, 70, -2130706676, 0}
+ ,
+ {0, 71, -2130706676, 0}
+ ,
+ {0, 72, -2130706676, 0}
+ ,
+ {0, 73, -2130706676, 0}
+ ,
+ {0, 74, -2130706676, 0}
+ ,
+ {0, 75, -2130706676, 0}
+ ,
+ {0, 76, -2130706676, 0}
+ ,
+ {0, 77, -2130706676, 0}
+ ,
+ {0, 78, -2130706676, 0}
+ ,
+ {0, 79, -2130706676, 0}
+ ,
+ {0, 80, -2130706676, 0}
+ ,
+ {0, 81, -2130706676, 0}
+ ,
+ {0, 82, -2130706676, 0}
+ ,
+ {0, 83, -2130706676, 0}
+ ,
+ {0, 84, -2130706676, 0}
+ ,
+ {0, 85, -2130706676, 0}
+ ,
+ {0, 86, -2130706676, 0}
+ ,
+ {0, 87, -2130706676, 0}
+ ,
+ {0, 88, -2130706676, 0}
+ ,
+ {0, 89, -2130706676, 0}
+ ,
+ {0, 90, -2130706676, 0}
+ ,
+ {0, 91, -2130706676, 0}
+ ,
+ {0, 92, -2130706676, 0}
+ ,
+ {0, 93, -2130706676, 0}
+ ,
+ {0, 94, -2130706676, 0}
+ ,
+ {0, 95, -2130706676, 0}
+ ,
+ {0, 96, -2130706676, 0}
+ ,
+ {0, 97, -2130706676, 0}
+ ,
+ {0, 98, -2130706676, 0}
+ ,
+ {0, 99, -2130706676, 0}
+ ,
+ {0, 100, -2130706676, 0}
+ ,
+ {0, 101, -2130706676, 0}
+ ,
+ {0, 102, -2130706676, 0}
+ ,
+ {0, 103, -2130706676, 0}
+ ,
+ {0, 104, -2130706676, 0}
+ ,
+ {0, 105, -2130706676, 0}
+ ,
+ {0, 106, -2130706676, 0}
+ ,
+ {0, 107, -2130706676, 0}
+ ,
+ {0, 108, -2130706676, 0}
+ ,
+ {0, 109, -2130706676, 0}
+ ,
+ {0, 110, -2130706676, 0}
+ ,
+ {0, 111, -2130706676, 0}
+ ,
+ {0, 112, -2130706676, 0}
+ ,
+ {0, 113, -2130706676, 0}
+ ,
+ {0, 114, -2130706676, 0}
+ ,
+ {0, 115, -2130706676, 0}
+ ,
+ {0, 116, -2130706676, 0}
+ ,
+ {0, 117, -2130706676, 0}
+ ,
+ {0, 118, -2130706676, 0}
+ ,
+ {0, 119, -2130706676, 0}
+ ,
+ {0, 120, -2130706676, 0}
+ ,
+ {0, 121, -2130706676, 0}
+ ,
+ {0, 122, -2130706676, 0}
+ ,
+ {0, 123, -2130706676, 0}
+ ,
+ {0, 124, -2130706676, 0}
+ ,
+ {0, 125, -2130706676, 0}
+ ,
+ {0, 126, -2130706676, 0}
+ ,
+ {0, 127, -2130706676, 0}
+ ,
+ {0, 128, -2130706676, 0}
+ ,
+ {0, 129, -2130706676, 0}
+ ,
+ {0, 130, -2130706676, 0}
+ ,
+ {0, 131, -2130706676, 0}
+ ,
+ {0, 132, -2130706676, 0}
+ ,
+ {0, 133, -2130706676, 0}
+ ,
+ {0, 134, -2130706676, 0}
+ ,
+ {0, 135, -2130706676, 0}
+ ,
+ {0, 136, -2130706676, 0}
+ ,
+ {0, 137, -2130706676, 0}
+ ,
+ {0, 138, -2130706676, 0}
+ ,
+ {0, 139, -2130706676, 0}
+ ,
+ {0, 140, -2130706676, 0}
+ ,
+ {0, 141, -2130706676, 0}
+ ,
+ {0, 142, -2130706676, 0}
+ ,
+ {0, 143, -2130706676, 0}
+ ,
+ {0, 144, -2130706676, 0}
+ ,
+ {0, 145, -2130706676, 0}
+ ,
+ {0, 146, -2130706676, 0}
+ ,
+ {0, 147, -2130706676, 0}
+ ,
+ {0, 148, -2130706676, 0}
+ ,
+ {0, 149, -2130706676, 0}
+ ,
+ {0, 150, -2130706676, 0}
+ ,
+ {0, 151, -2130706676, 0}
+ ,
+ {0, 152, -2130706676, 0}
+ ,
+ {0, 153, -2130706676, 0}
+ ,
+ {0, 154, -2130706676, 0}
+ ,
+ {0, 155, -2130706676, 0}
+ ,
+ {0, 156, -2130706676, 0}
+ ,
+ {0, 157, -2130706676, 0}
+ ,
+ {0, 158, -2130706676, 0}
+ ,
+ {0, 159, -2130706676, 0}
+ ,
+ {0, 160, -2130706676, 0}
+ ,
+ {0, 161, -2130706676, 0}
+ ,
+ {0, 162, -2130706676, 0}
+ ,
+ {0, 163, -2130706676, 0}
+ ,
+ {0, 164, -2130706676, 0}
+ ,
+ {0, 165, -2130706676, 0}
+ ,
+ {0, 166, -2130706676, 0}
+ ,
+ {0, 167, -2130706676, 0}
+ ,
+ {0, 168, -2130706676, 0}
+ ,
+ {0, 169, -2130706676, 0}
+ ,
+ {0, 170, -2130706676, 0}
+ ,
+ {0, 171, -2130706676, 0}
+ ,
+ {0, 172, -2130706676, 0}
+ ,
+ {0, 173, -2130706676, 0}
+ ,
+ {0, 174, -2130706676, 0}
+ ,
+ {0, 175, -2130706676, 0}
+ ,
+ {&GUID_XAxis, 176, -2130706685, 512}
+ ,
+ {&GUID_YAxis, 180, -2130706685, 512}
+ ,
+ {&GUID_ZAxis, 184, -2130706685, 512}
+ ,
+ {&GUID_RxAxis, 188, -2130706685, 512}
+ ,
+ {&GUID_RyAxis, 192, -2130706685, 512}
+ ,
+ {&GUID_RzAxis, 196, -2130706685, 512}
+ ,
+ {&GUID_Slider, 24, -2130706685, 512}
+ ,
+ {&GUID_Slider, 28, -2130706685, 512}
+ ,
+ {&GUID_XAxis, 208, -2130706685, 768}
+ ,
+ {&GUID_YAxis, 212, -2130706685, 768}
+ ,
+ {&GUID_ZAxis, 216, -2130706685, 768}
+ ,
+ {&GUID_RxAxis, 220, -2130706685, 768}
+ ,
+ {&GUID_RyAxis, 224, -2130706685, 768}
+ ,
+ {&GUID_RzAxis, 228, -2130706685, 768}
+ ,
+ {&GUID_Slider, 24, -2130706685, 768}
+ ,
+ {&GUID_Slider, 28, -2130706685, 768}
+ ,
+ {&GUID_XAxis, 240, -2130706685, 1024}
+ ,
+ {&GUID_YAxis, 244, -2130706685, 1024}
+ ,
+ {&GUID_ZAxis, 248, -2130706685, 1024}
+ ,
+ {&GUID_RxAxis, 252, -2130706685, 1024}
+ ,
+ {&GUID_RyAxis, 256, -2130706685, 1024}
+ ,
+ {&GUID_RzAxis, 260, -2130706685, 1024}
+ ,
+ {&GUID_Slider, 24, -2130706685, 1024}
+ ,
+ {&GUID_Slider, 28, -2130706685, 1024}
+};
+
+const DIDATAFORMAT c_dfDIJoystick2 = { 24,
+ 16,
+ 1,
+ 272,
+ 164,
+ rgodf_c_dfDIJoystick2
+};
+
+
+/* DirectSound */
+
+// Direct Sound Component GUID {47D4D946-62E8-11cf-93BC-444553540000}
+DEFINE_GUID(CLSID_DirectSound, 0x47d4d946, 0x62e8, 0x11cf, 0x93, 0xbc,
+ 0x44, 0x45, 0x53, 0x54, 0x0, 0x0);
+
+// DirectSound Capture Component GUID {B0210780-89CD-11d0-AF08-00A0C925CD16}
+DEFINE_GUID(CLSID_DirectSoundCapture, 0xb0210780, 0x89cd, 0x11d0, 0xaf,
+ 0x8, 0x0, 0xa0, 0xc9, 0x25, 0xcd, 0x16);
+#endif
diff --git a/src/ui/ui-drv/win32/installer/XaoS Installer.nsi b/src/ui/ui-drv/win32/installer/XaoS Installer.nsi
new file mode 100644
index 0000000..cfd49ba
--- /dev/null
+++ b/src/ui/ui-drv/win32/installer/XaoS Installer.nsi
@@ -0,0 +1,138 @@
+;--------------------------------
+;Include Modern UI
+
+ !include "MUI2.nsh"
+
+;--------------------------------
+;General
+
+ ;Name and file
+ Name "XaoS"
+ OutFile "XaoS Installer.exe"
+
+ ;Default installation folder
+ InstallDir "$PROGRAMFILES\XaoS"
+
+ ;Get installation folder from registry if available
+ InstallDirRegKey HKLM "Software\XaoS" ""
+
+ ;Request application privileges for Windows Vista
+ RequestExecutionLevel admin
+
+;--------------------------------
+;Variables
+
+ Var StartMenuFolder
+
+;--------------------------------
+;Interface Settings
+
+ !define MUI_HEADERIMAGE
+ !define MUI_HEADERIMAGE_BITMAP "XaoS.bmp"
+ !define MUI_ABORTWARNING
+
+;--------------------------------
+;Language Selection Dialog Settings
+
+ ;Remember the installer language
+ !define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
+ !define MUI_LANGDLL_REGISTRY_KEY "Software\XaoS"
+ !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
+
+;--------------------------------
+;Pages
+
+ !insertmacro MUI_PAGE_WELCOME
+ !insertmacro MUI_PAGE_LICENSE "..\..\..\..\..\copying"
+ !insertmacro MUI_PAGE_DIRECTORY
+
+ ;Start Menu Folder Page Configuration
+ !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM"
+ !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\XaoS"
+ !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Start Menu Folder"
+
+ !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
+
+ !insertmacro MUI_PAGE_INSTFILES
+ !insertmacro MUI_PAGE_FINISH
+
+ !insertmacro MUI_UNPAGE_WELCOME
+ !insertmacro MUI_UNPAGE_CONFIRM
+ !insertmacro MUI_UNPAGE_INSTFILES
+ !insertmacro MUI_UNPAGE_FINISH
+
+;--------------------------------
+;Languages
+
+ !insertmacro MUI_LANGUAGE "English"
+ !insertmacro MUI_LANGUAGE "French"
+ !insertmacro MUI_LANGUAGE "German"
+ !insertmacro MUI_LANGUAGE "Spanish"
+ !insertmacro MUI_LANGUAGE "Italian"
+ !insertmacro MUI_LANGUAGE "Czech"
+ !insertmacro MUI_LANGUAGE "Hungarian"
+ !insertmacro MUI_LANGUAGE "Romanian"
+
+;--------------------------------
+;Reserve Files
+
+ ;If you are using solid compression, files that are required before
+ ;the actual installation should be stored first in the data block,
+ ;because this will make your installer start faster.
+
+ !insertmacro MUI_RESERVEFILE_LANGDLL
+
+;--------------------------------
+;Installer Sections
+
+Section "XaoS" XaoS
+
+ SetOutPath "$INSTDIR"
+
+ File /r "XaoS\*"
+
+ ;Store installation folder
+ WriteRegStr HKLM "Software\XaoS" "" $INSTDIR
+
+ ;Create uninstaller
+ WriteUninstaller "$INSTDIR\Uninstall.exe"
+
+ !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+
+ ;Create shortcuts
+ CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk" "$INSTDIR\Uninstall.exe"
+
+ SetOutPath "$INSTDIR\bin"
+
+ CreateShortCut "$SMPROGRAMS\$StartMenuFolder\XaoS.lnk" "$INSTDIR\bin\xaos.exe"
+
+ !insertmacro MUI_STARTMENU_WRITE_END
+
+SectionEnd
+
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall"
+
+ RMDir /r /REBOOTOK "$INSTDIR"
+
+ !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
+
+ Delete "$SMPROGRAMS\$StartMenuFolder\XaoS.lnk"
+ Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall.lnk"
+ RMDir "$SMPROGRAMS\$StartMenuFolder"
+
+ DeleteRegKey /ifempty HKLM "Software\XaoS"
+
+SectionEnd
+
+;--------------------------------
+;Uninstaller Functions
+
+Function un.onInit
+
+ !insertmacro MUI_UNGETLANGUAGE
+
+FunctionEnd \ No newline at end of file
diff --git a/src/ui/ui-drv/win32/installer/XaoS.bmp b/src/ui/ui-drv/win32/installer/XaoS.bmp
new file mode 100644
index 0000000..47b4b82
--- /dev/null
+++ b/src/ui/ui-drv/win32/installer/XaoS.bmp
Binary files differ
diff --git a/src/ui/ui-drv/win32/resource.h b/src/ui/ui-drv/win32/resource.h
new file mode 100644
index 0000000..596a030
--- /dev/null
+++ b/src/ui/ui-drv/win32/resource.h
@@ -0,0 +1,3 @@
+/*#define IDI_XAOS_ICON 128
+ #define IDI_SMALL_ICON 129 */
+/*#define IDOK 0 */
diff --git a/src/ui/ui-drv/win32/small.ico b/src/ui/ui-drv/win32/small.ico
new file mode 100644
index 0000000..8481328
--- /dev/null
+++ b/src/ui/ui-drv/win32/small.ico
Binary files differ
diff --git a/src/ui/ui-drv/win32/ui_win32.c b/src/ui/ui-drv/win32/ui_win32.c
new file mode 100644
index 0000000..fff810c
--- /dev/null
+++ b/src/ui/ui-drv/win32/ui_win32.c
@@ -0,0 +1,1886 @@
+/* This file actually implements three drivers (win32 and DirectX
+ windowed/fullscreen) drivers, because they have a lot of common stuff. */
+#include <config.h>
+#ifdef WIN32_DRIVER
+#define _WIN32_WINNT 0x0501 /* Enable access to Windows XP APIs */
+#include <windows.h>
+#ifdef HTML_HELP
+#include <htmlhelp.h>
+#endif
+#ifdef DDRAW_DRIVER
+#include <ddraw.h>
+#endif
+#include <malloc.h>
+#include <string.h>
+#include <stdio.h>
+#include <xmenu.h>
+#include <xerror.h>
+#include "ui.h"
+#include "ui_win32.h"
+#include "resource.h"
+#include "xio.h"
+#include <cursor.h>
+
+#define MAXRESOLUTIONS 256
+#define DXWIDTH 320
+#define DXHEIGHT 200
+#define DXBPP 8
+#define WWIDTH (480+4*48)
+#define WHEIGHT (360+4*36)
+
+#define DXFULLSCREEN 1
+#define DXWINDOWED 2
+
+#define MOUSEWIDTH 16
+#define MOUSEHEIGHT 16
+
+#ifdef HAVE_GETTEXT
+
+#include <libintl.h>
+
+#include <locale.h>
+
+#else
+
+#define gettext(STRING) STRING
+
+#endif
+
+
+
+HINSTANCE hInstance;
+HWND hWnd;
+CONST char *helptopic = "main";
+
+struct ui_driver win32_driver;
+struct ui_driver dxw_driver, dxf_driver;
+
+static int initialized = 0, needredraw = 0;
+
+static char *helpname = NULL;
+
+/* This variables are used by drivers in initializetion */
+static int windowpos;
+static CONST char *size = "520x430";
+static CONST char *dxsize = "320x200x8";
+
+
+/* Display information */
+static int displayX, displayY, bitDepth;
+static int lineSize;
+static int fontWidth, fontHeight;
+static HPALETTE hPalette = NULL;
+static char *buffer1;
+static char *buffer2;
+static int currentbuff = 0;
+static BITMAPINFO *bmp = NULL;
+
+/* Mouse */
+static int mouseX, mouseY, mouseButtons = 0;
+static int captured = 0, tmpcaptured = 0;
+
+/* Keyboard state */
+static int altPressed;
+static int arrowsPressed;
+
+/* WindowProc comunication variables */
+static BOOL closeFlag;
+static int resized = 0;
+static int active = 1;
+
+/* Curent class information */
+static HICON hIcon;
+static HICON hIconSm;
+static HFONT hFont = NULL;
+
+/* DirectX stuff */
+#ifdef DDRAW_DRIVER
+int directX = 0;
+static LPDIRECTDRAWPALETTE dxPalette = NULL;
+static LPDIRECTDRAW lpDD = NULL;
+static LPDIRECTDRAW2 lpDD2 = NULL;
+static LPDIRECTDRAWSURFACE lpSurfaces[2], BackSurface[2];
+static DDSURFACEDESC surface[2];
+static CONST char *mousepointer = mouse_pointer_data;
+static char *storeddata = NULL;
+static HMODULE hModule = NULL;
+static int oldmouseX, oldmouseY;
+#else
+#define directX 0
+#endif
+static PUCHAR backpalette[256][4];
+static HMODULE hModule2;
+static RECT rcWindow;
+static RECT rcViewport;
+static RECT rcScreen;
+static int MyHelpMsg;
+/*clipboard*/
+static WORD clipboard_format;
+
+/* forward declarations */
+#ifdef DDRAW_DRIVER
+static void DeInitDD(void);
+static void PaintDD(void);
+static void UpdateMouseDD(void);
+#endif
+static void Paint(HDC hDC);
+static void CalculateBITMAPINFO(void);
+static void win32_display(void);
+static void DeInitWindow(void);
+
+#ifdef DDRAW_DRIVER
+ /* FIXME: In windowed mode we don't support 8bpp yet! */
+#define DXSUPPORTEDDEPTH(fullscreen,depth) \
+ (!(depth < 8 || (!fullscreen && depth != 16 && depth !=24 && depth != 32)))
+
+static char *store(char *data, int depth, int lpitch, int width,
+ int height, int xpos, int ypos)
+{
+ int d = depth / 8;
+ char *store = malloc(d * MOUSEWIDTH * MOUSEHEIGHT);
+ int y;
+ if (xpos + MOUSEWIDTH > width)
+ xpos = width - MOUSEWIDTH;
+ if (ypos + MOUSEHEIGHT > height)
+ ypos = height - MOUSEHEIGHT;
+ if (xpos < 0)
+ xpos = 0;
+ if (ypos < 0)
+ ypos = 0;
+ for (y = 0; y < MOUSEHEIGHT; y++)
+ memcpy(store + d * MOUSEWIDTH * y,
+ data + xpos * d + (ypos + y) * lpitch, MOUSEWIDTH * d);
+ return store;
+}
+
+static void
+restore(char *data, CONST char *store, int depth, int lpitch, int width,
+ int height, int xpos, int ypos)
+{
+ int y;
+ int d = depth / 8;
+ if (xpos + MOUSEWIDTH > width)
+ xpos = width - MOUSEWIDTH;
+ if (ypos + MOUSEHEIGHT > height)
+ ypos = height - MOUSEHEIGHT;
+ if (xpos < 0)
+ xpos = 0;
+ if (ypos < 0)
+ ypos = 0;
+ for (y = 0; y < MOUSEHEIGHT; y++)
+ memcpy(data + xpos * d + (ypos + y) * lpitch,
+ store + d * MOUSEWIDTH * y, MOUSEWIDTH * d);
+}
+
+static void
+drawmouse(char *data, CONST char *mouse, int depth, int lpitch, int width,
+ int height, int xpos, int ypos)
+{
+ int x, y, z, c;
+ int d = depth / 8;
+ for (y = 0; y < MOUSEWIDTH; y++)
+ for (x = 0; x < MOUSEWIDTH; x++)
+ if (mouse[x + MOUSEWIDTH * y] && x + xpos > 0
+ && (x + xpos) < width && y + ypos > 0
+ && y + ypos < height) {
+ c = mouse[x + MOUSEWIDTH * y] == 2 ? (d ==
+ 1 ? 1 : 255) : 0;
+ for (z = 0; z < d; z++)
+ data[z + d * (x + xpos) + (y + ypos) * lpitch] = c;
+ }
+}
+#endif
+static void getdimens(float *width, float *height)
+{
+ HDC hDC = GetDC(hWnd);
+ *width = GetDeviceCaps(hDC, HORZSIZE) / 10.0;
+ *height = GetDeviceCaps(hDC, VERTSIZE) / 10.0;
+ if (*width > 100 || *width < 1)
+ *width = 29.0;
+ if (*height > 100 || *height < 1)
+ *height = 21.0;
+ ReleaseDC(hWnd, hDC);
+}
+
+static void getres(float *width, float *height)
+{
+ HDC hDC = GetDC(hWnd);
+ *width = 2.54 / GetDeviceCaps(hDC, LOGPIXELSX);
+ *height = 2.54 / GetDeviceCaps(hDC, LOGPIXELSY);
+ ReleaseDC(hWnd, hDC);
+}
+
+/******************************************************************************
+ Win32 driver helper routines
+ */
+
+static LRESULT CALLBACK WindowProc(HWND hWnd, // handle to window
+ UINT uMsg, // message identifier
+ WPARAM wParam, // first message parameter
+ LPARAM lParam // second message parameter
+ )
+{
+ PAINTSTRUCT paintStruct;
+ HDC hDC;
+ if (uMsg == (unsigned int) MyHelpMsg) {
+ win32_help(NULL, helptopic);
+ return 0;
+ }
+ switch (uMsg) {
+ case WM_COMMAND:
+ win32_pressed(wParam);
+ break;
+ case WM_SIZE:
+ // resize window
+ if (directX == DXFULLSCREEN)
+ return 0;
+ if (LOWORD(lParam) == 0 && HIWORD(lParam) == 0) {
+ active = 0;
+ break;
+ } /*Minimized window */
+ active = 1;
+ if (displayX != LOWORD(lParam) || displayY != HIWORD(lParam))
+ resized = 1;
+ displayX = LOWORD(lParam);
+ displayY = HIWORD(lParam);
+ break;
+ case WM_DISPLAYCHANGE:
+ if (directX == DXFULLSCREEN)
+ return 0;
+ mouseButtons = 0;
+ resized = 1;
+ hDC = GetDC(hWnd);
+ bitDepth = GetDeviceCaps(hDC, BITSPIXEL);
+ ReleaseDC(hWnd, hDC);
+ break;
+ case WM_CLOSE:
+ // close window
+ closeFlag = TRUE;
+ return 0;
+ case WM_MOUSEMOVE:
+ case WM_LBUTTONUP:
+ case WM_LBUTTONDOWN:
+ case WM_RBUTTONUP:
+ case WM_RBUTTONDOWN:
+ case WM_MBUTTONUP:
+ case WM_MBUTTONDOWN:
+ // handle mouse move and mouse buttons
+ mouseButtons = wParam;
+ if (!captured) {
+ if (mouseButtons && !tmpcaptured)
+ SetCapture(hWnd), tmpcaptured = 1;
+ if (!mouseButtons && tmpcaptured)
+ ReleaseCapture(), tmpcaptured = 0;
+ }
+ mouseX = (short) LOWORD(lParam);
+ mouseY = (short) HIWORD(lParam);
+#ifdef DDRAW_DRIVER
+ if (directX == DXFULLSCREEN) {
+ POINT p;
+ GetCursorPos(&p);
+ mouseX = p.x;
+ mouseY = p.y;
+ UpdateMouseDD();
+ }
+#endif
+ break;
+ case WM_PAINT:
+ // redraw screen
+ if (directX == DXFULLSCREEN)
+ return 0;
+ needredraw = 1;
+ if (GetUpdateRect(hWnd, NULL, FALSE)) {
+ HDC hDC = BeginPaint(hWnd, &paintStruct);
+ if (hDC) {
+#ifdef DDRAW_DRIVER
+ if (directX)
+ PaintDD();
+ else
+#endif
+ Paint(hDC);
+ EndPaint(hWnd, &paintStruct);
+ }
+ }
+ return 0;
+ case WM_QUERYNEWPALETTE:
+ // windows calls this when window is reactivated.
+ if (directX == DXFULLSCREEN)
+ return 0;
+ hDC = GetDC(hWnd);
+#ifdef DDRAW_DRIVER
+ if (directX == DXWINDOWED) {
+ if (dxPalette) {
+ IDirectDrawSurface_SetPalette(lpSurfaces[0], dxPalette);
+ IDirectDrawPalette_SetEntries(dxPalette, 0, 0, 255,
+ (PALETTEENTRY *)
+ backpalette);
+ }
+ } else
+#endif
+ {
+ SelectPalette(hDC, hPalette, FALSE);
+ RealizePalette(hDC);
+ }
+ ReleaseDC(hWnd, hDC);
+ return TRUE;
+ case WM_MOVE:
+ if (directX != DXFULLSCREEN) {
+ GetWindowRect(hWnd, &rcWindow);
+ GetClientRect(hWnd, &rcViewport);
+ GetClientRect(hWnd, &rcScreen);
+ ClientToScreen(hWnd, (POINT *) & rcScreen.left);
+ ClientToScreen(hWnd, (POINT *) & rcScreen.right);
+ }
+ break;
+ case WM_SETCURSOR:
+ if (directX == DXFULLSCREEN) {
+ SetCursor(NULL);
+ return TRUE;
+ }
+ break;
+#ifdef DDRAW_DRIVER
+ case WM_ACTIVATEAPP:
+ {
+ int oldactive = active;
+ mouseButtons = 0;
+ if (directX == DXFULLSCREEN) {
+ needredraw = 1;
+ active = (wParam == WA_ACTIVE)
+ || (wParam == WA_CLICKACTIVE) /*(BOOL) wParam */ ;
+ PaintDD();
+ if (!oldactive && active && captured)
+ SetCursor(NULL), SetCapture(hWnd);
+ if (oldactive && !active && captured)
+ ReleaseCapture();
+ return 0L;
+ }
+ }
+#endif
+ break;
+ }
+ return DefWindowProc(hWnd, uMsg, wParam, lParam);
+}
+
+/*Create Xaos Window. It is either used for normal window mode or
+ as basis for DirectX */
+static int InitWindow(void)
+{
+ int width = CW_USEDEFAULT, height = CW_USEDEFAULT;
+ int xpos = CW_USEDEFAULT, ypos = CW_USEDEFAULT;
+ LOGPALETTE *logPalette;
+ WNDCLASS wndClass;
+ LOGFONT logFont;
+ ATOM a;
+ HDC hDC;
+ TEXTMETRIC textMetric;
+ HGLOBAL oldFont;
+ RECT r;
+ closeFlag = FALSE;
+
+ altPressed = arrowsPressed = 0;
+ if (hIcon == NULL)
+ hIcon = LoadIcon(hInstance, "BIG");
+ mouseButtons = 0;
+ mouseX = 0;
+ mouseY = 0;
+ {
+ static FARPROC proc;
+ if (hModule2 == NULL) {
+ hModule2 = LoadLibrary("user32");
+ proc = GetProcAddress(hModule2, "RegisterClassExA");
+ }
+ if (proc != NULL) {
+ WNDCLASSEX ExWndClass;
+ memset(&ExWndClass, 0, sizeof(WNDCLASSEX));
+ if (hIconSm == NULL)
+ hIconSm = LoadIcon(hInstance, "SMALL");
+ ExWndClass.hIconSm = hIconSm;
+ memset(&ExWndClass, 0, sizeof(WNDCLASSEX));
+ ExWndClass.style = CS_OWNDC;
+ ExWndClass.cbSize = sizeof(WNDCLASSEX);
+ ExWndClass.lpfnWndProc = WindowProc;
+ ExWndClass.hInstance = hInstance;
+ ExWndClass.hIcon = hIcon;
+ ExWndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
+ ExWndClass.lpszClassName = "XaosWindow";
+ ExWndClass.hbrBackground =
+ (HBRUSH) GetStockObject(BLACK_BRUSH);
+ a = (ATOM) proc(&ExWndClass);
+ } else {
+ memset(&wndClass, 0, sizeof(WNDCLASS));
+ wndClass.style = CS_OWNDC;
+ wndClass.lpfnWndProc = WindowProc;
+ wndClass.hInstance = hInstance;
+ wndClass.hIcon = hIcon;
+ wndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
+ wndClass.lpszClassName = "XaosWindow";
+ wndClass.hbrBackground = (HBRUSH) GetStockObject(BLACK_BRUSH);
+ a = RegisterClass(&wndClass);
+ }
+ }
+ if (!a) {
+ x_error("Unable to create windows class");
+ return 0;
+ }
+
+ /* First time use defaut size, otherwise use saved sizes */
+ if (sscanf(size, "%ix%ix", &width, &height) != 2) {
+ width = WWIDTH;
+ height = WHEIGHT;
+ }
+ if (windowpos) {
+ xpos = rcWindow.left;
+ ypos = rcWindow.top;
+ width = rcWindow.right - rcWindow.left;
+ height = rcWindow.bottom - rcWindow.top;
+ }
+
+ /* create main window */
+ if (directX == DXFULLSCREEN)
+ hWnd =
+ CreateWindowEx(WS_EX_TOPMOST, "XaoSWindow", "XaoS", WS_POPUP,
+ 0, 0, GetSystemMetrics(SM_CXSCREEN),
+ GetSystemMetrics(SM_CYSCREEN), NULL, NULL,
+ hInstance, NULL);
+ else
+
+ hWnd = CreateWindowEx(WS_EX_CLIENTEDGE, "XaoSWindow", "XaoS",
+ WS_OVERLAPPEDWINDOW | WS_EX_LEFTSCROLLBAR,
+ xpos, ypos, width, height, NULL, NULL,
+ hInstance, NULL);
+
+ if (!hWnd) {
+ x_error("Unable to create app window");
+ return 0;
+ }
+
+ clipboard_format = RegisterClipboardFormat("image/x-xaos.position");
+
+
+ /* create font */
+ memset(&logFont, 0, sizeof(LOGFONT));
+ hDC = CreateDC("DISPLAY", NULL, NULL, NULL);
+ logFont.lfHeight = -MulDiv(12, GetDeviceCaps(hDC, LOGPIXELSY), 72);
+ logFont.lfWeight = FW_NORMAL;
+ logFont.lfPitchAndFamily = FIXED_PITCH;
+ strcpy(logFont.lfFaceName, "Courier");
+
+ hFont = CreateFontIndirect(&logFont);
+ oldFont = SelectObject(hDC, hFont);
+ GetTextMetrics(hDC, &textMetric);
+ SelectObject(hDC, oldFont);
+ DeleteDC(hDC);
+
+ fontHeight = textMetric.tmHeight;
+ fontWidth = textMetric.tmAveCharWidth;
+
+ ShowWindow(hWnd, SW_NORMAL);
+
+ GetClientRect(hWnd, &r);
+ displayX = r.right;
+ displayY = r.bottom;
+
+ /* create palette */
+ CalculateBITMAPINFO(); /* calculate BITMAPINFO structure */
+ logPalette = malloc(sizeof(LOGPALETTE) + 4 * 256);
+ logPalette->palVersion = 0x300;
+ logPalette->palNumEntries = 256;
+ memcpy(logPalette->palPalEntry, bmp->bmiColors, 4 * 256);
+ hPalette = CreatePalette(logPalette);
+ free(logPalette);
+
+ /* select and realize palette */
+ hDC = GetDC(hWnd);
+ SelectPalette(hDC, hPalette, FALSE);
+ RealizePalette(hDC);
+ ReleaseDC(hWnd, hDC);
+
+ // increase priority of XaoS
+ SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
+
+ MyHelpMsg = RegisterWindowMessage(HELPMSGSTRING);
+
+ return 1;
+}
+
+static void DeInitWindow()
+{
+ if (tmpcaptured)
+ ReleaseCapture();
+ if (directX != DXFULLSCREEN)
+ windowpos = 1, GetWindowRect(hWnd, &rcWindow);
+ /* normalize priority */
+ SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL);
+ if (helpname)
+ WinHelp(hWnd, helpname, HELP_QUIT, 0), free(helpname), helpname =
+ NULL;
+
+ /* destroy windows and other objects */
+ DeleteObject(hFont);
+ DestroyWindow(hWnd);
+ UnregisterClass("XaosWindow", hInstance);
+ if (bmp) {
+ free(bmp);
+ bmp = NULL;
+ }
+ if (hModule2 != NULL)
+ FreeLibrary(hModule2);
+ hModule2 = NULL;
+ win32_uninitializewindows();
+}
+
+/* Display buffer to screen */
+static void Paint(HDC hDC)
+{
+ if (!initialized || !buffer1)
+ return;
+ StretchDIBits(hDC, 0, 0, displayX, displayY,
+ 0, 0, displayX, displayY,
+ (currentbuff == 0) ? buffer1 : buffer2,
+ bmp, DIB_RGB_COLORS, SRCCOPY);
+ needredraw = 0;
+}
+
+
+
+static int Init(void)
+{
+ HDC hDC;
+ buffer1 = buffer2 = NULL;
+
+ // get bit depth
+ hDC = CreateDC("DISPLAY", NULL, NULL, NULL);
+ bitDepth = GetDeviceCaps(hDC, BITSPIXEL);
+ if (bitDepth < 8)
+ bitDepth = 16;
+ if (bitDepth < 10)
+ bitDepth = 8;
+ if (bitDepth >= 10 && bitDepth < 20)
+ bitDepth = 16;
+ if (bitDepth >= 20 && bitDepth < 28)
+ bitDepth = 24;
+ if (bitDepth >= 32 && bitDepth < 32)
+ bitDepth = 32;
+ DeleteDC(hDC);
+
+ // create windows and other objects
+ if (!InitWindow())
+ return 0;
+
+ CalculateBITMAPINFO(); /* calculate BITMAPINFO structure */
+
+
+ return 1;
+}
+
+static void getmouse(int *mx, int *my, int *mb)
+{
+ *mb = 0;
+ if (mouseButtons & MK_LBUTTON)
+ *mb |= 256;
+ if (mouseButtons & MK_MBUTTON)
+ *mb |= 512;
+ if (mouseButtons & MK_RBUTTON)
+ *mb |= 1024;
+ *mx = mouseX;
+ *my = mouseY;
+}
+
+static void
+Processevents(int wait, int *mx, int *my, int *mb, int *k, int *c)
+{
+ MSG msg;
+ int r;
+ if (wait) {
+ // wait for message if in wait mode
+ r = GetMessage(&msg, hWnd, 0, 0);
+ wait = 0;
+ } else {
+ // don't wait for message
+ r = PeekMessage(&msg, hWnd, 0, 0, PM_REMOVE);
+ }
+#if 0
+ if (needredraw) {
+ if (directX)
+ PaintDD();
+ else
+ win32_display();
+ }
+#endif
+ if (r > 0) {
+ if (msg.message == WM_CHAR) {
+ // ascii char
+ *c = msg.wParam;
+ }
+ if (msg.message == WM_KEYUP)
+ switch (msg.wParam) {
+ case VK_MENU:
+ altPressed = 0;
+ break;
+ case VK_UP:
+ arrowsPressed &= ~4;
+ break;
+ case VK_DOWN:
+ arrowsPressed &= ~8;
+ break;
+ case VK_LEFT:
+ arrowsPressed &= ~1;
+ break;
+ case VK_RIGHT:
+ arrowsPressed &= ~2;
+ break;
+ }
+ if (msg.message == WM_KEYDOWN) {
+ // any key
+ switch (msg.wParam) {
+ case VK_MENU:
+ /*x_message("Alt"); */
+ altPressed = 1;
+ break;
+ case VK_UP:
+ *c = UIKEY_UP;
+ arrowsPressed |= 4;
+ break;
+ case VK_DOWN:
+ *c = UIKEY_DOWN;
+ arrowsPressed |= 8;
+ break;
+ case VK_LEFT:
+ *c = UIKEY_LEFT;
+ arrowsPressed |= 1;
+ break;
+ case VK_RIGHT:
+ *c = UIKEY_RIGHT;
+ arrowsPressed |= 2;
+ break;
+ case VK_ESCAPE:
+ *c = UIKEY_ESC;
+ break;
+ case VK_BACK:
+ *c = UIKEY_BACKSPACE;
+ break;
+ case VK_TAB:
+ *c = UIKEY_TAB;
+ break;
+ case VK_HOME:
+ *c = UIKEY_HOME;
+ break;
+ case VK_END:
+ *c = UIKEY_END;
+ break;
+ case VK_PRIOR:
+ *c = UIKEY_PGUP;
+ break;
+ case VK_NEXT:
+ *c = UIKEY_PGDOWN;
+ break;
+#ifdef DDRAW_DRIVER
+ case VK_RETURN:
+ /*x_message("Enter %i",altPressed); */
+ if (altPressed) {
+ HDC hDC;
+ CONST char *cmd;
+ CONST menuitem *item;
+ if (directX == DXFULLSCREEN) {
+ int depth;
+ cmd = "dX-windowed";
+ hDC = CreateDC("DISPLAY", NULL, NULL, NULL);
+ depth = GetDeviceCaps(hDC, BITSPIXEL);
+ DeleteDC(hDC);
+ if (!DXSUPPORTEDDEPTH(0, depth))
+ cmd = "win32";
+ } else {
+ cmd = "dX-fullscreen";
+ }
+ item = menu_findcommand(cmd);
+ ui_menuactivate(item, NULL);
+ }
+ break;
+#endif
+ }
+ }
+ // forward messages to window
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ }
+ getmouse(mx, my, mb); // get mouse position
+
+ *k = arrowsPressed;
+
+ if (closeFlag)
+ *c = -2; // force quit if so requested
+
+}
+
+// calculate BITMAPINFO structure. It is used to copy bitmaps
+static void CalculateBITMAPINFO()
+{
+ int i;
+ if (!bmp)
+ bmp = (BITMAPINFO *) malloc(sizeof(BITMAPINFOHEADER) + 4 * 256);
+
+ memset(bmp, 0, sizeof(BITMAPINFOHEADER));
+ bmp->bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
+ bmp->bmiHeader.biWidth = displayX;
+ bmp->bmiHeader.biHeight = -displayY;
+ bmp->bmiHeader.biPlanes = 1;
+ bmp->bmiHeader.biBitCount = bitDepth;
+
+ // create default palette
+ for (i = 0; i < 256; i++) {
+ bmp->bmiColors[i].rgbRed = i;
+ bmp->bmiColors[i].rgbGreen = i;
+ bmp->bmiColors[i].rgbBlue = i;
+ }
+}
+
+#ifdef DDRAW_DRIVER
+
+/**************************************************************************************
+ DirectDraw driver helper routines
+ */
+static char *resstr[MAXRESOLUTIONS];
+static struct resolutions {
+ int width, height;
+} ressize[MAXRESOLUTIONS];
+static int nresolutions;
+/* callback for DirectX resolutions */
+static HRESULT WINAPI
+EnumModesCallback(LPDDSURFACEDESC lpDDSurfaceDesc, LPVOID lpContext)
+{
+ if (nresolutions < MAXRESOLUTIONS)
+ if (lpDDSurfaceDesc->ddpfPixelFormat.u1.dwRGBBitCount == 8 ||
+ lpDDSurfaceDesc->ddpfPixelFormat.u1.dwRGBBitCount == 16 ||
+ lpDDSurfaceDesc->ddpfPixelFormat.u1.dwRGBBitCount == 24 ||
+ lpDDSurfaceDesc->ddpfPixelFormat.u1.dwRGBBitCount == 32) {
+ int i;
+ char s[20];
+ for (i = 0; i < nresolutions; i++)
+ if ((int) ressize[i].width ==
+ (int) lpDDSurfaceDesc->dwWidth
+ && (int) ressize[i].height ==
+ (int) lpDDSurfaceDesc->dwHeight)
+ return DDENUMRET_OK;
+ ressize[nresolutions].width = lpDDSurfaceDesc->dwWidth;
+ ressize[nresolutions].height = lpDDSurfaceDesc->dwHeight;
+ sprintf(s, "%ix%i", lpDDSurfaceDesc->dwWidth,
+ lpDDSurfaceDesc->dwHeight);
+ resstr[nresolutions] = strdup(s);
+ nresolutions++;
+ }
+ return DDENUMRET_OK;
+}
+
+typedef HRESULT WINAPI(*ddrawcreateptr) (GUID FAR * lpGUID,
+ LPDIRECTDRAW FAR * lplpDD,
+ IUnknown FAR * pUnkOuter);
+static ddrawcreateptr DirectDrawCreatePtr;
+
+static int ResizeDD(int fullscreen)
+{
+ HRESULT ddrval;
+ DDSURFACEDESC ddsd;
+ /*DDCAPS2 ddscaps; */
+ LPDIRECTDRAWCLIPPER pClipper;
+ int dxwidth;
+ int dxheight;
+ int dxbpp;
+
+ // free DirectX objects
+ if (lpSurfaces[0])
+ IDirectDrawSurface_Release(lpSurfaces[0]);
+ lpSurfaces[0] = NULL;
+ if (dxPalette)
+ IDirectDrawPalette_Release(dxPalette);
+ dxPalette = NULL;
+ /* Set cooperative level */
+ ddrval = IDirectDraw2_SetCooperativeLevel(lpDD2, hWnd,
+ fullscreen
+ ? (DDSCL_FULLSCREEN |
+ DDSCL_EXCLUSIVE |
+ DDSCL_ALLOWREBOOT)
+ : DDSCL_NORMAL);
+ if (ddrval != DD_OK) {
+ DeInitDD();
+ x_error("Failed to set cooperative level");
+ return 0;
+ }
+
+ if (fullscreen) {
+ if (sscanf(dxsize, "%ix%ix%i", &dxwidth, &dxheight, &dxbpp) != 3) {
+ dxwidth = DXWIDTH;
+ dxheight = DXHEIGHT;
+ dxbpp = DXBPP;
+ }
+ displayX = dxwidth;
+ displayY = dxheight;
+ bitDepth = dxbpp;
+ if (bitDepth < 10)
+ bitDepth = 8;
+ if (bitDepth >= 10 && bitDepth < 20)
+ bitDepth = 16;
+ if (bitDepth >= 20 && bitDepth < 28)
+ bitDepth = 24;
+ if (bitDepth >= 32 && bitDepth < 32)
+ bitDepth = 32;
+
+ /* set resolution and bit depth */
+ ddrval =
+ IDirectDraw2_SetDisplayMode(lpDD2, displayX, displayY,
+ bitDepth, 0, 0);
+ if (ddrval != DD_OK) {
+ /* The display mode cannot be changed.
+ The mode is either not supported or
+ another application has exclusive mode.
+
+ Try 320x200x256 and 640x480x256 modes before giving up */
+ displayX = 320;
+ displayY = 200;
+ bitDepth = 8;
+ ddrval =
+ IDirectDraw2_SetDisplayMode(lpDD2, displayX, displayY,
+ bitDepth, 0, 0);
+ if (ddrval != DD_OK) {
+ displayY = 240;
+ if (ddrval != DD_OK) {
+ displayX = 640;
+ displayY = 480;
+ ddrval =
+ IDirectDraw2_SetDisplayMode(lpDD2, displayX,
+ displayY, bitDepth, 0,
+ 0);
+ if (ddrval != DD_OK) {
+ /* Bad luck... give up. */
+ DeInitDD();
+ return 0;
+ }
+ }
+ }
+ }
+ SetRect(&rcViewport, 0, 0, displayX, displayY);
+ rcScreen = rcViewport;
+ } else {
+ /* Get the dimensions of the viewport and screen bounds */
+ GetClientRect(hWnd, &rcViewport);
+ GetClientRect(hWnd, &rcScreen);
+ ClientToScreen(hWnd, (POINT *) & rcScreen.left);
+ ClientToScreen(hWnd, (POINT *) & rcScreen.right);
+ /*bitDepth = GetDeviceCaps (hDC, BITSPIXEL); */
+
+ /* Create clipper object for window */
+ ddrval = IDirectDraw_CreateClipper(lpDD, 0, &pClipper, NULL);
+ if (ddrval != DD_OK) {
+ DeInitDD();
+ x_error("Failed to create clipper object");
+ return 0;
+ }
+ /* Asociate it */
+ IDirectDrawClipper_SetHWnd(pClipper, 0, hWnd);
+ }
+ /* Create the primary surface with one back buffer */
+ CalculateBITMAPINFO(); // calculate BITMAPINFO structure
+
+ memset(&ddsd, 0, sizeof(ddsd));
+ ddsd.dwSize = sizeof(ddsd);
+ ddsd.dwFlags = DDSD_CAPS;
+ ddsd.ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE;
+
+ ddrval = IDirectDraw_CreateSurface(lpDD, &ddsd, &lpSurfaces[0], NULL);
+ if (ddrval != DD_OK) {
+ DeInitDD();
+ x_error("Failed to create flipping surface");
+ return 0;
+ }
+
+ if (!fullscreen) {
+ IDirectDrawSurface_SetClipper(lpSurfaces[0], pClipper);
+ IDirectDrawClipper_Release(pClipper);
+ if (IDirectDrawSurface_GetSurfaceDesc(lpSurfaces[0], &ddsd) !=
+ DD_OK) {
+ DeInitDD();
+ x_error("Failed to get pixel format");
+ return 0;
+ }
+ bitDepth = ddsd.ddpfPixelFormat.u1.dwRGBBitCount;
+ }
+
+ if (bitDepth == 8) {
+ /* create palette */
+ ddrval =
+ IDirectDraw_CreatePalette(lpDD, DDPCAPS_8BIT,
+ (LPPALETTEENTRY) bmp->bmiColors,
+ &dxPalette, NULL);
+ if (ddrval != DD_OK) {
+ DeInitDD();
+ x_error("Failed to create palette");
+ return 0;
+ }
+
+ /* set palette */
+ IDirectDrawSurface_SetPalette(lpSurfaces[0], dxPalette);
+ }
+ if (fullscreen)
+ SetCursor(NULL);
+ needredraw = 1;
+ return 1;
+
+}
+
+/* init DirectX */
+static int InitDD(int fullscreen)
+{
+ HRESULT ddrval;
+ HDC hDC;
+ directX = fullscreen ? DXFULLSCREEN : DXWINDOWED;
+
+ if (!hModule)
+ hModule = LoadLibrary("ddraw");
+ if (!hModule) {
+ /*x_error ("Unable to load DirectX (ddraw.dll)"); */
+ return 0;
+ }
+ /* DirectDraw don't support 16 color modes. Don't even try to initialize
+ it then. Also avoid unsupported bit depths in the windowed driver */
+ hDC = CreateDC("DISPLAY", NULL, NULL, NULL);
+ bitDepth = GetDeviceCaps(hDC, BITSPIXEL);
+ DeleteDC(hDC);
+
+ if (!DXSUPPORTEDDEPTH(fullscreen, bitDepth))
+ return 0;
+
+
+ DirectDrawCreatePtr =
+ (ddrawcreateptr) GetProcAddress(hModule, "DirectDrawCreate");
+ if (!DirectDrawCreatePtr) {
+ x_error
+ ("Unable to get hook DirectDrawCreate in ddraw.dll. Check your DirectX installation");
+ return 0;
+ }
+
+ lpDD = NULL;
+ lpDD2 = NULL;
+ lpSurfaces[0] = NULL;
+ lpSurfaces[1] = NULL;
+ buffer1 = buffer2 = NULL;
+
+ bitDepth = 8;
+
+ InitWindow();
+ UpdateWindow(hWnd);
+ SetFocus(hWnd);
+
+
+ /* contact DirectX */
+ ddrval = DirectDrawCreatePtr(NULL, &lpDD, NULL);
+ if (ddrval != DD_OK) {
+ DeInitDD();
+ x_error("Failed to create DirectDraw object");
+ return 0;
+ }
+
+ /* get IDirectDraw2 interface */
+ ddrval =
+ IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw2,
+ (LPVOID *) & lpDD2);
+ if (ddrval != DD_OK) {
+ DeInitDD();
+ x_error("Failed to get DirectDraw2 object");
+ return 0;
+ }
+ /* enumerate modes */
+#ifdef DDRAW_DRIVER
+ if (!nresolutions && directX == DXFULLSCREEN)
+ IDirectDraw2_EnumDisplayModes(lpDD2, 0, NULL, NULL,
+ EnumModesCallback);
+#endif
+
+
+ if (!ResizeDD(fullscreen))
+ return 0;
+ if (fullscreen) {
+ SetCapture(hWnd); // make sure no other windows get mouse messages
+
+ captured = 1;
+ }
+
+ return 1;
+}
+
+/* uninitialize DirectX */
+static void DeInitDD(void)
+{
+ if (captured)
+ ReleaseCapture(), captured = 0; // free mouse
+
+ // free DirectX objects
+ if (lpSurfaces[0])
+ IDirectDrawSurface_Release(lpSurfaces[0]);
+ lpSurfaces[0] = NULL;
+ if (BackSurface[0])
+ IDirectDrawSurface_Release(BackSurface[0]);
+ BackSurface[0] = NULL;
+ if (BackSurface[1])
+ IDirectDrawSurface_Release(BackSurface[1]);
+ BackSurface[1] = NULL;
+ if (dxPalette)
+ IDirectDrawPalette_Release(dxPalette);
+ dxPalette = NULL;
+ if (lpDD2)
+ IDirectDraw2_Release(lpDD2);
+ lpDD2 = NULL;
+ if (lpDD)
+ IDirectDraw_Release(lpDD);
+ lpDD = NULL;
+ DeInitWindow();
+ if (hModule != NULL)
+ FreeLibrary(hModule), hModule = NULL;
+ hWnd = NULL;
+ directX = 0;
+}
+
+static LRESULT CALLBACK WindowProc(HWND hwnd, // handle to window
+ UINT uMsg, // message identifier
+ WPARAM wParam, // first message parameter
+ LPARAM lParam // second message parameter
+ );
+static void UpdateMouseDD()
+{
+ DDSURFACEDESC m_surface;
+ PUCHAR dst;
+ DWORD ddrval;
+ memset(&m_surface, 0, sizeof(DDSURFACEDESC));
+ m_surface.dwSize = sizeof(DDSURFACEDESC);
+ ddrval = IDirectDrawSurface_Lock(lpSurfaces[0], NULL, &m_surface,
+ DDLOCK_WAIT, NULL);
+ if (ddrval != DD_OK) {
+ return;
+ }
+
+ dst = (PUCHAR) m_surface.lpSurface;
+ if (storeddata) {
+ restore(dst, storeddata, bitDepth, m_surface.u1.lPitch, displayX,
+ displayY, oldmouseX, oldmouseY);
+ free(storeddata);
+ }
+ storeddata =
+ store(dst, bitDepth, m_surface.u1.lPitch, displayX, displayY,
+ mouseX, mouseY);
+ drawmouse(dst, mousepointer, bitDepth, m_surface.u1.lPitch, displayX,
+ displayY, mouseX, mouseY);
+ oldmouseX = mouseX;
+ oldmouseY = mouseY;
+ IDirectDrawSurface_Unlock(lpSurfaces[0], m_surface.lpSurface);
+}
+
+/* Display buffer */
+static void PaintDD()
+{
+ DWORD ddrval;
+ if (!IsWindowVisible(hWnd) || !active || !initialized
+ || !BackSurface[0])
+ return;
+ IDirectDrawSurface_Unlock(BackSurface[0], surface[0].lpSurface);
+ IDirectDrawSurface_Unlock(BackSurface[1], surface[1].lpSurface);
+ if (directX == DXFULLSCREEN) {
+ if (storeddata)
+ free(storeddata), storeddata = NULL;
+ storeddata =
+ store(currentbuff ? buffer2 : buffer1, bitDepth, lineSize,
+ displayX, displayY, mouseX, mouseY);
+ drawmouse(currentbuff ? buffer2 : buffer1, mousepointer, bitDepth,
+ lineSize, displayX, displayY, mouseX, mouseY);
+ ddrval =
+ IDirectDrawSurface_BltFast(lpSurfaces[0], 0, 0,
+ BackSurface[currentbuff], &rcScreen,
+ FALSE);
+ restore(currentbuff ? buffer2 : buffer1, storeddata, bitDepth,
+ lineSize, displayX, displayY, mouseX, mouseY);
+ oldmouseX = mouseX;
+ oldmouseY = mouseY;
+ } else {
+ ddrval = IDirectDrawSurface_Blt(lpSurfaces[0], &rcScreen,
+ BackSurface[currentbuff],
+ &rcViewport, DDBLT_WAIT, NULL);
+ }
+ if (ddrval != DD_OK) {
+ if ((int) ddrval == (int) DDERR_SURFACELOST) {
+ IDirectDrawSurface_Restore(lpSurfaces[0]);
+ IDirectDrawSurface_Restore(BackSurface[0]);
+ IDirectDrawSurface_Restore(BackSurface[1]);
+ ddrval = IDirectDrawSurface_Blt(lpSurfaces[0], &rcScreen,
+ BackSurface[currentbuff],
+ &rcViewport, DDBLT_WAIT, NULL);
+ //if (ddrval == DDERR_SURFACELOST) resized=1; /*We've lost our fractal*/
+ }
+ }
+ ddrval = IDirectDrawSurface_Lock(BackSurface[0], NULL, &surface[0],
+ DDLOCK_WAIT, NULL);
+ ddrval = IDirectDrawSurface_Lock(BackSurface[1], NULL, &surface[1],
+ DDLOCK_WAIT, NULL);
+ if (buffer1 != (char *) surface[0].lpSurface ||
+ buffer2 != (char *) surface[1].lpSurface) {
+ DeInitDD();
+ x_fatalerror
+ ("Unexpected event - buffers moved! Please contact authors!");
+ }
+ needredraw = 0;
+
+}
+#endif
+
+/**************************************************************************************
+ Drivers implementation
+ */
+
+
+
+static void flip_buffers(void)
+{
+ currentbuff ^= 1;
+}
+
+
+static void processevents(int wait, int *mx, int *my, int *mb, int *k)
+{
+ int c = -1;
+ *mb = 0;
+ *k = 0;
+ Processevents(wait, mx, my, mb, k, &c);
+ if (c > -1) {
+ ui_key(c);
+ }
+
+ if (c == -2)
+ ui_quit(); // -2 signals program exit
+
+ if (resized) {
+ ui_resize(); // tell Xaos to resize
+
+ }
+}
+
+static void print(int x, int y, CONST char *text)
+{
+ HDC hDC;
+ static char current[256];
+ char s[256];
+#ifdef DDRAW_DRIVER
+ if (directX == DXFULLSCREEN) {
+ HGLOBAL oldFont;
+ if (IDirectDrawSurface_GetDC(lpSurfaces[0], &hDC) != DD_OK)
+ return;
+ SetTextColor(hDC, 0xffffff);
+ SetBkColor(hDC, 0x000000);
+ oldFont = SelectObject(hDC, hFont);
+ ExtTextOut(hDC, x, y, 0, NULL, text, strlen(text), NULL);
+ SelectObject(hDC, oldFont);
+ IDirectDrawSurface_ReleaseDC(lpSurfaces[0], hDC);
+ return;
+ }
+#endif
+ if (!text[0])
+ strcpy(s, "XaoS");
+ else
+ sprintf(s, "XaoS - %s", text);
+ if (strcmp(current, s))
+ strcpy(current, s), SetWindowText(hWnd, s);
+}
+
+static void mousetype(int type)
+{
+ char *cursor;
+ switch (type) {
+ default:
+ case 0:
+ cursor = IDC_ARROW;
+ break;
+ case 1:
+ cursor = IDC_WAIT;
+ break;
+ case 2:
+ cursor = IDC_NO;
+ break;
+ }
+ SetCursor(LoadCursor(NULL, cursor));
+}
+
+static void set_palette(ui_palette pal1, int start, int end)
+{
+ PUCHAR pal = (PUCHAR) pal1;
+ HDC hDC;
+ int i;
+ // store new palette entries locally
+ memcpy(backpalette + 4 * start, pal, (end - start) * 4);
+ for (i = start; i <= end; i++) {
+ bmp->bmiColors[i].rgbRed = *(pal + 4 * (i - start) + 0);
+ bmp->bmiColors[i].rgbGreen = *(pal + 4 * (i - start) + 1);
+ bmp->bmiColors[i].rgbBlue = *(pal + 4 * (i - start) + 2);
+ bmp->bmiColors[i].rgbReserved = 0;
+ }
+ // update window/screen
+#ifdef DDRAW_DRIVER
+ if (directX) {
+ IDirectDrawPalette_SetEntries(dxPalette, 0, start, end - start + 1,
+ (PALETTEENTRY *) pal);
+ } else
+#endif
+ {
+ SetPaletteEntries(hPalette, start, end - start + 1,
+ (PALETTEENTRY *) pal);
+ hDC = GetDC(hWnd);
+ UnrealizeObject(hPalette);
+ RealizePalette(hDC);
+ ReleaseDC(hWnd, hDC);
+ win32_display();
+ }
+}
+
+static void win32_copy(struct uih_context *uih)
+{
+ char *c = ui_getpos();
+ HANDLE hData = GlobalAlloc(GMEM_DDESHARE, strlen(c) + 1);
+ char *data;
+ if (!hData) {
+ x_error("Out of memory");
+ free(c);
+ return;
+ }
+ if (!(data = GlobalLock(hData))) {
+ x_error("Out of memory");
+ free(c);
+ return;
+ }
+ memcpy(hData, c, strlen(c) + 1);
+ GlobalUnlock(hData);
+ if (OpenClipboard(hWnd)) {
+ EmptyClipboard();
+ SetClipboardData(clipboard_format, hData);
+ }
+ free(c);
+}
+
+static void win32_paste(void)
+{
+ if (OpenClipboard(hWnd)) {
+ HANDLE hClipData;
+ char *text;
+ if (!(hClipData = GetClipboardData(clipboard_format))) {
+ CloseClipboard();
+ return;
+ }
+ if (!(text = GlobalLock(hClipData))) {
+ x_error("Out of memory");
+ CloseClipboard();
+ }
+ ui_loadstr(strdup(text));
+ GlobalUnlock(hClipData);
+ CloseClipboard();
+ }
+}
+
+#define MAX_MENUITEMS_I18N 7
+static menuitem menuitems_i18n[MAX_MENUITEMS_I18N];
+
+int uiw_no_menuitems_i18n, uiw_no_cutpasteitems_i18n;
+
+static menuitem *cutpasteitems;
+static void add_cutpasteitems()
+{
+ // General method (not needed currently):
+ int no_menuitems_i18n = uiw_no_menuitems_i18n; /* This variable must be local. */
+ MENUSEPARATOR_I("edit");
+ MENUNOP_I("edit", NULL, gettext("Copy"), "copy", 0, win32_copy);
+ MENUNOP_I("edit", NULL, gettext("Paste"), "paste", 0, win32_paste);
+ MENUNOP_I("misc", NULL, "Generate .dlg files", "genresources", 0,
+ win32_genresources);
+ MENUSEPARATOR_I("helpmenu");
+ MENUNOP_I("helpmenu", NULL, gettext("About"), "about", 0, AboutBox);
+ no_menuitems_i18n -= uiw_no_menuitems_i18n;
+ cutpasteitems = &(menuitems_i18n[uiw_no_menuitems_i18n]);
+ uiw_no_cutpasteitems_i18n = no_menuitems_i18n;
+ menu_add(cutpasteitems, uiw_no_cutpasteitems_i18n);
+ uiw_no_menuitems_i18n += no_menuitems_i18n;
+
+}
+
+
+static int win32_init(void)
+{
+ int r;
+
+#ifdef DDRAW_DRIVER
+ directX = 0;
+#endif
+ r = Init();
+ if (!r)
+ return r;
+ win32_driver.textwidth = fontWidth;
+ win32_driver.textheight = fontHeight;
+ getres(&win32_driver.width, &win32_driver.height);
+ win32_createrootmenu();
+ uiw_no_menuitems_i18n = 0;
+ add_cutpasteitems();
+ return r;
+}
+
+static void win32_uninitialize(void)
+{
+ DeInitWindow();
+ menu_delete(cutpasteitems, uiw_no_cutpasteitems_i18n);
+}
+
+static void win32_getsize(int *width, int *height)
+{
+ resized = 0;
+ *width = displayX;
+ *height = displayY;
+ switch (bitDepth) {
+ case 8:
+ win32_driver.imagetype = UI_C256;
+ break;
+ case 16:
+ /* Windows seems to always use 15bpp mode */
+ win32_driver.imagetype = UI_TRUECOLOR16;
+ win32_driver.rmask = 31 * 32 * 32;
+ win32_driver.gmask = 31 * 32;
+ win32_driver.bmask = 31;
+ break;
+ case 24:
+ win32_driver.imagetype = UI_TRUECOLOR24;
+ win32_driver.rmask = 0xff0000;
+ win32_driver.gmask = 0x00ff00;
+ win32_driver.bmask = 0x0000ff;
+ break;
+ case 32:
+ win32_driver.imagetype = UI_TRUECOLOR;
+ win32_driver.rmask = 0xff0000;
+ win32_driver.gmask = 0x00ff00;
+ win32_driver.bmask = 0x0000ff;
+ break;
+ }
+ CalculateBITMAPINFO();
+}
+
+
+
+static void win32_display()
+{
+ HDC hDC = GetDC(hWnd);
+ if (IsWindowVisible(hWnd))
+ Paint(hDC);
+ ReleaseDC(hWnd, hDC);
+}
+
+static int win32_alloc_buffers(char **b1, char **b2)
+{
+ currentbuff = 0;
+ // calculate DWORD aligned line length
+ lineSize = displayX * ((bitDepth + 7) / 8);
+ lineSize += 3 - ((lineSize - 1) & 3);
+
+ buffer1 = (char *) malloc(displayY * lineSize);
+ buffer2 = (char *) malloc(displayY * lineSize);
+ *b1 = buffer1;
+ *b2 = buffer2;
+ initialized = 1;
+ return lineSize;
+}
+
+static void win32_free_buffers(char *b1, char *b2)
+{
+ initialized = 0;
+ free(buffer1);
+ free(buffer2);
+ buffer1 = buffer2 = NULL;
+}
+
+static CONST char *CONST dx_depth[] = { "8bpp (256 colors)",
+ "16bpp (65536 colors)",
+ "24bpp (16777216 colors)",
+ "32bpp (16777216 colors)",
+ NULL
+};
+
+#ifdef DDRAW_DRIVER
+static menudialog dx_resdialog[] = {
+ DIALOGCHOICE("Resolution", resstr, 0),
+ DIALOGCHOICE("Depth", dx_depth, 0),
+ {NULL}
+};
+
+static menudialog *dx_resizedialog(struct uih_context *c)
+{
+ int i;
+ switch (bitDepth) {
+ case 8:
+ dx_resdialog[1].defint = 0;
+ break;
+ case 16:
+ dx_resdialog[1].defint = 1;
+ break;
+ case 24:
+ dx_resdialog[1].defint = 2;
+ break;
+ case 32:
+ dx_resdialog[1].defint = 3;
+ }
+ for (i = 0; i < MAXRESOLUTIONS; i++)
+ if (displayX == ressize[i].width && displayY == ressize[i].height) {
+ dx_resdialog[0].defint = i;
+ break;
+ }
+ return dx_resdialog;
+}
+
+static void dx_resize(struct uih_context *c, dialogparam * p)
+{
+ static char s[10];
+ CONST static char *CONST st[] = { "8", "16", "24", "32" };
+ sprintf(s, "%sx%s", resstr[p[0].dint], st[p[1].dint]);
+ dxsize = s;
+ resized = 1;
+ ui_call_resize();
+}
+
+int uiw_no_resizeitems_i18n;
+
+static menuitem *resizeitems;
+
+static void add_resizeitems()
+{
+ // General method, it's needed:
+ int no_menuitems_i18n = uiw_no_menuitems_i18n; /* This variable must be local. */
+ MENUCDIALOG_I("ui", "=", gettext("Resize"), "resize", 0, dx_resize,
+ dx_resizedialog);
+ no_menuitems_i18n -= uiw_no_menuitems_i18n;
+ resizeitems = &(menuitems_i18n[uiw_no_menuitems_i18n]);
+ uiw_no_resizeitems_i18n = no_menuitems_i18n;
+ menu_add(resizeitems, uiw_no_resizeitems_i18n);
+ uiw_no_menuitems_i18n += no_menuitems_i18n;
+
+}
+
+
+static int dx_alloc_buffers(char **b1, char **b2)
+{
+ DWORD ddrval;
+ DDSURFACEDESC ddsd;
+ int i;
+ currentbuff = 0;
+ memset(surface, 0, sizeof(DDSURFACEDESC) * 2);
+ memset(&ddsd, 0, sizeof(DDSURFACEDESC));
+ ddsd.dwSize = sizeof(ddsd);
+ if (IDirectDrawSurface_GetSurfaceDesc(lpSurfaces[0], &ddsd) != DD_OK) {
+ DeInitDD();
+ x_error("Failed to get pixel format");
+ return 0;
+ }
+ for (i = 0; i < 2; i++) {
+ ddsd.dwFlags = DDSD_WIDTH | DDSD_HEIGHT | DDSD_CAPS;
+ ddsd.dwWidth = displayX;
+ ddsd.dwHeight = displayY;
+ ddsd.ddsCaps.dwCaps =
+ DDSCAPS_OFFSCREENPLAIN | DDSCAPS_SYSTEMMEMORY;
+
+ ddrval =
+ IDirectDraw_CreateSurface(lpDD, &ddsd, &BackSurface[i], NULL);
+ if (ddrval != DD_OK) {
+ DeInitDD();
+ x_error("Failed to create back surface");
+ return 0;
+ }
+ }
+ for (i = 0; i < 2; i++) {
+ surface[i].dwSize = sizeof(DDSURFACEDESC);
+ ddrval = IDirectDrawSurface_Lock(BackSurface[i], NULL, surface + i,
+ DDLOCK_WAIT, NULL);
+ if (ddrval != DD_OK) {
+ DeInitDD();
+ x_fatalerror("Failed to lock offscreen surfaces");
+ }
+ }
+ buffer1 = *b1 = (char *) surface[0].lpSurface;
+ buffer2 = *b2 = (char *) surface[1].lpSurface;
+ lineSize = surface[0].u1.lPitch;
+ initialized = 1;
+ return lineSize;
+}
+
+static void dx_free_buffers(char *b1, char *b2)
+{
+ IDirectDrawSurface_Unlock(BackSurface[0], surface[0].lpSurface);
+ IDirectDrawSurface_Unlock(BackSurface[1], surface[1].lpSurface);
+ if (BackSurface[0])
+ IDirectDrawSurface_Release(BackSurface[0]);
+ if (BackSurface[1])
+ IDirectDrawSurface_Release(BackSurface[1]);
+ BackSurface[0] = NULL;
+ BackSurface[1] = NULL;
+ initialized = 0;
+ buffer1 = buffer2 = NULL;
+}
+
+static int dx_imgparams(void)
+{
+ DDSURFACEDESC s;
+ memset(&s, 0, sizeof(s));
+ s.dwSize = sizeof(s);
+ if (IDirectDrawSurface_GetSurfaceDesc(lpSurfaces[0], &s) != DD_OK) {
+ DeInitDD();
+ x_error("Failed to get pixel format");
+ return 0;
+ }
+ switch (s.ddpfPixelFormat.u1.dwRGBBitCount) {
+ case 8:
+ dxw_driver.imagetype = UI_C256;
+ dxf_driver.imagetype = UI_C256;
+ break;
+ case 16:
+ case 15:
+ dxw_driver.imagetype = UI_TRUECOLOR16;
+ dxf_driver.imagetype = UI_TRUECOLOR16;
+ break;
+ case 24:
+ dxw_driver.imagetype = UI_TRUECOLOR24;
+ dxf_driver.imagetype = UI_TRUECOLOR24;
+ break;
+ case 32:
+ dxw_driver.imagetype = UI_TRUECOLOR;
+ dxf_driver.imagetype = UI_TRUECOLOR;
+ break;
+ default:
+ x_fatalerror
+ ("Unsupported bit depth! Only 8bpp, 16bpp, 24bpp and 32bpp modes supported\n");
+ return 0;
+ }
+ dxw_driver.rmask = s.ddpfPixelFormat.u2.dwRBitMask;
+ dxw_driver.gmask = s.ddpfPixelFormat.u3.dwGBitMask;
+ dxw_driver.bmask = s.ddpfPixelFormat.u4.dwBBitMask;
+ dxf_driver.rmask = s.ddpfPixelFormat.u2.dwRBitMask;
+ dxf_driver.gmask = s.ddpfPixelFormat.u3.dwGBitMask;
+ dxf_driver.bmask = s.ddpfPixelFormat.u4.dwBBitMask;
+ dxf_driver.textwidth = fontWidth;
+ dxf_driver.textheight = fontHeight;
+ dxw_driver.textwidth = fontWidth;
+ dxw_driver.textheight = fontHeight;
+ return 1;
+}
+
+static int dxw_init(void)
+{
+ int r;
+
+ r = InitDD(0);
+ if (!r)
+ return r;
+
+ if (!dx_imgparams())
+ return 0;
+ win32_createrootmenu();
+ getres(&dxw_driver.width, &dxw_driver.height);
+ uiw_no_menuitems_i18n = 0;
+ add_cutpasteitems();
+ return r;
+}
+
+static int dxf_init(void)
+{
+ int r;
+
+ getdimens(&dxf_driver.width, &dxf_driver.height);
+ r = InitDD(1);
+ if (!r)
+ return r;
+
+ if (!dx_imgparams())
+ return 0;
+ uiw_no_menuitems_i18n = 0;
+ add_resizeitems();
+ add_cutpasteitems();
+ return r;
+}
+
+
+
+static void dx_uninitialize(void)
+{
+ if (directX == DXFULLSCREEN)
+ menu_delete(resizeitems, uiw_no_resizeitems_i18n);
+ menu_delete(cutpasteitems, uiw_no_cutpasteitems_i18n);
+ DeInitDD();
+}
+
+
+
+
+static void dx_getsize(int *width, int *height)
+{
+ if (resized) {
+ resized = 0;
+ if (!ResizeDD(directX == DXFULLSCREEN)) {
+ DeInitDD();
+ x_fatalerror("Failed to resize");
+ }
+ if (!dx_imgparams()) {
+ DeInitDD();
+ x_fatalerror("Internal program error #34234");
+ }
+ }
+ *width = displayX;
+ *height = displayY;
+ CalculateBITMAPINFO();
+}
+
+static void dx_mousetype(int type)
+{
+ switch (type) {
+ default:
+ case 0:
+ mousepointer = mouse_pointer_data;
+ break;
+ case 1:
+ mousepointer = wait_pointer_data;
+ break;
+ case 2:
+ mousepointer = replay_pointer_data;
+ break;
+ }
+ UpdateMouseDD();
+}
+#endif
+
+void win32_help(struct uih_context *c, CONST char *name)
+{
+#ifdef HTML_HELP
+ FILE *f;
+ char *n;
+ if (helpname == NULL) {
+ if (directX == DXFULLSCREEN)
+ ShowWindow(hWnd, SW_MINIMIZE);
+ n = xio_fixpath("\01\\help\\xaoshelp.chm");
+ if ((f = fopen(n, "r"))) {
+ fclose(f);
+ } else {
+ free(n);
+ n = xio_fixpath("\01\\..\\help\\xaoshelp.chm");
+ if ((f = fopen(n, "r"))) {
+ fclose(f);
+ } else
+ n = strdup("..\\help\\xaoshelp.chm");
+ }
+ helpname = n;
+ }
+ HH_AKLINK link;
+ link.cbStruct = sizeof(HH_AKLINK) ;
+ link.fReserved = FALSE ;
+ link.pszKeywords = name ;
+ link.pszUrl = NULL ;
+ link.pszMsgText = NULL ;
+ link.pszMsgTitle = NULL ;
+ link.pszWindow = NULL ;
+ link.fIndexOnFail = TRUE ;
+
+ if (!HtmlHelp(hWnd, helpname, HH_ALINK_LOOKUP, (DWORD) &link)) {
+ x_error("Could not display help for topic %s from file %s", name, helpname);
+ }
+#else
+ x_error("Help support not included in this executable.");
+#endif
+}
+
+
+static struct params params[] = {
+ {"", P_HELP, NULL, "Win32 driver options:"},
+ {"-size", P_STRING, &size,
+ "Window size in format WIDTHxHEIGHT (320x200)"},
+ {NULL, 0, NULL, NULL}
+};
+
+static struct params dxfparams[] = {
+ {"", P_HELP, NULL, "DirectX fullscreen driver options:"},
+ {"-mode", P_STRING, &dxsize,
+ "Select preffered graphics mode in format WIDTHxHEIGHTxDEPTH (320x200x8)"},
+ {NULL, 0, NULL, NULL}
+};
+
+static struct params dxwparams[] = {
+ {"", P_HELP, NULL, "DirectX windowed driver options:"},
+ {"-size", P_STRING, &size,
+ "Window size in format WIDTHxHEIGHT (320x200)"},
+ {NULL, 0, NULL, NULL}
+};
+
+extern int XaoS_main(int argc, char **argv);
+int STDCALL
+WinMain(HINSTANCE hInstance1,
+ HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+ static char name0[256];
+ static char *argv[256];
+ int argc = 1;
+ int i;
+
+ GetModuleFileName(hInstance1, name0, 256);
+ /* Allocate everything virtually - be on the safe side */
+ argv[0] = strdup(name0);
+ lpCmdLine = strdup(lpCmdLine);
+
+ for (i = 0; lpCmdLine[i]; i++) {
+ if (lpCmdLine[i] == ' ' || lpCmdLine[i] == '\t')
+ lpCmdLine[i] = 0;
+ else if (!i || !lpCmdLine[i - 1])
+ argv[argc] = lpCmdLine + i, argc++;
+ }
+
+ /* Attach to parent console if available so output will be visible */
+ if (AttachConsole(ATTACH_PARENT_PROCESS)) {
+ /* make sure stdout is not already redirected before redefining */
+ if (_fileno(stdout) == -1 || _get_osfhandle(fileno(stdout)) == -1)
+ freopen("CON", "w", stdout);
+ }
+
+ hInstance = hInstance1;
+ return XaoS_main(argc, argv);
+}
+
+static CONST struct gui_driver win32_gui_driver = {
+ win32_dorootmenu,
+ win32_enabledisable,
+ win32_menu,
+ win32_dialog,
+ win32_help
+};
+
+static CONST struct gui_driver win32_fullscreen_gui_driver = {
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ win32_help
+};
+
+struct ui_driver win32_driver = {
+ "win32",
+ win32_init,
+ win32_getsize,
+ processevents,
+ getmouse,
+ win32_uninitialize,
+ NULL, // win32_set_color,
+ set_palette,
+ print,
+ win32_display,
+ win32_alloc_buffers,
+ win32_free_buffers,
+ flip_buffers,
+ mousetype,
+ NULL,
+ 16 + 16,
+ 12,
+ params,
+ PIXELSIZE | UPDATE_AFTER_PALETTE,
+ 0.0, 0.0,
+ 0, 0,
+ UI_C256,
+ 0, 256, 255,
+ 0, 0, 0,
+ &win32_gui_driver
+};
+
+#ifdef DDRAW_DRIVER
+struct ui_driver dxw_driver = {
+ "dX-window",
+ dxw_init,
+ dx_getsize,
+ processevents,
+ getmouse,
+ dx_uninitialize,
+ NULL, // dx_set_color,
+ set_palette,
+ print,
+ PaintDD,
+ dx_alloc_buffers,
+ dx_free_buffers,
+ flip_buffers,
+ mousetype,
+ NULL,
+ 16 + 16,
+ 12,
+ dxwparams,
+ PIXELSIZE,
+ 0.0, 0.0,
+ 0, 0,
+ UI_C256,
+ 0, 256, 255,
+ 0, 0, 0,
+ &win32_gui_driver
+};
+
+struct ui_driver dxf_driver = {
+ "dX-fullscreen",
+ dxf_init,
+ dx_getsize,
+ processevents,
+ getmouse,
+ dx_uninitialize,
+ NULL, // dx_set_color,
+ set_palette,
+ print,
+ PaintDD,
+ dx_alloc_buffers,
+ dx_free_buffers,
+ flip_buffers,
+ dx_mousetype,
+ NULL,
+ 16 + 16,
+ 12,
+ dxfparams,
+ FULLSCREEN | SCREENSIZE,
+ 0.0, 0.0,
+ 0, 0,
+ UI_C256,
+ 0, 256, 255,
+ 0, 0, 0,
+ &win32_fullscreen_gui_driver
+};
+#endif
+
+void x_message(const char *text, ...)
+{
+ va_list ap;
+ char buf[4096];
+ va_start(ap, text);
+ vsprintf(buf, text, ap);
+ if (directX == DXFULLSCREEN)
+ ShowWindow(hWnd, SW_MINIMIZE);
+ MessageBox(NULL, buf, "XaoS", MB_OK | MB_ICONINFORMATION);
+ va_end(ap);
+}
+
+void x_error(const char *text, ...)
+{
+ va_list ap;
+ char buf[4096];
+ va_start(ap, text);
+ vsprintf(buf, text, ap);
+ if (directX == DXFULLSCREEN)
+ ShowWindow(hWnd, SW_MINIMIZE);
+ MessageBox(NULL, buf, "XaoS have problem", MB_OK | MB_ICONEXCLAMATION);
+ va_end(ap);
+}
+
+void x_fatalerror(const char *text, ...)
+{
+ va_list ap;
+ char buf[4096];
+ va_start(ap, text);
+ vsprintf(buf, text, ap);
+ if (directX == DXFULLSCREEN)
+ ShowWindow(hWnd, SW_MINIMIZE);
+ MessageBox(NULL, buf, "Unrecovable XaoS error", MB_OK | MB_ICONSTOP);
+ va_end(ap);
+ exit(1);
+}
+
+
+#endif /* WIN32_DRIVER */
diff --git a/src/ui/ui-drv/win32/ui_win32.h b/src/ui/ui-drv/win32/ui_win32.h
new file mode 100644
index 0000000..cd64526
--- /dev/null
+++ b/src/ui/ui-drv/win32/ui_win32.h
@@ -0,0 +1,20 @@
+
+#ifndef UI_WIN32_H
+#include <windows.h>
+#include <ui.h>
+extern int directX;
+extern CONST char *helptopic;
+extern HWND hWnd;
+extern HINSTANCE hInstance;
+HMENU win32_createrootmenu(void);
+void win32_pressed(int id);
+void win32_dorootmenu(struct uih_context *uih, CONST char *name);
+void win32_enabledisable(struct uih_context *uih, CONST char *name);
+void win32_menu(struct uih_context *c, CONST char *name);
+void win32_uninitializewindows(void);
+void win32_dialog(struct uih_context *uih, CONST char *name);
+void win32_genresources(struct uih_context *uih);
+void win32_help(struct uih_context *uih, CONST char *name);
+void CenterWindow(HWND hwndChild, HWND hwndParent);
+void AboutBox(void);
+#endif
diff --git a/src/ui/ui-drv/win32/version.rc b/src/ui/ui-drv/win32/version.rc
new file mode 100644
index 0000000..2606338
--- /dev/null
+++ b/src/ui/ui-drv/win32/version.rc
@@ -0,0 +1,39 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// Version
+//
+
+1 VERSIONINFO
+ FILEVERSION 3,5,0,0
+ PRODUCTVERSION 3,5,0,0
+ FILEFLAGSMASK 0x3fL
+#ifdef _DEBUG
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
+#endif
+ FILEOS 0x4L
+ FILETYPE 0x1L
+ FILESUBTYPE 0x0L
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904b0"
+ BEGIN
+ VALUE "Comments", "Brought to you by Jan Hubicka, Thomas Marsh and many others\0"
+ VALUE "CompanyName", "Free Software Foundation\0"
+ VALUE "FileDescription", "XaoS - a realtime fractal zoomer\0"
+ VALUE "FileVersion", "0.0\0"
+ VALUE "InternalName", "XaoS\0"
+ VALUE "LegalCopyright", "Copyright 1996-2008 Jan Hubicka, Thomas Marsh and many others. Many parts are copyrighted by their authors. See the source distribution\0"
+ VALUE "LegalTrademarks", "\0"
+ VALUE "OriginalFilename", "\0"
+ VALUE "ProductName", "XaoS\0"
+ VALUE "ProductVersion", "3.5\0"
+ END
+ END
+ BLOCK "VarFileInfo"
+ BEGIN
+ VALUE "Translation", 0x409, 0x04E4, 0x411, 0x04E4
+ END
+END
diff --git a/src/ui/ui-drv/win32/windialo.c b/src/ui/ui-drv/win32/windialo.c
new file mode 100644
index 0000000..dd0a9e6
--- /dev/null
+++ b/src/ui/ui-drv/win32/windialo.c
@@ -0,0 +1,471 @@
+#include <windows.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdio.h>
+#include <config.h>
+/*#include <filter.h>
+ #include <ui_helper.h> */
+#include <xerror.h>
+#include <xldio.h>
+#include <ui.h>
+#include <xmenu.h>
+#include "ui_win32.h"
+
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+TCHAR text[100];
+
+#define QUESTIONSTART 100
+#define ITEMSTART 10
+#define PERITEM 5
+
+#define OK 1
+#define CANCEL 2
+#define HELP 3
+
+static struct dialogrecord {
+ CONST menuitem *item;
+ CONST menudialog *dialog;
+ int nitems;
+ HWND windialog;
+ struct uih_context *c;
+ struct dialogrecord *next, *prev;
+} *firstdialog = NULL;
+static CONST char *win32_getextension(CONST char *ch)
+{
+ int i = 0;
+ while (ch[i]) {
+ if (ch[i] == '*')
+ return (ch + i + 1);
+ i++;
+ }
+ return ch + i;
+}
+
+static char *win32_dofiledialog(struct uih_context *uih,
+ CONST menuitem * item,
+ CONST menudialog * dialog)
+{
+ OPENFILENAME ofn;
+ char szDirName[256];
+ char szFile[256], szFileTitle[256];
+ UINT i, p;
+ char szFilter[256];
+
+ helptopic = item->shortname;
+ szDirName[0] = 0;
+ /*GetSystemDirectory(szDirName, sizeof(szDirName)); */
+ szFile[0] = 0;
+ if (dialog[0].type == DIALOG_OFILE) {
+ strcpy(szFile, dialog[0].defstr);
+ for (i = 0; dialog[0].defstr[i] && dialog[0].defstr[i] != '*';
+ i++);
+ szFile[i] = 0;
+ strcpy(szFile,
+ ui_getfile(szFile, win32_getextension(dialog[0].defstr)));
+ }
+
+ for (i = 0; dialog[0].defstr[i] && dialog[0].defstr[i] != '*'; i++)
+ if (!dialog[0].defstr[i])
+ i = 0;
+ strcpy(szFilter, dialog[0].defstr + i);
+ p = strlen(szFilter);
+ strcpy(szFilter + p + 1, dialog[0].defstr + i);
+ p += strlen(szFilter + p + 1) + 1;
+ strcpy(szFilter + p + 1, "All files");
+ p += strlen(szFilter + p + 1) + 1;
+ strcpy(szFilter + p + 1, "*.*");
+ p += strlen(szFilter + p + 1) + 1;
+ szFilter[p + 1] = 0;
+
+ memset(&ofn, 0, sizeof(OPENFILENAME));
+ ofn.lStructSize = sizeof(OPENFILENAME);
+ ofn.hwndOwner = hWnd;
+ ofn.lpstrFilter = szFilter;
+ ofn.nFilterIndex = 1;
+ ofn.lpstrFile = szFile;
+ ofn.nMaxFile = sizeof(szFile);
+ ofn.lpstrFileTitle = szFileTitle;
+ ofn.nMaxFileTitle = sizeof(szFileTitle);
+ ofn.lpstrInitialDir = szDirName;
+ ofn.Flags =
+ OFN_SHOWHELP | OFN_PATHMUSTEXIST | (dialog[0].type ==
+ DIALOG_IFILE ?
+ OFN_FILEMUSTEXIST :
+ OFN_OVERWRITEPROMPT);
+ if (dialog[0].type == DIALOG_IFILE)
+ i = GetOpenFileName(&ofn);
+ else
+ i = GetSaveFileName(&ofn);
+ helptopic = "main";
+ if (i) {
+ return (strdup(ofn.lpstrFile));
+ }
+ return NULL;
+}
+
+
+static void
+win32_filedialog(struct uih_context *uih, CONST menuitem * item,
+ CONST menudialog * dialog)
+{
+ char *name = win32_dofiledialog(uih, item, dialog);
+ if (name) {
+ dialogparam *param = malloc(sizeof(dialogparam));
+ param->dstring = name;
+ ui_menuactivate(item, param);
+ }
+}
+
+static void win32_freedialog(struct dialogrecord *r)
+{
+ if (r->next)
+ r->next->prev = r->prev;
+ if (r->prev)
+ r->prev->next = r->next;
+ else
+ firstdialog = r->next;
+ free(r);
+}
+
+static int win32_dodialog(struct dialogrecord *r, HWND hDLG)
+{
+ dialogparam *p = calloc(sizeof(*p), r->nitems);
+ int i;
+ char s[256];
+ for (i = 0; i < r->nitems; i++) {
+ switch (r->dialog[i].type) {
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+ case DIALOG_STRING:
+ case DIALOG_KEYSTRING:
+ GetDlgItemText(hDLG, i * PERITEM + ITEMSTART, s, sizeof(s));
+ p[i].dstring = strdup(s);
+ break;
+ case DIALOG_INT:
+ GetDlgItemText(hDLG, i * PERITEM + ITEMSTART, s, sizeof(s));
+ p[i].dint = r->dialog[i].defint;
+ sscanf(s, "%i", &p[i].dint);
+ break;
+ case DIALOG_FLOAT:
+ GetDlgItemText(hDLG, i * PERITEM + ITEMSTART, s, sizeof(s));
+ p[i].number = r->dialog[i].deffloat;
+ p[i].number = x_strtold(s, NULL);
+ break;
+ case DIALOG_COORD:
+ GetDlgItemText(hDLG, i * PERITEM + ITEMSTART, s, sizeof(s));
+ p[i].dcoord[0] = r->dialog[i].deffloat;
+ p[i].dcoord[0] = x_strtold(s, NULL);
+ GetDlgItemText(hDLG, i * PERITEM + ITEMSTART + 1, s,
+ sizeof(s));
+ p[i].dcoord[1] = r->dialog[i].deffloat2;
+ p[i].dcoord[1] = x_strtold(s, NULL);
+ break;
+ case DIALOG_CHOICE:
+ /*x_message("Choice is not implemented yet"); */
+ {
+ int y;
+ y = LOWORD(SendDlgItemMessage
+ (hDLG, i * PERITEM + ITEMSTART, CB_GETCURSEL, 0,
+ 0L));
+ p[i].dint =
+ LOWORD(SendDlgItemMessage
+ (hDLG, i * PERITEM + ITEMSTART, CB_GETITEMDATA,
+ (WPARAM) y, 0L));
+ }
+ }
+ }
+ ui_menuactivate(r->item, p);
+ return 1;
+}
+
+static BOOL APIENTRY
+DialogHandler(HWND hDLG, UINT message, UINT wParam, LONG lParam)
+{
+ struct dialogrecord *rec = firstdialog;
+ int i;
+/* while(rec->windialog!=hDLG) rec=rec->next; */
+ if (!rec->windialog)
+ rec->windialog = hDLG;
+ switch (message) {
+ case WM_INITDIALOG:
+ /*x_message("Creating dialog"); */
+ ShowWindow(hDLG, SW_HIDE);
+ /*CenterWindow (hDLG, GetWindow (hDLG, GW_OWNER)); */
+ if (GetWindowText(hDLG, text, GetWindowTextLength(hDLG) + 1) > 0);
+ SetWindowText(hDLG, gettext(text));
+ SetDlgItemText(hDLG, OK, gettext("OK"));
+ SetDlgItemText(hDLG, CANCEL, gettext("Cancel"));
+ SetDlgItemText(hDLG, HELP, gettext("Help"));
+ for (i = 0; rec->dialog[i].question; i++) {
+ if (GetDlgItemText
+ (hDLG, i * PERITEM + QUESTIONSTART, text, 100) > 0)
+ SetDlgItemText(hDLG, i * PERITEM + QUESTIONSTART,
+ gettext(text));
+ switch (rec->dialog[i].type) {
+ char s[256];
+ case DIALOG_STRING:
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+ SetDlgItemText(hDLG, i * PERITEM + ITEMSTART,
+ rec->dialog[i].defstr);
+ break;
+ case DIALOG_INT:
+ sprintf(s, "%i", rec->dialog[i].defint);
+ SetDlgItemText(hDLG, i * PERITEM + ITEMSTART, s);
+ break;
+ case DIALOG_COORD:
+ sprintf(s, "%g", (double) rec->dialog[i].deffloat2);
+ SetDlgItemText(hDLG, i * PERITEM + ITEMSTART + 1, s);
+ /*Fall trought */
+ case DIALOG_FLOAT:
+ sprintf(s, "%g", (double) rec->dialog[i].deffloat);
+ SetDlgItemText(hDLG, i * PERITEM + ITEMSTART, s);
+ break;
+ case DIALOG_CHOICE:
+ {
+ CONST char **strings =
+ (CONST char **) rec->dialog[i].defstr;
+ int y;
+ int pos;
+ for (y = 0; strings[y]; y++) {
+ pos =
+ LOWORD(SendDlgItemMessage
+ (hDLG, i * PERITEM + ITEMSTART,
+ CB_ADDSTRING, (WPARAM) 0,
+ (LPARAM) (LPSTR) strings[y]));
+ /*x_message("%s %i",strings[y],pos); */
+ SendMessage(GetDlgItem
+ (hDLG, i * PERITEM + ITEMSTART),
+ CB_SETITEMDATA, (WPARAM) pos, y);
+ if (y == rec->dialog[i].defint) {
+ pos =
+ SendMessage(GetDlgItem
+ (hDLG,
+ i * PERITEM + ITEMSTART),
+ CB_SETCURSEL, (WPARAM) pos,
+ 0L);
+ /*x_message("Default %i",pos); */
+ }
+ }
+ pos =
+ LOWORD(SendDlgItemMessage
+ (hDLG, i * PERITEM + ITEMSTART, CB_GETCOUNT,
+ (WPARAM) 0, 0));
+ /*x_message("Count %i",pos); */
+ }
+ break;
+ }
+ }
+ CenterWindow(hDLG, GetWindow(hDLG, GW_OWNER));
+ ShowWindow(hDLG, SW_SHOW);
+ return (TRUE);
+ case WM_SYSCOMMAND:
+ if (wParam == SC_CLOSE) {
+ EndDialog(hDLG, 0);
+ return (TRUE);
+ }
+ break;
+ case WM_COMMAND:
+ if (wParam == OK) {
+ if (win32_dodialog(rec, hDLG)) {
+ EndDialog(hDLG, 0);
+ return (TRUE);
+ }
+ }
+ if (wParam == CANCEL) {
+ EndDialog(hDLG, 0);
+ return (TRUE);
+ }
+ if (wParam == HELP) {
+ win32_help(rec->c, rec->item->shortname);
+ return (TRUE);
+ }
+ {
+ int i = (wParam - ITEMSTART) / PERITEM;
+ int pos = (wParam - ITEMSTART) % PERITEM;
+ if (i >= 0 && i < rec->nitems) {
+ if (pos == 1
+ && (rec->dialog[i].type == DIALOG_IFILE
+ || rec->dialog[i].type == DIALOG_OFILE)) {
+ /*x_message("File dialog\n"); */
+ char *file =
+ win32_dofiledialog(rec->c, rec->item,
+ rec->dialog + i);
+ if (file) {
+ SetDlgItemText(hDLG, wParam - 1, file);
+ free(file);
+ }
+ }
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
+
+#define INPUTSIZE 20
+#define XBORDER 0
+#define YBORDER 5
+#define XSEP 4
+
+#define CHARWIDTH 4
+#define MINWIDTH ((7*3)*CHARWIDTH)
+#define LINEHEIGHT 14
+#define TEXTHEIGHT 11
+
+static FILE *file;
+static void
+win32_outputdialog(struct uih_context *uih, CONST struct menuitem *item)
+{
+ CONST menudialog *dialog;
+ int leftsize = 0;
+ int rightsize = 0;
+ int width, height;
+ int i;
+ rightsize = INPUTSIZE;
+ if (item->type != MENU_DIALOG && item->type != MENU_CUSTOMDIALOG)
+ return;
+ if (item->flags & MENUFLAG_NOMENU)
+ return;
+ dialog = menu_getdialog(uih, item);
+ for (i = 0; dialog[i].question; i++) {
+ if (leftsize < (int) strlen(dialog[i].question))
+ leftsize = strlen(dialog[i].question);
+ }
+ if (i == 1
+ && (dialog[0].type == DIALOG_IFILE
+ || dialog[0].type == DIALOG_OFILE))
+ return;
+ leftsize = XBORDER + leftsize * CHARWIDTH + XSEP;
+ rightsize = XBORDER + rightsize * CHARWIDTH;
+ width = leftsize + rightsize;
+ if (width < MINWIDTH)
+ width = MINWIDTH;
+ height = 2 * YBORDER + (i + 1) * LINEHEIGHT;
+ fprintf(file, "%sBox DIALOG %i, %i, %i, %i\n", item->shortname, 52,
+ 57, width, height);
+ fprintf(file, "STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU\n");
+ fprintf(file, "CAPTION \"%s\"\n", item->name);
+ fprintf(file, "FONT 8, \"MS Shell Dlg\"\n");
+ fprintf(file, "BEGIN\n");
+ for (i = 0; dialog[i].question; i++) {
+ fprintf(file, " RTEXT \"%s\", %i, %i, %i, %i, %i, WS_GROUP\n",
+ dialog[i].question,
+ i * PERITEM + QUESTIONSTART,
+ 0, YBORDER + i * LINEHEIGHT, leftsize - XSEP, TEXTHEIGHT);
+ switch (dialog[i].type) {
+ case DIALOG_INT:
+ case DIALOG_FLOAT:
+ case DIALOG_STRING:
+ case DIALOG_KEYSTRING:
+ fprintf(file,
+ " EDITTEXT %i, %i, %i, %i, %i, ES_AUTOHSCROLL | WS_TABSTOP\n",
+ i * PERITEM + ITEMSTART, leftsize,
+ i * LINEHEIGHT + YBORDER, rightsize - XSEP,
+ TEXTHEIGHT);
+ break;
+ case DIALOG_COORD:
+ fprintf(file,
+ " EDITTEXT %i, %i, %i, %i, %i, ES_AUTOHSCROLL | WS_TABSTOP\n",
+ i * PERITEM + ITEMSTART, leftsize,
+ i * LINEHEIGHT + YBORDER,
+ (rightsize - XSEP - 4 * CHARWIDTH) / 2, TEXTHEIGHT);
+ fprintf(file,
+ " EDITTEXT %i, %i, %i, %i, %i, ES_AUTOHSCROLL | WS_TABSTOP\n",
+ i * PERITEM + ITEMSTART + 1,
+ leftsize + (rightsize - XSEP + CHARWIDTH) / 2,
+ i * LINEHEIGHT + YBORDER,
+ (rightsize - XSEP - 4 * CHARWIDTH) / 2, TEXTHEIGHT);
+ fprintf(file, " RTEXT \"+\", -1, %i, %i, %i, %i\n",
+ leftsize + (rightsize - XSEP - 2 * CHARWIDTH) / 2,
+ YBORDER + i * LINEHEIGHT, CHARWIDTH, TEXTHEIGHT);
+ fprintf(file, " RTEXT \"i\", -1, %i, %i, %i, %i\n",
+ leftsize + rightsize - XSEP - CHARWIDTH,
+ YBORDER + i * LINEHEIGHT, CHARWIDTH, TEXTHEIGHT);
+ break;
+ case DIALOG_CHOICE:
+ fprintf(file,
+ " COMBOBOX %i, %i, %i, %i, %i, CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP\n",
+ i * PERITEM + ITEMSTART, leftsize,
+ i * LINEHEIGHT + YBORDER, rightsize - XSEP,
+ TEXTHEIGHT * 10);
+ break;
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+#define BROWSEWIDTH ((strlen("Browse")+1)*CHARWIDTH)
+ fprintf(file,
+ " EDITTEXT %i, %i, %i, %i, %i, ES_AUTOHSCROLL | WS_TABSTOP\n",
+ i * PERITEM + ITEMSTART, leftsize,
+ i * LINEHEIGHT + YBORDER,
+ rightsize - 2 * XSEP - BROWSEWIDTH, TEXTHEIGHT);
+ fprintf(file,
+ " PUSHBUTTON \"Browse\", %i, %i, %i, %i, %i, WS_GROUP\n",
+ i * PERITEM + ITEMSTART + 1,
+ leftsize + rightsize - XSEP - BROWSEWIDTH,
+ i * LINEHEIGHT + YBORDER, BROWSEWIDTH, TEXTHEIGHT);
+ break;
+ }
+ }
+ fprintf(file,
+ " DEFPUSHBUTTON \"&OK\", %i, %i, %i, %i, %i, WS_GROUP\n", OK,
+ XSEP / 2, i * LINEHEIGHT + YBORDER, width / 3 - XSEP, 14);
+ fprintf(file, " PUSHBUTTON \"&Cancel\", %i, %i, %i, %i, %i\n", CANCEL,
+ width / 3 + XSEP / 2, i * LINEHEIGHT + YBORDER,
+ width / 3 - XSEP, 14);
+ fprintf(file, " PUSHBUTTON \"&Help\", %i, %i, %i, %i, %i\n", HELP,
+ 2 * width / 3 + XSEP / 2, i * LINEHEIGHT + YBORDER,
+ width / 3 - XSEP, 14);
+ fprintf(file, "END\n");
+}
+
+void win32_genresources(struct uih_context *uih)
+{
+ file = fopen("xaos.dlg", "w");
+ menu_forall(uih, win32_outputdialog);
+ fclose(file);
+
+}
+
+void win32_dialog(struct uih_context *uih, CONST char *name)
+{
+ CONST menuitem *item = menu_findcommand(name);
+ CONST menudialog *dialog;
+ int nitems;
+ char s[256];
+
+ if (!item)
+ return;
+ dialog = menu_getdialog(uih, item);
+ if (!dialog)
+ return;
+ for (nitems = 0; dialog[nitems].question; nitems++);
+ if (nitems == 1
+ && (dialog[0].type == DIALOG_IFILE
+ || dialog[0].type == DIALOG_OFILE))
+ win32_filedialog(uih, item, dialog);
+ else {
+ struct dialogrecord *r = calloc(sizeof(*r), 1);
+ r->next = firstdialog;
+ firstdialog = r;
+ r->prev = NULL;
+ r->item = item;
+ r->nitems = nitems;
+ r->dialog = dialog;
+ r->c = uih;
+ sprintf(s, "%sBox", item->shortname);
+ if (DialogBox(hInstance, s, hWnd, DialogHandler) == -1) {
+ /*r->windialog=CreateDialog (hInstance, s, hWnd, DialogHandler);
+ if(r->windialog==NULL) { */
+ x_message("Failed to create dialog %s", item->shortname);
+ win32_freedialog(r);
+ }
+ win32_freedialog(r);
+ /*x_message("Dialog (%s %i %s) not implemented", name, nitems, dialog[0].question); */
+ }
+}
diff --git a/src/ui/ui-drv/win32/winmenu.c b/src/ui/ui-drv/win32/winmenu.c
new file mode 100644
index 0000000..d04f941
--- /dev/null
+++ b/src/ui/ui-drv/win32/winmenu.c
@@ -0,0 +1,243 @@
+#include <windows.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <string.h>
+#include <config.h>
+/*#include <filter.h>
+ #include <ui_helper.h> */
+#include <xerror.h>
+#include <ui.h>
+#include <xmenu.h>
+#include "ui_win32.h"
+#define IDMUL 64
+#define MAIN 0
+#define POPUP 1
+#define WSUBMENU 2
+struct menurecord {
+ int type;
+ int id;
+ struct uih_context *c;
+ CONST menuitem *item;
+ struct menurecord *nextrecord;
+ struct menurecord *prevrecord;
+ HMENU menu;
+ struct menurecord *submenu;
+ struct menurecord *nextsubmenu;
+} *firstrecord;
+struct menurecord rootmenu;
+
+static void win32_appendmenu(struct uih_context *c,
+ struct menurecord *menu);
+HMENU win32_createrootmenu()
+{
+ /*printf("Createrootmenu\n"); */
+ rootmenu.id = 0;
+ rootmenu.menu = CreateMenu();
+ rootmenu.nextrecord = firstrecord;
+ rootmenu.prevrecord = NULL;
+ firstrecord = &rootmenu;
+ rootmenu.nextsubmenu = NULL;
+ rootmenu.submenu = NULL;
+ /*printf("Createrootmenu OK\n"); */
+ return rootmenu.menu;
+};
+
+static struct menurecord *win32_createmenu(struct uih_context *c,
+ CONST char *name, int type)
+{
+ struct menurecord *m = calloc(sizeof(*m), 1);
+ static int id = 1;
+ /*printf("Createmenu %s\n",name); */
+ m->id = id++;
+ m->type = type;
+ if (type != POPUP)
+ m->menu = CreateMenu();
+ else
+ m->menu = CreatePopupMenu();
+ m->c = c;
+ m->item = menu_findcommand(name);
+ m->nextrecord = firstrecord;
+ m->prevrecord = NULL;
+ firstrecord = m;
+ m->nextsubmenu = NULL;
+ m->submenu = NULL;
+ win32_appendmenu(c, m);
+ /*printf("Createmenu OK\n"); */
+ return m;
+};
+
+static void
+win32_appendmenu(struct uih_context *c, struct menurecord *menu)
+{
+ int i, y, hotkeyed;
+ CONST menuitem *item;
+ char out[256];
+ char used[256];
+ memset(used, 0, 256);
+ /*printf("Appendmenu %s\n",menu->item->shortname); */
+ for (i = 0; (item = menu_item(menu->item->shortname, i)) != NULL; i++) {
+ struct menurecord *submenu = NULL;
+ int flags = MF_ENABLED | MF_STRING;
+ if (item->type == MENU_SEPARATOR)
+ flags |= MF_SEPARATOR;
+ if (item->type == MENU_SUBMENU) {
+ submenu = win32_createmenu(c, item->shortname, WSUBMENU);
+ flags |= MF_POPUP;
+ submenu->nextsubmenu = menu->submenu;
+ menu->submenu = submenu;
+ }
+ if (item->flags & (MENUFLAG_RADIO | MENUFLAG_CHECKBOX) &&
+ menu_enabled(item, c))
+ flags |= MF_CHECKED;
+ /*printf(" %s\n",item->name); */
+
+ hotkeyed = 0;
+ for (y = 0; item->name[y]; y++) {
+ if (!hotkeyed) {
+ unsigned char c = tolower(item->name[y]);
+ if (((c >= '0' && c <= '9') || (c >= 'a' && c <= 'z'))
+ && !used[c])
+ used[c] = 1, hotkeyed = 1, out[y] = '&';
+ }
+ out[y + hotkeyed] = item->name[y];
+ }
+ out[y + hotkeyed] = 0;
+ if (item->type == MENU_CUSTOMDIALOG || item->type == MENU_DIALOG)
+ strcat(out, "...");
+ if (menu->type != MAIN && item->key) {
+ strcat(out, "\t");
+ strcat(out, item->key);
+ }
+ AppendMenu(menu->menu, flags,
+ (submenu !=
+ NULL ? (UINT) submenu->menu : (UINT) (menu->id *
+ IDMUL + i)),
+ out);
+
+ }
+ /*printf("Appendmenu OK\n"); */
+}
+
+static void win32_freestructures(struct menurecord *menu)
+{
+ struct menurecord *sub, *nextsub;
+ /*printf("Freestructures\n"); */
+ sub = menu->submenu;
+ while (sub != NULL) {
+ nextsub = sub->nextsubmenu;
+ win32_freestructures(sub);
+ sub = nextsub;
+ }
+ if (menu->nextrecord)
+ menu->nextrecord->prevrecord = menu->prevrecord;
+ if (menu->prevrecord)
+ menu->prevrecord->nextrecord = menu->nextrecord;
+ else
+ firstrecord = menu->nextrecord;
+ free(menu);
+}
+
+void win32_pressed(int id)
+{
+ struct menurecord *menu = firstrecord;
+ /*printf("Pressed\n"); */
+ while (menu) {
+ if (id / IDMUL == menu->id) {
+ ui_menuactivate(menu_item(menu->item->shortname, id % IDMUL),
+ NULL);
+ return;
+ }
+ menu = menu->nextrecord;
+ }
+ x_error("Unknown menu");
+}
+
+/* first destroy the old contents */
+void win32_dorootmenu(struct uih_context *uih, CONST char *name)
+{
+ struct menurecord *sub, *nextsub;
+ /*printf("dorootmenu %s\n",name); */
+ /* Delete the old entries */
+ while (DeleteMenu(rootmenu.menu, 0, MF_BYPOSITION));
+ sub = rootmenu.submenu;
+ rootmenu.c = uih;
+ while (sub != NULL) {
+ nextsub = sub->nextsubmenu;
+ win32_freestructures(sub);
+ sub = nextsub;
+ }
+ rootmenu.item = menu_findcommand(name);
+ rootmenu.submenu = NULL;
+ win32_appendmenu(uih, &rootmenu);
+ SetMenu(hWnd, rootmenu.menu);
+ /*printf("OK\n"); */
+}
+
+/* Check all created menus to see if there is the changed item and do changes
+ as neccesary.
+
+ This implementation is rather ugly and slow. Try if it is fast enought
+ and change it otherwise */
+void win32_enabledisable(struct uih_context *uih, CONST char *name)
+{
+ CONST struct menuitem *chgitem = menu_findcommand(name);
+ CONST struct menuitem *item;
+ struct menurecord *menu = firstrecord;
+ int i;
+ int checked = menu_enabled(chgitem, uih);
+ while (menu) {
+ if (menu->item != NULL)
+ for (i = 0;
+ (item = menu_item(menu->item->shortname, i)) != NULL;
+ i++) {
+ if (item == chgitem) {
+ if (chgitem->flags & MENUFLAG_RADIO && checked) {
+ int y;
+ for (y = 0;
+ (item =
+ menu_item(menu->item->shortname, y)) != NULL;
+ y++)
+ if (item->flags & MENUFLAG_RADIO)
+ CheckMenuItem(menu->menu,
+ menu->id * IDMUL + y,
+ MF_BYCOMMAND | MF_UNCHECKED);
+ }
+ CheckMenuItem(menu->menu, menu->id * IDMUL + i,
+ MF_BYCOMMAND | (checked ? MF_CHECKED :
+ MF_UNCHECKED));
+ }
+ }
+ menu = menu->nextrecord;
+ }
+}
+
+void win32_menu(struct uih_context *c, CONST char *name)
+{
+
+ POINT p;
+ struct menurecord *m = firstrecord;
+
+ /*Delete records about all popups, since they are closed now */
+ while (m) {
+ if (m->type == POPUP) {
+ DestroyMenu(m->menu), win32_freestructures(m);
+ break;
+ }
+ m = m->nextrecord;
+ }
+ m = win32_createmenu(c, name, POPUP);
+ GetCursorPos(&p);
+ /*printf("menu %s %i %i\n",name,p.x,p.y); */
+ TrackPopupMenu(m->menu, 0, p.x, p.y, 0, hWnd, 0);
+}
+
+void win32_uninitializewindows()
+{
+ while (firstrecord) {
+ struct menurecord *r = firstrecord;
+ while (r->type == WSUBMENU)
+ r = r->nextrecord;
+ DestroyMenu(r->menu);
+ win32_freestructures(r);
+ }
+}
diff --git a/src/ui/ui-drv/win32/xaos.dlg b/src/ui/ui-drv/win32/xaos.dlg
new file mode 100644
index 0000000..132a122
--- /dev/null
+++ b/src/ui/ui-drv/win32/xaos.dlg
@@ -0,0 +1,228 @@
+lettersBox DIALOG 52, 57, 160, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Letters per second"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Letters per second:", 100, 0, 5, 76, 11, WS_GROUP
+ EDITTEXT 10, 80, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 49, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 55, 19, 49, 14
+ PUSHBUTTON "&Help", 3, 108, 19, 49, 14
+END
+commandBox DIALOG 52, 57, 136, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Command"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Your command:", 100, 0, 5, 52, 11, WS_GROUP
+ EDITTEXT 10, 56, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 41, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 47, 19, 41, 14
+ PUSHBUTTON "&Help", 3, 92, 19, 41, 14
+END
+renderanimBox DIALOG 52, 57, 204, 192
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Render animation"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "File to render:", 100, 0, 5, 120, 11, WS_GROUP
+ EDITTEXT 10, 124, 5, 44, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ PUSHBUTTON "Browse", 11, 172, 5, 28, 11, WS_GROUP
+ RTEXT "Basename:", 105, 0, 19, 120, 11, WS_GROUP
+ EDITTEXT 15, 124, 19, 44, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ PUSHBUTTON "Browse", 16, 172, 19, 28, 11, WS_GROUP
+ RTEXT "Width:", 110, 0, 33, 120, 11, WS_GROUP
+ EDITTEXT 20, 124, 33, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "Height:", 115, 0, 47, 120, 11, WS_GROUP
+ EDITTEXT 25, 124, 47, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "Real width (cm):", 120, 0, 61, 120, 11, WS_GROUP
+ EDITTEXT 30, 124, 61, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "Real height (cm):", 125, 0, 75, 120, 11, WS_GROUP
+ EDITTEXT 35, 124, 75, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "Framerate:", 130, 0, 89, 120, 11, WS_GROUP
+ EDITTEXT 40, 124, 89, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "Image type:", 135, 0, 103, 120, 11, WS_GROUP
+ COMBOBOX 45, 124, 103, 76, 110, CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Antialiasing:", 140, 0, 117, 120, 11, WS_GROUP
+ COMBOBOX 50, 124, 117, 76, 110, CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Always recalculate:", 145, 0, 131, 120, 11, WS_GROUP
+ COMBOBOX 55, 124, 131, 76, 110, CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Calculate MPEG motion vectors:", 150, 0, 145, 120, 11, WS_GROUP
+ COMBOBOX 60, 124, 145, 76, 110, CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ RTEXT "Recommended I frame distance:", 155, 0, 159, 120, 11, WS_GROUP
+ EDITTEXT 65, 124, 159, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 173, 64, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 70, 173, 64, 14
+ PUSHBUTTON "&Help", 3, 138, 173, 64, 14
+END
+textBox DIALOG 52, 57, 104, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Display text"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Text:", 100, 0, 5, 20, 11, WS_GROUP
+ EDITTEXT 10, 24, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 30, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 36, 19, 30, 14
+ PUSHBUTTON "&Help", 3, 71, 19, 30, 14
+END
+colorBox DIALOG 52, 57, 108, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Color"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Color:", 100, 0, 5, 24, 11, WS_GROUP
+ COMBOBOX 10, 28, 5, 76, 110, CBS_DROPDOWNLIST | CBS_HASSTRINGS | WS_VSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 32, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 38, 19, 32, 14
+ PUSHBUTTON "&Help", 3, 74, 19, 32, 14
+END
+usrformBox DIALOG 52, 57, 116, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "User formula"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Formula:", 100, 0, 5, 32, 11, WS_GROUP
+ EDITTEXT 10, 36, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 34, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 40, 19, 34, 14
+ PUSHBUTTON "&Help", 3, 79, 19, 34, 14
+END
+usrformInitBox DIALOG 52, 57, 144, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "User initialization"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Initialization:", 100, 0, 5, 60, 11, WS_GROUP
+ EDITTEXT 10, 64, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 44, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 50, 19, 44, 14
+ PUSHBUTTON "&Help", 3, 98, 19, 44, 14
+END
+uimandelbrotBox DIALOG 52, 57, 128, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Mandelbrot mode"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Julia-seed:", 100, 0, 5, 44, 11, WS_GROUP
+ EDITTEXT 10, 48, 5, 30, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ EDITTEXT 11, 88, 5, 30, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "+", -1, 82, 5, 4, 11
+ RTEXT "i", -1, 120, 5, 4, 11
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 38, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 44, 19, 38, 14
+ PUSHBUTTON "&Help", 3, 87, 19, 38, 14
+END
+uiperturbationBox DIALOG 52, 57, 136, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Perturbation"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Perturbation:", 100, 0, 5, 52, 11, WS_GROUP
+ EDITTEXT 10, 56, 5, 30, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ EDITTEXT 11, 96, 5, 30, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "+", -1, 90, 5, 4, 11
+ RTEXT "i", -1, 128, 5, 4, 11
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 41, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 47, 19, 41, 14
+ PUSHBUTTON "&Help", 3, 92, 19, 41, 14
+END
+uiviewBox DIALOG 52, 57, 112, 66
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "View"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Center:", 100, 0, 5, 28, 11, WS_GROUP
+ EDITTEXT 10, 32, 5, 30, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ EDITTEXT 11, 72, 5, 30, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "+", -1, 66, 5, 4, 11
+ RTEXT "i", -1, 104, 5, 4, 11
+ RTEXT "Radius:", 105, 0, 19, 28, 11, WS_GROUP
+ EDITTEXT 15, 32, 19, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "Angle:", 110, 0, 33, 28, 11, WS_GROUP
+ EDITTEXT 20, 32, 33, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 47, 33, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 39, 47, 33, 14
+ PUSHBUTTON "&Help", 3, 76, 47, 33, 14
+END
+paletteBox DIALOG 52, 57, 152, 66
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Custom palette"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Algorithm number:", 100, 0, 5, 68, 11, WS_GROUP
+ EDITTEXT 10, 72, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "Seed:", 105, 0, 19, 68, 11, WS_GROUP
+ EDITTEXT 15, 72, 19, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ RTEXT "Shift:", 110, 0, 33, 68, 11, WS_GROUP
+ EDITTEXT 20, 72, 33, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 47, 46, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 52, 47, 46, 14
+ PUSHBUTTON "&Help", 3, 103, 47, 46, 14
+END
+cyclingspeedBox DIALOG 52, 57, 156, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Color cycling speed"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Frames per second:", 100, 0, 5, 72, 11, WS_GROUP
+ EDITTEXT 10, 76, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 48, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 54, 19, 48, 14
+ PUSHBUTTON "&Help", 3, 106, 19, 48, 14
+END
+shiftpaletteBox DIALOG 52, 57, 112, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Shift palette"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Amount:", 100, 0, 5, 28, 11, WS_GROUP
+ EDITTEXT 10, 32, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 33, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 39, 19, 33, 14
+ PUSHBUTTON "&Help", 3, 76, 19, 33, 14
+END
+maxiterBox DIALOG 52, 57, 128, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Iterations"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Iterations:", 100, 0, 5, 44, 11, WS_GROUP
+ EDITTEXT 10, 48, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 38, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 44, 19, 38, 14
+ PUSHBUTTON "&Help", 3, 87, 19, 38, 14
+END
+bailoutBox DIALOG 52, 57, 116, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Bailout"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Bailout:", 100, 0, 5, 32, 11, WS_GROUP
+ EDITTEXT 10, 36, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 34, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 40, 19, 34, 14
+ PUSHBUTTON "&Help", 3, 79, 19, 34, 14
+END
+rotationspeedBox DIALOG 52, 57, 168, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Rotation speed"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Rotations per second:", 100, 0, 5, 84, 11, WS_GROUP
+ EDITTEXT 10, 88, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 52, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 58, 19, 52, 14
+ PUSHBUTTON "&Help", 3, 114, 19, 52, 14
+END
+speedBox DIALOG 52, 57, 140, 38
+STYLE DS_MODALFRAME | WS_CAPTION | WS_SYSMENU
+CAPTION "Zooming speed"
+FONT 8, "MS Shell Dlg"
+BEGIN
+ RTEXT "Zooming speed:", 100, 0, 5, 56, 11, WS_GROUP
+ EDITTEXT 10, 60, 5, 76, 11, ES_AUTOHSCROLL | WS_TABSTOP
+ DEFPUSHBUTTON "&OK", 1, 2, 19, 42, 14, WS_GROUP
+ PUSHBUTTON "&Cancel", 2, 48, 19, 42, 14
+ PUSHBUTTON "&Help", 3, 95, 19, 42, 14
+END
diff --git a/src/ui/ui-drv/win32/xaos.exe.manifest b/src/ui/ui-drv/win32/xaos.exe.manifest
new file mode 100644
index 0000000..9a3a947
--- /dev/null
+++ b/src/ui/ui-drv/win32/xaos.exe.manifest
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
+<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
+<assemblyIdentity version="3.5.0.0" processorArchitecture="X86" name="net.sourceforge.XaoS" type="win32" />
+<description>Your application description here.</description>
+<dependency>
+<dependentAssembly>
+<assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" processorArchitecture="X86" publicKeyToken="6595b64144ccf1df" language="*" />
+</dependentAssembly>
+</dependency>
+</assembly>
diff --git a/src/ui/ui-drv/win32/xaos.ico b/src/ui/ui-drv/win32/xaos.ico
new file mode 100644
index 0000000..54a99cf
--- /dev/null
+++ b/src/ui/ui-drv/win32/xaos.ico
Binary files differ
diff --git a/src/ui/ui-drv/win32/xaos.rc b/src/ui/ui-drv/win32/xaos.rc
new file mode 100644
index 0000000..5564505
--- /dev/null
+++ b/src/ui/ui-drv/win32/xaos.rc
@@ -0,0 +1,16 @@
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+#include <windows.h>
+#include "resource.h"
+#include "about.h"
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "xaos.exe.manifest"
+BIG ICON DISCARDABLE "xaos.ico"
+SMALL ICON DISCARDABLE "small.ico"
+
+#include "xaos.dlg"
+#include "version.rc"
+#include "about.rc"
diff --git a/src/ui/ui-drv/x11/Makefile.in b/src/ui/ui-drv/x11/Makefile.in
new file mode 100644
index 0000000..c4ac33c
--- /dev/null
+++ b/src/ui/ui-drv/x11/Makefile.in
@@ -0,0 +1,40 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = xlib.c \
+ ui_x11.c
+
+OBJS = $(SRCS:.c=.o)
+
+TLIB = @LIBPATH@/libuix11.a
+
+
+all: $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $(OBJS)
+ $(RANLIB) $@
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/ui/ui-drv/x11/ui_x11.c b/src/ui/ui-drv/x11/ui_x11.c
new file mode 100644
index 0000000..9b5daa3
--- /dev/null
+++ b/src/ui/ui-drv/x11/ui_x11.c
@@ -0,0 +1,597 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "aconfig.h"
+#ifdef X11_DRIVER
+#include <stdio.h>
+#include <stdlib.h>
+#include <unistd.h>
+#include <signal.h>
+#include <string.h>
+#include <X11/Xlib.h>
+#include <X11/cursorfont.h>
+#include "xlib.h"
+#ifdef MITSHM
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <X11/extensions/XShm.h>
+#endif
+#include <fconfig.h>
+#include <ui.h>
+xlibparam xparams = { 0, 0, 0, 0, NULL, -1 };
+
+static int allocated;
+Cursor normal, xwait, replay;
+
+struct ui_driver x11_driver;
+static xdisplay *d;
+static char *size;
+static int Xsync;
+static int busy;
+static int sharedcolormap;
+#if 0
+static char *selection;
+#endif
+#ifdef MITSHM
+static int Completion;
+#endif
+#ifdef AMIGA
+#define XFlush(x) while(0)
+#endif
+
+static void x11_setpaletterange(ui_palette p, int s, int e)
+{
+ xsetpaletterange(d, p, s, e);
+}
+
+static int x11_set_color(int r, int g, int b, int init)
+{
+ if (init)
+ xfree_colors(d);
+ return (xalloc_color(d, r * 256, g * 256, b * 256, init));
+}
+
+static void x11_print(int x, int y, CONST char *text)
+{
+ xmoveto(d, x, y + x11_driver.textheight - 2);
+ xouttext(d, text);
+
+}
+
+static void x11_flush(void)
+{
+ XFlush(d->display);
+}
+
+static int display;
+static int flipped = 0;
+static void x11_display(void)
+{
+ XFlush(d->display);
+#ifdef MITSHM
+ if (d->SharedMemFlag) {
+ if (busy) {
+ display = 1;
+ return;
+ }
+ busy++;
+ display = 0;
+ }
+#endif
+ if (Xsync)
+ XSync(d->display, 0);
+ if (flipped)
+ xflip_buffers(d), flipped = 0;
+ draw_screen(d);
+#ifdef MITSHM
+ if (d->SharedMemFlag) {
+ XSync(d->display, 0);
+ }
+#endif
+}
+
+static void x11_flip_buffers(void)
+{
+ flipped ^= 1;
+}
+
+static void x11_free_buffers(char *b1, char *b2)
+{
+ if (allocated) {
+ XSync(d->display, 0);
+ allocated = 0;
+ free_image(d);
+ }
+}
+
+static int x11_alloc_buffers(char **b1, char **b2)
+{
+ if (!allocated) {
+ XSync(d->display, 0);
+ allocated = 1;
+ if (!alloc_image(d)) {
+ return (0);
+ }
+ xflip_buffers(d);
+ }
+ *b1 = d->vbuff;
+ *b2 = d->back;
+ flipped = 0;
+#if 0
+ if (d->SharedMemFlag) {
+ x11_driver.flags |= UI_KEEP_BUFFER;
+ }
+#endif
+ return (d->linewidth);
+}
+
+static void x11_getsize(int *w, int *h)
+{
+ XSync(d->display, 0);
+ xupdate_size(d);
+ *w = d->width;
+ *h = d->height;
+}
+
+static void x11_processevents(int wait, int *mx, int *my, int *mb, int *k)
+{
+ static int mousex = 100, mousey = 0;
+ static int iflag = 0;
+ static unsigned int mousebuttons = 0;
+ static int resized;
+ XEvent ev;
+
+
+ if (XPending(d->display) || busy >= 2 || wait) {
+ do {
+ XNextEvent(d->display, &ev);
+ switch (ev.type) {
+ case ClientMessage:
+ if ((int) ev.xclient.format == 32
+ && ev.xclient.data.l[0] == wmDeleteWindow)
+ ui_quit();
+ break;
+ case ButtonRelease:
+ mousex = ev.xbutton.x;
+ mousey = ev.xbutton.y;
+ switch (ev.xbutton.button) {
+ case 1:
+ mousebuttons &= ~BUTTON1;
+ break;
+ case 2:
+ mousebuttons &= ~BUTTON2;
+ break;
+ case 3:
+ mousebuttons &= ~BUTTON3;
+ break;
+ }
+ break;
+ case ButtonPress:
+ mousex = ev.xbutton.x;
+ mousey = ev.xbutton.y;
+ if (!
+ (mousex < 0 || mousey < 0 || mousex > (int) d->width
+ || mousey > (int) d->height)) {
+ switch (ev.xbutton.button) {
+ case 1:
+ mousebuttons |= BUTTON1;
+ break;
+ case 2:
+ mousebuttons |= BUTTON2;
+ break;
+ case 3:
+ mousebuttons |= BUTTON3;
+ break;
+ }
+ }
+ break;
+ case MotionNotify:
+ mousex = ev.xmotion.x;
+ mousey = ev.xmotion.y;
+ mousebuttons =
+ ev.xmotion.state & (BUTTON1 | BUTTON2 | BUTTON3);
+ break;
+ case Expose:
+ if (resized)
+ break;
+ x11_display();
+ break;
+ case ResizeRequest:
+ XResizeWindow(d->display, d->window,
+ ev.xresizerequest.width,
+ ev.xresizerequest.height);
+ XResizeWindow(d->display, d->parent_window,
+ ev.xresizerequest.width,
+ ev.xresizerequest.height);
+ XSync(d->display, 0);
+ resized = 2;
+ ui_resize();
+ resized = 0;
+ break;
+
+ case ConfigureNotify:
+ {
+ int oldw = d->width, oldh = d->height;
+ XSync(d->display, 0);
+ xupdate_size(d);
+ if ((int) d->width != oldw || (int) d->height != oldh) {
+ resized = 2;
+ ui_resize();
+ resized = 0;
+ }
+ }
+ break;
+ case KeyRelease:
+ {
+ switch (XLookupKeysym(&ev.xkey, 0)) {
+ case XK_Left:
+ iflag &= ~1;
+ break;
+ case XK_Right:
+ iflag &= ~2;
+ break;
+ case XK_Up:
+ iflag &= ~4;
+ break;
+ case XK_Down:
+ iflag &= ~8;
+ break;
+ }
+ }
+ break;
+ case KeyPress:
+ {
+ KeySym ksym;
+ switch (ksym = XLookupKeysym(&ev.xkey, 0)) {
+ case XK_Left:
+ iflag |= 1;
+ ui_key(UIKEY_LEFT);
+ break;
+ case XK_Right:
+ iflag |= 2;
+ ui_key(UIKEY_RIGHT);
+ break;
+ case XK_Up:
+ iflag |= 4;
+ ui_key(UIKEY_UP);
+ break;
+ case XK_Down:
+ iflag |= 8;
+ ui_key(UIKEY_DOWN);
+ break;
+#ifdef XK_Page_Up
+ case XK_Page_Up:
+ iflag |= 4;
+ ui_key(UIKEY_PGUP);
+ break;
+ case XK_Page_Down:
+ iflag |= 8;
+ ui_key(UIKEY_PGDOWN);
+ break;
+#endif
+ case XK_Escape:
+ ui_key(UIKEY_ESC);
+ case XK_BackSpace:
+ ui_key(UIKEY_BACKSPACE);
+ break; /* This statement was missing.
+ I'm not sure if this is needed
+ because new X drivers handle
+ UIKEY_BACKSPACE better or
+ double backspaces were problems
+ in earlier versions of XaoS, too.
+ -- Zoltan, 2004-10-30 */
+ default:
+ {
+ CONST char *name;
+ char buff[256];
+ if (ksym == XK_F1)
+ name = "h";
+ else {
+ name = buff;
+ buff[XLookupString
+ (&ev.xkey, buff, 256, &ksym, NULL)] =
+ 0;
+ }
+ if (strlen(name) == 1) {
+ if (ui_key(*name) == 2) {
+ return;
+ }
+ }
+ }
+ }
+ }
+ break;
+ default:
+#ifdef MITSHM
+ if (ev.xany.type == Completion) {
+ busy--;
+ if (display)
+ x11_display();
+ }
+#endif
+ break;
+ }
+ }
+ while (busy >= 2 || /*XEventsQueued (d->display, QueuedAlready) */
+ XPending(d->display));
+ }
+ *mx = mousex;
+ *my = mousey;
+ *mb = mousebuttons;
+ *k = iflag;
+}
+
+/*static int defined; */
+static void x11_cursor(int mode)
+{
+ /*if(defined)
+ XUndefineCursor(d->display,d->window),defined=0; */
+ switch (mode) {
+ case NORMALMOUSE:
+ XDefineCursor(d->display, d->window, normal);
+ /*defined=1; */
+ break;
+ case WAITMOUSE:
+ XDefineCursor(d->display, d->window, xwait);
+ /*defined=1; */
+ break;
+ case REPLAYMOUSE:
+ XDefineCursor(d->display, d->window, replay);
+ /*defined=1; */
+ break;
+ }
+ XFlush(d->display);
+}
+
+#if 0
+static Atom atom;
+void x11_copy()
+{
+ if (slection)
+ free(selection), selection = NULL;
+ selection = ui_getpos();
+ atom = XInternAtom(d->display, "image/x-xaos.position", False);
+ printf("%i\n", atom);
+ XSetSelectionOwner(d->display, atom, d->window, CurrentTime);
+}
+#endif
+static int x11_init(void)
+{
+ if (xparams.windowid != -1)
+ xparams.rootwindow = xparams.fullscreen = 0;
+ if (xparams.fullscreen || xparams.rootwindow)
+ sharedcolormap = 1; /*private colormap is broken in fullscreen
+ mode (at least at my X) */
+ xparams.privatecolormap = !sharedcolormap;
+ if (xparams.display == NULL) { /*solaris stuff */
+ xparams.display = getenv("DISPLAY");
+ }
+ if (size != NULL) {
+ int x, y;
+ sscanf(size, "%ix%i", &x, &y);
+ if (x < 0)
+ x = XSIZE;
+ if (y < 0)
+ y = YSIZE;
+ d = xalloc_display("XaoS", x, y, &xparams);
+ } else
+ d = xalloc_display("XaoS", XSIZE, YSIZE, &xparams);
+ if (d == NULL)
+ return 0;
+ /*normal=XCreateFontCursor(d->display,XC_arrow); */
+ normal = XCreateFontCursor(d->display, XC_left_ptr);
+ xwait = XCreateFontCursor(d->display, XC_watch);
+ replay = XCreateFontCursor(d->display, XC_dot);
+ if (d->truecolor || d->privatecolormap)
+ x11_driver.flags &= ~RANDOM_PALETTE_SIZE;
+ if (!alloc_image(d)) {
+ xfree_display(d);
+ return (0);
+ }
+ allocated = 1;
+ switch (d->visual->class) {
+ case StaticGray:
+ if (d->depth == 1) {
+ if (BitmapBitOrder(d->display) == LSBFirst)
+ if (WhitePixel(d->display, d->screen))
+ x11_driver.imagetype = UI_LBITMAP;
+ else
+ x11_driver.imagetype = UI_LIBITMAP;
+ else if (WhitePixel(d->display, d->screen))
+ x11_driver.imagetype = UI_MBITMAP;
+ else
+ x11_driver.imagetype = UI_MIBITMAP;
+ } else {
+ /*Warning! this is untested. I believe it works */
+ /*x11_driver.set_color = x11_set_color; */
+ x11_driver.palettestart = 0;
+ x11_driver.paletteend = 256;
+ x11_driver.maxentries = 256;
+ x11_driver.imagetype = UI_GRAYSCALE;
+ }
+ break;
+ case StaticColor:
+ smallcolor:
+ {
+ int end = 256;
+ int start = 0;
+ int entries = d->visual->map_entries;
+ if (d->visual->class == TrueColor) {
+ entries = (int) (d->image[0]->red_mask |
+ d->image[0]->green_mask |
+ d->image[0]->blue_mask);
+ }
+ x11_driver.imagetype = UI_FIXEDCOLOR;
+ if (end > entries)
+ end = entries;
+ if (end < 64)
+ start = 0;
+ x11_driver.set_range = x11_setpaletterange;
+ x11_driver.palettestart = start;
+ x11_driver.paletteend = end;
+ x11_driver.maxentries = end - start;
+ }
+ break;
+ case PseudoColor:
+ case GrayScale:
+ if (d->privatecolormap) {
+ int end = 256;
+ int start = 16;
+ if (end > d->visual->map_entries)
+ end = d->visual->map_entries;
+ if (end < 64)
+ start = 0;
+ x11_driver.set_range = x11_setpaletterange;
+ x11_driver.palettestart = start;
+ x11_driver.paletteend = end;
+ x11_driver.maxentries = end - start;
+ } else {
+ int end = 256;
+ if (end > d->visual->map_entries)
+ end = d->visual->map_entries;
+ x11_driver.set_color = x11_set_color, x11_driver.flags |=
+ RANDOM_PALETTE_SIZE;
+ x11_driver.palettestart = 0;
+ x11_driver.paletteend = end;
+ x11_driver.maxentries = end;
+ }
+ break;
+ case TrueColor:
+ x11_driver.rmask = d->image[0]->red_mask;
+ x11_driver.gmask = d->image[0]->green_mask;
+ x11_driver.bmask = d->image[0]->blue_mask;
+ {
+ unsigned char c[4];
+ int order = MSBFirst;
+ *(unsigned short *) c = 0xff;
+ if (c[0] == (unsigned char) 0xff)
+ order = LSBFirst;
+ if (order != d->image[0]->byte_order) {
+ int shift = 32 - d->image[0]->bits_per_pixel;
+#define SWAPE(c) (((c&0xffU)<<24)|((c&0xff00U)<<8)|((c&0xff0000U)>>8)|((c&0xff000000U)>>24))
+ x11_driver.rmask = SWAPE(x11_driver.rmask) >> shift;
+ x11_driver.gmask = SWAPE(x11_driver.gmask) >> shift;
+ x11_driver.bmask = SWAPE(x11_driver.bmask) >> shift;
+ }
+ }
+ switch (d->image[0]->bits_per_pixel) {
+ case 8:
+ goto smallcolor;
+ case 16:
+ x11_driver.imagetype = UI_TRUECOLOR16;
+ break;
+ case 24:
+ x11_driver.imagetype = UI_TRUECOLOR24;
+ break;
+ case 32:
+ x11_driver.imagetype = UI_TRUECOLOR;
+ break;
+ default:
+ printf("Fatal error:unsupported bits per pixel!\n");
+ }
+ }
+ x11_driver.maxwidth = XDisplayWidth(d->display, d->screen);
+ x11_driver.maxheight = XDisplayHeight(d->display, d->screen);
+ x11_driver.width =
+ ((double) ((unsigned int) XDisplayWidthMM(d->display, d->screen)))
+ / x11_driver.maxwidth / 10.0;
+ x11_driver.height =
+ ((double) ((unsigned int) XDisplayHeightMM(d->display, d->screen)))
+ / x11_driver.maxheight / 10.0;
+ x11_driver.textheight = xsetfont(d, "fixed");
+ x11_driver.textwidth =
+ d->font_struct->max_bounds.rbearing -
+ d->font_struct->min_bounds.lbearing;
+#ifdef MITSHM
+ Completion = XShmGetEventBase(d->display) + ShmCompletion;
+#endif
+ if (d->privatecolormap) {
+ x11_driver.flags |= PALETTE_ROTATION | ROTATE_INSIDE_CALCULATION;
+ }
+ return (1);
+}
+
+static void x11_uninitialise(void)
+{
+#if 0
+ if (selection)
+ free(selection), selection = NULL;
+#endif
+ xfree_colors(d);
+ xfree_display(d);
+}
+
+static void x11_getmouse(int *x, int *y, int *b)
+{
+ int rootx, rooty;
+ Window rootreturn, childreturn;
+ XQueryPointer(d->display, d->window,
+ &rootreturn, &childreturn,
+ &rootx, &rooty, x, y, (unsigned int *) b);
+}
+
+static CONST struct params params[] = {
+ {"", P_HELP, NULL, "X11 driver options:"},
+ {"-display", P_STRING, &xparams.display, "Select display"},
+ {"-size", P_STRING, &size, "Select size of window (WIDTHxHEIGHT)."},
+ {"-sync", P_SWITCH, &Xsync,
+ "Generate sync signals before looking for events. This\n\t\t\thelps on old and buggy HP-UX X servers."},
+ {"-shared", P_SWITCH, &sharedcolormap,
+ "Use shared colormap on pseudocolor display."},
+ {"-usedefault", P_SWITCH, &xparams.usedefault,
+ "Use default visual if autodetection causes troubles."},
+ {"-nomitshm", P_SWITCH, &xparams.nomitshm,
+ "Disable MITSHM extension."},
+ {"-fullscreen", P_SWITCH, &xparams.fullscreen,
+ "Enable fullscreen mode."},
+ {"-windowid", P_NUMBER, &xparams.windowid, "Use selected window."},
+ {"-window-id", P_NUMBER, &xparams.windowid, "Use selected window."},
+ {"-root", P_SWITCH, &xparams.rootwindow, "Use root window."},
+ {NULL, 0, NULL, NULL}
+};
+
+struct ui_driver x11_driver = {
+ "X11",
+ x11_init,
+ x11_getsize,
+ x11_processevents,
+ x11_getmouse,
+ x11_uninitialise,
+ NULL,
+ NULL,
+ x11_print,
+ x11_display,
+ x11_alloc_buffers,
+ x11_free_buffers,
+ x11_flip_buffers,
+ x11_cursor,
+ x11_flush,
+ 8,
+ 8,
+ params,
+ RESOLUTION | PIXELSIZE | NOFLUSHDISPLAY /*| UPDATE_AFTER_RESIZE */ ,
+ 0.0, 0.0,
+ 0, 0,
+ UI_C256,
+ 16, 254, 254 - 16
+};
+
+#endif
diff --git a/src/ui/ui-drv/x11/xlib.c b/src/ui/ui-drv/x11/xlib.c
new file mode 100644
index 0000000..87308b8
--- /dev/null
+++ b/src/ui/ui-drv/x11/xlib.c
@@ -0,0 +1,663 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include "aconfig.h"
+#ifdef X11_DRIVER
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <config.h>
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include "xlib.h"
+#ifdef AMIGA
+#define XFlush(x) while(0)
+#endif
+
+#define chkalloc(n) if (!n) fprintf(stderr, "out of memory\n"), exit(-1)
+
+extern int prog_argc;
+extern char **prog_argv;
+Atom wmDeleteWindow;
+
+int xupdate_size(xdisplay * d)
+{
+ int tmp;
+ Window wtmp;
+ unsigned int width = d->width, height = d->height;
+ XSync(d->display, False);
+ XGetGeometry(d->display, d->window, &wtmp, &tmp, &tmp, &d->width,
+ &d->height, (unsigned int *) &tmp, (unsigned int *) &tmp);
+ if (d->width != width || d->height != height)
+ return 1;
+ return 0;
+}
+
+void xflip_buffers(xdisplay * d)
+{
+ d->back = d->vbuffs[d->current];
+ d->current ^= 1;
+ d->vbuff = d->vbuffs[d->current];
+}
+
+
+void draw_screen(xdisplay * d)
+{
+#ifdef MITSHM
+ if (d->SharedMemFlag) {
+ XShmPutImage(d->display, d->window, d->gc, d->image[d->current], 0,
+ 0, 0, 0, d->bwidth, d->bheight, True);
+ } else
+#endif
+ XPutImage(d->display, d->window, d->gc, d->image[d->current], 0, 0,
+ 0, 0, d->bwidth, d->bheight);
+ /*XFlush(d->display); *//*gives small rest to X but degrades perofrmance
+ too much */
+ d->screen_changed = 0;
+}
+
+#ifdef MITSHM
+int alloc_shm_image(xdisplay * new)
+{
+ register char *ptr;
+ int temp, size = 0, i;
+ ptr = DisplayString(new->display);
+ if (!ptr || (*ptr == ':') || !strncmp(ptr, "localhost:", 10) ||
+ !strncmp(ptr, "unix:", 5) || !strncmp(ptr, "local:", 6)) {
+ new->SharedMemOption =
+ XQueryExtension(new->display, "MIT-SHM", &temp, &temp, &temp);
+ } else {
+ new->SharedMemOption = False;
+ return 0;
+ }
+ new->SharedMemFlag = False;
+
+ if (new->SharedMemFlag) {
+ XShmDetach(new->display, &new->xshminfo[0]);
+ XShmDetach(new->display, &new->xshminfo[1]);
+ new->image[0]->data = (char *) NULL;
+ new->image[1]->data = (char *) NULL;
+ shmdt(new->xshminfo[0].shmaddr);
+ shmdt(new->xshminfo[1].shmaddr);
+ }
+ for (i = 0; i < 2; i++) {
+ if (new->SharedMemOption) {
+ new->SharedMemFlag = False;
+ new->image[i] =
+ XShmCreateImage(new->display, new->visual, new->depth,
+ new->depth == 1 ? XYBitmap : ZPixmap, NULL,
+ &new->xshminfo[i], new->width,
+ new->height);
+ if (new->image[i]) {
+ temp =
+ new->image[i]->bytes_per_line *
+ (new->image[i]->height + 150);
+ new->linewidth = new->image[i]->bytes_per_line;
+ if (temp > size)
+ size = temp;
+ new->xshminfo[i].shmid =
+ shmget(IPC_PRIVATE, size, IPC_CREAT | 0777);
+ if (new->xshminfo[i].shmid != -1) {
+ errno = 0;
+ new->xshminfo[i].shmaddr =
+ (char *) shmat(new->xshminfo[i].shmid, 0, 0);
+ if (!errno) {
+ new->image[i]->data = new->xshminfo[i].shmaddr;
+ new->data[i] = new->vbuffs[i] =
+ (char *) new->image[i]->data;
+ new->xshminfo[i].readOnly = True;
+
+ new->SharedMemFlag =
+ XShmAttach(new->display, &new->xshminfo[i]);
+ XSync(new->display, False);
+ if (!new->SharedMemFlag) {
+ XDestroyImage(new->image[i]);
+ new->image[i] = (XImage *) NULL;
+ new->SharedMemFlag = 0;
+ return 0;
+ }
+ }
+ /* Always Destroy Shared Memory Ident */
+ shmctl(new->xshminfo[i].shmid, IPC_RMID, 0);
+ }
+ if (!new->SharedMemFlag) {
+ XDestroyImage(new->image[i]);
+ new->image[i] = (XImage *) NULL;
+ new->SharedMemFlag = 0;
+ return 0;
+ }
+ } else {
+ new->SharedMemFlag = 0;
+ return 0;
+ }
+ } else {
+ new->SharedMemFlag = 0;
+ return 0;
+ }
+ }
+ new->current = 0;
+ xflip_buffers(new);
+ return 1;
+}
+
+void free_shm_image(xdisplay * d)
+{
+ if (d->SharedMemFlag) {
+ XDestroyImage(d->image[0]);
+ XDestroyImage(d->image[1]);
+ XShmDetach(d->display, &d->xshminfo[0]);
+ XShmDetach(d->display, &d->xshminfo[1]);
+ shmdt(d->xshminfo[0].shmaddr);
+ shmdt(d->xshminfo[1].shmaddr);
+ }
+}
+
+#endif
+
+int alloc_image(xdisplay * d)
+{
+ int i;
+ d->bwidth = d->width;
+ d->bheight = d->height;
+#ifdef MITSHM
+ if (!d->params->nomitshm && d->depth != 1 && alloc_shm_image(d)) {
+ return 1;
+ }
+#endif
+ for (i = 0; i < 2; i++) {
+
+ d->image[i] =
+ XCreateImage(d->display, d->visual, d->depth,
+ d->depth == 1 ? XYBitmap : ZPixmap, 0, NULL,
+ d->width, d->height, 32, 0);
+ if (d->image[i] == NULL) {
+ printf("Out of memory for image..exiting\n");
+ exit(-1);
+ }
+ d->image[i]->data =
+ malloc(d->image[i]->bytes_per_line * d->height);
+ if (d->image[i]->data == NULL) {
+ printf("Out of memory for image buffers..exiting\n");
+ exit(-1);
+ }
+ {
+ unsigned char c[4];
+ int byteexact = 0;
+ *(unsigned short *) c = 0xff;
+ if ((!(d->image[i]->red_mask & ~0xffU)
+ || !(d->image[i]->red_mask & ~0xff00U)
+ || !(d->image[i]->red_mask & ~0xff0000U)
+ || !(d->image[i]->red_mask & ~0xff000000U))
+ && (!(d->image[i]->green_mask & ~0xffU)
+ || !(d->image[i]->green_mask & ~0xff00U)
+ || !(d->image[i]->green_mask & ~0xff0000U)
+ || !(d->image[i]->green_mask & ~0xff000000U))
+ && (!(d->image[i]->blue_mask & ~0xffU)
+ || !(d->image[i]->blue_mask & ~0xff00U)
+ || !(d->image[i]->blue_mask & ~0xff0000U)
+ || !(d->image[i]->blue_mask & ~0xff000000U)))
+ byteexact = 1;
+ if (!byteexact) {
+ /*Make endianity correct */
+ if (c[0] == (unsigned char) 0xff) {
+ if (d->image[i]->byte_order != LSBFirst) {
+ d->image[i]->byte_order = LSBFirst;
+ /*XInitImage(d->image[i]); */
+ }
+ } else {
+ if (d->image[i]->byte_order != MSBFirst) {
+ d->image[i]->byte_order = MSBFirst;
+ /*XInitImage(d->image[i]); */
+ }
+ }
+ }
+ }
+ d->data[i] = d->vbuffs[i] = (char *) d->image[i]->data;
+ d->linewidth = d->image[i]->bytes_per_line;
+ }
+ xflip_buffers(d);
+ return 1;
+}
+
+void free_image(xdisplay * d)
+{
+#ifdef MITSHM
+ if (d->SharedMemFlag) {
+ free_shm_image(d);
+ return;
+ }
+#endif
+ XDestroyImage(d->image[0]);
+ XDestroyImage(d->image[1]);
+}
+
+#define MAX(x,y) ((x)>(y)?(x):(y))
+
+
+xdisplay *xalloc_display(CONST char *s, int x, int y, xlibparam * params)
+{
+ xdisplay *new;
+ Visual *defaultvisual;
+ XVisualInfo vis;
+ int found;
+ int i;
+
+ XClassHint classHint;
+ XWMHints *hints;
+ char **faked_argv;
+
+ new = (xdisplay *) calloc(sizeof(xdisplay), 1);
+ chkalloc(new);
+ new->display = XOpenDisplay(params->display);
+ if (!new->display) {
+ free((void *) new);
+ return NULL;
+ }
+ new->screen = DefaultScreen(new->display);
+
+ new->attributes =
+ (XSetWindowAttributes *) malloc(sizeof(XSetWindowAttributes));
+ chkalloc(new->attributes);
+ new->attributes->background_pixel =
+ BlackPixel(new->display, new->screen);
+ new->attributes->border_pixel = BlackPixel(new->display, new->screen);
+ new->attributes->event_mask = ButtonPressMask | StructureNotifyMask |
+ ButtonReleaseMask | PointerMotionMask | KeyPressMask |
+ ExposureMask | KeyReleaseMask;
+
+
+ new->attr_mask = CWBackPixel | CWEventMask;
+ if (params->fullscreen || params->rootwindow) {
+ new->attributes->override_redirect = True;
+ new->attr_mask |= CWOverrideRedirect;
+ } else
+ new->attr_mask |= CWBorderPixel;
+ new->class = InputOutput;
+ new->xcolor.n = 0;
+ new->parent_window = RootWindow(new->display, new->screen);
+ defaultvisual = DefaultVisual(new->display, new->screen);
+ new->params = params;
+
+ found = 0;
+ for (i = 31; i > 13 && !found; i--)
+ if (XMatchVisualInfo
+ (new->display, new->screen, i, TrueColor, &vis)) {
+ found = 1;
+ }
+ if (defaultvisual->class != StaticGray
+ && defaultvisual->class != GrayScale) {
+ for (i = 8; i && !found; i--)
+ if (XMatchVisualInfo
+ (new->display, new->screen, i, PseudoColor, &vis)) {
+ found = 1;
+ }
+ for (i = 8; i && !found; i--)
+ if (XMatchVisualInfo
+ (new->display, new->screen, i, StaticColor, &vis)) {
+ found = 1;
+ }
+ for (i = 8; i && !found; i--)
+ if (XMatchVisualInfo
+ (new->display, new->screen, i, TrueColor, &vis)) {
+ found = 1;
+ }
+ }
+ if (!found
+ && XMatchVisualInfo(new->display, new->screen, 8, StaticGray,
+ &vis)) {
+ found = 1;
+ }
+ for (i = 8; i && !found; i--)
+ if (XMatchVisualInfo
+ (new->display, new->screen, i, GrayScale, &vis)) {
+ found = 1;
+ }
+ if (!found
+ && XMatchVisualInfo(new->display, new->screen, 1, StaticGray,
+ &vis)) {
+ found = 8;
+ }
+ if (!found || params->fullscreen || params->rootwindow) {
+ new->visual = defaultvisual;
+ new->depth = DefaultDepth(new->display, new->screen);
+ } else {
+ new->visual = vis.visual;
+ new->depth = vis.depth;
+ }
+
+ switch (new->visual->class) {
+ case StaticColor:
+ case StaticGray:
+ smallcolor:
+ new->truecolor = 0;
+ new->fixedcolormap = 1;
+ break;
+ case PseudoColor:
+ case GrayScale:
+ if (new->depth <= 8) {
+ new->truecolor = 0;
+ new->fixedcolormap = 0;
+ } else {
+ goto visuals;
+ }
+ break;
+ case TrueColor:
+ new->truecolor = 1;
+ new->fixedcolormap = 1;
+ if (new->depth <= 8)
+ goto smallcolor;
+ if (new->depth > 32) {
+ goto visuals;
+ }
+ break;
+ default:
+ visuals:
+ printf
+ ("Unusuported visual. Please contact authors. Maybe it will be supported in next release:)\n");
+ return (NULL);
+ }
+ new->privatecolormap = params->privatecolormap;
+ new->attributes->colormap = new->defaultcolormap =
+ DefaultColormap(new->display, new->screen);
+ if (new->visual->visualid != defaultvisual->visualid) {
+ new->privatecolormap = 1;
+ }
+ if ( /*!new->fixedcolormap && */ new->privatecolormap) {
+ unsigned long pixels[256];
+ int i;
+ new->attributes->colormap =
+ XCreateColormap(new->display,
+ RootWindow(new->display, new->screen),
+ new->visual, AllocNone);
+ if (new->visual->visualid == defaultvisual->visualid
+ && new->visual->class == PseudoColor) {
+ XAllocColorCells(new->display, new->attributes->colormap, 1, 0,
+ 0, pixels, MAX(new->visual->map_entries,
+ 256));
+ for (i = 0; i < 16; i++) {
+ new->xcolor.c[i].pixel = pixels[i];
+ }
+ XQueryColors(new->display, new->defaultcolormap, new->xcolor.c,
+ 16);
+ XStoreColors(new->display, new->attributes->colormap,
+ new->xcolor.c, 16);
+ }
+ }
+ new->colormap = new->attributes->colormap;
+ new->attr_mask |= CWColormap;
+
+ new->window_name = (char *) s;
+ new->height = y;
+ new->width = x;
+ new->border_width = 2;
+ new->lastx = 0;
+ new->lasty = 0;
+ new->font_struct = (XFontStruct *) NULL;
+
+ if (params->fullscreen || params->rootwindow) {
+ Window wtmp;
+ int tmp;
+ /* Get size of the root window */
+ XGetGeometry(new->display, RootWindow(new->display, new->screen), &wtmp, &tmp, &tmp, &new->width, &new->height, (unsigned int *) &tmp, /* border width */
+ (unsigned int *) &tmp); /* depth */
+ new->border_width = 0;
+ }
+
+ if (params->windowid != -1) {
+ Window wtmp;
+ int tmp;
+
+ new->parent_window = params->windowid;
+ XGetGeometry(new->display, new->parent_window, &wtmp, &tmp, &tmp, &new->width, &new->height, (unsigned int *) &tmp, /* border width */
+ (unsigned int *) &tmp); /* depth */
+ XSelectInput(new->display, new->parent_window, ResizeRedirectMask);
+ }
+ if (params->rootwindow)
+ new->window = RootWindow(new->display, new->screen);
+ else
+ new->window = XCreateWindow(new->display, new->parent_window, 0, 0,
+ new->width, new->height,
+ new->border_width, new->depth,
+ new->class, new->visual,
+ new->attr_mask, new->attributes);
+
+ classHint.res_name = (char *) "xaos";
+ classHint.res_class = (char *) "XaoS";
+ hints = XAllocWMHints();
+ hints->initial_state = NormalState;
+ hints->window_group = new->window;
+ hints->flags = (WindowGroupHint | StateHint);
+
+ {
+ int fake = 0;
+
+ if (prog_argc < 2)
+ fake = 1;
+
+ if (fake == 0)
+ if (strcmp(prog_argv[prog_argc - 2], "-driver") &&
+ strcmp(prog_argv[prog_argc - 1], "x11"))
+ fake = 1;
+
+ if (fake) {
+ int i;
+ faked_argv =
+ (char **) malloc((prog_argc + 2) * sizeof(char *));
+ for (i = 0; i < prog_argc; i++)
+ faked_argv[i] = prog_argv[i];
+ faked_argv[prog_argc] = (char *) "-driver";
+ faked_argv[prog_argc + 1] = (char *) "x11";
+
+ XSetWMProperties(new->display, new->window, NULL, NULL,
+ faked_argv, prog_argc + 2, NULL, hints,
+ &classHint);
+
+ free(faked_argv);
+ } else
+ XSetWMProperties(new->display, new->window, NULL, NULL,
+ prog_argv, prog_argc, NULL, hints,
+ &classHint);
+ }
+ XSetIconName(new->display, new->window, "xaos");
+
+ wmDeleteWindow = XInternAtom(new->display, "WM_DELETE_WINDOW", False);
+ XSetWMProtocols(new->display, new->window, &wmDeleteWindow, 1);
+
+ new->gc = XCreateGC(new->display, new->window, 0L, &(new->xgcvalues));
+ XSetBackground(new->display, new->gc,
+ BlackPixel(new->display, new->screen));
+ XSetForeground(new->display, new->gc,
+ WhitePixel(new->display, new->screen));
+ XStoreName(new->display, new->window, new->window_name);
+ XMapWindow(new->display, new->window);
+ if (params->fullscreen || params->rootwindow)
+ XSetInputFocus(new->display, new->window, RevertToNone,
+ CurrentTime);
+
+ return (new);
+}
+
+void xsetcolor(xdisplay * d, int col)
+{
+ switch (col) {
+ case 0:
+ XSetForeground(d->display, d->gc,
+ BlackPixel(d->display, d->screen));
+ break;
+ case 1:
+ XSetForeground(d->display, d->gc,
+ WhitePixel(d->display, d->screen));
+ break;
+ default:
+ if ((col - 2) > d->xcolor.n) {
+ fprintf(stderr, "color error\n");
+ exit(-1);
+ }
+ XSetForeground(d->display, d->gc, d->xcolor.c[col - 2].pixel);
+ break;
+ }
+}
+
+void xsetpaletterange(xdisplay * d, ui_palette c, int start, int end)
+{
+ int i;
+ if (d->visual->class == StaticColor || d->visual->class == TrueColor) {
+ for (i = start; i < end; i++)
+ d->xcolor.c[i].pixel = i;
+ XQueryColors(d->display, d->colormap, d->xcolor.c + start,
+ end - start);
+ for (i = start; i < end; i++) {
+ c[i - start][0] = d->xcolor.c[i].red / 256;
+ c[i - start][1] = d->xcolor.c[i].green / 256;
+ c[i - start][2] = d->xcolor.c[i].blue / 256;
+ }
+
+ } else {
+ for (i = start; i < end; i++) {
+ d->xcolor.c[i].pixel = i;
+ d->xcolor.c[i].flags = DoRed | DoGreen | DoBlue;
+ d->xcolor.c[i].red = c[i - start][0] * 256;
+ d->xcolor.c[i].green = c[i - start][1] * 256;
+ d->xcolor.c[i].blue = c[i - start][2] * 256;
+ }
+ XStoreColors(d->display, d->colormap, d->xcolor.c + start,
+ end - start);
+ }
+}
+
+int xalloc_color(xdisplay * d, int r, int g, int b, int readwrite)
+{
+ d->xcolor.n++;
+ d->xcolor.c[d->xcolor.n - 1].flags = DoRed | DoGreen | DoBlue;
+ d->xcolor.c[d->xcolor.n - 1].red = r;
+ d->xcolor.c[d->xcolor.n - 1].green = g;
+ d->xcolor.c[d->xcolor.n - 1].blue = b;
+ d->xcolor.c[d->xcolor.n - 1].pixel = d->xcolor.n - 1;
+ if ((readwrite && !d->fixedcolormap) || d->privatecolormap) {
+ unsigned long cell;
+ if (d->privatecolormap) {
+ cell = d->xcolor.c[d->xcolor.n - 1].pixel += 16;
+ if ((int) d->xcolor.c[d->xcolor.n - 1].pixel >=
+ d->visual->map_entries) {
+ d->xcolor.n--;
+ return (-1);
+ }
+ } else {
+ if (!XAllocColorCells
+ (d->display, d->colormap, 0, 0, 0, &cell, 1)) {
+ d->xcolor.n--;
+ if (d->xcolor.n <= 32)
+ printf
+ ("Colormap is too full! close some colorfull applications or use -private\n");
+ return (-1);
+ }
+ d->xcolor.c[d->xcolor.n - 1].pixel = cell;
+ }
+ XStoreColor(d->display, d->colormap,
+ &(d->xcolor.c[d->xcolor.n - 1]));
+ return ((int) cell);
+ }
+ if (!XAllocColor
+ (d->display, d->colormap, &(d->xcolor.c[d->xcolor.n - 1]))) {
+ d->xcolor.n--;
+ if (d->xcolor.n <= 32)
+ printf
+ ("Colormap is too full! close some colorfull aplications or use -private\n");
+ return (-1);
+ }
+ d->pixels[d->xcolor.n - 1] = d->xcolor.c[d->xcolor.n - 1].pixel;
+ return (d->depth !=
+ 8 ? d->xcolor.n - 1 : (int) d->xcolor.c[d->xcolor.n -
+ 1].pixel);
+}
+
+void xfree_colors(xdisplay * d)
+{
+ unsigned long pixels[256];
+ int i;
+ for (i = 0; i < d->xcolor.n; i++)
+ pixels[i] = d->xcolor.c[i].pixel;
+ if (!d->privatecolormap)
+ XFreeColors(d->display, d->colormap, pixels, d->xcolor.n, 0);
+ d->xcolor.n = 0;
+}
+
+void xfree_display(xdisplay * d)
+{
+ XSync(d->display, 0);
+ if (d->font_struct != (XFontStruct *) NULL) {
+ XFreeFont(d->display, d->font_struct);
+ }
+ XUnmapWindow(d->display, d->window);
+ XDestroyWindow(d->display, d->window);
+ XCloseDisplay(d->display);
+ free((void *) d->attributes);
+ free((void *) d);
+}
+
+void xclear_screen(xdisplay * d)
+{
+ XClearWindow(d->display, d->window);
+ d->screen_changed = 1;
+}
+
+void xmoveto(xdisplay * d, int x, int y)
+{
+ d->lastx = x, d->lasty = y;
+}
+
+int xsetfont(xdisplay * d, CONST char *font_name)
+{
+
+ if (d->font_struct != (XFontStruct *) NULL) {
+ XFreeFont(d->display, d->font_struct);
+ }
+ d->font_struct = XLoadQueryFont(d->display, font_name);
+ XSetFont(d->display, d->gc, d->font_struct->fid);
+ if (!d->font_struct) {
+ fprintf(stderr, "could not load font: %s\n", font_name);
+ exit(-1);
+ }
+ return (d->font_struct->max_bounds.ascent +
+ d->font_struct->max_bounds.descent);
+}
+
+void xouttext(xdisplay * d, CONST char *string)
+{
+ int sz;
+
+ sz = (int) strlen(string);
+ XDrawImageString(d->display, d->window, d->gc, d->lastx, d->lasty,
+ string, sz);
+}
+
+void xresize(xdisplay * d, XEvent * ev)
+{
+ XSync(d->display, False);
+ d->width = ev->xconfigure.width;
+ d->height = ev->xconfigure.height;
+}
+
+#endif
diff --git a/src/ui/ui-drv/x11/xlib.h b/src/ui/ui-drv/x11/xlib.h
new file mode 100644
index 0000000..485a032
--- /dev/null
+++ b/src/ui/ui-drv/x11/xlib.h
@@ -0,0 +1,139 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#ifndef XAOS_X11_H
+#define XAOS_X11_H
+
+#include <X11/Xlib.h>
+#include <X11/Xutil.h>
+#include <X11/keysym.h>
+#include <X11/keysymdef.h>
+#include "config.h"
+#include "ui.h"
+#ifdef MITSHM
+#include <sys/types.h>
+#include <sys/ipc.h>
+#include <sys/shm.h>
+#include <X11/extensions/XShm.h>
+#endif /* MITSHM */
+
+typedef struct {
+ int n;
+ XColor c[256];
+} xcol_t;
+
+typedef struct {
+ int privatecolormap;
+ int usedefault;
+ int nomitshm;
+ int fullscreen;
+ char *display;
+ int windowid;
+ int rootwindow;
+} xlibparam;
+
+typedef struct {
+ Colormap colormap;
+ Colormap defaultcolormap;
+ int fixedcolormap;
+ int privatecolormap;
+ xlibparam *params;
+ Display *display;
+ Window parent_window;
+ Window window;
+ unsigned int width, height;
+ unsigned int bwidth, bheight;
+ unsigned int border_width;
+ unsigned long background;
+ int depth;
+ unsigned int class;
+ Visual *visual;
+ unsigned long valuemask;
+ XSetWindowAttributes *attributes;
+ unsigned long attr_mask;
+ XSizeHints sizehints;
+ int screen;
+ char *window_name;
+ int status;
+ GC gc;
+ XGCValues xgcvalues;
+ xcol_t xcolor;
+ Pixmap pixmap;
+ XFontStruct *font_struct;
+ int screen_changed;
+ int lastx, lasty;
+ int mouse_x, mouse_y;
+ unsigned int mouse_buttons;
+ int current;
+ XImage *image[2];
+#ifdef MITSHM
+ XShmSegmentInfo xshminfo[2];
+ int SharedMemOption;
+ int SharedMemFlag;
+#endif /* MITSHM */
+ unsigned long pixels[256];
+ char *vbuffs[2];
+ char *data[2];
+ char *vbuff;
+ char *back;
+ int truecolor;
+ int linewidth;
+} xdisplay;
+
+void xsetpaletterange(xdisplay * d, ui_palette c, int start, int end);
+extern int alloc_shm_image(xdisplay * d);
+extern void free_shm_image(xdisplay * d);
+extern int alloc_image(xdisplay * d);
+extern void free_image(xdisplay * d);
+extern int xupdate_size(xdisplay * d);
+extern void xflip_buffers(xdisplay * d);
+extern xdisplay *xalloc_display(CONST char *n, int x, int y,
+ xlibparam * p);
+extern void xfree_display(xdisplay * d);
+extern void xsetcolor(xdisplay * d, int col);
+extern int xsetfont(xdisplay * d, CONST char *font_name);
+extern int xalloc_color(xdisplay * d, int r, int g, int b, int readwrite);
+extern void xfree_colors(xdisplay * d);
+extern void xline(xdisplay * d, int x1, int y1, int x2, int y2);
+extern void xmoveto(xdisplay * d, int x, int y);
+extern void xlineto(xdisplay * d, int x, int y);
+extern void xrect(xdisplay * d, int x1, int y1, int x2, int y2);
+extern void xfillrect(xdisplay * d, int x1, int y1, int x2, int y2);
+extern void xarc(xdisplay * d, int x, int y, unsigned int w,
+ unsigned int h, int a1, int a2);
+extern void xfillarc(xdisplay * d, int x, int y, unsigned int w,
+ unsigned int h, int a1, int a2);
+extern void xpoint(xdisplay * d, int x, int y);
+extern void xflush(xdisplay * d);
+extern void xclear_screen(xdisplay * d);
+extern void xrotate_palette(xdisplay * d, int direction,
+ unsigned char c[3][256], int ncolors);
+extern void draw_screen(xdisplay * d);
+extern void xouttext(xdisplay * d, CONST char *string);
+extern void xresize(xdisplay * d, XEvent * ev);
+extern int xmouse_x(xdisplay * d);
+extern int xmouse_y(xdisplay * d);
+extern void xmouse_update(xdisplay * d);
+extern unsigned int xmouse_buttons(xdisplay * d);
+
+extern Atom wmDeleteWindow;
+
+#endif /* XAOS_X11_H */
diff --git a/src/ui/ui.c b/src/ui/ui.c
new file mode 100644
index 0000000..413d357
--- /dev/null
+++ b/src/ui/ui.c
@@ -0,0 +1,1761 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <config.h>
+#undef _EFENCE_
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#include <ctype.h>
+#else
+#include <limits.h>
+#include <aconfig.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <string.h>
+#include <errno.h>
+#include <math.h>
+#ifdef __EMX__
+#include <float.h>
+#endif
+#ifdef __EMX__
+#include <sys/types.h>
+#endif
+#ifndef _MAC
+#include <sys/stat.h>
+#endif
+#include <time.h>
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+#include <signal.h>
+#endif
+#include <fconfig.h>
+#ifndef _plan9_
+#include <assert.h>
+#endif
+#include <filter.h>
+#include <ui_helper.h>
+#include <ui.h>
+#include <param.h>
+#include <version.h>
+#include <timers.h>
+#include <plane.h>
+#include <xthread.h>
+#include <xerror.h>
+#include <xmenu.h>
+#include <grlib.h>
+#include <archaccel.h>
+#include "uiint.h"
+#ifdef HAVE_GETTEXT
+#include <libintl.h>
+#include <locale.h>
+#else
+#define gettext(STRING) STRING
+#endif
+
+#ifdef SFFE_USING
+#include "sffe.h"
+#endif
+
+#ifdef DESTICKY
+int euid, egid;
+#endif
+#ifdef DEBUG
+#ifdef __linux__
+#include <malloc.h>
+#define MEMCHECK
+#endif
+#endif
+#define textheight1 (driver->textheight)
+#define textwidth1 (driver->textwidth)
+#define ui_flush() (driver->flush?driver->flush(),1:0)
+#ifdef MEMCHECK
+#define STATUSLINES 13
+#else
+#define STATUSLINES 11
+#endif
+static void ui_mouse(int mousex, int mousey, int mousebuttons,
+ int iterchange);
+#ifndef exit_xaos
+#define exit_xaos(i) exit(i)
+#endif
+
+xio_pathdata configfile;
+static void ui_unregistermenus(void);
+static void ui_mkimages(int, int);
+static void ui_mainloop(int loop);
+
+int prog_argc;
+int err;
+char **prog_argv;
+/*UI state */
+uih_context *uih;
+CONST struct ui_driver *driver;
+char statustext[256];
+int ui_nogui;
+static struct image *image;
+static int statusstart;
+static struct uih_window *statuswindow = NULL;
+static int ministatusstart;
+static struct uih_window *ministatuswindow = NULL;
+static int mouse;
+/* Used by ui_mouse */
+static int dirty = 0;
+static int lastiter;
+static int maxiter;
+static int lastbuttons, lastx, lasty;
+static int callresize = 0;
+static tl_timer *maintimer;
+static tl_timer *arrowtimer;
+static tl_timer *loopt;
+static int todriver = 0;
+
+/* Command line variables */
+static char *defpipe;
+static char *defdriver = NULL;
+static int deflist;
+static int printconfig;
+static int printspeed;
+static int delaytime = 0;
+static int defthreads = 0;
+static int maxframerate = 80;
+static float defscreenwidth = 0.0, defscreenheight = 0.0, defpixelwidth =
+ 0.0, defpixelheight = 0.0;
+
+#ifdef SFFE_USING
+char *sffeform = NULL;
+char *sffeinit = NULL;
+#endif
+
+CONST struct params global_params[] = {
+ {"-delay", P_NUMBER, &delaytime,
+ "Delay screen updates (milliseconds)"},
+ {"-driver", P_STRING, &defdriver, "Select driver"},
+ {"-list", P_SWITCH, &deflist, "List available drivers. Then exit"},
+ {"-config", P_SWITCH, &printconfig, "Print configuration. Then exit"},
+ {"-speedtest", P_SWITCH, &printspeed,
+ "Test speed of calculation loop. Then exit"},
+#ifndef nthreads
+ {"-threads", P_NUMBER, &defthreads,
+ "Set number of threads (CPUs) to use"},
+#else
+ {"-threads", P_NUMBER, &defthreads,
+ "Multiple CPUs unsupported - please recompile XaoS with threads enabled"},
+#endif
+#ifdef COMPILE_PIPE
+ {"-pipe", P_STRING, &defpipe,
+ "Accept commands from pipe (use \"-\" for stdin)"},
+#else
+ {"-pipe", P_STRING, &defpipe,
+ "Pipe input unavailable (recompile XaoS)"},
+#endif
+ {"-maxframerate", P_NUMBER, &maxframerate,
+ "Maximal framerate (0 for unlimited - default)"},
+ {"", P_HELP, NULL,
+ "Screen size options: \n\n Knowledge of exact screen size makes random dot stereogram look better. \n Also is used for choosing correct view area"},
+ {"-screenwidth", P_FLOAT, &defscreenwidth,
+ "exact size of screen in centimeters"},
+ {"-screenheight", P_FLOAT, &defscreenheight,
+ "exact size of screen in centimeters"},
+ {"", P_HELP, NULL,
+ " Use this option in case you use some kind of virtual screen\n or something similiar that confuses previous options"},
+ {"-pixelwidth", P_FLOAT, &defpixelwidth,
+ "exact size of one pixel in centimeters"},
+ {"-pixelheight", P_FLOAT, &defpixelheight,
+ "exact size of one pixel in centimeters"},
+#ifdef SFFE_USING
+ {"-formula", P_STRING, &sffeform,
+ "user formula"},
+ {"-forminit", P_STRING, &sffeinit,
+ "z0 for user formula"},
+#endif
+ {NULL, 0, NULL, NULL}
+};
+
+static int resizeregistered = 0;
+static void ui_updatemenus(uih_context * c, CONST char *name)
+{
+ CONST struct menuitem *item;
+ if (ui_nogui) {
+ if (name == NULL) {
+ printf("Root \"%s\"", uih->menuroot);
+ }
+ item = menu_findcommand(name);
+ if (item == NULL) {
+ /*x_fatalerror ("Internall error:unknown command %s", name); */
+ return;
+ }
+ if (item->flags & MENUFLAG_CHECKBOX) {
+ if (menu_enabled(item, c))
+ printf("checkbox \"%s\" on\n", name);
+ else
+ printf("checkbox \"%s\" off\n", name);
+ }
+ if (item->flags & MENUFLAG_RADIO) {
+ if (menu_enabled(item, c))
+ printf("radio \"%s\"\n", name);
+ }
+ }
+ if (driver != NULL && driver->gui_driver) {
+ if (name == NULL) {
+ if (driver->gui_driver->setrootmenu)
+ driver->gui_driver->setrootmenu(c, uih->menuroot);
+ return;
+ }
+ item = menu_findcommand(name);
+ if (item == NULL) {
+ /*fprintf (stderr, "Internall error:unknown command %s\n", name); */
+ return;
+ }
+ if (item->flags & (MENUFLAG_CHECKBOX | MENUFLAG_RADIO)) {
+ if (driver->gui_driver->enabledisable)
+ driver->gui_driver->enabledisable(uih, name);
+ }
+ }
+}
+
+static void mousetype(int m)
+{
+#ifdef _plan9_
+#define filevisible 0
+#endif
+ if (ui_nmenus || helpvisible || filevisible || dialogvisible
+ || yesnodialogvisible)
+ m = NORMALMOUSE;
+ if (mouse != m) {
+ mouse = m;
+ if (driver->mousetype != NULL)
+ driver->mousetype(m);
+ }
+}
+
+static void ui_display(void)
+{
+ if (nthreads == 1)
+ uih_drawwindows(uih);
+ driver->display();
+ uih_cycling_continue(uih);
+ if (!(driver->flags & NOFLUSHDISPLAY))
+ ui_flush();
+}
+
+float ui_get_windowwidth(int width)
+{
+ if (defscreenwidth > 0.0 && driver->flags & RESOLUTION)
+ return (defscreenwidth * width / driver->maxwidth);
+ if (defscreenwidth > 0.0)
+ return (defscreenwidth);
+ if (defpixelwidth > 0.0)
+ return (defpixelwidth * width);
+ return (0);
+}
+
+static float get_windowwidth(int width)
+{
+ float w = ui_get_windowwidth(width);
+ if (w)
+ return w;
+ if (driver->flags & PIXELSIZE)
+ return (driver->width * width);
+ if (driver->flags & SCREENSIZE)
+ return (driver->width);
+ if (driver->flags & RESOLUTION)
+ return (29.0 / driver->maxwidth * width);
+ return (29.0);
+}
+
+float ui_get_windowheight(int height)
+{
+ if (defscreenheight > 0.0 && driver->flags & RESOLUTION)
+ return (defscreenheight * height / driver->maxheight);
+ if (defscreenheight > 0.0)
+ return (defscreenheight);
+ if (defpixelheight > 0.0)
+ return (defpixelheight * height);
+ return 0;
+}
+
+static float get_windowheight(int height)
+{
+ float h = ui_get_windowheight(height);
+ if (h)
+ return h;
+ if (driver->flags & PIXELSIZE)
+ return (driver->height * height);
+ if (driver->flags & SCREENSIZE)
+ return (driver->height);
+ if (driver->flags & RESOLUTION)
+ return (21.0 / driver->maxheight * height);
+ return (21.5);
+}
+
+extern int dynsize;
+static void ui_outofmem(void)
+{
+ x_error(gettext("XaoS is out of memory."));
+}
+
+#define CHECKPROCESSEVENTS(b,k) assert(!((k)&~15)&&!((b)&~(BUTTON1|BUTTON2|BUTTON3)))
+static int
+ui_passfunc(struct uih_context *c, int display, CONST char *text,
+ float percent)
+{
+ char str[80];
+ int x = 0, y = 0, b = 0, k = 0;
+ driver->processevents(0, &x, &y, &b, &k);
+ ui_mouse(x, y, b, k);
+ CHECKPROCESSEVENTS(b, k);
+ if (!uih->play) {
+ if (uih->display)
+ ui_display(), display = 1;
+ if (!c->interruptiblemode && !uih->play) {
+ if (display) {
+ if (percent)
+ sprintf(str, "%s %3.2f%% ", text,
+ (double) percent);
+ else
+ sprintf(str, "%s ", text);
+ driver->print(0, uih->image->height - textheight1, str);
+ ui_flush();
+ }
+ } else {
+ if (!(driver->flags & NOFLUSHDISPLAY))
+ ui_flush();
+ }
+ }
+ return (0);
+}
+
+static void ui_updatestatus(void)
+{
+ double times =
+ (uih->fcontext->currentformula->v.rr) / (uih->fcontext->s.rr);
+ double timesnop = log(times) / log(10.0);
+ double speed;
+ uih_drawwindows(uih);
+ driver->display();
+ uih_cycling_continue(uih);
+ speed = uih_displayed(uih);
+ sprintf(statustext,
+ gettext
+ ("%s %.2f times (%.1fE) %2.2f frames/sec %c %i %i %i %i "),
+ times < 1 ? gettext("unzoomed") : gettext("zoomed"),
+ times < 1 ? 1.0 / times : times, timesnop, speed,
+ uih->autopilot ? 'A' : ' ', uih->fcontext->coloringmode + 1,
+ uih->fcontext->incoloringmode + 1, uih->fcontext->plane + 1,
+ uih->fcontext->maxiter);
+
+ if (!(driver->flags & NOFLUSHDISPLAY))
+ ui_flush();
+ STAT(printf(gettext("framerate:%f\n"), speed));
+ driver->print(0, 0, "");
+}
+
+void ui_updatestarts(void)
+{
+ int y = 0;
+ y += ui_menuwidth();
+ ministatusstart = y;
+ if (ministatuswindow != NULL)
+ y += xtextheight(uih->font);
+ statusstart = y;
+ if (statuswindow != NULL)
+ y += xtextheight(uih->font) * STATUSLINES;
+ uih->messg.messagestart = y;
+}
+
+void ui_menuactivate(CONST menuitem * item, dialogparam * d)
+{
+ if (item == NULL)
+ return;
+ ui_closemenus();
+ if (item->type == MENU_SUBMENU) {
+ ui_menu(item->shortname);
+ return;
+ } else {
+ if (menu_havedialog(item, uih) && d == NULL) {
+ ui_builddialog(item);
+ return;
+ }
+ if (uih->incalculation && !(item->flags & MENUFLAG_INCALC)) {
+ menu_addqueue(item, d);
+ if (item->flags & MENUFLAG_INTERRUPT)
+ uih_interrupt(uih);
+ return;
+ }
+ if (item->flags & MENUFLAG_CHECKBOX) {
+ char s[256];
+ ui_updatestatus();
+ if (!menu_enabled(item, uih))
+ sprintf(s, gettext("Enabling: %s. "), item->name);
+ else
+ sprintf(s, gettext("Disabling: %s. "), item->name);
+ uih_message(uih, s);
+ ui_flush();
+ } else
+ uih_message(uih, item->name);
+ uih_saveundo(uih);
+ menu_activate(item, uih, d);
+ if (d != NULL)
+ menu_destroydialog(item, d, uih);
+ }
+}
+
+xio_path ui_getfile(CONST char *basename, CONST char *extension)
+{
+ return (xio_getfilename(basename, extension));
+}
+
+static void
+ui_statuspos(uih_context * uih, int *x, int *y, int *w, int *h, void *data)
+{
+ *x = 0;
+ *y = statusstart;
+ *w = uih->image->width;
+ *h = xtextheight(uih->font) * STATUSLINES;
+}
+
+static void ui_drawstatus(uih_context * uih, void *data)
+{
+ char str[6000];
+ int h = xtextheight(uih->font);
+ sprintf(str, gettext("Fractal name:%s"),
+ uih->fcontext->currentformula->name[!uih->fcontext->
+ mandelbrot]);
+ xprint(uih->image, uih->font, 0, statusstart, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, gettext("Fractal type:%s"),
+ uih->
+ fcontext->mandelbrot ? gettext("Mandelbrot") :
+ gettext("Julia"));
+#ifdef SFFE_USING
+ if (uih->fcontext->currentformula->flags & SFFE_FRACTAL) {
+ sprintf(str, gettext("Formula:%s"), uih->parser->expression);
+ };
+#endif
+ xprint(uih->image, uih->font, 0, statusstart + h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, gettext("View:[%1.12f,%1.12f]"),
+ (double) uih->fcontext->s.cr, (double) uih->fcontext->s.ci);
+ xprint(uih->image, uih->font, 0, statusstart + 2 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, gettext("size:[%1.12f,%1.12f]"),
+ (double) uih->fcontext->s.rr, (double) uih->fcontext->s.ri);
+ xprint(uih->image, uih->font, 0, statusstart + 3 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, gettext("Rotation:%4.2f Screen size:%i:%i"),
+ (double) uih->fcontext->angle, uih->image->width,
+ uih->image->height);
+ xprint(uih->image, uih->font, 0, statusstart + 4 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, gettext("Iterations:%-4i Palette size:%i"),
+ uih->fcontext->maxiter, uih->image->palette->size);
+ xprint(uih->image, uih->font, 0, statusstart + 5 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, "Bailout:%4.2f", (double) uih->fcontext->bailout);
+ xprint(uih->image, uih->font, 0, statusstart + 6 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, gettext("Autopilot:%-4s Plane:%s"),
+ uih->autopilot ? gettext("On") : gettext("Off"),
+ planename[uih->fcontext->plane]);
+ xprint(uih->image, uih->font, 0, statusstart + 7 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, gettext("incoloring:%s outcoloring:%s"),
+ incolorname[uih->fcontext->incoloringmode],
+ outcolorname[uih->fcontext->coloringmode]);
+ xprint(uih->image, uih->font, 0, statusstart + 8 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, gettext("zoomspeed:%f"), (float) uih->maxstep * 1000);
+ xprint(uih->image, uih->font, 0, statusstart + 9 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ if (uih->fcontext->mandelbrot)
+ strcpy(str, gettext("Parameter:none"));
+ else
+ sprintf(str, gettext("Parameter:[%f,%f]"),
+ (float) uih->fcontext->pre, (float) uih->fcontext->pim);
+ xprint(uih->image, uih->font, 0, statusstart + 10 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+#ifdef MEMCHECK
+ {
+ struct mallinfo i = mallinfo();
+ sprintf(str, "Allocated arena:%i Wasted:%i %i", i.arena, i.ordblks,
+ i.fordblks);
+ xprint(uih->image, uih->font, 0, statusstart + 11 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ sprintf(str, "Mmaped blocks%i Mmaped area:%i keep:%i", i.hblks,
+ i.hblkhd, i.keepcost);
+ xprint(uih->image, uih->font, 0, statusstart + 12 * h, str,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+ }
+#endif
+ ui_flush();
+}
+
+static void ui_status(uih_context * uih)
+{
+ if (statuswindow == NULL) {
+ statuswindow =
+ uih_registerw(uih, ui_statuspos, ui_drawstatus, NULL, 0);
+ } else {
+ uih_removew(uih, statuswindow);
+ statuswindow = NULL;
+ }
+ ui_updatemenus(uih, "status");
+ ui_updatemenus(uih, "animministatus");
+ ui_updatestarts();
+}
+
+static int ui_statusenabled(uih_context * uih)
+{
+ return (statuswindow != NULL);
+}
+
+static void
+ui_ministatuspos(uih_context * uih, int *x, int *y, int *w, int *h,
+ void *data)
+{
+ *x = 0;
+ *y = ministatusstart;
+ *w = uih->image->width;
+ *h = xtextheight(uih->font);
+}
+
+static void ui_drawministatus(uih_context * uih, void *data)
+{
+ xprint(uih->image, uih->font, 0, ministatusstart, statustext,
+ FGCOLOR(uih), BGCOLOR(uih), 0);
+}
+
+static void ui_noguisw(uih_context * uih)
+{
+ ui_nogui ^= 1;
+ ui_updatemenus(uih, "nogui");
+}
+
+static int ui_noguienabled(uih_context * uih)
+{
+ return (ui_nogui);
+}
+
+static void ui_ministatus(uih_context * uih)
+{
+ if (ministatuswindow == NULL) {
+ ministatuswindow =
+ uih_registerw(uih, ui_ministatuspos, ui_drawministatus, NULL,
+ 0);
+ } else {
+ uih_removew(uih, ministatuswindow);
+ ministatuswindow = NULL;
+ }
+ ui_updatestarts();
+ ui_updatemenus(uih, "ministatus");
+ ui_updatemenus(uih, "animministatus");
+}
+
+static int ui_ministatusenabled(uih_context * uih)
+{
+ return (ministatuswindow != NULL);
+}
+
+static void ui_message(struct uih_context *u)
+{
+ char s[80];
+ if (uih->play)
+ return;
+ mousetype(WAITMOUSE);
+ sprintf(s, gettext("Please wait while calculating %s"),
+ uih->fcontext->currentformula->name[!uih->fcontext->
+ mandelbrot]);
+ driver->print(0, 0, s);
+}
+
+#define ROTATESPEEDUP 30
+static int
+procescounter(int *counter, CONST char *text, int speed, int keys,
+ int lastkeys, int down, int up, int tenskip, int min,
+ int max)
+{
+ static int pid = -1;
+ int changed = 0;
+ char str[80];
+ if (tl_lookup_timer(arrowtimer) > 1000000)
+ tl_reset_timer(arrowtimer);
+ if ((keys & up) && !(lastkeys & up)) {
+ (*counter)++;
+ tenskip = 0;
+ changed = 1;
+ tl_reset_timer(arrowtimer);
+ }
+ if ((keys & down) && !(lastkeys & down)) {
+ (*counter)--;
+ tenskip = 0;
+ changed = 1;
+ tl_reset_timer(arrowtimer);
+ }
+ while (tl_lookup_timer(arrowtimer) > speed * FRAMETIME) {
+ tl_slowdown_timer(arrowtimer, speed * FRAMETIME);
+ if (keys & up) {
+ if (tenskip && !(*counter % 10))
+ (*counter) += 10;
+ else
+ (*counter)++;
+ changed = 1;
+ }
+ if (keys & down) {
+ if (tenskip && !(*counter % 10))
+ (*counter) -= 10;
+ else
+ (*counter)--;
+ changed = 1;
+ }
+ }
+ if (changed) {
+ if (*counter > max)
+ *counter = max;
+ if (*counter < min)
+ *counter = min;
+ sprintf(str, text, *counter);
+ uih_rmmessage(uih, pid);
+ pid = uih_message(uih, str);
+ ui_flush();
+ }
+ return changed;
+}
+
+static void
+ui_mouse(int mousex, int mousey, int mousebuttons, int iterchange)
+{
+ int flags;
+ char str[80];
+ static int spid;
+ flags = 0;
+ if (mousex != lastx || mousey != lasty)
+ flags |= MOUSE_MOVE;
+ if ((mousebuttons & BUTTON1) && !(lastbuttons & BUTTON1))
+ flags |= MOUSE_PRESS;
+ if (!(mousebuttons & BUTTON1) && (lastbuttons & BUTTON1))
+ flags |= MOUSE_RELEASE;
+ if (mousebuttons & BUTTON1)
+ flags |= MOUSE_DRAG;
+ lastx = mousex;
+ lasty = mousey;
+ lastbuttons = mousebuttons;
+ tl_update_time();
+ CHECKPROCESSEVENTS(mousebuttons, iterchange);
+ if (ui_helpmouse(mousex, mousey, mousebuttons, flags)) {
+ uih_update(uih, mousex, mousey, 0);
+ return;
+ }
+#ifndef _plan9_
+ if (ui_mousefilesel(mousex, mousey, mousebuttons, flags)) {
+ uih_update(uih, mousex, mousey, 0);
+ return;
+ }
+#endif
+ if (ui_dialogmouse(mousex, mousey, mousebuttons, flags)) {
+ uih_update(uih, mousex, mousey, 0);
+ return;
+ }
+ if (ui_menumouse(mousex, mousey, mousebuttons, flags)) {
+ uih_update(uih, mousex, mousey, 0);
+ return;
+ }
+ uih_update(uih, mousex, mousey, mousebuttons);
+ if (uih->play) {
+ procescounter(&uih->letterspersec,
+ gettext("Letters per second %i "), 2, iterchange,
+ lastiter, 1, 2, 0, 1, INT_MAX);
+ return;
+ }
+ if (!uih->cycling) {
+ if (uih->rotatemode == ROTATE_CONTINUOUS) {
+ static int rpid;
+ if (iterchange == 2) {
+ uih->rotationspeed +=
+ ROTATESPEEDUP * tl_lookup_timer(maintimer) / 1000000.0;
+ uih_rmmessage(uih, rpid);
+ sprintf(str,
+ gettext
+ ("Rotation speed:%2.2f degrees per second "),
+ (float) uih->rotationspeed);
+ rpid = uih_message(uih, str);
+ ui_flush();
+ }
+ if (iterchange == 1) {
+ uih->rotationspeed -=
+ ROTATESPEEDUP * tl_lookup_timer(maintimer) / 1000000.0;
+ uih_rmmessage(uih, rpid);
+ sprintf(str,
+ gettext
+ ("Rotation speed:%2.2f degrees per second "),
+ (float) uih->rotationspeed);
+ rpid = uih_message(uih, str);
+ ui_flush();
+ }
+ tl_reset_timer(maintimer);
+ } else {
+ if (!dirty)
+ maxiter = uih->fcontext->maxiter;
+ if (procescounter
+ (&maxiter, gettext("Iterations: %i "), 1, iterchange,
+ lastiter, 1, 2, 1, 1, INT_MAX) || (iterchange & 3)) {
+ dirty = 1;
+ lastiter = iterchange;
+ return;
+ }
+ }
+ }
+ if (dirty) {
+ if (uih->incalculation)
+ uih_interrupt(uih);
+ else
+ uih_setmaxiter(uih, maxiter), dirty = 0;
+ }
+ if (uih->cycling) {
+ if (procescounter
+ (&uih->cyclingspeed, gettext("Cycling speed: %i "), 1,
+ iterchange, lastiter, 1, 2, 0, -1000000, INT_MAX)) {
+ uih_setcycling(uih, uih->cyclingspeed);
+ }
+ }
+ if (iterchange & 4
+ && (tl_lookup_timer(maintimer) > FRAMETIME || mousebuttons)) {
+ double mul1 = tl_lookup_timer(maintimer) / FRAMETIME;
+ double su = 1 + (SPEEDUP - 1) * mul1;
+ if (su > 2 * SPEEDUP)
+ su = SPEEDUP;
+ tl_reset_timer(maintimer);
+ uih->speedup *= su, uih->maxstep *= su;
+ sprintf(str, gettext("speed:%2.2f "),
+ (double) uih->speedup * (1.0 / STEP));
+ uih_rmmessage(uih, spid);
+ spid = uih_message(uih, str);
+ ui_flush();
+ }
+ if (iterchange & 8
+ && (tl_lookup_timer(maintimer) > FRAMETIME || mousebuttons)) {
+ double mul1 = tl_lookup_timer(maintimer) / FRAMETIME;
+ double su = 1 + (SPEEDUP - 1) * mul1;
+ if (su > 2 * SPEEDUP)
+ su = SPEEDUP;
+ tl_reset_timer(maintimer);
+ uih->speedup /= su, uih->maxstep /= su;
+ sprintf(str, gettext("speed:%2.2f "),
+ (double) uih->speedup * (1 / STEP));
+ uih_rmmessage(uih, spid);
+ spid = uih_message(uih, str);
+ ui_flush();
+ }
+ lastiter = iterchange;
+ return;
+}
+
+void ui_call_resize(void)
+{
+ callresize = 1;
+ uih_interrupt(uih);
+}
+
+static int
+ui_alloccolor(struct palette *pal, int init, int r, int g, int b)
+{
+ int i;
+ i = driver->set_color(r, g, b, init);
+ if (i == -1)
+ return (-1);
+ if (init)
+ pal->size = 0;
+ pal->pixels[pal->size] = i;
+ pal->rgb[i][0] = r;
+ pal->rgb[i][1] = g;
+ pal->rgb[i][2] = b;
+ pal->size++;
+ if (driver->flags & UPDATE_AFTER_PALETTE) {
+ uih->display = 1;
+ }
+ return (i);
+}
+
+static void
+ui_setpalette(struct palette *pal, int start, int end, rgb_t * rgb1)
+{
+ driver->set_range((ui_palette) rgb1, start, end);
+}
+
+static void ui_flip(struct image *image)
+{
+ flipgeneric(image);
+ driver->flip_buffers();
+}
+
+static int ui_driverselected(uih_context * c, int d)
+{
+ return (driver == drivers[d]);
+}
+
+static void ui_setdriver(uih_context * c, int d)
+{
+ todriver = d + 1;
+}
+
+static void processbuffer(void)
+{
+ CONST menuitem *item;
+ dialogparam *d;
+ if (uih->incalculation)
+ return;
+ while ((item = menu_delqueue(&d)) != NULL) {
+ ui_menuactivate(item, d);
+ }
+}
+
+static void ui_doquit(int i) NORETURN;
+static void ui_doquit(int i)
+{
+ uih_cycling_off(uih);
+ uih_freecatalog(uih);
+ uih_freecontext(uih);
+ tl_free_timer(maintimer);
+ tl_free_timer(arrowtimer);
+ tl_free_timer(loopt);
+ driver->free_buffers(NULL, NULL);
+ driver->uninit();
+ destroypalette(image->palette);
+ destroy_image(image);
+ xth_uninit();
+ xio_uninit();
+ ui_unregistermenus();
+ uih_unregistermenus();
+ exit_xaos(i);
+}
+
+void ui_quit(void)
+{
+#ifndef _MAC
+ printf(gettext("Thank you for using XaoS\n"));
+#endif
+ ui_doquit(0);
+}
+
+static void ui_quitwr(uih_context * c, int quit)
+{
+ if (c == NULL) {
+ ui_unregistermenus();
+ uih_unregistermenus();
+ xio_uninit();
+ exit_xaos(0);
+ }
+ if (quit)
+ ui_quit();
+}
+
+int ui_key(int key)
+{
+ int sym;
+ char mkey[2];
+ CONST menuitem *item;
+#ifdef _plan9_
+#define ui_keyfilesel(k) 0
+#endif
+ if (!ui_helpkeys(key) && !ui_keyfilesel(key) && !ui_dialogkeys(key)
+ && !ui_menukey(key))
+ switch (sym = tolower(key)) {
+ case ' ':
+ ui_closemenus();
+ uih->display = 1;
+ if (uih->play) {
+ if (uih->incalculation)
+ ui_updatestatus();
+ else {
+ uih_skipframe(uih);
+ driver->print(0, 0,
+ gettext("Skipping, please wait..."));
+ }
+ }
+ break;
+ default:
+ {
+ int number;
+ if (sym >= '0' && sym <= '9') {
+ number = sym - '1';
+ if (number < 0)
+ number = 9;
+ if (number == -1)
+ break;
+ }
+ }
+ mkey[0] = key;
+ mkey[1] = 0;
+ item = menu_findkey(mkey, uih->menuroot);
+ if (item == NULL) {
+ mkey[0] = sym;
+ item = menu_findkey(mkey, uih->menuroot);
+ }
+ if (item != NULL) {
+ dialogparam *p = NULL;
+ if (menu_havedialog(item, uih)) {
+ CONST menudialog *d = menu_getdialog(uih, item);
+ int mousex, mousey, buttons;
+ driver->getmouse(&mousex, &mousey, &buttons);
+ if (d[0].question != NULL && d[1].question == NULL
+ && d[0].type == DIALOG_COORD) {
+ p = (dialogparam *) malloc(sizeof(dialogparam));
+ uih_screentofractalcoord(uih, mousex, mousey,
+ p->dcoord, p->dcoord + 1);
+ }
+ }
+ ui_menuactivate(item, p);
+ }
+ break;
+ }
+ processbuffer();
+ return 0;
+}
+
+#ifdef _EFENCE_
+int EF_ALIGNMENT = 1;
+int EF_PROTECT_BELOW = 0;
+int EF_PROTECT_FREE = 1;
+#endif
+static void ui_helpwr(struct uih_context *c)
+{
+ ui_help("main");
+}
+
+char *ui_getpos(void)
+{
+ return (uih_savepostostr(uih));
+}
+
+void ui_loadstr(CONST char *n)
+{
+ uih_loadstr(uih, n);
+}
+
+static menuitem *menuitems;
+/* This structure is now empty. All static definitions have been moved
+ to ui_registermenus_i18n() which fills up its own static array. */
+
+/* Registering internationalized menus. See also include/xmenu.h
+ for details. Note that MAX_MENUITEMS_I18N may be increased
+ if more items will be added in future. */
+
+/* Details of implementation:
+ *
+ * There are static menuitems_i18n[] arrays for several *.c files.
+ * In these files this array is common for all functions.
+ * Here, e.g. add_resizeitems() and ui_registermenus_i18n()
+ * use the same array and ui_no_menuitems_i18n is the counter
+ * that counts the number of items. The local variables
+ * count the local items.
+ */
+
+#define MAX_MENUITEMS_I18N 20
+/* These variables must be global: */
+static menuitem menuitems_i18n[MAX_MENUITEMS_I18N];
+int ui_no_menuitems_i18n = 0, ui_no_resizeitems;
+static menuitem *resizeitems;
+
+#define UI (MENUFLAG_NOPLAY|MENUFLAG_NOOPTION)
+static void add_resizeitems()
+{
+ // General version, it's needed now:
+ int no_menuitems_i18n = ui_no_menuitems_i18n; /* This variable must be local. */
+ MENUNOP_I("ui", "=", gettext("Resize"), "resize",
+ UI | MENUFLAG_INTERRUPT, ui_call_resize);
+ MENUNOP_I("uia", "=", gettext("Resize"), "animresize",
+ UI | MENUFLAG_INTERRUPT, ui_call_resize);
+ no_menuitems_i18n -= ui_no_menuitems_i18n;
+ resizeitems = &menuitems_i18n[ui_no_menuitems_i18n];
+ menu_add(resizeitems, no_menuitems_i18n);
+ ui_no_resizeitems = no_menuitems_i18n;
+ ui_no_menuitems_i18n += no_menuitems_i18n;
+}
+
+static void ui_registermenus_i18n(void)
+{
+ int no_menuitems_i18n = ui_no_menuitems_i18n; /* This variable must be local. */
+#ifndef MACOSX
+ SUBMENU_I("file", "q", gettext("Quit"), "quitmenu");
+ MENUINT_I("quitmenu", NULL, gettext("Exit now"), "quit",
+ MENUFLAG_INTERRUPT | MENUFLAG_ATSTARTUP, ui_quitwr, 1);
+ MENUINT_I("quitmenu", NULL, gettext("Not yet"), "noquit", UI,
+ ui_quitwr, 0);
+#endif
+ MENUNOP_I("helpmenu", "h", gettext("Help"), "help", MENUFLAG_INCALC,
+ ui_helpwr);
+ MENUNOPCB_I("ui", NULL, gettext("Disable XaoS's builtin GUI"), "nogui",
+ MENUFLAG_INCALC | MENUFLAG_ATSTARTUP | MENUFLAG_NOMENU,
+ ui_noguisw, ui_noguienabled);
+ MENUSEPARATOR_I("ui");
+ MENUNOPCB_I("ui", "/", gettext("Status"), "status", MENUFLAG_INCALC, ui_status, ui_statusenabled); /*FIXME: add also ? as key */
+
+ MENUNOPCB_I("ui", "l", gettext("Ministatus"), "ministatus",
+ MENUFLAG_INCALC, ui_ministatus, ui_ministatusenabled);
+ MENUSEPARATOR_I("ui");
+ MENUSEPARATOR_I("uia");
+ MENUNOPCB_I("uia", "/", gettext("Status"), "animstatus", UI | MENUFLAG_INCALC, ui_status, ui_statusenabled); /*FIXME: add also ? as key */
+
+ MENUNOPCB_I("uia", "l", gettext("Ministatus"), "animministatus",
+ UI | MENUFLAG_INCALC, ui_ministatus, ui_ministatusenabled);
+ MENUSEPARATOR_I("uia");
+ SUBMENU_I("ui", NULL, gettext("Driver"), "drivers");
+ SUBMENU_I("uia", NULL, gettext("Driver"), "drivers");
+ no_menuitems_i18n -= ui_no_menuitems_i18n;
+ menu_add(&(menuitems_i18n[ui_no_menuitems_i18n]), no_menuitems_i18n);
+ ui_no_menuitems_i18n += no_menuitems_i18n;
+}
+
+/* Registering driver items: */
+static menuitem *driveritems;
+static void ui_registermenus(void)
+{
+ int i;
+ menuitem *item;
+ menu_add(menuitems, NITEMS(menuitems));
+ driveritems = item = (menuitem *) malloc(sizeof(menuitem) * ndrivers);
+ for (i = 0; i < ndrivers; i++) {
+ item[i].menuname = "drivers";
+ item[i].shortname = drivers[i]->name;
+ item[i].key = NULL;
+ item[i].type = MENU_INT;
+ item[i].flags = MENUFLAG_RADIO | UI;
+ item[i].iparam = i;
+ item[i].name = drivers[i]->name;
+ item[i].function = (void (*)(void)) ui_setdriver;
+ item[i].control = (int (*)(void)) ui_driverselected;
+ }
+ menu_add(item, ndrivers);
+}
+
+static void ui_unregistermenus(void)
+{
+ menu_delete(menuitems, NITEMS(menuitems));
+ menu_delete(driveritems, ndrivers);
+ menu_delete(menuitems_i18n, ui_no_menuitems_i18n);
+ free(driveritems);
+}
+
+int number_six = 6;
+
+#ifdef SFFE_USING
+ /* parser variables vars */
+cmplx Z, C, pZ;
+#endif
+
+#define MAX_WELCOME 50
+
+void ui_init(int argc, char **argv)
+{
+ int i;
+ int width, height;
+ char welcome[MAX_WELCOME], language[11];
+#ifdef HAVE_GETTEXT
+ char *locale;
+#endif
+#ifdef DESTICKY
+ euid = geteuid();
+ egid = getegid();
+#endif
+#ifdef DESTICKY
+ seteuid(getuid()); /* Don't need supervisor rights anymore. */
+ setegid(getgid());
+#endif
+
+ strcpy(language, "english");
+#ifdef HAVE_GETTEXT
+ /* Setting all locales for XaoS: */
+ locale = setlocale(LC_ALL, "");
+ if (locale == NULL) {
+ printf
+ ("An error occured in your setlocale/gettext installation.\n");
+ printf("I18n menus will not be available.\n");
+ }
+#ifdef _WIN32
+ // x_message("%s",locale);
+ if (locale != NULL) {
+ if (strncmp(locale, "Hungarian", 9) == 0)
+ strcpy(language, "magyar");
+ if (strncmp(locale, "Czech", 5) == 0)
+ strcpy(language, "cesky");
+ if (strncmp(locale, "German", 6) == 0)
+ strcpy(language, "deutsch");
+ if (strncmp(locale, "Spanish", 7) == 0)
+ strcpy(language, "espanhol");
+ if (strncmp(locale, "French", 6) == 0)
+ strcpy(language, "francais");
+ if (strncmp(locale, "Romanian", 8) == 0)
+ strcpy(language, "romanian");
+ if (strncmp(locale, "Italian", 7) == 0)
+ strcpy(language, "italiano");
+ if (strncmp(locale, "Portuguese", 10) == 0)
+ strcpy(language, "portuguese");
+ }
+ // x_message("%s",language);
+#else
+ if ((locale == NULL) || (strcmp(locale, "C") == 0))
+ locale = getenv("LANG");
+ else
+ locale = setlocale(LC_MESSAGES, "");
+
+
+#ifdef DEBUG
+ printf("Trying to use locale settings for %s.\n", locale);
+#endif
+
+ if (locale != NULL) {
+ if (strlen(locale) > 2)
+ locale[2] = '\0';
+ if (strcmp(locale, "hu") == 0)
+ strcpy(language, "magyar");
+ if (strcmp(locale, "cs") == 0)
+ strcpy(language, "cesky");
+ if (strcmp(locale, "de") == 0)
+ strcpy(language, "deutsch");
+ if (strcmp(locale, "es") == 0)
+ strcpy(language, "espanhol");
+ if (strcmp(locale, "fr") == 0)
+ strcpy(language, "francais");
+ if (strcmp(locale, "ro") == 0)
+ strcpy(language, "romanian");
+ if (strcmp(locale, "it") == 0)
+ strcpy(language, "italiano");
+ if (strcmp(locale, "pt") == 0)
+ strcpy(language, "portuguese");
+ }
+#endif
+#ifdef DEBUG
+ printf("Using catalog file for %s language.\n", language);
+#endif
+ /* Without this some locales (e.g. the Hungarian) replaces "." to ","
+ in numerical format and this will cause an automatic truncation
+ at each parameter at certain places, e.g. drawing a new fractal. */
+ setlocale(LC_NUMERIC, "C");
+#ifdef DEBUG
+ printf("Text domain will be bound to directory %s.\n",
+#endif
+ bindtextdomain("xaos",
+#ifdef DOG_DRIVER
+ "..\\locale")
+#ifdef DEBUG
+ )
+#endif
+#else
+#ifdef _WIN32
+ "..\\locale")
+#ifdef DEBUG
+ )
+#endif
+#else
+#ifdef USE_LOCALEPATH
+ localepath)
+#else
+ "/usr/share/locale")
+#endif
+#ifdef DEBUG
+ )
+#endif
+#endif
+#endif
+ ;
+#ifndef _WIN32
+ bind_textdomain_codeset("xaos", "UTF-8");
+#endif
+ textdomain("xaos");
+ /* Done setting locales. */
+#endif
+ xio_init(argv[0]);
+ params_register(global_params);
+ params_register(ui_fractal_params);
+ uih_registermenudialogs_i18n(); /* Internationalized dialogs. */
+ /* Dialogs must be generated before menus because menu items
+ link to dialog pointers. */
+ uih_registermenus_i18n(); /* Internationalized menus. */
+ uih_registermenus();
+ ui_registermenus();
+ ui_registermenus_i18n(); /* Internationalized menus. */
+ for (i = 0; i < ndrivers; i++)
+ params_register(drivers[i]->params);
+#ifdef __alpha__
+#ifdef __linux__
+ extern void ieee_set_fp_control(unsigned long);
+ ieee_set_fp_control(1UL);
+#endif
+#endif
+ prog_argc = argc;
+ prog_argv = argv;
+ if (!params_parser(argc, argv)) {
+ ui_unregistermenus();
+ uih_unregistermenus();
+ xio_uninit();
+ exit_xaos(-1);
+ }
+#ifdef MEM_DEBUG
+ D_NORMAL;
+#endif
+#ifdef DEBUG
+ printf("Initializing driver\n");
+#endif
+#ifndef __BEOS__
+#ifndef _plan9_
+ signal(SIGFPE, SIG_IGN);
+#endif
+#endif
+ if (printconfig) {
+#define tostring(s) #s
+ x_message("XaoS configuration\n"
+ "Version: %s\n"
+ "Type size: %i\n" "integer size: %i\n" "configfile: %s\n"
+#ifndef _plan9_
+#ifdef HAVE_ALLOCA
+ "using alloca\n"
+#endif
+#ifdef HAVE_LONG_DOUBLE
+ "using long double\n"
+#endif
+#ifdef const
+ "const disabled\n"
+#endif
+#ifdef inline
+ "inline disabled\n"
+#endif
+#ifdef HAVE_GETTIMEOFDAY
+ "using gettimeofday\n"
+#endif
+#ifdef HAVE_FTIME
+ "using ftime\n"
+#endif
+#ifdef MITSHM
+ "using mitshm\n"
+#endif
+#ifdef HAVE_MOUSEMASK
+ "using ncurses mouse\n"
+#endif
+#ifdef DEBUG
+ "debug enabled\n"
+#endif
+#ifdef NDEBUG
+ "assertions disabled\n"
+#endif
+#ifdef STATISTICS
+ "statistics enabled\n"
+#endif
+#ifdef SFFE_USING
+ "user formula evaluation\n"
+#endif
+#endif
+ , XaoS_VERSION, (int) sizeof(FPOINT_TYPE),
+ (int) sizeof(int), CONFIGFILE);
+ }
+ if (deflist || printconfig) {
+ char s[256];
+ strcpy(s, "Available drivers: ");
+ for (i = 0; i < ndrivers; i++) {
+ strcat(s, drivers[i]->name);
+ if (i < ndrivers - 1)
+ strcat(s, ", ");
+ }
+ x_message(s);
+ ui_unregistermenus();
+ uih_unregistermenus();
+ xio_uninit();
+ exit_xaos(0);
+ }
+#ifndef _plan9_
+ xth_init(defthreads);
+#endif
+ {
+ int i = ui_dorender_params();
+ if (i) {
+ ui_unregistermenus();
+ uih_unregistermenus();
+ xio_uninit();
+ exit_xaos(i - 1);
+ }
+ }
+ if (defdriver != NULL) {
+ for (i = 0; i < ndrivers; i++) {
+ int y;
+ for (y = 0;
+ tolower(drivers[i]->name[y]) == tolower(defdriver[y])
+ && drivers[i]->name[y] != 0; y++);
+ if (drivers[i]->name[y] == 0) {
+ driver = drivers[i];
+ if (driver->init())
+ break;
+ else {
+ x_fatalerror("Can not initialize %s driver",
+ defdriver);
+ }
+ }
+ }
+ if (i == ndrivers) {
+ x_fatalerror("Unknown driver %s", defdriver);
+ }
+ } else {
+ for (i = 0; i < ndrivers; i++) {
+ driver = drivers[i];
+ if (driver->init())
+ break;
+ }
+ if (i == ndrivers) {
+ x_fatalerror("Can not initialize driver");
+ }
+ }
+#ifdef DEBUG
+ printf("Getting size\n");
+#endif
+ driver->getsize(&width, &height);
+#ifdef _plan9_
+ xth_init(defthreads); /*plan0 requires to initialize tasks after graphics */
+#endif
+ mousetype(WAITMOUSE);
+ driver->print(0, 0, "Initializing. Please wait");
+ driver->print(0, textheight1, "Creating framebuffer");
+ ui_flush();
+ ui_mkimages(width, height);
+
+ driver->print(0, textheight1 * 2, "Initializing fractal engine");
+ ui_flush();
+
+ /* gloabuih initialization moved into uih_mkcontext function : malczak */
+ uih =
+ uih_mkcontext(driver->flags, image, ui_passfunc, ui_message,
+ ui_updatemenus);
+
+ if (driver->gui_driver && driver->gui_driver->setrootmenu)
+ driver->gui_driver->setrootmenu(uih, uih->menuroot);
+ ui_flush();
+#ifdef HOMEDIR
+ if (getenv("HOME") != NULL) {
+ char home[256], *env = getenv("HOME");
+ int maxsize = 255 - (int) strlen(CONFIGFILE) - 1; /*Avoid buffer owerflow */
+ int i;
+ for (i = 0; i < maxsize && env[i]; i++)
+ home[i] = env[i];
+ home[i] = 0;
+ xio_addfname(configfile, home, CONFIGFILE);
+ } else
+#endif
+ xio_addfname(configfile, XIO_EMPTYPATH, CONFIGFILE);
+ ui_flush();
+ srand(time(NULL));
+ uih->fcontext->version++;
+ maintimer = tl_create_timer();
+ arrowtimer = tl_create_timer();
+ loopt = tl_create_timer();
+ driver->print(0, textheight1 * 3, "Loading message catalog");
+ ui_flush();
+ uih_loadcatalog(uih, language);
+ driver->print(0, textheight1 * 4, "Initializing timming system");
+ ui_flush();
+ uih_newimage(uih);
+ tl_update_time();
+ /*tl_process_group (syncgroup, NULL); */
+ tl_reset_timer(maintimer);
+ tl_reset_timer(arrowtimer);
+#ifdef COMPILE_PIPE
+ if (defpipe != NULL) {
+ driver->print(0, textheight1 * 5, "Initializing pipe");
+ ui_flush();
+ ui_pipe_init(defpipe);
+ }
+#else
+ if (defpipe != NULL) {
+ x_fatalerror("Pipe input not supported!");
+ }
+#endif
+ /*uih_constantframetime(uih,1000000/20); */
+ driver->print(0, textheight1 * 6, "Reading configuration file");
+ {
+ xio_file f = xio_ropen(configfile); /*load the configuration file */
+ if (f != XIO_FAILED) {
+ uih_load(uih, f, configfile);
+ if (uih->errstring) {
+ x_error("Configuration file %s load failed", configfile);
+ uih_printmessages(uih);
+ x_error("Hint:try to remove it :)");
+ ui_doquit(1);
+ }
+ }
+ }
+ driver->print(0, textheight1 * 7,
+ "Processing command line parameters");
+ ui_flush();
+ {
+ CONST menuitem *item;
+ dialogparam *d;
+ while ((item = menu_delqueue(&d)) != NULL) {
+ uih_saveundo(uih);
+ menu_activate(item, uih, d);
+ }
+ }
+#ifndef _plan9_
+ sprintf(welcome, gettext("Welcome to XaoS version %s"), XaoS_VERSION);
+ /*TYPE*/ uih_message(uih, welcome);
+#endif
+ uih_updatemenus(uih, driver->name);
+ if (printspeed) {
+ int c = 0;
+ int x, y, b, k;
+ int linesize = uih->image->bytesperpixel * uih->image->height;
+ int size = linesize * uih->image->height;
+ driver->print(0, textheight1 * 8, "Preparing for speedtest");
+ ui_flush();
+ uih->passfunc = NULL;
+ tl_sleep(1000000);
+ for (c = 0; c < 5; c++)
+ driver->display(), ui_flush();
+ driver->processevents(0, &x, &y, &b, &k);
+ driver->print(0, textheight1 * 9, "Measuring dislay speed");
+ ui_flush();
+ tl_sleep(1000000);
+ tl_update_time();
+ tl_reset_timer(maintimer);
+ c = 0;
+ while (tl_lookup_timer(maintimer) < 5000000)
+ driver->display(), ui_flush(), driver->processevents(0, &x, &y,
+ &b, &k),
+ tl_update_time(), c++;
+ x_message("Driver speed: %g FPS (%.4f MBPS)", c / 5.0,
+ c * (double) size / 5.0 / 1024 / 1024);
+
+ driver->print(0, textheight1 * 10, "Measuring memcpy speed");
+ ui_flush();
+ for (c = 0; c < 5; c++) {
+ for (x = 0; x < uih->image->height; x++)
+ memcpy(uih->image->currlines[y], uih->image->oldlines[y],
+ linesize);
+ }
+ tl_update_time();
+ tl_reset_timer(maintimer);
+ c = 0;
+ while (tl_lookup_timer(maintimer) < 5000000) {
+ for (x = 0; x < uih->image->height; x++)
+ memcpy(uih->image->currlines[y], uih->image->oldlines[y],
+ linesize);
+ tl_update_time(), c++;
+ }
+ x_message("Memcpy speed: %g FPS (%.4f MBPS)", c / 5.0,
+ c * (double) size / 5.0 / 1024 / 1024);
+
+ driver->print(0, textheight1 * 10,
+ "Measuring missaligned memcpy speed");
+ tl_update_time();
+ tl_reset_timer(maintimer);
+ c = 0;
+ while (tl_lookup_timer(maintimer) < 5000000) {
+ for (x = 0; x < uih->image->height; x++)
+ memcpy(uih->image->currlines[y] + 1,
+ uih->image->oldlines[y] + 2, linesize - 2);
+ tl_update_time(), c++;
+ }
+ x_message("Missaligned memcpy speed: %g FPS (%.4f MBPS)", c / 5.0,
+ c * (double) size / 5.0 / 1024 / 1024);
+
+ driver->print(0, textheight1 * 10, "Measuring size6 memcpy speed");
+ tl_update_time();
+ tl_reset_timer(maintimer);
+ c = 0;
+ while (tl_lookup_timer(maintimer) < 5000000) {
+ int x, y;
+ for (y = 0; y < uih->image->height; y++)
+ for (x = 0; x < linesize - 6; x += 6) {
+ memcpy(uih->image->currlines[y] + x,
+ uih->image->oldlines[y] + x, number_six);
+ }
+ tl_update_time(), c++;
+ }
+ x_message("Size 6 memcpy speed: %g FPS (%.4f MBPS)", c / 5.0,
+ c * (double) size / 5.0 / 1024 / 1024);
+
+ driver->display();
+ driver->print(0, textheight1 * 11, "Measuring calculation speed");
+ ui_flush();
+ speed_test(uih->fcontext, image);
+ driver->print(0, textheight1 * 12,
+ "Measuring new image calculation loop");
+ ui_flush();
+ uih_prepare_image(uih);
+ tl_update_time();
+ tl_reset_timer(maintimer);
+ for (c = 0; c < 5; c++)
+ uih_newimage(uih), uih->fcontext->version++,
+ uih_prepare_image(uih);
+ driver->display();
+ ui_flush();
+ x_message("New image caluclation took %g seconds (%.2g fps)",
+ tl_lookup_timer(maintimer) / 5.0 / 1000000.0,
+ 5000000.0 / tl_lookup_timer(maintimer));
+ tl_update_time();
+ for (c = 0; c < 5; c++)
+ uih_animate_image(uih), uih_prepare_image(uih), c++;
+ c = 0;
+ tl_update_time();
+ tl_reset_timer(maintimer);
+ driver->print(0, textheight1 * 13,
+ "Measuring zooming algorithm loop");
+ ui_flush();
+ while (tl_lookup_timer(maintimer) < 5000000)
+ uih_animate_image(uih), uih_prepare_image(uih),
+ tl_update_time(), c++;
+ x_message("Approximation loop speed: %g FPS", c / 5.0);
+ ui_doquit(0);
+ }
+#ifdef SFFE_USING
+ /*SFFE : malczak */
+ if (uih->parser->expression == NULL)
+ if (sffeform)
+ err = sffe_parse(&uih->parser, (char *) sffeform);
+ else
+ sffe_parse(&uih->parser, "z^2+c");
+
+ if (sffeinit) {
+ uih->pinit = sffe_alloc();
+ sffe_regvar(&uih->pinit, &pZ, 'p');
+ sffe_regvar(&uih->pinit, &C, 'c');
+ if (sffe_parse(&uih->pinit, (char *) sffeinit) > 0)
+ sffe_free(&uih->pinit);
+ };
+
+ if (err > 0)
+ sffe_parse(&uih->parser, "z^2+c");
+ /*SFFE*/
+#endif
+ driver->print(0, textheight1 * 8, "Entering main loop");
+ ui_flush();
+}
+
+#ifndef MAIN_FUNCTION
+#define MAIN_FUNCTION main
+#endif
+int MAIN_FUNCTION(int argc, char **argv)
+{
+ ui_init(argc, argv);
+ ui_mainloop(1);
+ ui_quit();
+
+ return (0);
+}
+
+static void ui_mkimages(int w, int h)
+{
+ struct palette *palette;
+ int scanline;
+ int width, height;
+ union paletteinfo info;
+ char *b1, *b2;
+ width = w;
+ height = h;
+ if (resizeregistered && !(driver->flags & RESIZE_COMMAND)) {
+ menu_delete(resizeitems, ui_no_resizeitems);
+ resizeregistered = 0;
+ } else {
+ if (!resizeregistered && (driver->flags & RESIZE_COMMAND)) {
+ add_resizeitems();
+ resizeregistered = 1;
+ }
+ }
+ if (!(scanline = driver->alloc_buffers(&b1, &b2))) {
+ driver->uninit();
+ x_error(gettext("Can not allocate buffers"));
+ ui_outofmem();
+ exit_xaos(-1);
+ }
+ info.truec.rmask = driver->rmask;
+ info.truec.gmask = driver->gmask;
+ info.truec.bmask = driver->bmask;
+ palette =
+ createpalette(driver->palettestart, driver->paletteend,
+ driver->imagetype,
+ (driver->
+ flags & RANDOM_PALETTE_SIZE) ? UNKNOWNENTRIES : 0,
+ driver->maxentries,
+ driver->set_color != NULL ? ui_alloccolor : NULL,
+ driver->set_range != NULL ? ui_setpalette : NULL,
+ NULL, NULL, &info);
+ if (!palette) {
+ driver->uninit();
+ x_error(gettext("Can not create palette"));
+ ui_outofmem();
+ exit_xaos(-1);
+ }
+ image =
+ create_image_cont(width, height, scanline, 2, (unsigned char *) b1,
+ (unsigned char *) b2, palette, ui_flip,
+ (driver->flags & AALIB) ? AAIMAGE : 0,
+ get_windowwidth(width) / width,
+ get_windowheight(height) / height);
+ if (!image) {
+ driver->uninit();
+ x_error(gettext("Can not create image"));
+ ui_outofmem();
+ exit_xaos(-1);
+ }
+}
+
+void ui_resize(void)
+{
+ int w, h;
+
+ /* Prevent crash on startup for Mac OS X */
+ if (!uih)
+ return;
+
+ if (uih->incalculation) {
+ uih_interrupt(uih);
+ return;
+ }
+ ui_closemenus();
+ ui_closedialog(0);
+ ui_close_help();
+ uih_clearwindows(uih);
+ uih_stoptimers(uih);
+ uih_cycling_stop(uih);
+ uih_savepalette(uih);
+ driver->getsize(&w, &h);
+ assert(w > 0 && w < 65000 && h > 0 && h < 65000);
+ if (w != uih->image->width || h != uih->image->height
+ || (driver->flags & UPDATE_AFTER_RESIZE)
+ || uih->palette->type != driver->imagetype) {
+ driver->free_buffers(NULL, NULL);
+ destroy_image(uih->image);
+ destroypalette(uih->palette);
+ ui_mkimages(w, h);
+ if (!uih_updateimage(uih, image)) {
+ driver->uninit();
+ x_error(gettext("Can not allocate tables"));
+ ui_outofmem();
+ exit_xaos(-1);
+ }
+ tl_process_group(syncgroup, NULL);
+ tl_reset_timer(maintimer);
+ tl_reset_timer(arrowtimer);
+ uih_newimage(uih);
+ }
+ uih_newimage(uih);
+ uih_restorepalette(uih);
+ /*uih_mkdefaultpalette(uih); */
+ uih->display = 1;;
+ uih_cycling_continue(uih);
+}
+
+static void ui_driver(int d)
+{
+ CONST struct ui_driver *driver1;
+ int width, height;
+ ui_closemenus();
+ ui_closedialog(0);
+ ui_close_help();
+ if (d < 0)
+ d = 0;
+ if (d >= ndrivers)
+ d = ndrivers - 1;
+ uih_stoptimers(uih);
+ driver1 = driver;
+ uih_clearwindows(uih);
+ uih_cycling_off(uih);
+ uih_savepalette(uih);
+ driver->free_buffers(NULL, NULL);
+ driver->uninit();
+ driver = drivers[d];
+ if (!driver->init()) {
+ driver = driver1;
+ uih_error(uih, gettext("Can not initialize driver"));
+ if (!driver1->init()) {
+ x_fatalerror(gettext
+ ("Can not return back to previous driver"));
+ } else
+ driver = driver1;
+ }
+ driver->getsize(&width, &height);
+ destroy_image(uih->image);
+ destroypalette(uih->palette);
+ uih->flags = driver->flags;
+ ui_mkimages(width, height);
+ if (!uih_updateimage(uih, image)) {
+ driver->uninit();
+ x_error(gettext("Can not allocate tables"));
+ ui_outofmem();
+ exit_xaos(-1);
+ }
+ if (driver->gui_driver && driver->gui_driver->setrootmenu)
+ driver->gui_driver->setrootmenu(uih, uih->menuroot);
+ tl_process_group(syncgroup, NULL);
+ tl_reset_timer(maintimer);
+ tl_reset_timer(arrowtimer);
+ uih->display = 1;
+ uih_newimage(uih);
+ uih_restorepalette(uih);
+ ui_updatestatus();
+ uih_updatemenus(uih, driver->name);
+}
+
+static void ui_mainloop(int loop)
+{
+ int inmovement = 1;
+ int x, y, b, k;
+ int time;
+ driver->processevents((!inmovement && !uih->inanimation), &x, &y, &b,
+ &k);
+ do {
+ mousetype(uih->play ? REPLAYMOUSE : uih->
+ inhibittextoutput ? VJMOUSE : NORMALMOUSE);
+ if (uih->display) {
+ uih_prepare_image(uih);
+ ui_updatestatus();
+ }
+ if ((time = tl_process_group(syncgroup, NULL)) != -1) {
+ if (!inmovement && !uih->inanimation) {
+ if (time > 1000000 / 50)
+ time = 1000000 / 50;
+ if (time > delaytime) {
+ tl_sleep(time - delaytime);
+ tl_update_time();
+ }
+ }
+ inmovement = 1;
+ }
+ if (delaytime || maxframerate) {
+ tl_update_time();
+ time = tl_lookup_timer(loopt);
+ tl_reset_timer(loopt);
+ time = 1000000 / maxframerate - time;
+ if (time < delaytime)
+ time = delaytime;
+ if (time) {
+ tl_sleep(time);
+ tl_update_time();
+ }
+ }
+ processbuffer();
+ driver->processevents((!inmovement && !uih->inanimation), &x, &y,
+ &b, &k);
+
+ inmovement = 0;
+ ui_mouse(x, y, b, k);
+ if (todriver)
+ ui_driver(todriver - 1), todriver = 0;
+ if (callresize)
+ ui_resize(), callresize = 0;
+ } while (loop);
+}
diff --git a/src/ui/ui.pri b/src/ui/ui.pri
new file mode 100644
index 0000000..75e2dff
--- /dev/null
+++ b/src/ui/ui.pri
@@ -0,0 +1,10 @@
+SOURCES += \
+ $$PWD/drivers.c \
+ $$PWD/ui.c \
+ $$PWD/uihelp.c \
+ $$PWD/param.c \
+ $$PWD/fparams.c \
+ $$PWD/filesel.c \
+ $$PWD/uimenu.c \
+ $$PWD/pipecmd.c \
+ $$PWD/dialog.c
diff --git a/src/ui/uihelp.c b/src/ui/uihelp.c
new file mode 100644
index 0000000..d597e25
--- /dev/null
+++ b/src/ui/uihelp.c
@@ -0,0 +1,486 @@
+#include <config.h>
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#else
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <string.h>
+#endif
+
+#include <fconfig.h>
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <ui.h>
+#include <xshl.h>
+#include <xmenu.h>
+#include <grlib.h>
+#include <misc-f.h>
+#include "uiint.h"
+#define HISTORYSIZE 10
+static int historypos;
+static struct xshl_line *lines;
+static int helpwidth, helpheight, helpx, helpy;
+static struct uih_window *helpw;
+static int textheight;
+static char *ui_helppage[HISTORYSIZE];
+static int ui_helppos[HISTORYSIZE];
+int helpvisible;
+
+static struct xshl_item *presseditem;
+static struct xshl_item *selecteditem;
+static int pressedline;
+static int selectedline;
+#define SCROOLSIZE 10
+#define XPOS(xp) (2 * BORDERWIDTH + (xp))
+#define YPOS(yp) (2*BORDERWIDTH+ (yp)-ui_helppos[historypos]+10)
+#define SCROOLSTART (helpx+helpwidth-WBORDERS)
+#define WBORDERS (4*BORDERWIDTH+SCROOLSIZE)
+#define HBORDERS (xtextheight(uih->font)+8*BORDERHEIGHT)
+#define WIDTH (uih->image->width-WBORDERS)
+#define HEIGHT (uih->image->height-HBORDERS)
+
+static int pressedbutton = -1;
+static int selectedbutton = -1;
+
+#define NBUTTONS 3
+CONST char *CONST names[] = { "OK", "Back", "Main" };
+
+#define BUTTONSTART(i) (helpx+BORDERWIDTH+(helpwidth-2*BORDERWIDTH)/NBUTTONS*(i))
+static void ui_build_help(char *name);
+static void ui_backhelp(void)
+{
+ historypos--;
+ if (historypos < 0)
+ historypos = HISTORYSIZE - 1;
+ ui_build_help(ui_helppage[historypos]);
+}
+
+static void do_button(int i)
+{
+ switch (i) {
+ case 0:
+ ui_close_help();
+ break;
+ case 1:
+ ui_backhelp();
+ break;
+ case 2:
+ ui_help("main");
+ break;
+ }
+}
+
+void ui_close_help(void)
+{
+ if (helpw != NULL) {
+ xshl_free(lines);
+ helpvisible = 0;
+ uih_removew(uih, helpw);
+ uih->display = 1;
+ helpw = NULL;
+ }
+}
+
+static int getwidth(void *data, int flags, CONST char *text)
+{
+ if (uih->image->flags & AAIMAGE)
+ return (xtextwidth(uih->font, text));
+ return (xtextwidth(uih->font, text) - 1);
+}
+
+static void
+helpsize(struct uih_context *c, int *x, int *y, int *width, int *height,
+ void
+ *data)
+{
+ *x = helpx;
+ *y = helpy;
+ *width = helpwidth;
+ *height = helpheight;
+}
+
+static void drawhelp(struct uih_context *c, void *data)
+{
+ int i = 0;
+ int y;
+ int percentx, percenty;
+ struct xshl_item *curritem;
+ uih_drawborder(uih, helpx + BORDERWIDTH, helpy + BORDERHEIGHT,
+ helpwidth - WBORDERS + SCROOLSIZE,
+ helpheight - HBORDERS, BORDER_PRESSED);
+
+ if (ui_helppos[historypos] > textheight - helpheight / 2 + HBORDERS)
+ ui_helppos[historypos] = textheight - helpheight / 2 + HBORDERS;
+ if (ui_helppos[historypos] < 0)
+ ui_helppos[historypos] = 0;
+
+ /*draw scroolbar */
+ percentx =
+ (helpheight - HBORDERS) * ui_helppos[historypos] / textheight;
+ percenty =
+ (helpheight - HBORDERS) * (ui_helppos[historypos] + helpheight -
+ HBORDERS) / textheight;
+ if (percentx < BORDERHEIGHT)
+ percentx = BORDERHEIGHT;
+ if (percenty < BORDERHEIGHT)
+ percenty = BORDERHEIGHT;
+ if (percentx > helpheight - HBORDERS - BORDERHEIGHT)
+ percentx = helpheight - HBORDERS - BORDERHEIGHT;
+ if (percenty > helpheight - HBORDERS - BORDERHEIGHT)
+ percenty = helpheight - HBORDERS - BORDERHEIGHT;
+ uih_drawborder(uih, SCROOLSTART, helpy + BORDERHEIGHT + percentx,
+ SCROOLSIZE - 1, percenty - percentx, 0);
+ for (i = 0; i < NBUTTONS; i++) {
+ ui_drawbutton(names[i], pressedbutton == i, selectedbutton == i,
+ BUTTONSTART(i) + BORDERWIDTH,
+ BUTTONSTART(i + 1) - BORDERWIDTH,
+ helpy + helpheight - BUTTONHEIGHT - BORDERHEIGHT);
+ }
+
+
+ i = 0;
+ while (YPOS(lines[i].y) < 2 * BORDERWIDTH) {
+ i++;
+ if (lines[i].y < 0)
+ return;
+ }
+ while ((y =
+ YPOS(lines[i].y)) <
+ helpheight - HBORDERS - xtextheight(uih->font)
+ && lines[i].y >= 0) {
+ curritem = lines[i].first;
+ while (curritem != NULL) {
+ unsigned int bgcolor = BGCOLOR(uih);
+ unsigned int fgcolor = /*FGCOLOR (uih) */ LIGHTGRAYCOLOR2(uih);
+ int flags = 0;
+ int x = XPOS(curritem->x);
+
+ if (curritem->c.flags & (XSHL_BIG | XSHL_RED))
+ fgcolor = SELCOLOR(uih);
+ else if (curritem->c.flags & (XSHL_EMPH | XSHL_MONOSPACE))
+ fgcolor =
+ uih->image->
+ flags & AAIMAGE ? SELCOLOR(uih) : FGCOLOR(uih);
+ else if (curritem->c.flags & (XSHL_BLACK))
+ bgcolor = fgcolor = BGCOLOR(uih), flags = TEXT_PRESSED;
+ else
+ bgcolor = fgcolor, flags |= TEXT_PRESSED;
+ if (uih->palette->type & BITMAPS) {
+ flags = TEXT_PRESSED;
+ fgcolor = BGCOLOR(uih);
+ }
+ if (curritem->c.linktext != NULL) {
+ if (uih->palette->type & BITMAPS) {
+ if (curritem == presseditem
+ || curritem == selecteditem)
+ fgcolor =
+ FGCOLOR(uih), xrectangle(uih->image, x + helpx,
+ y + helpy,
+ curritem->width,
+ xtextheight(uih->
+ font),
+ BGCOLOR(uih));
+ else
+ xhline(uih->image, x + helpx,
+ y + helpy + xtextheight(uih->font) - 1,
+ curritem->width, BGCOLOR(uih));
+ } else {
+ if (uih->image->flags & AAIMAGE)
+ fgcolor = curritem == presseditem
+ || curritem ==
+ selecteditem ? SELCOLOR(uih) : BGCOLOR(uih);
+ else {
+ int i;
+ i = strlen(curritem->c.linktext);
+ if (i > 3
+ && !strcmp(".xaf",
+ curritem->c.linktext + i - 4))
+ xhline(uih->image, x + helpx,
+ y + helpy + xtextheight(uih->font) - 1,
+ curritem->width, curritem == presseditem
+ || curritem ==
+ selecteditem ? SELCOLOR(uih) :
+ SELCOLOR(uih));
+ else
+ xhline(uih->image, x + helpx,
+ y + helpy + xtextheight(uih->font) - 1,
+ curritem->width, curritem == presseditem
+ || curritem ==
+ selecteditem ? SELCOLOR(uih) :
+ LIGHTGRAYCOLOR2(uih));
+ xhline(uih->image, x + helpx + 1,
+ y + helpy + xtextheight(uih->font) - 0,
+ curritem->width, BGCOLOR(uih));
+ }
+ flags = 0;
+ bgcolor = BGCOLOR(uih);
+ if (fgcolor == LIGHTGRAYCOLOR2(uih))
+ fgcolor = FGCOLOR(uih);
+ if (curritem == presseditem
+ || curritem == selecteditem)
+ fgcolor = SELCOLOR(uih);
+ }
+ }
+ xprint(uih->image, uih->font, x + helpx, y + helpy,
+ curritem->text, fgcolor, bgcolor, flags);
+ curritem = curritem->next;
+ }
+ i++;
+ }
+}
+
+int ui_helpkeys(int key)
+{
+ int i;
+ if (helpw == NULL)
+ return 0;
+ switch (key) {
+ case 'h':
+ ui_close_help();
+ ui_menu("tutor");
+ return 1;
+ case 'm':
+ ui_help("main");
+ return 1;
+ case UIKEY_DOWN:
+ case 'j':
+ ui_helppos[historypos] += 8, uih->display = 1;
+ presseditem = NULL;
+ selecteditem = NULL;
+ break;
+ case UIKEY_UP:
+ case 'k':
+ ui_helppos[historypos] -= 8, uih->display = 1;
+ presseditem = NULL;
+ selecteditem = NULL;
+ break;
+ case UIKEY_PGDOWN:
+ case '+':
+ case 'f':
+ case ' ':
+ ui_helppos[historypos] +=
+ helpheight - HBORDERS - 32, uih->display = 1;
+ presseditem = NULL;
+ selecteditem = NULL;
+ break;
+ case UIKEY_PGUP:
+ case '-':
+ ui_helppos[historypos] -=
+ helpheight - HBORDERS - 32, uih->display = 1;
+ presseditem = NULL;
+ selecteditem = NULL;
+ break;
+ case 'b':
+ case 1:
+ ui_backhelp();
+ break;
+ case UIKEY_ESC:
+ case 'q':
+ case 'c':
+ case 'o':
+ ui_close_help();
+ break;
+ case UIKEY_TAB:
+ case UIKEY_RIGHT:
+ uih->display = 1;
+ if (selectedbutton < 0 || selectedbutton == NBUTTONS - 1) {
+ if (selecteditem == NULL) {
+ i = 0;
+ while (YPOS(lines[i].y) < 2 * BORDERWIDTH) {
+ i++;
+ if (lines[i].y < 0)
+ break;
+ }
+ selecteditem = lines[i].first;
+ } else
+ i = selectedline, selecteditem = selecteditem->next;
+ for (;
+ lines[i].y >= 0
+ && YPOS(lines[i].y) < helpheight - HBORDERS; i++) {
+ selectedline = i;
+ while (selecteditem != NULL) {
+ if (selecteditem->c.linktext != NULL) {
+ selectedbutton = -1;
+ return 0;
+ }
+ selecteditem = selecteditem->next;
+ }
+ selecteditem = lines[i + 1].first;
+ }
+ selecteditem = NULL;
+ selectedbutton = 0;
+ } else
+ selectedbutton++;
+ break;
+ case 13:
+ case '\n':
+ if (selecteditem != NULL) {
+ ui_help(selecteditem->c.linktext);
+ return 1;
+ }
+ if (selectedbutton >= 0)
+ do_button(selectedbutton);
+ }
+ return 1;
+}
+
+int ui_helpmouse(int x, int y, int buttons, int flags)
+{
+ static int grabbed = 0;
+ int atpressed = 0;
+ if (helpw == NULL)
+ return 0;
+ if (x < helpx || y < helpy || x > helpx + helpwidth
+ || y > helpy + helpheight) {
+ if (flags & MOUSE_PRESS)
+ ui_close_help();
+ pressedbutton = -1;
+ if (pressedbutton != -1)
+ pressedbutton = -1, uih->display = 1;
+ return 1;
+ } else {
+ if (y > helpy + helpheight - BUTTONHEIGHT - 2 * BORDERHEIGHT) {
+ int button;
+ int i;
+ for (i = 0; i <= NBUTTONS; i++)
+ if (x < BUTTONSTART(i))
+ break;
+ button = i - 1;
+ if (flags & MOUSE_DRAG) {
+ if (pressedbutton != selectedbutton
+ || pressedbutton != button)
+ pressedbutton = selectedbutton = button, uih->display =
+ 1;
+ } else {
+ if (pressedbutton != -1)
+ pressedbutton = -1, uih->display = 1;
+ if (flags & MOUSE_RELEASE)
+ do_button(button);
+ }
+ return 1;
+ }
+ if (pressedbutton != -1)
+ pressedbutton = -1, uih->display = 1;
+ if (buttons
+ && ((x > SCROOLSTART && y < helpy + helpheight - HBORDERS)
+ || grabbed)) {
+ /*we are in scroolbar */
+ int pos = (y - helpy) * textheight / (helpheight - HBORDERS);
+ if (pos != ui_helppos[historypos])
+ ui_helppos[historypos] = pos, uih->display = 1;
+ grabbed = 1;
+ return 1;
+ } else
+ grabbed = 0;
+ y -= helpy + xtextheight(uih->font);
+ x -= 2 * BORDERWIDTH + helpx;
+ pressedbutton = -1;
+ if (presseditem != NULL) {
+ if (YPOS(lines[pressedline].y) + 1 >= y
+ && YPOS(lines[pressedline].y) <= y + xtextheight(uih->font)
+ && presseditem->x <= x
+ && presseditem->x + presseditem->width >= x)
+ atpressed = 1;
+ }
+ if (flags & MOUSE_PRESS || ((flags & MOUSE_DRAG) && !atpressed)) {
+ int i = 0;
+ for (i = 0;
+ lines[i].y >= 0 && (YPOS(lines[i].y) + 1 <= y
+ || YPOS(lines[i].y) >=
+ y + xtextheight(uih->font)); i++);
+ if (lines[i].y >= 0) {
+ struct xshl_item *item = lines[i].first;
+ while (item != NULL) {
+ if (item->c.linktext != NULL && item->x <= x
+ && item->x + item->width >= x)
+ break;
+ item = item->next;
+ }
+ if (item != NULL) {
+ uih->display = 1;
+ presseditem = item;
+ pressedline = i;
+ }
+ }
+ } else if (flags & MOUSE_MOVE) {
+ if (!atpressed && presseditem != NULL)
+ uih->display = 1, presseditem = 0;
+ } else if ((flags & MOUSE_RELEASE)) {
+ if (atpressed) {
+ ui_help(presseditem->c.linktext);
+ return 1;
+ }
+ if (presseditem != NULL)
+ presseditem = NULL, uih->display = 1;
+ /*odfajruj to! */
+ }
+ }
+ return 1;
+}
+
+static void ui_build_help(char *name)
+{
+ int i;
+ int width;
+ if (ui_nogui) {
+ printf("help \"%s\"\n", name);
+ return;
+ }
+ if (driver->gui_driver && driver->gui_driver->help) {
+ driver->gui_driver->help(uih, name);
+ return;
+ }
+ if (helpw != NULL)
+ ui_close_help();
+ pressedbutton = -1;
+ helpvisible = 1;
+ width = 80 * xtextwidth(uih->font, "w");
+ if (width > WIDTH)
+ width = WIDTH;
+ lines =
+ help_make(name ? name : "main", getwidth, width - 2,
+ xtextheight(uih->font), xtextheight(uih->font));
+ if (lines == NULL) {
+ lines =
+ help_make("main", getwidth, width - 2, xtextheight(uih->font),
+ xtextheight(uih->font));
+ if (lines == NULL) {
+ helpvisible = 0;
+ uih_message(uih, "Help file not found");
+ return;
+ }
+ }
+ width += WBORDERS;
+ uih->display = 1;
+ presseditem = selecteditem = NULL;
+ helpwidth = width;
+ helpx = (uih->image->width - width) / 2;
+ for (i = 0; lines[i].y >= 0; i++);
+ textheight = lines[i - 1].y + 4 * xtextheight(uih->font);
+ if (textheight < HEIGHT)
+ helpheight = textheight;
+ else
+ helpheight = HEIGHT;
+ helpheight += HBORDERS;
+ helpy = (uih->image->height - helpheight) / 2;
+ helpw = uih_registerw(uih, helpsize, drawhelp, 0, DRAWBORDER);
+}
+
+void ui_help(CONST char *name)
+{
+ if (strlen(name) > 4 && !strcmp(name + strlen(name) - 4, ".xaf")) {
+ uih_playtutorial(uih, name);
+ if (helpw != NULL)
+ ui_close_help();
+ /*FIXME!!!!!!! This needs to be queued! */
+ return;
+ }
+ historypos++;
+ historypos %= HISTORYSIZE;
+ ui_helppage[historypos] = mystrdup(name); /* NOTE we are not freeing this memory. I believe it is not problem. */
+ ui_helppos[historypos] = 0;
+ ui_build_help(ui_helppage[historypos]);
+}
diff --git a/src/ui/uiint.h b/src/ui/uiint.h
new file mode 100644
index 0000000..16223f1
--- /dev/null
+++ b/src/ui/uiint.h
@@ -0,0 +1,75 @@
+#ifndef UI_INT_H
+#define UI_INT_H
+
+#define MOUSE_PRESS 1
+#define MOUSE_RELEASE 2
+#define MOUSE_DRAG 4
+#define MOUSE_MOVE 8
+
+#define BORDERWIDTH 2
+#define BORDERHEIGHT 2
+
+#define BUTTONHEIGHT (xtextheight(uih->font)+2*BORDERWIDTH)
+
+struct ui_textdata {
+ int x, y, width;
+ char *text;
+ int size;
+ int cursor;
+ int cursorpos;
+ int start;
+ int ndisplayed;
+ int clear;
+};
+extern uih_context *uih;
+extern CONST struct ui_driver *driver;
+extern CONST int ndrivers;
+extern CONST struct ui_driver *CONST drivers[];
+extern int ui_nmenus;
+extern char *ui_helptext[];
+extern int ui_helpsize;
+extern CONST struct params ui_fractal_params[];
+extern int filevisible, helpvisible, dialogvisible, yesnodialogvisible;
+extern int ui_nogui;
+
+float ui_get_windowwidth(int width);
+float ui_get_windowheight(int height);
+
+void ui_updatetext(struct ui_textdata *d);
+struct ui_textdata *ui_opentext(int x, int y, int width, CONST char *def);
+void ui_drawtext(struct ui_textdata *d, int active);
+void ui_textmouse(struct ui_textdata *d, int x, int y);
+void ui_closetext(struct ui_textdata *d);
+int ui_textkey(struct ui_textdata *d, int key);
+
+int ui_menumouse(int x, int y, int mousebuttons, int flags);
+int ui_menukey(int key);
+int ui_menuwidth(void);
+void ui_closemenus(void);
+
+int ui_dorender_params(void);
+
+void ui_updatestarts(void);
+
+void ui_builddialog(CONST menuitem * d);
+void ui_close_help(void);
+void ui_closedialog(int call);
+int ui_dialogmouse(int x, int y, int mousebuttons, int flags);
+int ui_dialogkeys(int key);
+void ui_buildyesno(CONST char *question, void (*handler) (int yes));
+void ui_drawbutton(CONST char *text, int pressed, int selected, int x1,
+ int x2, int y);
+
+
+void ui_buildfilesel(CONST char *f, CONST char *m,
+ void (*c) (CONST char *, int));
+int ui_keyfilesel(int k);
+int ui_mousefilesel(int x, int y, int buttons, int flags);
+void ui_closefilesel(int succ);
+
+
+void ui_pipe_init(CONST char *name);
+int ui_helpkeys(int key);
+int ui_helpmouse(int x, int y, int buttons, int flags);
+
+#endif
diff --git a/src/ui/uimenu.c b/src/ui/uimenu.c
new file mode 100644
index 0000000..b920c48
--- /dev/null
+++ b/src/ui/uimenu.c
@@ -0,0 +1,572 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#undef _EFENCE_
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#include <ctype.h>
+#else
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#endif
+#include <config.h>
+#include <fconfig.h>
+#ifndef _plan9_
+#include <assert.h>
+#endif
+#include <filter.h>
+#include <ui_helper.h>
+#include <ui.h>
+#include <timers.h>
+#include <xmenu.h>
+#include <grlib.h>
+#include "uiint.h"
+
+
+#define NMENUS 20
+struct ui_menuitems {
+ int x, y, width, height;
+ CONST menuitem *item;
+ int separator;
+};
+static struct ui_menu {
+ int x, y, width, height;
+ CONST char *name;
+ CONST char *fullname;
+ int namewidth;
+ int selected;
+ int n;
+ int flags;
+ struct ui_menuitems *items;
+ struct uih_window *window;
+ tl_timer *timer;
+} *ui_menus[NMENUS];
+int ui_nmenus;
+
+#define MENU_HORIZONTAL 1
+#define MENU_PRESSED 2
+#define MENU_AUTOHIDE 4
+
+#define SUBMENUWIDTH xtextwidth(uih->font, ">")
+#define MENUPAUSE xtextwidth(uih->font, "X")
+#define MENUWIDTH(a) (xtextwidth(uih->font, "w")+MENUPAUSE+xtextwidth(uih->font, a)+SUBMENUWIDTH)
+#define HMENUWIDTH(a) (xtextwidth(uih->font, a)+xtextwidth(uih->font, " "))
+
+#define SEPARATORSIZE 6
+static struct ui_menuitems *ui_getmenuitems(CONST char *name, int *width1,
+ int *height1, int *n1,
+ int horizontal)
+{
+ CONST menuitem *item;
+ int nseparators = 0;
+ int i;
+ int width = 0;
+ int n;
+ struct ui_menuitems *items;
+ for (n = 0; (item = menu_item(name, n)) != NULL; n++)
+ if (item->type == MENU_SEPARATOR)
+ nseparators++;
+ n -= nseparators;
+ *n1 = n;
+ *height1 = n * xtextheight(uih->font) + nseparators * SEPARATORSIZE;
+ items =
+ (struct ui_menuitems *) malloc(n * sizeof(struct ui_menuitems));
+ nseparators = 0;
+ for (i = 0; i < n; i++) {
+ int w;
+ int sbehind = -1;
+ nseparators--;
+ do {
+ nseparators++;
+ sbehind++;
+ item = menu_item(name, i + nseparators);
+ }
+ while (item->type == MENU_SEPARATOR);
+ items[i].item = item;
+ items[i].separator = sbehind;
+ if (horizontal) {
+ w = HMENUWIDTH(items[i].item->name);
+ if (items[i].item->key) {
+ char c[10];
+ sprintf(c, "(%s)", items[i].item->key);
+ w += xtextwidth(uih->font, c);
+ }
+ } else {
+ w = MENUWIDTH(items[i].item->name);
+ if (items[i].item->key) {
+ char c[10];
+ sprintf(c, " %s ", items[i].item->key);
+ w += xtextwidth(uih->font, c);
+ }
+ }
+ items[i].width = w;
+ items[i].height = xtextheight(uih->font) + 1;
+ if (w > width)
+ width = w;
+ }
+ *width1 = width;
+ return (items);
+}
+
+static void
+ui_menusize(uih_context * c, int *x, int *y, int *w, int *h, void *data)
+{
+ struct ui_menu *m = (struct ui_menu *) data;
+ *x = m->x;
+ *y = m->y;
+ *w = m->width;
+ *h = m->height;
+}
+
+static void ui_drawmenu(uih_context * c, void *data)
+{
+ struct ui_menu *m = (struct ui_menu *) data;
+ int i;
+ int width1 = xtextwidth(c->font, "w");
+ char s[2];
+ s[1] = 0;
+ if (!(m->flags & MENU_HORIZONTAL))
+ xprint(c->image, c->font, m->x + (m->width - m->namewidth) / 2,
+ m->y + BORDERWIDTH, m->fullname, SELCOLOR(c),
+ BGCOLOR(c), 0);
+ for (i = 0; i < m->n; i++) {
+ int color = (i == m->selected ? SELCOLOR(c) : FGCOLOR(c));
+ int pressed = 0;
+ if ((uih->palette->type & BITMAPS) && i == m->selected) {
+ pressed = TEXT_PRESSED;
+ color = BGCOLOR(c);
+ xrectangle(uih->image, m->items[i].x, m->items[i].y,
+ m->items[i].width, m->items[i].height, FGCOLOR(c));
+ }
+ if (!(m->flags & MENU_HORIZONTAL)) {
+ if (m->items[i].separator) {
+ xhline(c->image, m->x + 5,
+ m->items[i].y - 2 - SEPARATORSIZE / 2,
+ m->width - 10, BGCOLOR(c));
+ xhline(c->image, m->x + 5,
+ m->items[i].y - 1 - SEPARATORSIZE / 2,
+ m->width - 10, LIGHTGRAYCOLOR(c));
+ }
+ if (i < 10)
+ s[0] = '0' + (i == 9 ? 0 : i + 1);
+ else
+ s[0] = 'A' + (i - 10);
+ xprint(c->image, c->font, m->items[i].x, m->items[i].y, s,
+ color, BGCOLOR(c), pressed);
+ if (menu_enabled(m->items[i].item, uih)) {
+ xprint(c->image, c->font, m->items[i].x + width1,
+ m->items[i].y, "X", color, BGCOLOR(c),
+ pressed);
+ }
+ xprint(c->image, c->font, m->items[i].x + width1 + MENUPAUSE,
+ m->items[i].y, m->items[i].item->name,
+ color, BGCOLOR(c), pressed);
+ if (m->items[i].item->key) {
+ char ch[20];
+ sprintf(ch, " %s ", m->items[i].item->key);
+ xprint(c->image, c->font,
+ m->items[i].x + m->items[i].width - SUBMENUWIDTH -
+ xtextwidth(uih->font, ch), m->items[i].y, ch,
+ LIGHTGRAYCOLOR(c), BGCOLOR(c),
+ pressed);
+ }
+ if (m->items[i].item->type == MENU_SUBMENU)
+ xprint(c->image, c->font,
+ m->items[i].x + m->items[i].width - SUBMENUWIDTH,
+ m->items[i].y, ">", color, BGCOLOR(c),
+ pressed);
+ } else {
+ xprint(c->image, c->font, m->items[i].x, m->items[i].y,
+ m->items[i].item->name, color, BGCOLOR(c),
+ pressed);
+ if (m->items[i].item->key) {
+ char ch[20];
+ sprintf(ch, "%s", m->items[i].item->key);
+ xprint(c->image, c->font,
+ m->items[i].x + xtextwidth(uih->font,
+ m->items[i].item->name) +
+ 2, m->items[i].y, ch,
+ LIGHTGRAYCOLOR(c), BGCOLOR(c), pressed);
+ }
+ }
+ }
+}
+
+static struct ui_menu *ui_buildmenu(CONST char *name, int x, int y,
+ int flags)
+{
+ int shift = 0;
+ int width, height;
+ int textheight = xtextheight(uih->font);
+ struct ui_menu *menu;
+ int i;
+ menu = (struct ui_menu *) malloc(sizeof(*menu));
+ menu->timer = tl_create_timer();
+ tl_reset_timer(menu->timer);
+ menu->flags = flags;
+ menu->items =
+ ui_getmenuitems(name, &width, &height, &menu->n,
+ flags & MENU_HORIZONTAL);
+ menu->selected = -1;
+ menu->fullname = menu_fullname(name);
+ menu->name = name;
+ menu->namewidth = xtextwidth(uih->font, menu->fullname);
+ if (!(menu->flags & MENU_HORIZONTAL)) {
+ if (menu->namewidth > width)
+ width = menu->namewidth;
+ width += 2 * BORDERWIDTH;
+ height += 2 * BORDERHEIGHT + xtextheight(uih->font);
+ if (x + width > uih->image->width)
+ x = uih->image->width - width;
+ if (y + height > uih->image->height)
+ y = uih->image->height - height;
+ if (x < 0)
+ x = 0;
+ if (y < 0)
+ y = 0;
+ shift = 0;
+ for (i = 0; i < menu->n; i++) {
+ shift += menu->items[i].separator * SEPARATORSIZE;
+ menu->items[i].x = x + BORDERWIDTH;
+ menu->items[i].y =
+ y + BORDERWIDTH + textheight * (i + 1) + shift;
+ menu->items[i].width = width - 2 * BORDERWIDTH;
+ menu->items[i].height = textheight;
+ }
+ } else {
+ int line = 0;
+ int xpos = BORDERWIDTH;
+ x = 0, width = uih->image->width;
+ for (i = 0; i < menu->n; i++) {
+ if (xpos + 2 * BORDERWIDTH + menu->items[i].width >
+ uih->image->width)
+ xpos = BORDERWIDTH, line++;
+ menu->items[i].x = xpos;
+ menu->items[i].y = y + BORDERWIDTH + line * textheight;
+ xpos += menu->items[i].width;
+ menu->items[i].height = textheight;
+ }
+ height = (line + 1) * textheight + 2 * BORDERWIDTH;
+ }
+ menu->selected = -1;
+ menu->window =
+ uih_registerw(uih, ui_menusize, ui_drawmenu, menu, DRAWBORDER);
+ uih->display = 1;
+ menu->x = x;
+ menu->y = y;
+ menu->width = width;
+ menu->height = height;
+ return (menu);
+}
+
+static void ui_closemenu(struct ui_menu *menu)
+{
+ free(menu->items);
+ tl_free_timer(menu->timer);
+ uih_removew(uih, menu->window);
+ uih->display = 1;
+ free(menu);
+}
+
+static void ui_openmenu(CONST char *name, int x, int y, int flags)
+{
+ if (ui_nogui) {
+ printf("menu \"%s\"\n", name);
+ return;
+ }
+ if (driver->gui_driver && driver->gui_driver->menu) {
+ driver->gui_driver->menu(uih, name);
+ return;
+ }
+ if (ui_nmenus > NMENUS)
+ return;
+ ui_menus[ui_nmenus] = ui_buildmenu(name, x, y, flags);
+ ui_nmenus++;
+ ui_updatestarts();
+}
+
+static void ui_closetopmenu(void)
+{
+ if (!ui_nmenus)
+ return;
+ ui_nmenus--;
+ ui_closemenu(ui_menus[ui_nmenus]);
+ ui_updatestarts();
+}
+
+void ui_closemenus(void)
+{
+ while (ui_nmenus)
+ ui_closetopmenu();
+}
+
+void ui_menu(CONST char *m)
+{
+ int mousex, mousey, buttons;
+ driver->getmouse(&mousex, &mousey, &buttons);
+ ui_openmenu(m, mousex, mousey, 0);
+}
+
+static void ui_menupress(int number)
+{
+ CONST menuitem *item;
+ if (number >= ui_menus[ui_nmenus - 1]->n)
+ return;
+ ui_menus[ui_nmenus - 1]->selected = number;
+ item = ui_menus[ui_nmenus - 1]->items[number].item;
+ if (item != NULL) {
+ uih->display = 1;
+ if (item->type == MENU_SUBMENU) {
+ int flags = 0;
+ int mousex, mousey, buttons;
+ driver->getmouse(&mousex, &mousey, &buttons);
+ if (buttons & BUTTON1)
+ flags |= MENU_PRESSED;
+ if ((ui_menus[ui_nmenus - 1]->flags & MENU_HORIZONTAL))
+ ui_openmenu(item->shortname,
+ ui_menus[ui_nmenus - 1]->items[number].x,
+ ui_menus[ui_nmenus - 1]->items[number].y +
+ ui_menus[ui_nmenus - 1]->items[number].height,
+ flags);
+ else
+ ui_openmenu(item->shortname,
+ ui_menus[ui_nmenus - 1]->items[number].x +
+ ui_menus[ui_nmenus - 1]->items[number].width,
+ ui_menus[ui_nmenus - 1]->items[number].y,
+ flags);
+ } else
+ ui_menuactivate(item, NULL);
+ }
+}
+
+int ui_menumouse(int x, int y, int mousebuttons, int flags)
+{
+ if (ui_nmenus) {
+ struct ui_menu *m = ui_menus[ui_nmenus - 1];
+ int place = -1;
+ int inmenu = 0;
+ if (x >= m->x && y >= m->y && x <= m->x + m->width
+ && y <= m->y + m->height) {
+ int i;
+ for (i = 0; i < m->n; i++) {
+ if (x >= m->items[i].x && y >= m->items[i].y
+ && x <= m->items[i].x + m->items[i].width
+ && y <= m->items[i].y + m->items[i].height) {
+ place = i;
+ break;
+ }
+ }
+ inmenu = 1;
+ } else {
+ if (ui_nmenus > 1) {
+ struct ui_menu *m2 = ui_menus[ui_nmenus - 2];
+ int i;
+ i = m2->selected;
+ if (x >= m2->items[i].x && y >= m2->items[i].y
+ && x <= m2->items[i].x + m2->items[i].width
+ && y <= m2->items[i].y + m2->items[i].height)
+ inmenu = 1;
+ }
+ }
+ if ((m->flags & MENU_AUTOHIDE) && !inmenu) {
+ ui_closetopmenu();
+ return (ui_menumouse(x, y, mousebuttons, flags));
+ }
+ if (flags & MOUSE_MOVE && m->selected != place)
+ m->selected = place, uih->display = 1;
+ if (m->flags & MENU_PRESSED) {
+ if (inmenu && place >= 0 && (m->flags & MENU_HORIZONTAL)
+ && (flags & MOUSE_DRAG)
+ && m->items[place].item->type == MENU_SUBMENU) {
+ ui_menupress(place);
+ return 1;
+ } else if (inmenu && place >= 0 && (flags & MOUSE_DRAG)
+ && m->items[place].item->type == MENU_SUBMENU
+ && x >
+ m->items[place].x + m->items[place].width -
+ 2 * SUBMENUWIDTH) {
+ ui_menupress(place);
+ return 1;
+ }
+ if (flags & MOUSE_RELEASE || !(flags & MOUSE_DRAG)) {
+ if (tl_lookup_timer(m->timer) < 300000) {
+ m->flags &= ~MENU_PRESSED;
+ return 1;
+ }
+ if (!inmenu || place < 0) {
+ ui_closetopmenu();
+ return (ui_menumouse(x, y, mousebuttons, flags));
+ }
+ ui_menupress(place);
+ return 1;
+ }
+ if (!inmenu) { /*Trace all menus back and look, if user selected some */
+ int nmenu;
+ for (nmenu = ui_nmenus - 2; nmenu > -1; nmenu--) {
+ struct ui_menu *m2 = ui_menus[nmenu];
+ if (x > m2->x && y > m2->y && x < m2->x + m2->width
+ && y < m2->y + m2->height) {
+ ui_closetopmenu();
+ m2->flags |= MENU_PRESSED;
+ return (ui_menumouse(x, y, mousebuttons, flags));
+ }
+ }
+ }
+ } else if (flags & MOUSE_PRESS) {
+ if (!inmenu || place < 0) {
+ ui_closetopmenu();
+ return (ui_menumouse(x, y, mousebuttons, flags));
+ }
+ ui_menupress(place);
+ }
+ return (1);
+ } else {
+ if (!ui_nogui &&
+ (!driver->gui_driver || !driver->gui_driver->setrootmenu) &&
+ (flags & MOUSE_MOVE) && y < xtextheight(uih->font) + 1
+ && !(mousebuttons))
+ ui_openmenu(uih->menuroot, 0, 0,
+ MENU_HORIZONTAL | MENU_AUTOHIDE);
+ }
+ return (0);
+}
+
+int ui_menukey(int key)
+{
+ int k;
+ if (!ui_nmenus) {
+ if (key == '\n' || key == 13) {
+ ui_closemenus();
+ ui_openmenu(uih->menuroot, 0, 0, MENU_HORIZONTAL);
+ return 1;
+ }
+ return 0;
+ } else {
+ struct ui_menu *menu = ui_menus[ui_nmenus - 1];
+ switch (key) {
+ case '\n':
+ case 13:
+ if (menu->selected >= 0)
+ ui_menupress(menu->selected);
+ return 1;
+ case 'h':
+ {
+ CONST menuitem *item = menu->items[menu->selected].item;
+ ui_closemenus();
+ if (menu->selected >= 0) {
+ ui_help(item->shortname);
+ } else
+ ui_help(menu->name);
+ return 1;
+ }
+ case UIKEY_LEFT:
+ if (menu->flags & MENU_HORIZONTAL) {
+ if (menu->selected == -1)
+ menu->selected = 0;
+ else
+ menu->selected--;
+ if (menu->selected < 0)
+ menu->selected = menu->n - 1;
+ uih->display = 1;
+ } else if (ui_nmenus == 2
+ && ui_menus[0]->flags & MENU_HORIZONTAL) {
+ ui_closetopmenu();
+ ui_menus[0]->selected--;
+ if (ui_menus[0]->selected < 0)
+ ui_menus[0]->selected = ui_menus[0]->n - 1;
+ ui_menupress(ui_menus[0]->selected);
+ } else
+ ui_closetopmenu();
+ return 1;
+ case UIKEY_RIGHT:
+ if (menu->flags & MENU_HORIZONTAL) {
+ if (menu->selected == -1)
+ menu->selected = 0;
+ else
+ menu->selected++;
+ menu->selected %= menu->n;
+ uih->display = 1;
+ } else if (menu->selected >= 0
+ && menu->items[menu->selected].item->type ==
+ MENU_SUBMENU) {
+ ui_menupress(menu->selected);
+ } else if (ui_nmenus == 2
+ && ui_menus[0]->flags & MENU_HORIZONTAL) {
+ ui_closetopmenu();
+ ui_menus[0]->selected++;
+ ui_menus[0]->selected %= ui_menus[0]->n;
+ ui_menupress(ui_menus[0]->selected);
+ }
+ return 1;
+ case UIKEY_DOWN:
+ if (menu->flags & MENU_HORIZONTAL) {
+ if (menu->selected >= 0)
+ ui_menupress(ui_menus[0]->selected);
+ } else {
+ if (menu->selected == -1)
+ menu->selected = 0;
+ else
+ menu->selected++;
+ menu->selected %= menu->n;
+ uih->display = 1;
+ }
+ return 1;
+ case UIKEY_ESC:
+ ui_closetopmenu();
+ return 1;
+ case UIKEY_UP:
+ if (menu->flags & MENU_HORIZONTAL) {
+ ui_closetopmenu();
+ } else {
+ if (menu->selected == -1)
+ menu->selected = 0;
+ else
+ menu->selected--;
+ if (menu->selected < 0)
+ menu->selected = menu->n - 1;
+ uih->display = 1;
+ }
+ return 1;
+ }
+ if (tolower(key) >= 'a'
+ && tolower(key) - 'a' < ui_menus[ui_nmenus - 1]->n - 10) {
+ ui_menupress(tolower(key) - 'a' + 10);
+ return 1;
+ }
+ if (key >= '0' && key <= '9') {
+ k = key - '1';
+ if (k == -1)
+ k = 9;
+ ui_menupress(k);
+ return 1;
+ }
+ return 0;
+ }
+}
+
+int ui_menuwidth(void)
+{
+ if (ui_nmenus && (ui_menus[0]->flags & MENU_HORIZONTAL))
+ return (ui_menus[0]->height);
+ return (0);
+}
diff --git a/src/util/Makefile.in b/src/util/Makefile.in
new file mode 100644
index 0000000..36aad5c
--- /dev/null
+++ b/src/util/Makefile.in
@@ -0,0 +1,50 @@
+CC = @CC@
+CFLAGS = @CFLAGS@
+LIBS = @LIBS@ -lm
+LFLAGS = @LDFLAGS@
+AR = @AR@
+RANLIB = @RANLIB@
+
+SRCS = \
+ png.c \
+ catalog.c \
+ thread.c \
+ xstring.c \
+ help.c \
+ xerror.c \
+ xshl.c \
+ xldio.c \
+ xstdio.c \
+ xmenu.c \
+ timers.c
+
+OBJS = $(SRCS:.c=.o)
+
+TLIB = ../lib/libutil.a
+
+
+all: $(TLIB)
+
+$(TLIB):$(OBJS)
+ rm -f $@
+ $(AR) rc $@ $(OBJS)
+ $(RANLIB) $@
+
+clean:
+ rm -f $(TLIB)
+ rm -f *.[oas]
+ rm -f *~
+ rm -f core
+
+distclean:clean
+ rm Makefile
+
+#dep:
+# rm -f .depend
+# make .depend
+#
+#.depend:
+# echo '# Program dependencies' >.depend
+# gcc -I svgalib $(DEFINES) -MM $(patsubst %.o,%.c,$(OBJS)) >>.depend
+#
+#include .depend
diff --git a/src/util/catalog.c b/src/util/catalog.c
new file mode 100644
index 0000000..76cfa69
--- /dev/null
+++ b/src/util/catalog.c
@@ -0,0 +1,253 @@
+#include <config.h>
+#ifndef _plan9_
+#include <string.h>
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <string.h>
+#else
+#include <u.h>
+#include <libc.h>
+#endif
+#include <catalog.h>
+#include <misc-f.h>
+/* Well, just simple implementation of unbalanced trees in combination
+ * of small hash table. I am lazy :) but should be OK for my purposes
+ *
+ * This function is used for both-lookups and adds into table (since most of
+ * code is the same, depends whether newvalue is NULL. If newvalue is nonNULL,
+ * new variable is added into table, if name is not present here or value is
+ * changed othewise.
+ */
+static char *find_variable(catalog_t * context, CONST char *name,
+ CONST char *newvalue)
+{
+ int r = 0;
+ int hash = (int) strlen(name);
+ struct varnames *current, *last, *newp;
+ hash =
+ ((unsigned char) (name[0]) + (unsigned char) (name[hash - 1]) +
+ hash) % (unsigned int) CHASHMAX;
+ current = last = context->root[hash];
+ while (current != NULL) {
+ last = current;
+ r = strcmp(current->name, name);
+ if (!r) {
+ if (newvalue != NULL) { /*overwrite value */
+ free(current->value);
+ current->value = mystrdup(newvalue);
+ }
+ return (current->value);
+ }
+ if (r > 0)
+ current = current->left;
+ else
+ current = current->right;
+ }
+ /*Entry is new */
+ if (newvalue == NULL)
+ return (NULL);
+ newp = (struct varnames *) calloc(1, sizeof(struct varnames));
+ newp->name = mystrdup(name);
+ newp->value = mystrdup(newvalue);
+ /*FIXME. Should take a care to full memory */
+ newp->left = NULL;
+ newp->right = NULL;
+ if (last == NULL) {
+ context->root[hash] = newp;
+ } else {
+ if (r > 0)
+ last->left = newp;
+ else
+ last->right = newp;
+ }
+ return (newp->value);
+}
+
+/*
+ * free memory used by node and its sons
+ */
+static void free_node(struct varnames *node)
+{
+ while (node != NULL) {
+ struct varnames *nextnode;
+ free_node(node->left);
+ nextnode = node->right;
+ free(node->name);
+ free(node->value);
+ free(node);
+ node = nextnode;
+ }
+}
+
+/*
+ * free catalog
+ */
+void free_catalog(catalog_t * context)
+{
+ int i;
+ for (i = 0; i < CHASHMAX; i++) {
+ free_node(context->root[i]);
+ context->root[i] = NULL;
+ }
+ free(context);
+}
+
+static catalog_t *alloc_catalog(void)
+{
+ int i;
+ catalog_t *c;
+ c = (catalog_t *) calloc(1, sizeof(catalog_t));
+ if (c == NULL)
+ return NULL;
+ for (i = 0; i < CHASHMAX; i++)
+ c->root[i] = NULL;
+ return c;
+}
+
+/*
+ * Parse an catalog file and save values into memory
+ */
+// FIXME: this macro gives a segfault if \" is used in text. kovzol, 2009-06-29
+#define seterror(text) sprintf(errort,"line %i:%s",line,text),*error=errort
+catalog_t *load_catalog(xio_file f, CONST char **error)
+{
+ int i;
+ int line = 1;
+ int size;
+ int c;
+ catalog_t *catalog = alloc_catalog();
+ static char errort[40];
+ char name[1024];
+ char value[1024];
+ if (catalog == NULL) {
+ *error = "Out of memory";
+ }
+ if (f == NULL) {
+ *error = "File could not be opened";
+ free_catalog(catalog);
+ return NULL;
+ }
+ /* Just very simple parsing loop of format
+ * [blanks]name[blanks]"value"[blanks]
+ * Blanks should be comments using # or space, newline, \r and tabulator
+ * Value shoud contain and \ seqences where \\ means \ and
+ * \[something] means something. Should be used for character "
+ */
+ while (!xio_feof(f)) {
+
+ do {
+ c = xio_getc(f);
+ if (c == '\n')
+ line++;
+ if (c == '#') {
+ while ((c = xio_getc(f)) != '\n' && c != XIO_EOF);
+ line++;
+ }
+ }
+ while (c == ' ' || c == '\n' || c == '\r' || c == '\t');
+
+ /*Skip blanks */
+ if (c == XIO_EOF) {
+ if (xio_feof(f))
+ break;
+ free_catalog(catalog);
+ seterror("read error");
+ xio_close(f);
+ return NULL;
+ }
+ i = 0;
+
+ /*read name */
+ do {
+ name[i] = c;
+ i++;
+ c = xio_getc(f);
+ if (c == '\n')
+ line++;
+ if (i == 1024) {
+ seterror("Name is too long (>=1024 characters)");
+ free_catalog(catalog);
+ xio_close(f);
+ return NULL;
+ }
+ }
+
+ while (c != '\n' && c != ' ' && c != '\t' && c != XIO_EOF);
+
+ /*Skip blanks */
+ while (c == ' ' || c == '\n' || c == '\r' || c == '\t') {
+ c = xio_getc(f);
+ if (c == '\n')
+ line++;
+ if (c == '#') {
+ while ((c = xio_getc(f)) != '\n' && c != XIO_EOF);
+ line++;
+ }
+ }
+
+ /*Skip blanks */
+ if (c == XIO_EOF) {
+ if (xio_feof(f))
+ seterror("Unexpected end of file after name field");
+ else
+ seterror("read error");
+ free_catalog(catalog);
+ xio_close(f);
+ return NULL;
+ }
+
+ name[i] = 0;
+ if (c != '"') {
+ seterror("Begin of value field expected"); // Text modified due to segfault problem, see above (kovzol)
+ free_catalog(catalog);
+ xio_close(f);
+ return NULL;
+ }
+ c = xio_getc(f);
+ if (c == '\n')
+ line++;
+ i = 0;
+
+ size = 0;
+ do {
+ if (c == '\\')
+ value[i] = xio_getc(f);
+ else
+ value[i] = c;
+ i++;
+ c = xio_getc(f);
+ if (c == '\n')
+ line++, size = 0;
+ if (size == 40 && c != '"') {
+ fprintf(stderr, "Warning - too long text at line %i\n",
+ line);
+ }
+ size++;
+ if (i == 1024) {
+ seterror("Value is too long (>=1024 characters)");
+ free_catalog(catalog);
+ xio_close(f);
+ return NULL;
+ }
+ }
+ while (c != '"' && c != XIO_EOF);
+
+ if (c == XIO_EOF) {
+ seterror("Unexpected EOF in value field");
+ free_catalog(catalog);
+ xio_close(f);
+ return NULL;
+ }
+
+ value[i] = 0;
+ find_variable(catalog, name, value);
+ } /*while */
+ xio_close(f);
+ return (catalog);
+} /*load_catalog */
+
+char *find_text(catalog_t * catalog, CONST char *name)
+{
+ return (find_variable(catalog, name, NULL));
+}
diff --git a/src/util/help.c b/src/util/help.c
new file mode 100644
index 0000000..adaabb7
--- /dev/null
+++ b/src/util/help.c
@@ -0,0 +1,95 @@
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#else
+#include <stdlib.h>
+#endif
+#include <ctype.h>
+#include <config.h>
+#include <xio.h>
+#include <xshl.h>
+struct helpstatus {
+ int eol;
+ xio_file file;
+};
+static int gethelp(void *userdata)
+{
+ struct helpstatus *s = (struct helpstatus *) userdata;
+ int c = xio_getc(s->file);
+ if (c == '\r')
+ return (gethelp(userdata));
+ if (c < 0 || c > 255)
+ return 0;
+ if (c == '%' && s->eol)
+ return 0;
+ s->eol = (c == '\n');
+ return c;
+}
+
+struct xshl_line *help_make(CONST char *command,
+ int getwidth(void *, int flags,
+ CONST char *text), int width,
+ int smallheight, int bigheight)
+{
+ struct helpstatus *s = (struct helpstatus *) malloc(sizeof(*s));
+ struct xshl_line *line;
+ s->file = xio_gethelp();
+ if (s->file == XIO_FAILED) {
+ free(s);
+ return 0;
+ }
+ s->eol = 1;
+ while (1) {
+ int c;
+ c = xio_getc(s->file);
+ if (c == '%' && s->eol) {
+ c = xio_getc(s->file);
+ do {
+ int i = 0;
+ i = 0;
+ while (command[i] && c == command[i]) {
+ c = xio_getc(s->file);
+ i++;
+ }
+ if (!command[i]) {
+ if (isspace(c)) {
+ while (c != '\n' && !xio_feof(s->file))
+ c = xio_getc(s->file);
+ line =
+ xshl_interpret(s, gethelp, width, getwidth, 0,
+ smallheight, bigheight);
+ xio_close(s->file);
+ free(s);
+ return (line);
+ }
+ } else {
+ while (c != '\n' && c != ' ' && !xio_feof(s->file))
+ c = xio_getc(s->file);
+ if (c == ' ')
+ while (c == ' ')
+ c = xio_getc(s->file);
+ }
+ }
+ while (c != '\n' && !xio_feof(s->file));
+ } /*c==% */
+ s->eol = (c == '\n');
+ if (xio_feof(s->file)) {
+ xio_close(s->file);
+ return NULL;
+ }
+ } /*while 1 */
+}
+
+#if _NEVER_
+void help_print(char *name, int skip, int width)
+{
+ struct xshl_line *l;
+ l = help_make(name, xshl_textlen, width, 1, 1);
+ if (l == NULL) {
+ printf("Help not available!\n");
+ return;
+ }
+ xshl_print(skip, l);
+ xshl_free(l);
+}
+#endif
diff --git a/src/util/png.c b/src/util/png.c
new file mode 100644
index 0000000..4fb01bc
--- /dev/null
+++ b/src/util/png.c
@@ -0,0 +1,201 @@
+#include <config.h>
+#ifndef _plan9_
+#include <aconfig.h>
+#ifdef USE_PNG
+#include <png.h>
+#endif
+#include <stdlib.h>
+#include <stdio.h>
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <errno.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <filter.h>
+#include <version.h>
+#include <misc-f.h>
+#include <xio.h>
+#ifndef USE_PNG
+CONST char *writepng(xio_constpath filename, CONST struct image *img)
+{
+ return
+ "XaoS can not save images because it was incorrectly compiled. Please compile it with zlib and libpng";
+}
+#else
+
+CONST char *writepng(xio_constpath filename, CONST struct image *image)
+{
+ png_structp png_ptr;
+ png_infop info_ptr;
+ png_color palette[256];
+ volatile unsigned short a = 255;
+ volatile unsigned char *b = (volatile unsigned char *) &a;
+#ifdef _undefined_
+ static char text[] =
+ "XaoS" XaoS_VERSION " - a realtime interactive fractal zoomer";
+ static png_text comments[] = {
+ {
+ -1,
+ "Software",
+ text,
+ sizeof(text)}
+ };
+#endif
+ FILE *file = fopen(filename, "wb");
+ errno = -1;
+ if (file == NULL) {
+ return strerror(errno);
+ }
+ png_ptr =
+ png_create_write_struct(PNG_LIBPNG_VER_STRING, (void *) NULL,
+ (png_error_ptr) NULL,
+ (png_error_ptr) NULL);
+ if (!png_ptr)
+ return "Unable to initialize pnglib";
+ info_ptr = png_create_info_struct(png_ptr);
+ if (!info_ptr) {
+ png_destroy_write_struct(&png_ptr, (png_infopp) NULL);
+ return "No memory to create png info structure";
+ }
+ if (setjmp(png_ptr->jmpbuf)) {
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(file);
+ return strerror(errno);
+ }
+ png_init_io(png_ptr, file);
+ png_set_filter(png_ptr, 0,
+ PNG_FILTER_NONE | PNG_FILTER_SUB | PNG_FILTER_PAETH |
+ PNG_FILTER_UP | PNG_FILTER_AVG);
+ /* set the zlib compression level */
+ /*png_set_compression_level(png_ptr, Z_BEST_COMPRESSION); */
+ png_set_compression_level(png_ptr, Z_DEFAULT_COMPRESSION);
+
+ /* set other zlib parameters */
+ png_set_compression_mem_level(png_ptr, 8);
+ png_set_compression_strategy(png_ptr, Z_DEFAULT_STRATEGY);
+ png_set_compression_window_bits(png_ptr, 15);
+ png_set_compression_method(png_ptr, 8);
+
+ info_ptr->width = image->width;
+ info_ptr->height = image->height;
+ /*info_ptr->gamma=1.0; */
+ info_ptr->gamma = 0.5;
+ info_ptr->valid |= PNG_INFO_gAMA | PNG_INFO_pHYs;
+ info_ptr->x_pixels_per_unit = (png_uint_32) (100 / image->pixelwidth);
+ info_ptr->y_pixels_per_unit = (png_uint_32) (100 / image->pixelheight);
+
+
+ switch (image->palette->type) {
+ case C256:
+ {
+ int i;
+ info_ptr->color_type = PNG_COLOR_TYPE_PALETTE;
+ info_ptr->bit_depth = image->bytesperpixel * 8;
+ info_ptr->palette = palette;
+ info_ptr->valid |= PNG_INFO_PLTE;
+ for (i = 0; i < image->palette->end; i++)
+ info_ptr->palette[i].red = image->palette->rgb[i][0],
+ info_ptr->palette[i].green = image->palette->rgb[i][1],
+ info_ptr->palette[i].blue = image->palette->rgb[i][2],
+ info_ptr->num_palette = image->palette->end;
+ }
+ break;
+ case SMALLITER:
+ case LARGEITER:
+ case GRAYSCALE:
+ info_ptr->color_type = PNG_COLOR_TYPE_GRAY;
+ info_ptr->bit_depth = image->bytesperpixel * 8;
+ break;
+ case TRUECOLOR:
+ case TRUECOLOR24:
+ case TRUECOLOR16:
+ info_ptr->color_type = PNG_COLOR_TYPE_RGB;
+ info_ptr->bit_depth = 8;
+ info_ptr->sig_bit.red = 8 - image->palette->info.truec.rprec;
+ info_ptr->sig_bit.green = 8 - image->palette->info.truec.gprec;
+ info_ptr->sig_bit.blue = 8 - image->palette->info.truec.bprec;
+ break;
+ }
+ info_ptr->interlace_type = 0;
+#ifdef _undefined_
+ png_set_text(png_ptr, info_ptr, comments,
+ sizeof(comments) / sizeof(png_text));
+#endif
+
+ png_write_info(png_ptr, info_ptr);
+ /*png_set_filler(png_ptr,0,PNG_FILLER_AFTER); */
+ png_set_packing(png_ptr);
+ if (image->palette->type & (TRUECOLOR | TRUECOLOR24 | TRUECOLOR16))
+ png_set_shift(png_ptr, &(info_ptr->sig_bit));
+ if (*b == 255)
+ png_set_swap(png_ptr);
+ png_set_bgr(png_ptr);
+ switch (image->palette->type) {
+ case C256:
+ case GRAYSCALE:
+ case SMALLITER:
+ case LARGEITER:
+#ifdef STRUECOLOR24
+ case TRUECOLOR24:
+ png_write_image(png_ptr, (png_bytepp) image->currlines);
+ break;
+#endif
+ case TRUECOLOR:
+ {
+ int i, y;
+ unsigned char *r = (unsigned char *) malloc(image->width * 3);
+ for (i = 0; i < image->height; i++) {
+ for (y = 0; y < image->width; y++)
+ r[y * 3 + 2] =
+ (((pixel32_t **) (image->
+ currlines))[i][y] &
+ image->palette->info.truec.rmask) >> image->
+ palette->info.truec.rshift, r[y * 3 + 1] =
+ (((pixel32_t **) (image->
+ currlines))[i][y] &
+ image->palette->info.truec.gmask) >> image->
+ palette->info.truec.gshift, r[y * 3] =
+ (((pixel32_t **) (image->
+ currlines))[i][y] &
+ image->palette->info.truec.bmask) >> image->
+ palette->info.truec.bshift;
+ png_write_rows(png_ptr, (png_bytepp) & r, 1);
+ }
+ }
+ break;
+#ifdef SUPPORT16
+ case TRUECOLOR16:
+ {
+ int i, y;
+ unsigned char *r = (unsigned char *) malloc(image->width * 3);
+ for (i = 0; i < image->height; i++) {
+ for (y = 0; y < image->width; y++)
+ r[y * 3 + 2] =
+ (((pixel16_t **) (image->
+ currlines))[i][y] &
+ image->palette->info.truec.rmask) >> image->
+ palette->info.truec.rshift, r[y * 3 + 1] =
+ (((pixel16_t **) (image->
+ currlines))[i][y] &
+ image->palette->info.truec.gmask) >> image->
+ palette->info.truec.gshift, r[y * 3] =
+ (((pixel16_t **) (image->
+ currlines))[i][y] &
+ image->palette->info.truec.bmask) >> image->
+ palette->info.truec.bshift;
+ png_write_rows(png_ptr, (png_bytepp) & r, 1);
+ }
+ }
+ break;
+#endif
+ }
+ png_write_end(png_ptr, info_ptr);
+ png_destroy_write_struct(&png_ptr, &info_ptr);
+ fclose(file);
+ return NULL;
+}
+#endif
diff --git a/src/util/thread.c b/src/util/thread.c
new file mode 100644
index 0000000..f3ef4a7
--- /dev/null
+++ b/src/util/thread.c
@@ -0,0 +1,221 @@
+#ifndef _plan9_
+#include <signal.h>
+#include <stdio.h>
+#endif
+#include <xthread.h>
+#ifndef __BEOS__
+struct taskinfo definfo = {
+ 0,
+};
+
+#ifndef nthreads
+
+#define getrange1(range,ncpu) ((range)*(ncpu))/nthreads
+#define getrange2(range,ncpu) getrange1(range,(ncpu)+1)
+
+int ethreads = 0;
+int nthreads = 1;
+
+#ifdef USE_PTHREAD
+
+/* Well conde follows is probably very ugly, since this is
+ * my absolutely first application for threads. Please let
+ * me know how to improvie it
+ */
+
+static pthread_cond_t synccond, startcond;
+static struct taskinfo infos[MAXTHREADS];
+static pthread_mutex_t synccondmutex, startcondmutex;
+pthread_mutex_t semaphors[MAXSEMAPHORS];
+pthread_cond_t conds[MAXCONDS];
+
+/*This loop is executed whole time in slave threads.
+ Its function is following:
+ 1) wait for message
+ 2) call function from message
+ 3) syncronize
+ 4) again
+
+ To invoke this mechanizm main thread(#1) should call
+ xth_function
+ xth_synchronize forces forces thread to wait for others
+ */
+
+static int nfinished;
+static int npending;
+static int counter;
+static int bcounter;
+static int bcounter1;
+static int range;
+static void *data;
+static xfunction function;
+static void *control_routine(void *i)
+{
+ struct taskinfo *info = i;
+ int mycounter = 0;
+ int r;
+ void *d;
+ xfunction f;
+ while (1) {
+ /* quite a lot pthread calls. Please if you are
+ * reading this code and crying "OH NO!" so ugly
+ * handling! Why so much calls? Stop crying, I am
+ * newbie in threads. Please rewrite my code and
+ * send me better and faster version.
+ *
+ * This function comunicates with pth_function from main loop
+ * as follows: it uses startcond to wait for order start function!
+ * Counter is used to ensure that main function did not give
+ * order whie control_routine was busy
+ *
+ * after order is received, function adress is readed from global
+ * variables and started. Pth_function then executes its
+ * own part of calculation. After that it waits counter
+ * nfinished to reach number of thasks-1. This is done
+ * using cond synccond and synccondmutex. Quite complex
+ * but it seems to work. Looking forward for someone, who
+ * should reduce number of _lock/_unlock
+ */
+ pthread_mutex_lock(&synccondmutex);
+ nfinished++;
+ pthread_cond_signal(&synccond);
+ pthread_mutex_unlock(&synccondmutex);
+
+ pthread_mutex_lock(&startcondmutex);
+ while (mycounter >= counter) {
+ if (bcounter > bcounter1) {
+ /*Well we are already locked using start lock..should be OK */
+ mycounter--;
+ bcounter1++;
+ break;
+ }
+ pthread_cond_wait(&startcond, &startcondmutex);
+ }
+ r = range;
+ d = data;
+ f = function;
+ npending--;
+ pthread_mutex_unlock(&startcondmutex);
+ mycounter++;
+ f(d, info, getrange1(r, info->n), getrange2(r, info->n));
+ }
+ return NULL;
+}
+
+void pth_init(int nthreads1)
+{
+ int i;
+ pthread_attr_t attr;
+ if (ethreads)
+ return;
+
+ if (nthreads1 == 1 || nthreads1 == 0)
+ return; /*use nothreads_* calls */
+ if (nthreads1 > MAXTHREADS)
+ nthreads1 = MAXTHREADS;
+ nthreads = nthreads1;
+
+ pthread_attr_init(&attr);
+ pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED);
+
+ if (pthread_cond_init(&synccond, NULL))
+ exit(1);
+ if (pthread_cond_init(&startcond, NULL))
+ exit(1);
+ if (pthread_mutex_init(&synccondmutex, NULL))
+ exit(1);
+ if (pthread_mutex_init(&startcondmutex, NULL))
+ exit(1);
+
+ infos[0].n = 0;
+ /*infos[0].id = pthread_self(); */
+
+ for (i = 0; i < MAXSEMAPHORS; i++) {
+ pthread_mutex_init(semaphors + i, NULL);
+ }
+ for (i = 0; i < MAXCONDS; i++) {
+ pthread_cond_init(conds + i, NULL);
+ }
+
+ nfinished = 0;
+ for (i = 0; i < nthreads - 1; i++) {
+ if (pthread_create
+ (&infos[i + 1].id, &attr, control_routine, infos + i + 1)) {
+ nthreads = i + 1;
+ break;
+ }
+ infos[i + 1].n = i + 1;
+ }
+ if (nthreads != 1)
+ ethreads = 1;
+}
+
+void pth_synchronize()
+{
+ /*Our job is done, synchronize now */
+ if (nfinished < nthreads - 1) {
+ pthread_mutex_lock(&synccondmutex);
+ while (nfinished < nthreads - 1) {
+ pthread_cond_wait(&synccond, &synccondmutex);
+ }
+ pthread_mutex_unlock(&synccondmutex);
+ }
+ /*Ok job is done, lets continue :) */
+}
+
+void pth_bgjob(xfunction f, void *d)
+{
+ pthread_mutex_lock(&startcondmutex);
+ if (npending) {
+ printf("Collision!\n"); /*FIXME:remove this..I just want to know how often this happends */
+ pthread_mutex_unlock(&startcondmutex);
+ f(d, infos, 0, 0);
+ }
+ if (bcounter < bcounter1) {
+ printf("Internal error\a\n");
+ }
+ if (!nfinished) {
+ pthread_mutex_unlock(&startcondmutex);
+ /*no more CPU available :( */
+ f(d, infos, 0, 0);
+ }
+ data = d;
+ range = 0;
+ function = f;
+ bcounter++;
+ nfinished--;
+ npending++;
+ pthread_cond_signal(&startcond);
+ pthread_mutex_unlock(&startcondmutex);
+}
+
+void pth_function(xfunction f, void *d, int r)
+{
+ pth_synchronize();
+ pthread_mutex_lock(&startcondmutex);
+ data = d;
+ range = r;
+ function = f;
+ /*And lets start it:) */
+ nfinished = 0;
+ npending = nthreads - 1;
+ counter++;
+ if (nthreads == 2)
+ pthread_cond_signal(&startcond);
+ else
+ pthread_cond_broadcast(&startcond);
+ pthread_mutex_unlock(&startcondmutex);
+
+ function(data, infos, getrange1(range, 0), getrange2(range, 0));
+}
+
+void pth_uninit()
+{
+ /*Should be empty for now since all threads will be killed after exit call */
+ /*FIXME should be added something if necessary :) */
+ nthreads = 1;
+ ethreads = 0;
+}
+#endif /*POSIX threads */
+#endif /*nthreads */
+#endif /*__BEOS__*/
diff --git a/src/util/timers.c b/src/util/timers.c
new file mode 100644
index 0000000..13e9abe
--- /dev/null
+++ b/src/util/timers.c
@@ -0,0 +1,670 @@
+/*
+ * XaoS, a fast portable realtime fractal zoomer
+ * Copyright (C) 1996,1997 by
+ *
+ * Jan Hubicka (hubicka@paru.cas.cz)
+ * Thomas Marsh (tmarsh@austin.ibm.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 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 General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ * All ugly architecture depended timing code is separated into this file..
+ */
+#ifdef _plan9_
+#include <u.h>
+#include <stdio.h>
+#include <libc.h>
+#else
+#include <config.h>
+#ifdef HAVE_GETTIMEOFDAY
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+ /*HAVE_UNISTD */
+#else
+#ifdef HAVE_FTIME
+#include <sys/timeb.h>
+#endif
+ /*HAVE_FTIME */
+#endif
+ /*HAVE_GETTIMEOFDAY */
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#else
+#include <time.h>
+#endif
+ /*HAVE_TIME_H */
+#include <aconfig.h>
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#include <stdio.h>
+#include <unistd.h>
+#ifndef _MAC
+#ifndef NO_MALLOC_H
+#include <malloc.h>
+#endif
+#endif
+#ifdef __BEOS__
+#include <OS.h>
+#endif
+#ifdef USE_ALLEGRO
+#include <allegro.h>
+#endif
+#ifdef HAVE_SETITIMER
+#include <signal.h>
+#endif
+#include <limits.h>
+#endif
+#ifndef _plan9_
+#include <assert.h>
+#endif
+#include "../include/timers.h"
+#ifdef _WIN32
+#include <windows.h>
+#endif
+
+#ifdef _WIN32
+#define QuadPart(x) x.QuadPart
+#endif
+
+#ifndef SIGALRM
+#undef HAVE_SETITIMER
+#endif
+
+#define EMULDIV 1024
+struct timeemulator {
+ unsigned long int time;
+ unsigned long exact;
+};
+
+ /* Definition of structure timer. There is lots of various formats for time
+ * at variious platforms. So there is quite lots of ifdefs... same is for
+ * saving current time and function comparing them. Rest of timer lib
+ * is platform independent
+ */
+
+
+struct timer {
+#ifdef __BEOS__
+ bigtime_t lastactivated;
+#else
+#ifdef _WIN32
+ LARGE_INTEGER lastactivated;
+#else
+#ifdef USE_ALLEGRO
+ uclock_t lastactivated;
+#else
+#ifdef HAVE_UCLOCK
+ uclock_t lastactivated;
+#else
+#ifdef USE_CLOCK
+ int lastactivated;
+#else
+#ifdef HAVE_GETTIMEOFDAY
+ struct timeval lastactivated;
+#else
+#ifdef _plan9_
+ int lastactivated;
+#else
+#ifdef HAVE_FTIME
+ struct timeb lastactivated;
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+ unsigned long lastemulated;
+ struct timeemulator *emulator;
+ void (*handler) (void *);
+ void (*multihandler) (void *, int);
+ void *userdata;
+ struct timer *next, *previous, *group;
+ int interval;
+ int stopped;
+ int stoppedtime;
+ int slowdown;
+};
+
+ /*Variable for saving current time */
+#ifdef __BEOS__
+bigtime_t currenttime;
+#else
+#ifdef _WIN32
+LARGE_INTEGER currenttime, frequency;
+#else
+#ifdef USE_ALLEGRO
+int allegromode;
+#define TICKSPERSEC 100 /*must be divisor of 1000000 */
+volatile static int counter = -1;
+static int ainstalled;
+#endif
+#ifdef HAVE_UCLOCK
+static uclock_t currenttime;
+#else
+#ifdef USE_CLOCK
+static int currenttime;
+#else
+#ifdef HAVE_GETTIMEOFDAY
+static struct timeval currenttime;
+#ifdef AMIGA
+extern long __timezone;
+#define tzp __timezone
+#else
+static struct timezone tzp;
+#endif
+#else
+#ifdef HAVE_FTIME
+static struct timeb currenttime;
+#endif
+#endif
+#endif
+#endif
+#ifdef _plan9_
+static int currenttime;
+#endif
+#endif
+#endif
+
+#ifdef HAVE_SETITIMER
+static int registered = 0, reghandler = 0;
+static tl_group group2;
+#endif
+static tl_group group1;
+tl_group *syncgroup = &group1,
+#ifdef HAVE_SETITIMER
+ *asyncgroup = &group2;
+#else
+ *asyncgroup = &group1;
+#endif
+#ifdef _plan9_
+#ifdef _plan9v2_
+static int plan9_msec(void)
+{ /*this function was sent by Nigel Roles */
+ static int fd = -1;
+ char buf[20]; /* ish */
+ if (fd < 0)
+ fd = open("/dev/msec", OREAD);
+ else
+ seek(fd, 0, 0);
+ read(fd, buf, sizeof(buf));
+ return atoi(buf);
+}
+#else
+static int plan9_msec(void)
+{
+ return (int) (nsec() / 1000000);
+}
+#endif
+#endif
+
+#ifndef __BEOS__
+#ifndef _WIN32
+#ifndef HAVE_GETTIMEOFDAY
+#ifndef HAVE_FTIME
+#ifndef _plan9_
+#ifndef _MAC
+#error I am unable to get time in milisecond. Please edit timers.c and make tl_update_time and tl_lookup_timer to work for your architecture and send me then back(to hubicka@paru.cas.cz). You will need also define timers.h and change type of lasttime.
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+
+
+#ifdef USE_ALLEGRO
+static void timer(void)
+{
+ counter++;
+}
+
+END_OF_FUNCTION(timer);
+#endif
+/*following functions are architecture dependent */
+void tl_update_time(void)
+{
+#ifdef __BEOS__
+ currenttime = system_time();
+#else
+#ifdef _WIN32
+ QueryPerformanceCounter(&currenttime);
+#else
+#ifdef USE_ALLEGRO
+ if (allegromode) {
+ if (counter == -1) {
+ LOCK_VARIABLE(counter);
+ LOCK_FUNCTION(timer);
+ install_int(timer, 1000 / TICKSPERSEC);
+ ainstalled = 1;
+ counter = 0;
+ }
+ currenttime = counter;
+ return;
+ }
+#endif
+#ifdef HAVE_UCLOCK
+ currenttime = uclock();
+#else
+#ifdef USE_CLOCK
+ currenttime = clock();
+#else
+#ifdef HAVE_GETTIMEOFDAY
+ do {
+ gettimeofday(&currenttime, &tzp);
+ }
+ while (currenttime.tv_usec > 999999);
+#else
+#ifdef HAVE_FTIME
+ ftime(&currenttime);
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+#ifdef _plan9_
+ currenttime = plan9_msec();
+#endif
+}
+
+static INLINE int __lookup_timer(tl_timer * t)
+{
+#ifdef __BEOS__
+ return (currenttime - t->lastactivated);
+#else
+#ifdef _WIN32
+ return ((QuadPart(currenttime) -
+ QuadPart(t->lastactivated)) * 1000000LL) /
+ QuadPart(frequency);
+#else
+#ifdef USE_ALLEGRO
+ if (allegromode)
+ return (((currenttime -
+ t->lastactivated) * (1000000LL / TICKSPERSEC)));
+#endif
+#ifdef HAVE_UCLOCK
+ return (((currenttime -
+ t->lastactivated) * 1000000LL) / UCLOCKS_PER_SEC);
+#else
+#ifdef USE_CLOCK
+ return ((currenttime -
+ t->lastactivated) * (1000000.0 / CLOCKS_PER_SEC));
+#else
+#ifdef HAVE_GETTIMEOFDAY
+ return ((1000000 *
+ (-(int) t->lastactivated.tv_sec + (int) currenttime.tv_sec) +
+ (-(int) t->lastactivated.tv_usec +
+ (int) currenttime.tv_usec)));
+#else
+#ifdef HAVE_FTIME
+ return ((1000000 * (-t->lastactivated.time + currenttime.time) +
+ 1000 * (-t->lastactivated.millitm + currenttime.millitm)));
+#else
+#ifdef _plan9_
+ return ((currenttime - t->lastactivated) * 1000);
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+#endif
+}
+
+REGISTERS(3)
+int tl_lookup_timer(tl_timer * t)
+{
+ if (t->stopped) {
+ return (t->stoppedtime);
+ }
+ if (t->emulator != NULL) {
+ return ((int) (t->emulator->time - t->lastemulated) * EMULDIV);
+ }
+ return (__lookup_timer(t) - t->slowdown);
+}
+
+void tl_stop_timer(tl_timer * t)
+{
+ if (!t->stopped) {
+ t->stoppedtime = tl_lookup_timer(t);
+ t->stopped = 1;
+ }
+}
+
+void tl_slowdown_timer(tl_timer * t, int time)
+{
+ if (!t->stopped) {
+ t->slowdown += time;
+ } else
+ t->stoppedtime -= time;
+}
+
+void tl_resume_timer(tl_timer * t)
+{
+ if (t->stopped) {
+ t->stopped = 0;
+ t->slowdown = tl_lookup_timer(t) - t->stoppedtime;
+ }
+}
+
+void tl_sleep(int time)
+{
+#ifdef _WIN32
+ Sleep(time / 1000);
+#else
+#ifdef HAVE_USLEEP
+ usleep(time);
+#else
+#ifdef __BEOS__
+ snooze(time);
+#else
+#ifdef HAVE_SELECT
+ {
+ struct timeval tv;
+ tv.tv_sec = time / 1000000L;
+ tv.tv_usec = time % 1000000L;
+ (void) select(0, (void *) 0, (void *) 0, (void *) 0, &tv);
+ }
+#else
+#ifdef _plan9_
+ sleep(time / 1000);
+#else
+/*
+ #warning tl_sleep function not implemented. You may ignore this warning.
+ #warning xaos will work correctly. But on miltitasked enviroments it is
+ #warning HIGHLY recomended to implement this.
+ */
+#endif
+#endif
+#endif
+#endif
+#endif
+}
+
+REGISTERS(3)
+void tl_reset_timer(tl_timer * t)
+{
+ if (t->stopped)
+ t->stoppedtime = 0;
+ else {
+ if (t->emulator != NULL) {
+ t->lastemulated = t->emulator->time;
+ } else
+ t->lastactivated = currenttime, t->slowdown = 0;
+ }
+}
+
+tl_timer *tl_create_timer(void)
+{
+ tl_timer *timer;
+ timer = (tl_timer *) calloc(1, sizeof(tl_timer));
+ if (timer == NULL)
+ return NULL;
+ timer->interval = -1;
+ timer->handler = NULL;
+ timer->multihandler = NULL;
+ timer->userdata = NULL;
+ timer->next = NULL;
+ timer->previous = NULL;
+ timer->group = NULL;
+ timer->stopped = 0;
+ timer->stoppedtime = 0;
+ timer->slowdown = 0;
+ timer->emulator = NULL;
+ tl_reset_timer(timer);
+#ifdef _WIN32
+ QueryPerformanceFrequency(&frequency);
+#endif
+ return (timer);
+}
+
+tl_group *tl_create_group(void)
+{
+ tl_group *timer;
+ timer = (tl_group *) calloc(1, sizeof(tl_group));
+ if (timer == NULL)
+ return NULL;
+ timer->interval = -1;
+ timer->handler = NULL;
+ timer->multihandler = NULL;
+ timer->userdata = NULL;
+ timer->next = NULL;
+ timer->previous = NULL;
+ timer->group = timer;
+ tl_reset_timer(timer);
+ return (timer);
+}
+
+
+void tl_free_timer(tl_timer * timer)
+{
+ if (timer->group)
+ tl_remove_timer(timer);
+ free((void *) timer);
+}
+
+void tl_free_group(tl_group * timer)
+{
+ tl_timer *next;
+ do {
+ next = timer->next;
+ free((void *) timer);
+ }
+ while (next != NULL);
+}
+
+int tl_process_group(tl_group * group, int *activated)
+{
+ int again = 1;
+ tl_timer *timer, *timer1;
+ int minwait = INT_MAX;
+ tl_update_time();
+ if (activated != NULL)
+ *activated = 0;
+ while (again) {
+ group->slowdown = 0;
+ again = 0;
+ minwait = INT_MAX;
+ timer = group->next;
+ while (timer != NULL) {
+ timer1 = timer->next;
+ if (timer->handler && timer->interval >= 0) {
+ int time = timer->interval - tl_lookup_timer(timer);
+ if (time < 500) {
+ if (activated != NULL)
+ (*activated)++;
+ again = 1;
+ tl_reset_timer(timer);
+ if (time < -200 * 1000000)
+ time = 0; /*underflow? */
+ tl_slowdown_timer(timer, time);
+ time = timer->interval + time;
+ timer->handler(timer->userdata);
+ tl_update_time();
+ }
+ if (time < minwait)
+ minwait = time;
+ } else if (timer->multihandler && timer->interval > 0) {
+ int time = timer->interval - tl_lookup_timer(timer);
+ if (time < 500) {
+ int n;
+ if (activated != NULL)
+ (*activated)++;
+ tl_reset_timer(timer);
+ if (time < -200 * 1000000)
+ time = 0; /*underflow? */
+ n = -(time + 500) / timer->interval + 1;
+ time = timer->interval * n + time;
+ tl_slowdown_timer(timer,
+ time - timer->interval +
+ n * timer->interval);
+ timer->multihandler(timer->userdata, n);
+ tl_update_time();
+ }
+ if (time < minwait)
+ minwait = time;
+ }
+ if (group->slowdown) {
+ again = 1;
+ break;
+ }
+ timer = timer1;
+ }
+ }
+ if (minwait != INT_MAX) {
+ if (minwait < 0)
+ return (0);
+ return (minwait);
+ }
+ return (-1);
+}
+
+#ifdef HAVE_SETITIMER
+static void update_async(void);
+static void alarmhandler(int a)
+{
+ update_async();
+ signal(SIGALRM, alarmhandler);
+}
+
+static void update_async(void)
+{
+ int time = tl_process_group(asyncgroup, NULL);
+ if (time != -1) {
+ struct itimerval t;
+ t.it_interval.tv_sec = 0;
+ t.it_interval.tv_usec = 0;
+ t.it_value.tv_sec = time / 1000000;
+ t.it_value.tv_usec = time % 1000000;
+ if (!reghandler) {
+ signal(SIGALRM, alarmhandler), reghandler = 1;
+ }
+ setitimer(ITIMER_REAL, &t, &t);
+ registered = 1;
+ } else if (registered) {
+ struct itimerval t;
+ t.it_interval.tv_sec = 0;
+ t.it_interval.tv_usec = 0;
+ t.it_value.tv_sec = 0;
+ t.it_value.tv_usec = 0;
+ setitimer(ITIMER_REAL, &t, &t);
+ registered = 0;
+ }
+}
+
+#else
+#define update_async()
+#endif
+void tl_add_timer(tl_group * group, tl_timer * timer)
+{
+ if (timer->group)
+ tl_remove_timer(timer);
+ timer->previous = group;
+ timer->next = group->next;
+ timer->group = group;
+ group->next = timer;
+ if (timer->next != NULL)
+ timer->next->previous = timer;
+ if (timer->group == asyncgroup)
+ update_async();
+}
+
+void tl_set_interval(tl_timer * timer, int interval)
+{
+ if (timer->interval <= 0) {
+ tl_reset_timer(timer);
+ }
+ timer->interval = interval;
+ if (timer->group == asyncgroup)
+ update_async();
+}
+
+void tl_set_handler(tl_timer * timer, void (*handler) (void *), void *ud)
+{
+ timer->handler = handler;
+ timer->userdata = ud;
+ if (timer->group == asyncgroup)
+ update_async();
+}
+
+void
+tl_set_multihandler(tl_timer * timer, void (*handler) (void *, int),
+ void *ud)
+{
+ timer->multihandler = handler;
+ timer->userdata = ud;
+ if (timer->group == asyncgroup)
+ update_async();
+}
+
+void tl_remove_timer(tl_timer * timer)
+{
+ tl_group *g = timer->group;
+ timer->group->slowdown = 1;
+ timer->previous->next = timer->next;
+ if (timer->next != NULL)
+ timer->next->previous = timer->previous;
+ timer->group = NULL;
+ if (g == asyncgroup)
+ update_async();
+}
+
+struct timeemulator *tl_create_emulator(void)
+{
+ return ((struct timeemulator *)
+ calloc(1, sizeof(struct timeemulator)));
+}
+
+void tl_free_emulator(struct timeemulator *t)
+{
+ free(t);
+}
+
+void tl_elpased(struct timeemulator *t, int elpased)
+{
+ t->exact += elpased;
+ t->time += t->exact / EMULDIV;
+ t->exact &= (EMULDIV - 1);
+}
+
+void tl_emulate_timer(struct timer *t, struct timeemulator *e)
+{
+ int time = tl_lookup_timer(t);
+ t->emulator = e;
+ t->lastemulated = e->time;
+ tl_slowdown_timer(t, -time);
+}
+
+void tl_unemulate_timer(struct timer *t)
+{
+ int time = tl_lookup_timer(t);
+ t->emulator = NULL;
+ tl_slowdown_timer(t, tl_lookup_timer(t) - time);
+}
+
+#ifdef USE_ALLEGRO
+void tl_allegromode(int mode)
+{
+ allegromode = mode;
+ if (!allegromode && ainstalled) {
+ remove_int(timer);
+ ainstalled = 0;
+ counter = -1;
+ }
+}
+#endif
diff --git a/src/util/util.pri b/src/util/util.pri
new file mode 100644
index 0000000..7db9d98
--- /dev/null
+++ b/src/util/util.pri
@@ -0,0 +1,12 @@
+SOURCES += \
+ $$PWD/png.c \
+ $$PWD/catalog.c \
+ $$PWD/thread.c \
+ $$PWD/xstring.c \
+ $$PWD/help.c \
+ $$PWD/xerror.c \
+ $$PWD/xshl.c \
+ $$PWD/xldio.c \
+ $$PWD/xstdio.c \
+ $$PWD/xmenu.c \
+ $$PWD/timers.c
diff --git a/src/util/xerror.c b/src/util/xerror.c
new file mode 100644
index 0000000..f7a904f
--- /dev/null
+++ b/src/util/xerror.c
@@ -0,0 +1,43 @@
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#endif
+#include <stdarg.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include "config.h"
+#include "xerror.h"
+#include "aconfig.h"
+/*BeOS driver have its own routines in the C++ code */
+#ifndef BEOS_DRIVER
+/*On windows we use message boxes done in the ui_win32.c code*/
+#ifndef WIN32_DRIVER
+void x_message(CONST char *text, ...)
+{
+ va_list ap;
+ va_start(ap, text);
+ vfprintf(stdout, text, ap);
+ fprintf(stdout, "\n");
+ va_end(ap);
+}
+
+void x_error(CONST char *text, ...)
+{
+ va_list ap;
+ va_start(ap, text);
+ vfprintf(stderr, text, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+}
+
+void x_fatalerror(CONST char *text, ...)
+{
+ va_list ap;
+ va_start(ap, text);
+ vfprintf(stderr, text, ap);
+ fprintf(stderr, "\n");
+ va_end(ap);
+ exit(1);
+}
+#endif
+#endif
diff --git a/src/util/xldio.c b/src/util/xldio.c
new file mode 100644
index 0000000..ab40058
--- /dev/null
+++ b/src/util/xldio.c
@@ -0,0 +1,603 @@
+/* This file contain long double I/O routines for Windows (because Windows API
+ don't support long double at all.
+
+ They don't work on other architectures. So be curefull. */
+
+
+/* This source comes from the DJGPP runtime library. It has been hacked
+ to work with XaoS */
+/* Copyright (C) 1998 DJ Delorie, see COPYING.DJ for details */
+/* Copyright (C) 1997 DJ Delorie, see COPYING.DJ for details */
+/* Copyright (C) 1996 DJ Delorie, see COPYING.DJ for details */
+/* Copyright (C) 1994 DJ Delorie, see COPYING.DJ for details */
+#include <config.h>
+#include <stdlib.h>
+#include <ctype.h>
+#include <xio.h>
+/*#include <libc/unconst.h>*/
+#include <sys/types.h>
+#include <ctype.h>
+#include <string.h>
+#include <stdio.h>
+#include <math.h>
+#include <xldio.h>
+#ifdef USE_XLDIO
+
+static long double powten[] = {
+ 1e1L, 1e2L, 1e4L, 1e8L, 1e16L, 1e32L, 1e64L, 1e128L, 1e256L,
+ 1e512L, 1e1024L, 1e2048L, 1e4096L
+};
+
+long double x_strtold(CONST char *s, CONST char **sret)
+{
+ long double r; /* result */
+ int e, ne; /* exponent */
+ int sign; /* +- 1.0 */
+ int esign;
+ int flags = 0;
+ int l2powm1;
+
+ r = 0.0L;
+ sign = 1;
+ e = ne = 0;
+ esign = 1;
+
+ while (*s && isspace(*s))
+ s++;
+
+ if (*s == '+')
+ s++;
+ else if (*s == '-') {
+ sign = -1;
+ s++;
+ }
+
+ while ((*s >= '0') && (*s <= '9')) {
+ flags |= 1;
+ r *= 10.0L;
+ r += *s - '0';
+ s++;
+ }
+
+ if (*s == '.') {
+ s++;
+ while ((*s >= '0') && (*s <= '9')) {
+ flags |= 2;
+ r *= 10.0L;
+ r += *s - '0';
+ s++;
+ ne++;
+ }
+ }
+ if (flags == 0) {
+ if (sret)
+ *sret = /*unconst(s, char *) */ s;
+ return 0.0L;
+ }
+
+ if ((*s == 'e') || (*s == 'E')) {
+ s++;
+ if (*s == '+')
+ s++;
+ else if (*s == '-') {
+ s++;
+ esign = -1;
+ }
+ while ((*s >= '0') && (*s <= '9')) {
+ e *= 10;
+ e += *s - '0';
+ s++;
+ }
+ }
+ if (esign < 0) {
+ esign = -esign;
+ e = -e;
+ }
+ e = e - ne;
+ if (e < -4096) {
+ /* possibly subnormal number, 10^e would overflow */
+ r *= 1.0e-2048L;
+ e += 2048;
+ }
+ if (e < 0) {
+ e = -e;
+ esign = -esign;
+ }
+ if (e >= 8192)
+ e = 8191;
+ if (e) {
+ long double d = 1.0L;
+ l2powm1 = 0;
+ while (e) {
+ if (e & 1)
+ d *= powten[l2powm1];
+ e >>= 1;
+ l2powm1++;
+ }
+ if (esign > 0)
+ r *= d;
+ else
+ r /= d;
+ }
+ if (sret)
+ *sret = /*unconst(s, char *) */ s;
+ return r * sign;
+}
+
+#if 0
+main()
+{
+ printf("%E", (float) x_strtold("1.4E15", NULL));
+}
+#endif
+
+
+#define MAXEXPLD 4952 /* this includes subnormal numbers */
+static int is_nan = 0;
+static char decimal = '.';
+static long double pten[] = {
+ 1e1L, 1e2L, 1e4L, 1e8L, 1e16L, 1e32L, 1e64L, 1e128L, 1e256L,
+ 1e512L, 1e1024L, 1e2048L, 1e4096L
+};
+
+static long double ptenneg[] = {
+ 1e-1L, 1e-2L, 1e-4L, 1e-8L, 1e-16L, 1e-32L, 1e-64L, 1e-128L, 1e-256L,
+ 1e-512L, 1e-1024L, 1e-2048L, 1e-4096L
+};
+
+static inline char tochar(int n)
+{
+ if (n >= 9)
+ return '9';
+ if (n <= 0)
+ return '0';
+ return n + '0';
+}
+
+static inline int todigit(char c)
+{
+ if (c <= '0')
+ return 0;
+ if (c >= '9')
+ return 9;
+ return c - '0';
+}
+
+#define LONGINT 0x01 /* long integer */
+#define LONGDBL 0x02 /* long double */
+#define SHORTINT 0x04 /* short integer */
+#define ALT 0x08 /* alternate form */
+#define LADJUST 0x10 /* left adjustment */
+#define ZEROPAD 0x20 /* zero (as opposed to blank) pad */
+#define HEXPREFIX 0x40 /* add 0x or 0X prefix */
+
+#define MAXP 4096
+#define NP 12
+#define P (4294967296.0L * 4294967296.0L * 2.0L) /* 2^65 */
+static long double INVPREC = P;
+static long double PREC = 1.0L / P;
+#undef P
+/*
+ * Defining FAST_LDOUBLE_CONVERSION results in a little bit faster
+ * version, which might be less accurate (about 1 bit) for long
+ * double. For 'normal' double it doesn't matter.
+ */
+/* #define FAST_LDOUBLE_CONVERSION */
+#if 1
+#define modfl mymodfl
+inline long double m_floor(long double x)
+{
+ register long double __value;
+ volatile unsigned short int __cw, __cwtmp;
+
+ asm volatile ("fnstcw %0":"=m" (__cw));
+ __cwtmp = (__cw & 0xf3ff) | 0x0400; /* rounding down */
+ asm volatile ("fldcw %0"::"m" (__cwtmp));
+ asm volatile ("frndint":"=t" (__value):"0"(x));
+ asm volatile ("fldcw %0"::"m" (__cw));
+
+ return __value;
+
+}
+
+static inline long double mymodfl(long double x, long double *pint)
+{
+ /*int p=(int) x; */
+ long double p = m_floor(x);
+ long double frac = x - p;
+ if (x < 0)
+ p = p + 1, frac = frac - 1;
+ *pint = p;
+ return frac;
+}
+#endif
+static char *exponentl(char *p, int expv, unsigned char fmtch)
+{
+ char *t;
+ char expbuf[MAXEXPLD];
+
+ *p++ = fmtch;
+ if (expv < 0) {
+ expv = -expv;
+ *p++ = '-';
+ } else
+ *p++ = '+';
+ t = expbuf + MAXEXPLD;
+ if (expv > 9) {
+ do {
+ *--t = tochar(expv % 10);
+ }
+ while ((expv /= 10) > 9);
+ *--t = tochar(expv);
+ for (; t < expbuf + MAXEXPLD; *p++ = *t++);
+ } else {
+ *p++ = '0';
+ *p++ = tochar(expv);
+ }
+ return p;
+}
+
+static int isspeciall(long double d, char *bufp)
+{
+ struct IEEExp {
+ unsigned manl:32;
+ unsigned manh:32;
+ unsigned exp:15;
+ unsigned sign:1;
+ } *ip = (struct IEEExp *) &d;
+
+ is_nan = 0; /* don't assume the static is 0 (emacs) */
+ if (ip->exp != 0x7fff)
+ return (0);
+ if ((ip->manh & 0x7fffffff) || ip->manl) {
+ strcpy(bufp, "NaN");
+ is_nan = ip->sign ? -1 : 1; /* kludge: we don't need the sign, it's not nice
+ but it should work */
+ } else
+ (void) strcpy(bufp, "Inf");
+ return (3);
+}
+
+static char *my_roundl(long double fract, int *expv, char *start,
+ char *end, char ch, char *signp)
+{
+ long double tmp;
+
+ if (fract) {
+ if (fract == 0.5L) {
+ char *e = end;
+ if (*e == '.')
+ e--;
+ if (*e == '0' || *e == '2' || *e == '4' || *e == '6'
+ || *e == '8') {
+ tmp = 3.0;
+ goto start;
+ }
+ }
+ (void) modfl(fract * 10.0L, &tmp);
+ } else
+ tmp = todigit(ch);
+ start:
+ if (tmp > 4)
+ for (;; --end) {
+ if (*end == decimal)
+ --end;
+ if (++*end <= '9')
+ break;
+ *end = '0';
+ if (end == start) {
+ if (expv) { /* e/E; increment exponent */
+ *end = '1';
+ ++*expv;
+ } else { /* f; add extra digit */
+ *--end = '1';
+ --start;
+ }
+ break;
+ }
+ }
+ /* ``"%.3f", (double)-0.0004'' gives you a negative 0. */
+ else if (*signp == '-')
+ for (;; --end) {
+ if (*end == decimal)
+ --end;
+ if (*end != '0')
+ break;
+ if (end == start)
+ *signp = 0;
+ }
+ return start;
+}
+
+
+static int
+cvtl(long double number, int prec, int flags, char *signp,
+ unsigned char fmtch, char *startp, char *endp)
+{
+ char *p, *t;
+ long double fract = 0;
+ int dotrim, expcnt, gformat;
+ int doextradps = 0; /* Do extra decimal places if the precision needs it */
+ int doingzero = 0; /* We're displaying 0.0 */
+ long double integer, tmp;
+
+ if ((expcnt = isspeciall(number, startp)))
+ return (expcnt);
+
+ dotrim = expcnt = gformat = 0;
+ /* fract = modfl(number, &integer); */
+ integer = number;
+
+ /* get an extra slot for rounding. */
+ t = ++startp;
+
+ p = endp - 1;
+ if (integer) {
+ int i, lp = NP, pt = MAXP;
+#ifndef FAST_LDOUBLE_CONVERSION
+ long double oint = integer, dd = 1.0L;
+#endif
+ if (integer > INVPREC) {
+ integer *= PREC;
+ while (lp >= 0) {
+ if (integer >= pten[lp]) {
+ expcnt += pt;
+ integer *= ptenneg[lp];
+#ifndef FAST_LDOUBLE_CONVERSION
+ dd *= pten[lp];
+#endif
+ }
+ pt >>= 1;
+ lp--;
+ }
+#ifndef FAST_LDOUBLE_CONVERSION
+ integer = oint / dd;
+#else
+ integer *= INVPREC;
+#endif
+ }
+ /*
+ * Do we really need this ?
+ */
+ for (i = 0; i < expcnt; i++)
+ *p-- = '0';
+ }
+ number = integer;
+ fract = modfl(number, &integer);
+ /* If integer is zero then we need to look at where the sig figs are */
+ if (integer < 1) {
+ /* If fract is zero the zero before the decimal point is a sig fig */
+ if (fract == 0.0)
+ doingzero = 1;
+ /* If fract is non-zero all sig figs are in fractional part */
+ else
+ doextradps = 1;
+ }
+ /*
+ * get integer portion of number; put into the end of the buffer; the
+ * .01 is added for modf(356.0 / 10, &integer) returning .59999999...
+ */
+ for (; integer; ++expcnt) {
+ tmp = modfl(integer * 0.1L, &integer);
+ *p-- = tochar((int) ((tmp + .01L) * 10));
+ }
+ switch (fmtch) {
+ case 'f':
+ /* reverse integer into beginning of buffer */
+ if (expcnt)
+ for (; ++p < endp; *t++ = *p);
+ else
+ *t++ = '0';
+ /*
+ * if precision required or alternate flag set, add in a
+ * decimal point.
+ */
+ if (prec || flags & ALT)
+ *t++ = decimal;
+ /* if requires more precision and some fraction left */
+ if (fract) {
+ if (prec)
+ do {
+ fract = modfl(fract * 10.0L, &tmp);
+ *t++ = tochar((int) tmp);
+ }
+ while (--prec && fract);
+ if (fract)
+ startp = my_roundl(fract, (int *) NULL, startp,
+ t - 1, (char) 0, signp);
+ }
+ for (; prec--; *t++ = '0');
+ break;
+ case 'e':
+ case 'E':
+ eformat:
+ if (expcnt) {
+ *t++ = *++p;
+ if (prec || flags & ALT)
+ *t++ = decimal;
+ /* if requires more precision and some integer left */
+ for (; prec && ++p < endp; --prec)
+ *t++ = *p;
+ /*
+ * if done precision and more of the integer component,
+ * round using it; adjust fract so we don't re-round
+ * later.
+ */
+ if (!prec && ++p < endp) {
+ fract = 0;
+ startp = my_roundl((long double) 0.0L, &expcnt,
+ startp, t - 1, *p, signp);
+ }
+ /* adjust expcnt for digit in front of decimal */
+ --expcnt;
+ }
+ /* until first fractional digit, decrement exponent */
+ else if (fract) {
+ int lp = NP, pt = MAXP;
+#ifndef FAST_LDOUBLE_CONVERSION
+ long double ofract = fract, dd = 1.0L;
+#endif
+ expcnt = -1;
+ if (fract < PREC) {
+ fract *= INVPREC;
+ while (lp >= 0) {
+ if (fract <= ptenneg[lp]) {
+ expcnt -= pt;
+ fract *= pten[lp];
+#ifndef FAST_LDOUBLE_CONVERSION
+ dd *= pten[lp];
+#endif
+ }
+ pt >>= 1;
+ lp--;
+ }
+#ifndef FAST_LDOUBLE_CONVERSION
+ fract = ofract * dd;
+#else
+ fract *= PREC;
+#endif
+ }
+ /* adjust expcnt for digit in front of decimal */
+ for ( /* expcnt = -1 */ ;; --expcnt) {
+ fract = modfl(fract * 10.0L, &tmp);
+ if (tmp)
+ break;
+ }
+ *t++ = tochar((int) tmp);
+ if (prec || flags & ALT)
+ *t++ = decimal;
+ } else {
+ *t++ = '0';
+ if (prec || flags & ALT)
+ *t++ = decimal;
+ }
+ /* if requires more precision and some fraction left */
+ if (fract) {
+ if (prec)
+ do {
+ fract = modfl(fract * 10.0L, &tmp);
+ *t++ = tochar((int) tmp);
+ }
+ while (--prec && fract);
+ if (fract)
+ startp =
+ my_roundl(fract, &expcnt, startp, t - 1, (char) 0,
+ signp);
+ }
+ /* if requires more precision */
+ for (; prec--; *t++ = '0');
+
+ /* unless alternate flag, trim any g/G format trailing 0's */
+ if (gformat && !(flags & ALT)) {
+ while (t > startp && *--t == '0');
+ if (*t == decimal)
+ --t;
+ ++t;
+ }
+ t = exponentl(t, expcnt, fmtch);
+ break;
+ case 'g':
+ case 'G':
+ if (prec) {
+ /* If doing zero and precision is greater than 0 count the
+ * 0 before the decimal place */
+ if (doingzero)
+ --prec;
+ } else {
+ /* a precision of 0 is treated as precision of 1 unless doing zero */
+ if (!doingzero)
+ ++prec;
+ }
+ /*
+ * ``The style used depends on the value converted; style e
+ * will be used only if the exponent resulting from the
+ * conversion is less than -4 or greater than the precision.''
+ * -- ANSI X3J11
+ */
+ if (expcnt > prec || (!expcnt && fract && fract < .0001)) {
+ /*
+ * g/G format counts "significant digits, not digits of
+ * precision; for the e/E format, this just causes an
+ * off-by-one problem, i.e. g/G considers the digit
+ * before the decimal point significant and e/E doesn't
+ * count it as precision.
+ */
+ --prec;
+ fmtch -= 2; /* G->E, g->e */
+ gformat = 1;
+ goto eformat;
+ }
+ /*
+ * reverse integer into beginning of buffer,
+ * note, decrement precision
+ */
+ if (expcnt)
+ for (; ++p < endp; *t++ = *p, --prec);
+ else
+ *t++ = '0';
+ /*
+ * if precision required or alternate flag set, add in a
+ * decimal point. If no digits yet, add in leading 0.
+ */
+ if (prec || flags & ALT) {
+ dotrim = 1;
+ *t++ = decimal;
+ } else
+ dotrim = 0;
+ /* if requires more precision and some fraction left */
+ while (prec && fract) {
+ fract = modfl(fract * 10.0L, &tmp);
+ *t++ = tochar((int) tmp);
+ /* If we're not adding 0s
+ * or we are but they're sig figs:
+ * decrement the precision */
+ if ((doextradps != 1) || ((int) tmp != 0)) {
+ doextradps = 0;
+ prec--;
+ }
+ }
+ if (fract)
+ startp =
+ my_roundl(fract, (int *) NULL, startp, t - 1, (char) 0,
+ signp);
+ /* alternate format, adds 0's for precision, else trim 0's */
+ if (flags & ALT)
+ for (; prec--; *t++ = '0');
+ else if (dotrim) {
+ while (t > startp && *--t == '0');
+ if (*t != decimal)
+ ++t;
+ }
+ }
+ return t - startp;
+}
+
+#if 0
+main()
+{
+ static char buf[4096];
+ int i;
+ cvtl(0.00000000000000000005, 4, 0, &softsign, 'G', buf,
+ buf + sizeof(buf) - 1);
+ printf("%s\n", buf + 1);
+ printf("%.30LG\n", (long double) 234236723234234231235324.47239L);
+}
+
+#endif
+void x_ldout(long double param, int prec, xio_file stream)
+{
+ static char buf[4095];
+ char softsign = 0;
+ int l;
+ if (param < 0)
+ xio_putc('-', stream), param = -param;
+ l = cvtl(param, prec, 0, &softsign, 'G', buf, buf + sizeof(buf));
+ /*printf("a:%s %i\n",buf+1, prec); */
+ buf[l + 2] = 0;
+ l = strlen(buf + 1);
+ if (buf[l] == '.')
+ buf[l] = 0;
+ /*printf("b:%s %i\n",buf+1, prec); */
+ xio_puts(buf + 1, stream);
+}
+#endif
diff --git a/src/util/xmenu.c b/src/util/xmenu.c
new file mode 100644
index 0000000..8a70b5d
--- /dev/null
+++ b/src/util/xmenu.c
@@ -0,0 +1,998 @@
+#ifdef _plan9_
+#include <u.h>
+#include <libc.h>
+#else
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#endif
+#include <config.h>
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <xerror.h>
+#include <xldio.h>
+#include <misc-f.h>
+#include "config.h"
+#include "xmenu.h"
+
+#define HASHBITS 8
+#define HASHSIZE (1<<HASHBITS)
+#define HASHMASK (HASHSIZE-1)
+#define HASH(c,len) (((len)*32+(c)[0]+(c)[(len)-1])&HASHMASK)
+
+static struct queuelist {
+ struct queuelist *next;
+ struct queuelist *previous;
+ CONST menuitem *item;
+ dialogparam *d;
+} *firstqueue = NULL, *lastqueue = NULL;
+static struct entry {
+ struct entry *next;
+ struct entry *previous;
+ struct entry *nextname;
+ CONST menuitem *item;
+} *firstitem = NULL, *lastitem = NULL;
+
+struct entry *namehash[HASHSIZE];
+
+static void
+x_menu_insert(CONST menuitem * item, struct entry *iitem, int n)
+{
+ int i;
+ int len;
+ int hashpos;
+ struct entry *list;
+ for (i = 0; i < n; i++) {
+ list = (struct entry *) calloc(1, sizeof(struct queuelist));
+ if (list == NULL) {
+ x_error("Warning:out of memory!");
+ return;
+ }
+ if (item->type != MENU_SEPARATOR) {
+ len = strlen(item->shortname);
+ hashpos = HASH(item->shortname, len);
+ list->nextname = namehash[hashpos];
+#ifdef DEBUG
+ {
+ struct entry *e = list->nextname;
+ while (e != NULL) {
+ if (e->item->type != MENU_SUBMENU
+ && e->item->type != MENU_SEPARATOR
+ && item->type != MENU_SEPARATOR);
+ if (!strcmp(e->item->shortname, item->shortname)
+ /*&& e->item->type != MENU_SUBMENU && item->type != MENU_SUBMENU */
+ ) {
+ x_error
+ ("Menu error:Name collision %s:'%s'(%s) and '%s'(%s)",
+ item->shortname, item->name, item->menuname,
+ e->item->name, e->item->menuname);
+ }
+ e = e->nextname;
+ }
+ }
+#endif
+ namehash[hashpos] = list;
+ }
+ list->item = item;
+ if (iitem == NULL) {
+ /*printf("ahoj\n"); */
+ list->previous = lastitem;
+ list->next = NULL;
+ if (lastitem != NULL)
+ lastitem->next = list;
+ else
+ firstitem = list;
+ lastitem = list;
+ } else {
+ list->next = iitem;
+ list->previous = iitem->previous;
+ if (iitem->previous)
+ iitem->previous->next = list;
+ else
+ firstitem = list;
+ iitem->previous = list;
+ }
+ item++;
+ }
+}
+
+void menu_add(CONST menuitem * item, int n)
+{
+ x_menu_insert(item, NULL, n);
+}
+
+void menu_insert(CONST menuitem * item, CONST char *before, int n)
+{
+ struct entry *e = firstitem;
+ while (e != NULL) {
+ if (!strcmp(e->item->shortname, before))
+ break;
+ e = e->next;
+ }
+ x_menu_insert(item, e, n);
+}
+
+void menu_delete(CONST menuitem * items, int n)
+{
+ int d = 0, i;
+ struct entry *item = firstitem;
+ struct entry *pe;
+ int hashpos;
+ for (i = 0; i < n; i++) {
+ if (items[i].type == MENU_SEPARATOR) {
+ struct entry *item = firstitem;
+ while (item && item->item != items + i)
+ item = item->next;
+ if (!item)
+ abort();
+ if (item->previous != NULL)
+ item->previous->next = item->next;
+ else
+ firstitem = item->next;
+ if (item->next != NULL)
+ item->next->previous = item->previous;
+ else
+ lastitem = item->previous;
+ free(item);
+ } else {
+ int len = strlen(items[i].shortname);
+ hashpos = HASH(items[i].shortname, len);
+ pe = NULL;
+ item = namehash[hashpos];
+ while (item != NULL) {
+ if (items + i == item->item) {
+ d++;
+ if (pe == NULL)
+ namehash[hashpos] = item->nextname;
+ else
+ pe->nextname = item->nextname;
+ if (item->previous != NULL)
+ item->previous->next = item->next;
+ else
+ firstitem = item->next;
+ if (item->next != NULL)
+ item->next->previous = item->previous;
+ else
+ lastitem = item->previous;
+ free(item);
+ break;
+ } /*if */
+ pe = item;
+ item = item->nextname;
+ } /*while */
+ }
+#ifdef DEBUG
+ if (item == NULL)
+ x_error("Item %s not found!", items[i].shortname);
+#endif
+ } /*for */
+}
+
+void menu_addqueue(CONST menuitem * item, dialogparam * d)
+{
+ struct queuelist *list;
+ list = (struct queuelist *) calloc(1, sizeof(struct queuelist));
+ if (list == NULL) {
+ x_error("Warning:out of memory!");
+ return;
+ }
+ list->previous = lastqueue;
+ list->next = NULL;
+ list->item = item;
+ list->d = d;
+ if (lastqueue != NULL)
+ lastqueue->next = list;
+ else
+ firstqueue = list;
+ lastqueue = list;
+}
+
+CONST menuitem *menu_delqueue(dialogparam ** d)
+{
+ CONST struct menuitem *item;
+ struct queuelist *list = firstqueue;
+ if (firstqueue == NULL)
+ return NULL;
+ item = firstqueue->item;
+ *d = firstqueue->d;
+ firstqueue = list->next;
+ if (list->next != NULL)
+ list->next->previous = NULL;
+ else
+ lastqueue = NULL;
+ free(list);
+ return (item);
+}
+
+CONST static void *menu_rfind(CONST void
+ *(*function) (struct entry * item),
+ CONST char *root)
+{
+ struct entry *item = firstitem;
+ CONST void *r;
+ while (item != NULL) {
+ if (!strcmp(root, item->item->menuname)) {
+ if ((r = function(item)) != NULL)
+ return r;
+ if (item->item->type == MENU_SUBMENU
+ && (r =
+ menu_rfind(function, item->item->shortname)) != NULL)
+ return r;
+ }
+ item = item->next;
+ }
+ return NULL;
+}
+
+CONST static char *findkey;
+CONST static void *cmpfunction(struct entry *item)
+{
+ if (item->item->key == NULL)
+ return NULL;
+ if (!strcmp(findkey, item->item->key))
+ return item->item;
+ return NULL;
+}
+
+CONST menuitem *menu_findkey(CONST char *key, CONST char *root)
+{
+ findkey = key;
+ return ((CONST menuitem *) menu_rfind(cmpfunction, root));
+}
+
+static CONST menuitem *finditem;
+CONST static void *cmpfunction2(struct entry *item)
+{
+ if (item->item == finditem)
+ return item;
+ return NULL;
+}
+
+int menu_available(CONST menuitem * item, CONST char *root)
+{
+ finditem = item;
+ return (menu_rfind(cmpfunction2, root) != NULL);
+}
+
+CONST char *menu_fullname(CONST char *menu)
+{
+ struct entry *item = firstitem;
+ while (item != NULL) {
+ if (item->item->type == MENU_SUBMENU
+ && !strcmp(menu, item->item->shortname)) {
+ return (item->item->name);
+ }
+ item = item->next;
+ }
+ return NULL;
+}
+
+CONST menuitem *menu_item(CONST char *menu, int n)
+{
+ struct entry *item = firstitem;
+ while (item != NULL) {
+ if (!strcmp(menu, item->item->menuname)) {
+ if (!(item->item->flags & MENUFLAG_NOMENU))
+ n--;
+ if (n < 0)
+ return (item->item);
+ }
+ item = item->next;
+ }
+ return NULL;
+}
+
+static CONST menuitem *menu_item2(CONST char *menu, int n)
+{
+ struct entry *item = firstitem;
+ while (item != NULL) {
+ if (!strcmp(menu, item->item->menuname)) {
+ n--;
+ if (n < 0)
+ return (item->item);
+ }
+ item = item->next;
+ }
+ return NULL;
+}
+
+int menu_havedialog(CONST menuitem * item, struct uih_context *c)
+{
+ if (item->type != MENU_DIALOG && item->type != MENU_CUSTOMDIALOG)
+ return 0;
+ if (!(item->type & MENUFLAG_RADIO) || c == NULL)
+ return 1;
+ if (item->flags & MENUFLAG_DIALOGATDISABLE)
+ return (menu_enabled(item, c));
+ return (!menu_enabled(item, c));
+}
+
+static void menu_freeparam(dialogparam * d, CONST struct dialog *di)
+{
+ switch (di->type) {
+ case DIALOG_STRING:
+ case DIALOG_KEYSTRING:
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+ free(d->dstring);
+ }
+}
+
+void
+menu_destroydialog(CONST menuitem * item, dialogparam * d,
+ struct uih_context *uih)
+{
+ int i;
+ CONST struct dialog *di = menu_getdialog(uih, item);
+ for (i = 0; di[i].question; i++) {
+ menu_freeparam(d + i, di + i);
+ }
+ free(d);
+
+}
+
+void
+menu_activate(CONST menuitem * item, struct uih_context *c,
+ dialogparam * d)
+{
+ if (c == NULL
+ && (!(item->flags & MENUFLAG_ATSTARTUP) || firstqueue != NULL)) {
+ menu_addqueue(item, d);
+ return;
+ } else {
+ if (c != NULL && c->incalculation
+ && !(item->flags & MENUFLAG_INCALC)) {
+ if (c->flags & MENUFLAG_INTERRUPT)
+ c->interrupt = 1;
+ menu_addqueue(item, d);
+ return;
+ }
+ }
+ switch (item->type) {
+ case MENU_SEPARATOR:
+ x_error("separator activated!");
+ break;
+ case MENU_SUBMENU:
+ x_error("submenu activated!");
+ break;
+ case MENU_NOPARAM:
+ ((void (*)(struct uih_context *)) item->function) (c);
+ break;
+ case MENU_INT:
+ ((void (*)(struct uih_context *, int)) item->function) (c,
+ item->
+ iparam);
+ break;
+ case MENU_STRING:
+ ((void (*)(struct uih_context *, CONST char *)) item->function) (c,
+ (CONST
+ char
+ *)
+ item->pparam);
+ break;
+ case MENU_DIALOG:
+ case MENU_CUSTOMDIALOG:
+ if (!menu_havedialog(item, c)) {
+ ((void (*)(struct uih_context * c, dialogparam *)) item->
+ function)
+ (c, (dialogparam *) NULL);
+ } else {
+ CONST menudialog *di = menu_getdialog(c, item);
+ if (di[0].question == NULL) {
+ ((void (*)(struct uih_context * c, dialogparam *))
+ item->function) (c, (dialogparam *) NULL);
+ break;
+ } else if (di[1].question == NULL) {
+ /*call function with right
+ *parameter. This avoids need to write wrappers*/
+ switch (di[0].type) {
+ case DIALOG_INT:
+ case DIALOG_CHOICE:
+ case DIALOG_ONOFF:
+ ((void (*)(struct uih_context * c, int)) item->
+ function) (c, d[0].dint);
+ break;
+ case DIALOG_FLOAT:
+ ((void (*)(struct uih_context * c, number_t))
+ item->function) (c, d[0].number);
+ break;
+ case DIALOG_COORD:
+ ((void (*)(struct uih_context * c, number_t, number_t))
+ item->function) (c, d[0].dcoord[0], d[0].dcoord[1]);
+ break;
+ case DIALOG_STRING:
+ case DIALOG_KEYSTRING:
+ ((void (*)(struct uih_context * c, char *)) item->
+ function)
+ (c, d[0].dstring);
+ break;
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+ ((void (*)(struct uih_context * c, xio_path))
+ item->function) (c, d[0].dpath);
+ break;
+ default:
+ x_error("dialog:unknown type!");
+ break;
+ }
+
+ } else
+ ((void (*)(struct uih_context * c, dialogparam *)) item->
+ function)
+ (c, d);
+ }
+ break;
+ default:
+ x_error("Menu_activate: unknown type %i!", item->type);
+ break;
+ }
+}
+
+int menu_enabled(CONST menuitem * item, struct uih_context *c)
+{
+ if (item->flags & (MENUFLAG_RADIO | MENUFLAG_CHECKBOX))
+ switch (item->type) {
+ case MENU_SEPARATOR:
+ return 0;
+ case MENU_SUBMENU:
+ case MENU_DIALOG:
+ case MENU_NOPARAM:
+ case MENU_CUSTOMDIALOG:
+ return (((int (*)(struct uih_context *)) item->control) (c));
+ case MENU_INT:
+ return (((int (*)(struct uih_context *, int)) item->
+ control) (c, item->iparam));
+ case MENU_STRING:
+ return (((int (*)(struct uih_context *, CONST char *)) item->
+ control)
+ (c, (CONST char *) item->pparam));
+ default:
+ x_error("Menu_enabled: unknown type!");
+ break;
+ }
+ return 0;
+}
+
+void menu_delnumbered(int n, CONST char *name)
+{
+ menuitem *items;
+ int i;
+ char s[256];
+ sprintf(s, "%s%i", name, 0);
+ items = (menuitem *) menu_findcommand(s);
+ menu_delete(items, n);
+ for (i = 0; i < n; i++) {
+ if (items[i].key)
+ free((char *) items[i].key);
+ free((char *) items[i].shortname);
+ }
+ free(items);
+}
+
+CONST menuitem *menu_genernumbered(int n, CONST char *menuname,
+ CONST char *CONST * CONST names,
+ CONST char *keys, int type, int flags,
+ void (*function) (struct uih_context *
+ context, int),
+ int (*control) (struct uih_context *
+ context, int),
+ CONST char *prefix)
+{
+ int l = keys != NULL ? (int) strlen(keys) : -1;
+ int i;
+ menuitem *item = (menuitem *) malloc(sizeof(menuitem) * n);
+ if (item == NULL)
+ return NULL;
+ for (i = 0; i < n; i++) {
+ item[i].menuname = menuname;
+ if (i < l) {
+ char *key = malloc(2);
+ item[i].key = key;
+ key[0] = keys[i];
+ key[1] = 0;
+ } else
+ item[i].key = 0;
+ item[i].type = type;
+ item[i].flags = flags;
+ item[i].iparam = i;
+ item[i].name = names[i];
+ item[i].shortname = names[i];
+ if (prefix != NULL) {
+ char *shortname = (char *) malloc(strlen(prefix) + 4);
+ item[i].shortname = shortname;
+ sprintf(shortname, "%s%i", prefix, i);
+ }
+ item[i].function = (void (*)(void)) function;
+ item[i].control = (int (*)(void)) control;
+ }
+ menu_add(item, n);
+ return (item);
+}
+
+number_t menu_getfloat(CONST char *s, CONST char **error)
+{
+#ifdef HAVE_LONG_DOUBLE
+ long double param = 0;
+#else
+ double param = 0;
+#endif
+#ifdef HAVE_LONG_DOUBLE
+#ifndef USE_ATOLD
+#ifdef USE_XLDIO
+ param = x_strtold(s, NULL);
+ if (0)
+#else
+ if (sscanf(s, "%LG", &param) == 0)
+#endif
+#else
+ param = _atold(s);
+ if (0)
+#endif
+ {
+#else
+ if (sscanf(s, "%lG", &param) == 0) {
+#endif
+ *error = "Floating point number expected";
+ return 0;
+ }
+ return (param);
+}
+
+int menuparse_scheme = 0;
+CONST char *menu_fillparam(struct uih_context *uih, tokenfunc f,
+ CONST menudialog * d, dialogparam * p)
+{
+ char *c = f(uih);
+ CONST char *error = NULL;
+ if (c == NULL)
+ return "Parameter expected";
+ switch (d->type) {
+ case DIALOG_INT:
+ if (sscanf(c, "%i", &p->dint) != 1) {
+ return "Integer parameter expected";
+ }
+ break;
+ case DIALOG_FLOAT:
+ p->number = menu_getfloat(c, &error);
+ if (error != NULL)
+ return (error);
+ break;
+ case DIALOG_COORD:
+ p->dcoord[0] = menu_getfloat(c, &error);
+ if (error != NULL)
+ return (error);
+ c = f(uih);
+ if (c == NULL)
+ return "Imaginary part expected";
+ p->dcoord[1] = menu_getfloat(c, &error);
+ if (error != NULL)
+ return (error);
+ break;
+ case DIALOG_KEYSTRING:
+ if (menuparse_scheme) {
+ if (c[0] != '\'')
+ return "Key string parameter expected";
+ p->dstring = mystrdup(c + 1);
+ } else
+ p->dstring = mystrdup(c);
+ break;
+ case DIALOG_STRING:
+ if (menuparse_scheme) {
+ int l = strlen(c);
+ if (l < 2 || c[0] != '"' || c[l - 1] != '"')
+ return "String parameter expected";
+ p->dstring = mystrdup(c + 1);
+ p->dstring[l - 2] = 0;
+ } else
+ p->dstring = mystrdup(c);
+ break;
+ case DIALOG_IFILE:
+ case DIALOG_OFILE:
+ if (menuparse_scheme) {
+ int l = strlen(c);
+ if (l < 2 || c[0] != '"' || c[l - 1] != '"')
+ return "String parameter expected";
+ p->dstring = mystrdup(c + 1);
+ p->dstring[l - 2] = 0;
+ } else
+ p->dstring = mystrdup(c);
+ break;
+ case DIALOG_CHOICE:
+ if (menuparse_scheme) {
+ if (c[0] != '\'')
+ return "Key string parameter expected";
+ c++;
+ }
+ {
+ int i;
+ CONST char **keys = (CONST char **) d->defstr;
+ for (i = 0;; i++) {
+ if (keys[i] == NULL)
+ return "Unknown parameter";
+ if (!strcmp(c, keys[i])) {
+ p->dint = i;
+ return NULL;
+ }
+ }
+ }
+ case DIALOG_ONOFF:
+ if (menuparse_scheme) {
+ if (!strcmp("#t", c)) {
+ p->dint = 1;
+ return NULL;
+ }
+ if (!strcmp("#f", c)) {
+ p->dint = 0;
+ return NULL;
+ }
+ } else {
+ if (!strcmp("on", c)) {
+ p->dint = 1;
+ return NULL;
+ }
+ if (!strcmp("off", c)) {
+ p->dint = 0;
+ return NULL;
+ }
+ }
+ default:
+ x_error("Unknown dialog parameter type!");
+ } /*switch */
+ return NULL;
+}
+
+static char errorstr[256];
+CONST menuitem *menu_findcommand(CONST char *name)
+{
+ struct entry *entry;
+ CONST menuitem *item;
+ int len;
+ len = strlen(name);
+ if (len > 100)
+ return NULL;
+ entry = namehash[HASH(name, len)];
+ while (entry != NULL) {
+ if (!strcmp(entry->item->shortname, name))
+ break;
+ entry = entry->nextname;
+ }
+ if (entry == NULL) {
+ return NULL;
+ }
+ item = entry->item;
+ return (item);
+}
+
+CONST char *menu_processcommand(struct uih_context *uih, tokenfunc f,
+ int scheme, int mask, CONST char *root)
+{
+ char *c = f(uih);
+ CONST menuitem *item;
+ menuparse_scheme = scheme;
+ if (c == NULL) {
+ if (!menuparse_scheme)
+ return "Command name expected";
+ return NULL;
+ }
+ item = menu_findcommand(c);
+ if (item == NULL) {
+ sprintf(errorstr, "%s:unknown function", c);
+ return errorstr;
+ }
+ if (item->flags & mask) {
+ sprintf(errorstr,
+ "function '%s' not available in this context (%i, %i)", c,
+ mask, item->flags);
+ return errorstr;
+ }
+ if ((item->flags & MENUFLAG_NOPLAY) && uih != NULL) {
+ if (root != NULL && !menu_available(item, root)) {
+ sprintf(errorstr, "function '%s' is disabled", c);
+ return errorstr;
+ }
+ }
+
+ if ((item->flags & MENUFLAG_CHECKBOX) && scheme) {
+ int w;
+ c = f(uih);
+ if (c == NULL) {
+ return ("Boolean parameter expected");
+ }
+
+ if (!strcmp("#t", c)) {
+ w = 1;
+ } else if (!strcmp("#f", c)) {
+ w = 0;
+ } else
+ return "Boolean parameter expected";
+ if (w == menu_enabled(item, uih)) {
+ if (((w != 0) ^ ((item->flags & MENUFLAG_DIALOGATDISABLE) !=
+ 0))
+ || (item->type != MENU_DIALOG
+ && item->type != MENU_CUSTOMDIALOG)) {
+ return NULL;
+ } else
+ menu_activate(item, uih, NULL); /*disable it... */
+ }
+ }
+ if (item->type != MENU_DIALOG && item->type != MENU_CUSTOMDIALOG) {
+ menu_activate(item, uih, NULL);
+ return NULL;
+ }
+ /*So we have some parameters */
+
+ {
+ dialogparam *param;
+ CONST menudialog *d = menu_getdialog(uih, item);
+ int i, n;
+ for (n = 0; d[n].question != NULL; n++);
+ param = (dialogparam *) malloc(n * sizeof(dialogparam));
+ for (i = 0; i < n; i++) {
+ CONST char *error;
+ error = menu_fillparam(uih, f, d + i, param + i);
+ if (error != NULL) {
+ sprintf(errorstr, "Function '%s' parameter %i:%s",
+ item->shortname, i, error);
+ for (n = 0; n < i; n++) {
+ menu_freeparam(param + i, d + i);
+ }
+ free(param);
+ return errorstr;
+ }
+ }
+ menu_activate(item, uih, param);
+ if (uih != NULL)
+ menu_destroydialog(item, param, uih);
+ }
+ return NULL;
+}
+
+static int argpos, margc;
+static char **margv;
+static int argposs;
+static char *gettoken(struct uih_context *c)
+{
+ if (argpos == margc)
+ return NULL;
+ if (argpos == argposs) {
+ if (!margv[argpos])
+ return NULL;
+ return (margv[argpos++] + 1);
+ } else
+ return (margv[argpos++]);
+}
+
+int menu_processargs(int n, int argc, char **argv)
+{
+ CONST char *error;
+ argpos = n;
+ argposs = n;
+ margc = argc;
+ margv = argv;
+ error =
+ menu_processcommand(NULL, gettoken, 0, MENUFLAG_NOOPTION, "root");
+ if (error) {
+ x_error("%s", error);
+ return -1;
+ }
+ return (argpos - 2);
+
+}
+
+void menu_printhelp(void)
+{
+ struct entry *e = firstitem;
+ while (e) {
+ if (e->item->type == MENU_SEPARATOR) {
+ e = e->next;
+ continue;
+ }
+ if (e->item->type == MENU_SUBMENU
+ && !(e->item->flags & MENUFLAG_NOOPTION)) {
+ struct entry *e1 = firstitem;
+ int n = 1;
+ while (e1) {
+ /*if (e->item->type == MENU_SEPARATOR) {printf ("\n"); e1=e1->next;continue;} */
+ if (e1->item->type != MENU_SUBMENU
+ && e1->item->type != MENU_SEPARATOR
+ && !(e1->item->flags & MENUFLAG_NOOPTION)
+ && !strcmp(e1->item->menuname, e->item->shortname)) {
+ if (n) {
+ printf("\n%s\n\n", e->item->name);
+ n = 0;
+ }
+ printf(" -%-15s", e1->item->shortname);
+ if (menu_havedialog(e1->item, NULL)) {
+ CONST menudialog *d =
+ menu_getdialog(NULL, e1->item);
+ while (d->question != NULL) {
+ switch (d->type) {
+ case DIALOG_INT:
+ printf("integer ");
+ break;
+ case DIALOG_FLOAT:
+ printf("real_number ");
+ break;
+ case DIALOG_COORD:
+ printf("real_number real_number ");
+ break;
+ case DIALOG_KEYSTRING:
+ case DIALOG_STRING:
+ printf("string ");
+ break;
+ case DIALOG_IFILE:
+ printf("input_file ");
+ break;
+ case DIALOG_OFILE:
+ printf("output_file ");
+ break;
+ case DIALOG_CHOICE:
+ {
+ int i;
+ CONST char **keys =
+ (CONST char **) d->defstr;
+ for (i = 0;; i++) {
+ if (keys[i] == NULL)
+ break;
+ if (i != 0)
+ putc('|', stdout);
+ printf("%s", keys[i]);
+ }
+ putc(' ', stdout);
+ }
+ break;
+ case DIALOG_ONOFF:
+ printf("on|off ");
+ }
+ d++;
+ }
+ printf("\n%14s ", "");
+ }
+ printf(" %s\n", e1->item->name);
+ }
+ e1 = e1->next;
+ }
+ }
+ e = e->next;
+ }
+}
+
+void uih_xshlprintmenu(struct uih_context *c, CONST char *name)
+{
+ int i = 0;
+ int nexti;
+ CONST menuitem *item, *nextitem, *lastitem;
+ int comma;
+ printf("%%%s\n\n", name);
+ printf("<menuhead><head>%s</head></menuhead>\n", menu_fullname(name));
+ printf("<menuitems><center>\n");
+ for (i = 0; (item = menu_item2(name, i)) != NULL; i++) {
+ if (item->type == MENU_SEPARATOR)
+ printf("<p>\n");
+ else if (item->type == MENU_SUBMENU)
+ printf("<p><submenu><a %s>%s</a>\n", item->shortname,
+ item->name);
+ else
+ printf("<p><a %s>%s</a>\n", item->shortname, item->name);
+ }
+ printf("</center></menuitems>\n");
+ lastitem = NULL;
+ for (i = 0; (item = menu_item2(name, i)) != NULL; i++) {
+ if (item->type == MENU_SEPARATOR)
+ continue;
+ if (item->type != MENU_SUBMENU) {
+ for (nexti = i + 1;
+ (nextitem = menu_item2(name, nexti)) != NULL
+ && nextitem->type == MENU_SUBMENU; nexti++);
+ printf("<node %s, %s, %s, %s>\n", item->shortname,
+ (lastitem != NULL ? lastitem->shortname : ""),
+ nextitem != NULL ? nextitem->shortname : "", name);
+ printf("%%%s\n", item->shortname);
+ printf("<head>%s</head>\n", item->name);
+ if (!(item->flags & MENUFLAG_NOPLAY)) {
+ printf("<p><emph>Syntax</emph>:(%s", item->shortname);
+ if (item->flags & MENUFLAG_CHECKBOX)
+ printf(" bool");
+ if (item->type == MENU_DIALOG
+ || item->type == MENU_CUSTOMDIALOG) {
+ int y;
+ CONST menudialog *di;
+ di = menu_getdialog(c, item);
+ if (item->flags & MENUFLAG_CHECKBOX)
+ printf(" [");
+ for (y = 0; di[y].question != NULL; y++) {
+ switch (di[y].type) {
+ case DIALOG_INT:
+ printf(" integer");
+ break;
+ case DIALOG_FLOAT:
+ printf(" float");
+ break;
+ case DIALOG_STRING:
+ printf(" string");
+ case DIALOG_KEYSTRING:
+ printf(" keyword");
+ break;
+ case DIALOG_IFILE:
+ printf(" file");
+ break;
+ case DIALOG_OFILE:
+ printf(" file");
+ break;
+ case DIALOG_ONOFF:
+ printf(" bool");
+ break;
+ case DIALOG_COORD:
+ printf(" complex");
+ break;
+ case DIALOG_CHOICE:
+ printf(" keyword");
+ break;
+ }
+ }
+ if (item->flags & MENUFLAG_CHECKBOX)
+ printf(" ]");
+ }
+ printf(")\n");
+ }
+ printf("<p>\n<emph>Available as</emph>: ");
+ comma = 0;
+ if (!(item->flags & MENUFLAG_NOMENU))
+ printf("menu item"), comma = 1;
+ if (!(item->flags & MENUFLAG_NOOPTION))
+ printf("%scommand line option", comma ? ", " : ""), comma =
+ 1;
+ if (!(item->flags & MENUFLAG_NOPLAY))
+ printf("%scommand", comma ? ", " : ""), comma = 1;
+ printf("\n");
+ printf("\n");
+ lastitem = item;
+ }
+ }
+}
+
+void uih_xshlprintmenus(struct uih_context *c)
+{
+ struct entry *e = firstitem;
+ struct entry *nexte;
+ struct entry *laste;
+ printf("%%menus\n");
+ printf("<main><head>Menus</head></main>\n");
+ printf("<menuitems><center>\n");
+ while (e != NULL) {
+ if (e->item->type == MENU_SUBMENU)
+ printf("<p><submenu><a %s>%s</a>\n", e->item->shortname,
+ e->item->name);
+ e = e->next;
+ }
+ printf("</center></menuitems>\n");
+ e = firstitem;
+ laste = NULL;
+ while (e != NULL) {
+ if (e->item->type == MENU_SUBMENU) {
+ nexte = e->next;
+ while (nexte != NULL && nexte->item->type != MENU_SUBMENU)
+ nexte = nexte->next;
+ printf("<node %s, %s, %s, %s>\n", e->item->shortname,
+ (laste != NULL ? laste->item->shortname : ""),
+ nexte != NULL ? nexte->item->shortname : "", "menus");
+ uih_xshlprintmenu(c, e->item->shortname);
+ laste = e;
+ }
+ e = e->next;
+ }
+ printf("%%endmenus");
+}
+
+void
+menu_forall(struct uih_context *c,
+ void (*callback) (struct uih_context * c,
+ CONST menuitem * item))
+{
+ struct entry *e = firstitem;
+ while (e != NULL) {
+ callback(c, e->item);
+ e = e->next;
+ }
+}
diff --git a/src/util/xshl.c b/src/util/xshl.c
new file mode 100644
index 0000000..27ab8d5
--- /dev/null
+++ b/src/util/xshl.c
@@ -0,0 +1,470 @@
+#ifndef _plan9_
+#include <stdio.h>
+#include <string.h>
+#include <stdlib.h>
+#include <ctype.h>
+#else
+#include <u.h>
+#include <libc.h>
+#include <stdio.h>
+#endif
+#include <config.h>
+#include <misc-f.h>
+#include "xshl.h"
+
+#define XSHL_ENDLINE (65536)
+#define XSHL_ENDPARAGRAPH (65536*2)
+#define XSHL_NEWSTART (65536*4)
+#define XSHL_SMALL (65536*8)
+#define XSHL_SKIPBLANK (65536*16)
+#define XSHL_COMMAND (65536*32)
+#define XSHL_BLANK (65536*64)
+#define XSHL_CLEARATLINE (65536*128)
+
+#define XSHL_AUTOCLEAN (XSHL_ENDLINE|XSHL_ENDPARAGRAPH|XSHL_NEWSTART|XSHL_SKIPBLANK|XSHL_COMMAND|XSHL_BLANK)
+
+
+#define ALL (~0)
+CONST static struct tag {
+ CONST char *name;
+ int andflagenable;
+ int orflagenable;
+ int andflagdisable;
+ int orflagdisable;
+} tags[] = {
+ {
+ "p", ALL, XSHL_SKIPBLANK | XSHL_ENDPARAGRAPH, ALL,
+ XSHL_SKIPBLANK | XSHL_ENDPARAGRAPH}
+ , {
+ "head", ALL,
+ XSHL_SKIPBLANK | XSHL_BIG | XSHL_CENTERALIGN |
+ XSHL_ENDPARAGRAPH, ~(XSHL_BIG | XSHL_CENTERALIGN),
+ XSHL_SKIPBLANK | XSHL_ENDPARAGRAPH | XSHL_ENDLINE}
+ , {
+ "emph", ALL, XSHL_EMPH, ~XSHL_EMPH, 0}
+ , {
+ "br", ALL, XSHL_SKIPBLANK | XSHL_ENDLINE, ALL, 0}
+ , {
+ "white", ~XSHL_COLORMASK, XSHL_WHITE, ~XSHL_WHITE, 0}
+ , {
+ "red", ~XSHL_COLORMASK, XSHL_RED, ~XSHL_RED, 0}
+ , {
+ "black", ~XSHL_COLORMASK, XSHL_BLACK, ~XSHL_BLACK, 0}
+ , {
+ "right", ALL, XSHL_SKIPBLANK | XSHL_RIGHTALIGN | XSHL_ENDLINE,
+ ~XSHL_RIGHTALIGN, XSHL_SKIPBLANK | XSHL_ENDLINE}
+ , {
+ "center", ALL, XSHL_SKIPBLANK | XSHL_CENTERALIGN | XSHL_ENDLINE,
+ ~XSHL_CENTERALIGN, XSHL_SKIPBLANK | XSHL_ENDLINE}
+ , {
+ "tt", ALL, XSHL_MONOSPACE, ~XSHL_MONOSPACE, 0}
+ , {
+ "dl", ALL, XSHL_SKIPBLANK | XSHL_ENDLINE,
+ ~(XSHL_SMALL | XSHL_EMPH), XSHL_SKIPBLANK | XSHL_ENDLINE}
+ , {
+ "dt", ~XSHL_SMALL, XSHL_SKIPBLANK | XSHL_ENDLINE | XSHL_EMPH, ALL,
+ 0}
+ , {
+ "dd", ~XSHL_EMPH, XSHL_SKIPBLANK | XSHL_NEWSTART | XSHL_SMALL, ALL,
+ 0}
+ , {
+ NULL}
+};
+
+#define MAXINPUT 256
+
+#define SMALLSKIP (4*spacewidth)
+
+struct boxitem {
+ char *text;
+ struct xshl_context c;
+ int xpos;
+ int width;
+ int height;
+ struct boxitem *next;
+};
+static void freebox(struct boxitem *box)
+{
+ if (box->c.linktext != NULL)
+ free(box->c.linktext);
+ free(box->text);
+ free(box);
+}
+
+static struct xshl_item *pack(struct boxitem *first, struct boxitem *last,
+ int *collectedflags, int width)
+{
+ struct xshl_item *f = NULL;
+ struct xshl_item *l = NULL;
+ struct xshl_item *item;
+ struct boxitem *curr = first, *ncurr;
+ int end = 0;
+ char text[256];
+ int collected = 0;
+ while (curr != last) {
+ if (curr->text[0] == 0) {
+ ncurr = curr->next;
+ freebox(curr);
+ curr = ncurr;
+ continue;
+ }
+ strcpy(text, curr->text);
+ item = (struct xshl_item *) malloc(sizeof(struct xshl_item));
+ if (item == NULL)
+ return NULL;
+ item->x = curr->xpos;
+ item->width = curr->width;
+ item->c = curr->c;
+ if (curr->c.linktext != NULL)
+ curr->c.linktext = mystrdup(curr->c.linktext);
+ collected |= item->c.flags;
+ ncurr = curr->next;
+ freebox(curr);
+ curr = ncurr;
+ while (curr != last &&
+ curr->xpos == item->x + item->width &&
+ (curr->c.flags & 0xffff) == (item->c.flags & 0xffff)
+ &&
+ ((curr->c.linktext == NULL && item->c.linktext == NULL) ||
+ (curr->c.linktext != NULL && item->c.linktext != NULL &&
+ !strcmp(curr->c.linktext, item->c.linktext))))
+ {
+ strcat(text, curr->text);
+ item->width += curr->width;
+ collected |= item->c.flags;
+ ncurr = curr->next;
+ freebox(curr);
+ curr = ncurr;
+ }
+ item->text = mystrdup(text);
+ item->next = NULL;
+ if (l != NULL)
+ l->next = item;
+ else
+ f = item;
+ l = item;
+ end = item->x + item->width;
+ }
+ *collectedflags = collected;
+ if (collected & (XSHL_CENTERALIGN | XSHL_RIGHTALIGN)) {
+ if (collected & XSHL_RIGHTALIGN)
+ end = width - end;
+ else
+ end = (width - end) / 2;
+ item = f;
+ while (item != NULL) {
+ item->x += end;
+ item = item->next;
+ }
+ }
+ return (f);
+}
+
+#ifndef isspace
+#define isspace(c) ((c)==' '||(c)=='\t'||(c)=='\n')
+#endif
+static char xshllink[32];
+static int flags;
+static struct boxitem *xshl_readbox(void *data, int (*get) (void *))
+{
+ char inputbuf[256];
+ int c;
+ int i;
+ char command[16];
+ char parameter[32];
+ if (flags & XSHL_BLANK) {
+ struct boxitem *box = (struct boxitem *) malloc(sizeof(*box));
+ box->width = 0;
+ box->next = NULL;
+ box->height = flags & XSHL_BIG ? 0 : 1;
+ box->text = mystrdup(" ");
+ box->c.flags = flags | XSHL_CLEARATLINE;
+ box->c.linktext = NULL;
+ if (xshllink[0] != 0)
+ box->c.linktext = mystrdup(xshllink);
+ flags &= ~XSHL_AUTOCLEAN;
+ flags |= XSHL_SKIPBLANK;
+ return (box);
+ }
+ if (flags & XSHL_COMMAND) {
+ int i = 0;
+ flags &= ~XSHL_COMMAND;
+ parameter[0] = 0;
+ do {
+ c = command[i] = get(data);
+ if (i < 15)
+ i++;
+ }
+ while (c && c != '>' && !isspace(c));
+ command[i - 1] = 0;
+ if (c != '>' && c) {
+ do {
+ c = get(data);
+ }
+ while (c && c != '>' && isspace(c));
+ if (c && c != '>') {
+ i = 1;
+ parameter[0] = c;
+ do {
+ c = parameter[i] = get(data);
+ if (i < 31)
+ i++;
+ }
+ while (c && c != '>' && !isspace(c));
+ parameter[i - 1] = 0;
+ if (isspace(c)) {
+ do {
+ c = get(data);
+ }
+ while (c && c != '>' && isspace(c));
+ }
+ }
+ }
+ {
+ int i;
+ int disabled = 0;
+ if (command[0] == '/')
+ disabled = 1;
+ for (i = 0;
+ tags[i].name != NULL
+ && strcmp(tags[i].name, command + disabled); i++);
+ if (tags[i].name != NULL) {
+ if (disabled) {
+ flags &= tags[i].andflagdisable;
+ flags |= tags[i].orflagdisable;
+ } else {
+ flags &= tags[i].andflagenable;
+ flags |= tags[i].orflagenable;
+ }
+ } else {
+ if (!strcmp(command + disabled, "a")
+ || !strcmp(command + disabled, "tutor")) {
+ if (disabled)
+ xshllink[0] = 0;
+ else
+ strcpy(xshllink, parameter);
+ } else
+ while (c != '>')
+ c = get(data);
+ }
+ }
+ if (c == '>')
+ c = get(data);
+ } else
+ c = get(data);
+ if (!c) {
+ return NULL;
+ }
+ if (flags & XSHL_SKIPBLANK) {
+ while (isspace(c)) {
+ c = get(data);
+ if (!c) {
+ return NULL;
+ }
+ }
+ flags &= ~XSHL_SKIPBLANK;
+ }
+ i = 0;
+ inputbuf[i++] = c;
+ while (c && c != '<' && !isspace(c)) {
+ c = get(data);
+ inputbuf[i++] = c;
+ if (i > 255)
+ i = 255;
+ }
+ inputbuf[i - 1] = 0;
+ if (i == 1 && !c) {
+ return NULL;
+ }
+ if (i == 1 && isspace(c)) {
+ flags |= XSHL_BLANK;
+ return xshl_readbox(data, get);
+ }
+ if (i == 1 && c == '<') {
+ flags |= XSHL_COMMAND;
+ return xshl_readbox(data, get);
+ }
+ {
+ struct boxitem *box = (struct boxitem *) malloc(sizeof(*box));
+ box->width = 0;
+ box->next = NULL;
+ box->height = flags & XSHL_BIG ? 0 : 1;
+ box->text = mystrdup(inputbuf);
+ box->c.flags = flags | XSHL_CLEARATLINE;
+ box->c.linktext = NULL;
+ if (xshllink[0] != 0)
+ box->c.linktext = mystrdup(xshllink);
+ flags &= ~XSHL_AUTOCLEAN;
+ if (isspace(c))
+ flags |= XSHL_BLANK;
+ if (c == '<')
+ flags |= XSHL_COMMAND;
+ return (box);
+ }
+ /*We are at the first word */
+}
+
+struct xshl_line *xshl_interpret(void *data, int (*get) (void *),
+ int width, int getwidth(void *, int flags,
+ CONST char *text),
+ int startflags, int smallheight,
+ int bigheight)
+{
+ int spacewidth = getwidth(data, 0, " ");
+ int cflags;
+ struct boxitem *first = NULL;
+ struct boxitem *last = NULL;
+ struct boxitem *item;
+ struct boxitem *lastword = NULL;
+ int maxlines = 200;
+ struct xshl_line *lines =
+ (struct xshl_line *) malloc(maxlines * sizeof(*lines));
+ int nlines = 0;
+ int ypos = 0;
+ flags = startflags | XSHL_SKIPBLANK;
+ xshllink[0] = 0;
+ while ((item = xshl_readbox(data, get)) != NULL) {
+ if (last == NULL) {
+ if (item->text[0] == ' ' && !item->text[1]) {
+ freebox(item);
+ continue;
+ }
+ lastword = NULL;
+ first = item, item->xpos =
+ item->c.flags & XSHL_SMALL ? SMALLSKIP : 0;
+ } else {
+ if (item->text[0] == ' ' && !item->text[1]) {
+ lastword = item;
+ }
+ last->next = item, item->xpos = last->xpos + last->width;
+ }
+ last = item;
+ item->width = getwidth(data, item->c.flags, item->text);
+ if (item->c.flags & (XSHL_ENDLINE | XSHL_ENDPARAGRAPH)
+ || ((item->c.flags & XSHL_NEWSTART)
+ && item->xpos + spacewidth > SMALLSKIP)) {
+ if (nlines > maxlines - 1)
+ maxlines *= 2, lines =
+ (struct xshl_line *) realloc(lines,
+ (maxlines) *
+ sizeof(*lines));
+ if (first != NULL) {
+ lines[nlines].first = pack(first, last, &cflags, width);
+ lines[nlines].y = ypos;
+ nlines++;
+ if (ypos & XSHL_BIG)
+ ypos += bigheight;
+ else
+ ypos += smallheight;
+ }
+ if (item->c.flags & (XSHL_ENDPARAGRAPH))
+ ypos += smallheight;
+ first = last;
+ item->xpos =
+ item->c.flags & item->c.flags & XSHL_SMALL ? SMALLSKIP : 0;
+ lastword = NULL;
+ } else if (item->c.flags & XSHL_NEWSTART)
+ item->xpos = SMALLSKIP;
+ if (item->xpos + item->width > width) {
+ if (lastword == NULL) {
+ item = first;
+ while (item != NULL) {
+ struct boxitem *c = item->next;
+ freebox(item);
+ item = c;
+ }
+ first = last = NULL;
+ } else {
+ int xpos;
+ if (nlines > maxlines - 1)
+ maxlines *= 2, lines =
+ (struct xshl_line *) realloc(lines,
+ (maxlines) *
+ sizeof(*lines));
+ lines[nlines].first =
+ pack(first, lastword, &cflags, width);
+ lines[nlines].y = ypos;
+ nlines++;
+ if (ypos & XSHL_BIG)
+ ypos += bigheight;
+ else
+ ypos += smallheight;
+ if (lastword != NULL)
+ first = lastword->next;
+ else
+ first = NULL;
+ item = first;
+ if (item != NULL) {
+ xpos =
+ item->c.flags & item->c.
+ flags & XSHL_SMALL ? SMALLSKIP : 0;
+ while (item != NULL) {
+ item->xpos = xpos;
+ xpos += item->width;
+ item = item->next;
+ }
+ }
+ freebox(lastword);
+ lastword = NULL;
+ if (first == NULL)
+ last = NULL;
+ }
+ }
+ }
+ if (last != NULL) {
+ lines[nlines].y = ypos;
+ lines[nlines].first = pack(first, last->next, &cflags, width);
+ }
+ nlines++;
+ lines[nlines].y = -1;
+ lines =
+ (struct xshl_line *) realloc(lines, (nlines + 2) * sizeof(*lines));
+ return (lines);
+}
+
+
+int xshl_textlen(void *data, int flags, CONST char *text)
+{
+ return ((int) strlen(text));
+}
+
+void xshl_print(int startskip, struct xshl_line *lines)
+{
+ int i = 0;
+ int y = 0;
+ while (lines[i].y >= 0) {
+ int xpos = -startskip;
+ struct xshl_item *item;
+ while (y < lines[i].y) {
+ putc('\n', stdout), y++;
+ }
+ item = lines[i].first;
+ while (item) {
+ while (xpos < item->x) {
+ putc(' ', stdout), xpos++;
+ }
+ xpos += item->width;
+ item = item->next;
+ }
+ i++;
+ }
+}
+
+void xshl_free(struct xshl_line *lines)
+{
+ int i = 0;
+ while (lines[i].y >= 0) {
+ struct xshl_item *item, *nextitem;
+ item = lines[i].first;
+ while (item) {
+ nextitem = item->next;
+ if (item->c.linktext != NULL)
+ free(item->c.linktext);
+ free(item->text);
+ free(item);
+ item = nextitem;
+ }
+ i++;
+ }
+ free(lines);
+}
diff --git a/src/util/xstdio.c b/src/util/xstdio.c
new file mode 100644
index 0000000..fc7eb42
--- /dev/null
+++ b/src/util/xstdio.c
@@ -0,0 +1,488 @@
+#ifndef _plan9_
+#include <string.h>
+#if defined(__EMX__) || defined(__APPLE__)
+#include <sys/types.h>
+#endif
+#include <dirent.h>
+#include <sys/stat.h>
+#include <stdlib.h>
+#include <unistd.h>
+#else
+#include <u.h>
+#include <libc.h>
+#endif
+#include <config.h>
+#include <filter.h>
+#include <fractal.h>
+#include <ui_helper.h>
+#include <misc-f.h>
+#ifdef _WIN32
+#define strcmp stricmp
+#endif
+#ifdef DJGPP
+#define strcmp stricmp
+#endif
+
+/* We reserve character 01 to application directory so we can easily refer to data files */
+char *xio_appdir;
+char *xio_homedir;
+
+char *xio_fixpath(CONST char *c)
+{
+ if (c[0] == '~') {
+ char *c1 = (char *) malloc(strlen(c) + strlen(xio_homedir) + 5);
+ sprintf(c1, "%s%s", xio_homedir, c + 1);
+ return c1;
+ }
+ if (c[0] == '\01') {
+ char *c1 = (char *) malloc(strlen(c) + strlen(xio_appdir) + 5);
+ sprintf(c1, "%s%s", xio_appdir, c + 1);
+ return c1;
+ }
+ return mystrdup(c);
+}
+
+int
+xio_getfiles(xio_constpath path1, char ***names, char ***dirs,
+ int *nnames2, int *ndirs2)
+{
+#ifdef _plan9_
+ *nnames2 = *ndirs2 = 0;
+#else
+ char *path = xio_fixpath(path1);
+ int maxnames = 200, maxdirs = 200;
+ int nnames = 0, ndirs = 0;
+ DIR *dir = opendir(path);
+ struct stat buf;
+ char buff[4096];
+ int pathlen;
+ struct dirent *e;
+ if (dir == NULL)
+ return 0;
+ *nnames2 = 0;
+ *ndirs2 = 0;
+ e = readdir(dir);
+ strcpy(buff, path);
+ pathlen = (int) strlen(path);
+ if (buff[pathlen - 1] != XIO_PATHSEP)
+ buff[pathlen] = XIO_PATHSEP;
+ else
+ pathlen--;
+ *names = (char **) malloc(maxnames * sizeof(**names));
+ *dirs = (char **) malloc(maxdirs * sizeof(**dirs));
+ free(path);
+ while (e != NULL) {
+ char *n = mystrdup(e->d_name);
+ strcpy(buff + pathlen + 1, e->d_name);
+ stat(buff, &buf);
+ if (S_ISDIR(buf.st_mode)) {
+ if (ndirs == maxdirs)
+ maxdirs *= 2, *dirs =
+ (char **) realloc(*dirs, maxdirs * sizeof(**dirs));
+ (*dirs)[ndirs] = n;
+ ndirs++;
+ } else {
+ if (nnames == maxnames)
+ maxnames *= 2, *names =
+ (char **) realloc(*names, maxnames * sizeof(**names));
+ (*names)[nnames] = n;
+ nnames++;
+ }
+ e = readdir(dir);
+ }
+ if (nnames)
+ *names = (char **) realloc(*names, nnames * sizeof(**names));
+ else
+ free(*names), *names = NULL;
+ if (ndirs)
+ *dirs = (char **) realloc(*dirs, ndirs * sizeof(**dirs));
+ else
+ free(*dirs), *dirs = NULL;
+ *nnames2 = nnames;
+ *ndirs2 = ndirs;
+ closedir(dir);
+ return 1;
+#endif
+}
+
+xio_path xio_getdirectory(xio_constpath filename)
+{
+ int i;
+ xio_pathdata directory;
+ for (i = (int) strlen(filename); i && filename[i] != '/' &&
+ filename[i] != '\\' && filename[i] != XIO_PATHSEP; i--);
+ if (filename[i] == '/' || filename[i] == '\\'
+ || filename[i] == XIO_PATHSEP)
+ i++;
+ directory[i] = 0;
+ i--;
+ for (; i >= 0; i--)
+ directory[i] = filename[i];
+ return (mystrdup(directory));
+}
+
+xio_path xio_getfilename(CONST char *basename, CONST char *extension)
+{
+ static char name[40];
+ int nimage = 0;
+#ifdef _plan9_
+#ifdef _plan9v4_
+#define DIRLEN 116
+ uchar edir[DIRLEN];
+#else
+ char edir[DIRLEN];
+#endif
+#else
+ struct stat sb;
+#endif
+ char *base = xio_fixpath(basename);
+ do {
+ sprintf(name, "%s%i%s", base, nimage++, extension);
+ }
+#ifndef _plan9_
+ while (stat(name, &sb) != -1);
+#else
+#ifdef _plan9v4_
+ while (stat(name, edir, DIRLEN) != -1);
+#else
+ while (stat(name, edir) != -1);
+#endif
+#endif
+ free(base);
+ return (name);
+}
+
+xio_file xio_getrandomexample(xio_path name)
+{
+#ifndef _plan9_
+ static CONST char *CONST paths[] = { /*Where examples should be located? */
+ EXAMPLESPATH, /*Data path when XaoS is propertly installed */
+ "\01" XIO_PATHSEPSTR "examples",
+ /*XaoS was started from root of source tree */
+ "\01" XIO_PATHSEPSTR ".." XIO_PATHSEPSTR "examples",
+ "." XIO_PATHSEPSTR "examples",
+ /*XaoS was started from root of source tree */
+ ".." XIO_PATHSEPSTR "examples",
+ /*XaoS was started from bin directory in source tree */
+ XIO_EMPTYPATH, /*Oops...it's not. Try curent directory */
+ };
+ int i = -1, p;
+ DIR *d = NULL;
+ xio_file f;
+ struct dirent *dir;
+ int n;
+ int max = 0;
+ char *realpath = NULL;
+
+ for (p = 0; p < (int) (sizeof(paths) / sizeof(char *)) && d == NULL;
+ p++) {
+ char *pp = xio_fixpath(paths[p]);
+ d = opendir(pp);
+ free(pp);
+ if (d != NULL) {
+ realpath = xio_fixpath(paths[p]);
+ max = 800 - (int) strlen(realpath);
+ for (i = 0; (dir = readdir(d)) != NULL; i++) {
+ int s = (int) strlen(dir->d_name);
+ if (s > max || s < 4
+ || strcmp(".xpf", dir->d_name + s - 4))
+ i--;
+ /*free(dir); */
+ }
+ if (!i) {
+ /*uih->errstring = "No *.xpf files found"; */
+ closedir(d);
+ free(realpath);
+ d = NULL;
+ continue;
+ }
+ break;
+ }
+ }
+ if (d == NULL) {
+ /*uih->errstring = "Can not open examples directory"; */
+ return NULL;
+ }
+
+
+
+ rewinddir(d);
+ dir = NULL;
+ n = (int) ((number_t) i * rand() / (RAND_MAX + 1.0));
+
+ for (i = 0; i <= n; i++) {
+ int s;
+ do {
+ /*if(dir!=NULL) free(dir); */
+ dir = readdir(d);
+ if (dir == NULL) {
+ /*uih->errstring = "Reading of examples directory failed"; */
+ closedir(d);
+ free(realpath);
+ return NULL;
+ }
+ s = (int) strlen(dir->d_name);
+ }
+ while (s > max || s < 4 || strcmp(".xpf", dir->d_name + s - 4));
+ }
+ if (dir == NULL) {
+ /*uih->errstring = "Reading of examples directory failed"; */
+ closedir(d);
+ free(realpath);
+ return NULL;
+ }
+ strcpy(name, realpath);
+ if (name[strlen(name) - 1] != XIO_PATHSEP)
+ strcat(name, XIO_PATHSEPSTR);
+ strcat(name, dir->d_name);
+ closedir(d);
+ /*free(dir); */
+
+ f = xio_ropen(name);
+ free(realpath);
+ return (f);
+#endif
+}
+
+xio_file xio_getcatalog(CONST char *name)
+{
+ static CONST xio_constpath paths[] = { /*Where catalogs should be located? */
+ CATALOGSPATH, /*Data path when XaoS is propertly installed */
+#ifndef _plan9_
+ "\01" XIO_PATHSEPSTR "catalogs" XIO_PATHSEPSTR,
+ "\01" XIO_PATHSEPSTR ".." XIO_PATHSEPSTR "catalogs" XIO_PATHSEPSTR,
+ "." XIO_PATHSEPSTR "catalogs" XIO_PATHSEPSTR,
+ /*XaoS was started from root of source tree */
+ ".." XIO_PATHSEPSTR "catalogs" XIO_PATHSEPSTR,
+ /*XaoS was started from bin directory in source tree */
+#else
+ "./catalogs/",
+ /*XaoS was started from root of source tree */
+ "../catalogs/",
+ /*XaoS was started from bin directory in source tree */
+#endif
+ XIO_EMPTYPATH, /*Oops...it's not. Try curent directory */
+ };
+ int i;
+ xio_file f = XIO_FAILED;
+ xio_pathdata tmp;
+ for (i = 0;
+ i < (int) (sizeof(paths) / sizeof(char *)) && f == XIO_FAILED;
+ i++) {
+ char *p = xio_fixpath(paths[i]);
+ xio_addfname(tmp, p, name);
+ free(p);
+ f = xio_ropen(tmp);
+ if (f == XIO_FAILED) {
+ xio_addextension(tmp, ".cat");
+ f = xio_ropen(tmp);
+ }
+ }
+ return (f);
+}
+
+xio_file xio_gethelp(void)
+{
+ static CONST xio_constpath paths[] = { /*Where help should be located? */
+ HELPPATH, /*Data path when XaoS is propertly installed */
+#ifndef _plan9_
+ "\01" XIO_PATHSEPSTR "help" XIO_PATHSEPSTR "xaos.hlp",
+ "\01" XIO_PATHSEPSTR ".." XIO_PATHSEPSTR "help" XIO_PATHSEPSTR
+ "xaos.hlp",
+ "." XIO_PATHSEPSTR "help" XIO_PATHSEPSTR "xaos.hlp",
+ /*XaoS was started from root of source tree */
+ ".." XIO_PATHSEPSTR "help" XIO_PATHSEPSTR "xaos.hlp",
+ /*XaoS was started from bin directory in source tree */
+ "." XIO_PATHSEPSTR "xaos.hlp",
+#else
+ "./help/xaos.hlp",
+ /*XaoS was started from root of source tree */
+ "../help/xaos.hlp",
+ /*XaoS was started from bin directory in source tree */
+ "./xaos.hlp",
+#endif
+ /*Oops...it's not. Try curent directory */
+ };
+ int i;
+ xio_file f = XIO_FAILED;
+ for (i = 0;
+ i < (int) (sizeof(paths) / sizeof(char *)) && f == XIO_FAILED;
+ i++) {
+ char *p = xio_fixpath(paths[i]);
+ f = xio_ropen(p);
+ free(p);
+ }
+ return (f);
+}
+
+xio_file xio_gettutorial(CONST char *name, xio_path tmp)
+{
+ int i;
+ xio_file f = XIO_FAILED;
+ static CONST xio_constpath paths[] = { /*Where tutorials should be located? */
+ TUTORIALPATH, /*Data path when XaoS is propertly installed */
+#ifndef _plan9_
+ "\01" XIO_PATHSEPSTR "tutorial" XIO_PATHSEPSTR,
+ "\01" XIO_PATHSEPSTR ".." XIO_PATHSEPSTR "tutorial" XIO_PATHSEPSTR,
+ "." XIO_PATHSEPSTR "tutorial" XIO_PATHSEPSTR, /*XaoS was started from root of source tree */
+ ".." XIO_PATHSEPSTR "tutorial" XIO_PATHSEPSTR, /*XaoS was started from bin directory in source tree */
+#else
+ "./tutorial/", /*XaoS was started from root of source tree */
+ "../tutorial/", /*XaoS was started from bin directory in source tree */
+#endif
+ XIO_EMPTYPATH, /*Oops...it's not. Try curent directory */
+ };
+
+ for (i = 0;
+ i < (int) (sizeof(paths) / sizeof(char *)) && f == XIO_FAILED;
+ i++) {
+ char *p = xio_fixpath(paths[i]);
+ xio_addfname(tmp, p, name);
+ f = xio_ropen(tmp);
+ free(p);
+ }
+ return (f);
+}
+
+int xio_exist(xio_constpath name)
+{
+#ifdef _plan9_
+ return (0);
+#else
+ struct stat buf;
+ return (!stat(name, &buf));
+#endif
+}
+
+static int sputc(int c, xio_file f)
+{
+ return putc(c, (FILE *) f->data);
+}
+
+static int sputs(CONST char *c, xio_file f)
+{
+ return fputs(c, (FILE *) f->data);
+}
+
+static int sungetc(int c, xio_file f)
+{
+ return ungetc(c, (FILE *) f->data);
+}
+
+static int sgetc(xio_file f)
+{
+ return getc((FILE *) f->data);
+}
+
+static int sfeof(xio_file f)
+{
+ return feof((FILE *) f->data);
+}
+
+static int sflush(xio_file f)
+{
+ return fflush((FILE *) f->data);
+}
+
+static int ssclose(xio_file f)
+{
+ int r = fclose((FILE *) f->data);
+ free(f);
+ return r;
+}
+
+xio_file xio_ropen(CONST char *name)
+{
+ xio_file f = (xio_file) calloc(1, sizeof(*f));
+ name = xio_fixpath(name);
+ f->data = (void *) fopen(name, "rt");
+ /*free (name); */
+ if (!f->data) {
+ free(f);
+ return 0;
+ }
+ f->fclose = ssclose;
+ f->xeof = sfeof;
+ f->fgetc = sgetc;
+ f->fungetc = sungetc;
+ return f;
+}
+
+xio_file xio_wopen(CONST char *name)
+{
+ xio_file f = (xio_file) calloc(1, sizeof(*f));
+ name = xio_fixpath(name);
+ f->data = (void *) fopen(name, "wt");
+ /*free (name); */
+ if (!f->data) {
+ free(f);
+ return 0;
+ }
+ f->fputc = sputc;
+ f->fputs = sputs;
+ f->fclose = ssclose;
+ f->flush = sflush;
+ return f;
+}
+
+#ifdef DJGPP
+#define DRIVES
+#endif
+#ifdef _WIN32
+#define DRIVES
+#endif
+void xio_init(CONST char *name)
+{
+ if (getenv("HOME"))
+ xio_homedir = mystrdup(getenv("HOME"));
+ else
+ xio_homedir = mystrdup("./");
+ if (
+#ifdef DRIVES
+ (((name[0] >= 'a' && name[0] <= 'z')
+ || (name[0] >= 'A' && name[0] <= 'Z')) && name[1] == ':'
+ && (name[2] == '\\' || name[2] == '/')) ||
+#endif
+ name[0] == '/' || name[0] == '\\' || name[0] == XIO_PATHSEP
+ || name[0] == '~') {
+ char *c = mystrdup(name);
+ int i;
+ int pos = 0;
+ for (i = 0; i < (int) strlen(c); i++)
+ if (name[i] == '/' || name[i] == '\\'
+ || name[i] == XIO_PATHSEP)
+ pos = i;
+ c[pos] = 0;
+ xio_appdir = xio_fixpath(c);
+ free(c);
+ } else {
+ char buf[4096];
+ buf[0] = '.';
+ buf[1] = 0;
+#ifndef _plan9_
+ getcwd(buf, sizeof(buf));
+#endif
+ xio_appdir = mystrdup(buf);
+ {
+ char *c = mystrdup(name), *c1;
+ int i;
+ int pos = 0;
+ for (i = 0; i < (int) strlen(c); i++)
+ if (name[i] == '/' || name[i] == '\\'
+ || name[i] == XIO_PATHSEP)
+ pos = i;
+ c[pos] = 0;
+ c1 = (char *) malloc(strlen(c) + strlen(xio_appdir) + 2);
+ sprintf(c1, "%s%s%s", xio_appdir, XIO_PATHSEPSTR, c);
+ free(c);
+ free(xio_appdir);
+ xio_appdir = c1;
+ }
+ }
+}
+
+void xio_uninit()
+{
+ free(xio_appdir);
+ free(xio_homedir);
+}
diff --git a/src/util/xstring.c b/src/util/xstring.c
new file mode 100644
index 0000000..02959f6
--- /dev/null
+++ b/src/util/xstring.c
@@ -0,0 +1,141 @@
+#ifndef _plan9_
+#include <string.h>
+#include <stdlib.h>
+#else
+#include <u.h>
+#include <libc.h>
+#endif
+
+#include <xio.h>
+#include <misc-f.h>
+struct fr {
+ char *string;
+ int pos;
+ int allocedsize;
+ int stringsize;
+};
+
+char *mystrdup(const char *c)
+{
+ int l = strlen(c);
+ char *d = malloc(l + 1);
+ if (!d)
+ return NULL;
+ memcpy(d, c, l + 1);
+ return d;
+}
+
+static int sputc(int c, xio_file s)
+{
+ struct fr *f = (struct fr *) s->data;
+ if (f->pos >= f->allocedsize - 1) {
+ char *c = (char *) realloc(f->string, f->allocedsize * 2);
+ if (!c)
+ return XIO_EOF;
+ f->string = c;
+ f->allocedsize *= 2;
+ }
+ f->string[f->pos++] = c;
+ if (f->pos >= f->stringsize)
+ f->string[f->pos] = 0, f->stringsize = f->pos;
+ return 0;
+}
+
+static int sputs(CONST char *c, xio_file s)
+{
+ int l = strlen(c);
+ struct fr *f = (struct fr *) s->data;
+ while (f->pos + l >= f->allocedsize - 1) {
+ char *c = (char *) realloc(f->string, f->allocedsize * 2);
+ if (!c)
+ return XIO_EOF;
+ f->string = c;
+ f->allocedsize *= 2;
+ }
+ memcpy(f->string + f->pos, c, l);
+ f->pos += l;
+ if (f->pos >= f->stringsize)
+ f->string[f->pos] = 0, f->stringsize = f->pos;
+ return 0;
+}
+
+static int sungetc(int c, xio_file s)
+{
+ struct fr *f = (struct fr *) s->data;
+ f->pos--;
+ /*f->string[f->pos]=c; */
+ return 0;
+}
+
+static int sgetc(xio_file s)
+{
+ struct fr *f = (struct fr *) s->data;
+ if (f->pos == f->stringsize)
+ return XIO_EOF;
+ return f->string[f->pos++];
+}
+
+static int sfeof(xio_file s)
+{
+ struct fr *f = (struct fr *) s->data;
+ return (f->pos == f->stringsize);
+}
+
+static int srclose(xio_file s)
+{
+ struct fr *f = (struct fr *) s->data;
+ free(f->string);
+ free(f);
+ free(s);
+ return 0;
+}
+
+static int swclose(xio_file s)
+{
+ struct fr *f = (struct fr *) s->data;
+ f->string = (char *) realloc(f->string, f->stringsize + 1);
+ /*free(s);
+ free(f); */
+ return 0;
+}
+
+char *xio_getstring(xio_file s)
+{
+ struct fr *f = (struct fr *) s->data;
+ char *c = f->string;
+ free(f);
+ free(s);
+ return c;
+}
+
+xio_file xio_strropen(CONST char *string)
+{
+ xio_file s = (xio_file) calloc(1, sizeof(*s));
+ struct fr *f = (struct fr *) calloc(1, sizeof(*f));
+ s->data = f;
+ f->pos = 0;
+ f->string = (char *) string;
+ f->stringsize = strlen(string);
+ s->fclose = srclose;
+ s->xeof = sfeof;
+ s->fgetc = sgetc;
+ s->fungetc = sungetc;
+ return s;
+}
+
+#define PAGE 4096
+xio_file xio_strwopen(void)
+{
+ xio_file s = (xio_file) calloc(1, sizeof(*s));
+ struct fr *f = (struct fr *) calloc(1, sizeof(*f));
+ s->data = f;
+ f->pos = 0;
+ f->string = (char *) malloc(PAGE);
+ f->allocedsize = PAGE;
+ f->stringsize = 0;
+ s->fputc = sputc;
+ s->fputs = sputs;
+ s->fclose = swclose;
+ s->flush = NULL;
+ return s;
+}
diff --git a/tools/cygwin_profile b/tools/cygwin_profile
new file mode 100644
index 0000000..9c5e768
--- /dev/null
+++ b/tools/cygwin_profile
@@ -0,0 +1,35 @@
+## .bash_profile for XaoS Cygwin build environment
+##
+## IMPORTANT! Please modify the lines below to point to the location where you
+## have installed each package. Note that paths are written with forward
+## slashes rather than backslashes and that drive letters are written like
+## "/c" instead of "c:".
+#############################################################################
+
+GNUWIN32_HOME='/cygdrive/c/Program Files/GnuWin32'
+HTMLHELP_HOME='/cygdrive/c/Program Files/HTML Help Workshop'
+DIRECTX_HOME='/cygdrive/c/Program Files/Microsoft DirectX SDK (March 2009)'
+PTHREADS_HOME='/cygdrive/c/pthreads-w32'
+
+#############################################################################
+## You should not have to modify anything below this line
+
+# GnuWin32
+PATH=$PATH:$GNUWIN32_HOME/bin
+C_INCLUDE_PATH=$C_INCLUDE_PATH:$GNUWIN32_HOME/include
+LIBRARY_PATH=$LIBRARY_PATH:$GNUWIN32_HOME/lib
+
+# HTML Help Workshop
+PATH=$PATH:$HTMLHELP_HOME
+C_INCLUDE_PATH=$C_INCLUDE_PATH:$HTMLHELP_HOME/include
+LIBRARY_PATH=$LIBRARY_PATH:$HTMLHELP_HOME/lib
+
+# DirectX SDK
+C_INCLUDE_PATH=$C_INCLUDE_PATH:$DIRECTX_HOME/include
+
+# Pthreads
+PATH=$PATH:$PTHREADS_HOME/Pre-built.2/lib
+C_INCLUDE_PATH=$C_INCLUDE_PATH:$PTHREADS_HOME/Pre-built.2/include
+LIBRARY_PATH=$LIBRARY_PATH:$PTHREADS_HOME/Pre-built.2/lib
+
+export PATH C_INCLUDE_PATH LIBRARY_PATH
diff --git a/tools/dlldeps b/tools/dlldeps
new file mode 100644
index 0000000..361d648
--- /dev/null
+++ b/tools/dlldeps
@@ -0,0 +1,10 @@
+#!/bin/sh
+# list non-system DLL dependencies for a Windows executable
+
+objdump -p $1 |
+ grep "DLL Name:" |
+ cut -d: -f2 |
+ tr -d ' ' |
+ sort | uniq |
+ xargs -n 1 which |
+ grep -v system32
diff --git a/tools/do-indent b/tools/do-indent
new file mode 100755
index 0000000..354fa16
--- /dev/null
+++ b/tools/do-indent
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Autoindenter.
+# This ugly trio of programs `do-indent', `indent1' and `wintounix' will
+# indent all .c and .h files to a standard format.
+# Author: Zoltan Kovacs <kovzol@math.u-szeged.hu>
+
+which indent || exit 1
+echo "You are to indent all .c and .h in this directory, recursively."
+echo -n "Do you really want to do this? [n] "
+read A
+if [ "$A" = "y" ]; then
+ gcc -o wintounix wintounix.c
+ find .. -name '*.[ch]' -exec ./indent1 '{}' ';'
+ fi
diff --git a/tools/indent1 b/tools/indent1
new file mode 100755
index 0000000..b382986
--- /dev/null
+++ b/tools/indent1
@@ -0,0 +1,7 @@
+#!/bin/sh
+# This script indents one file.
+# See do-indent for details.
+cp $1 .indent1.tmp
+./wintounix .indent1.tmp > $1
+rm .indent1.tmp
+indent -kr $1
diff --git a/tools/mkChangeLog b/tools/mkChangeLog
new file mode 100755
index 0000000..400b9fe
--- /dev/null
+++ b/tools/mkChangeLog
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Creates or updates ChangeLog file. Only for developers.
+
+cd ..
+echo "ChangeLog file for XaoS - generated automatically by tools/mkChangeLog.
+Please do not edit this file: your changes will be lost.
+
+" > ChangeLog
+export LC_ALL=C
+svn log >> ChangeLog
+svn commit -m "Automatic update by mkChangeLog" ChangeLog
diff --git a/tools/msys_profile b/tools/msys_profile
new file mode 100644
index 0000000..7694800
--- /dev/null
+++ b/tools/msys_profile
@@ -0,0 +1,40 @@
+## .profile for XaoS MSYS build environment
+##
+## IMPORTANT! Please modify the lines below to point to the location where you
+## have installed each package. Note that paths are written with forward
+## slashes rather than backslashes and that drive letters are written like
+## "/c" instead of "c:".
+#############################################################################
+
+GNUWIN32_HOME='/c/Program Files/GnuWin32'
+NASM_HOME='/c/Program Files/NASM'
+HTMLHELP_HOME='/c/Program Files/HTML Help Workshop'
+DIRECTX_HOME='/c/Program Files/Microsoft DirectX SDK (March 2009)'
+PTHREADS_HOME='/c/pthreads-w32'
+
+#############################################################################
+## You should not have to modify anything below this line
+
+
+# GnuWin32
+PATH=$PATH:$GNUWIN32_HOME/bin
+C_INCLUDE_PATH=$C_INCLUDE_PATH:$GNUWIN32_HOME/include
+LIBRARY_PATH=$LIBRARY_PATH:$GNUWIN32_HOME/lib
+
+# nasm
+PATH=$PATH:$NASM_HOME
+
+# HTML Help Workshop
+PATH=$PATH:$HTMLHELP_HOME
+C_INCLUDE_PATH=$C_INCLUDE_PATH:$HTMLHELP_HOME/include
+LIBRARY_PATH=$LIBRARY_PATH:$HTMLHELP_HOME/lib
+
+# DirectX SDK
+C_INCLUDE_PATH=$C_INCLUDE_PATH:$DIRECTX_HOME/include
+
+# Pthreads
+PATH=$PATH:$PTHREADS_HOME/Pre-built.2/lib
+C_INCLUDE_PATH=$C_INCLUDE_PATH:$PTHREADS_HOME/Pre-built.2/include
+LIBRARY_PATH=$LIBRARY_PATH:$PTHREADS_HOME/Pre-built.2/lib
+
+export PATH C_INCLUDE_PATH LIBRARY_PATH
diff --git a/tools/tarball b/tools/tarball
new file mode 100755
index 0000000..d816a50
--- /dev/null
+++ b/tools/tarball
@@ -0,0 +1,31 @@
+#!/bin/sh
+# Creates a recent tarball.
+# Assumes that the directory name is XaoS/tools where we currently are.
+# Be careful: this script will delete files without asking questions!
+
+NAME=xaos-3.5
+
+test -x tarball || exit 1 # Sorry, this script should be run inside its directory.
+
+./mkChangeLog
+cd ..
+./configure
+cd doc
+make clean
+make
+cd ../help
+make clean
+make
+cd ..
+make clean
+make distclean
+rm -fR autom4te.cache
+cd ..
+rm -fR /tmp/xaos /tmp/$NAME /tmp/$NAME.tar.gz
+cp -a xaos /tmp
+cd /tmp
+mv xaos $NAME
+cd $NAME
+find -name .svn | xargs rm -fR
+cd ..
+tar czf $NAME.tar.gz $NAME
diff --git a/tools/update b/tools/update
new file mode 100755
index 0000000..b4f8d9c
--- /dev/null
+++ b/tools/update
@@ -0,0 +1,22 @@
+#!/bin/sh
+# shell script for updating XaoS example files to latest file format.
+# Not for normal use
+# Requires XaoS compiled with aa driver
+
+echo "$0"
+cat $0 | head -4 | tail -3 | sed s/"^# "/""/
+echo -n "Do you really want to do this? [n] "
+read A
+if [ "$A" != "y" ]; then
+ exit 1
+ fi
+
+cd ..
+mkdir new
+mkdir new/examples
+rm fract0.xpf
+for name in examples/*.xpf
+do
+ echo "zs2qq" | bin/xaos -driver aa -aadriver stdout -kbddriver stdin -load $name -nomouse
+ mv fract0.xpf new/$name
+done
diff --git a/tools/wintounix.c b/tools/wintounix.c
new file mode 100644
index 0000000..8e6a3a0
--- /dev/null
+++ b/tools/wintounix.c
@@ -0,0 +1,15 @@
+#include <stdio.h>
+// This C code converts from Microsoft's #13#10 formatted files to UNIX.
+// See do-indent for details.
+main(int argc, char *argv[])
+{
+ FILE *f;
+ int c;
+ f = fopen(argv[1], "r");
+ while (!(feof(f))) {
+ c = fgetc(f);
+ if ((c != 0x0d) && (c != -1))
+ putchar(c);
+ }
+ fclose(f);
+}
diff --git a/tutorial/3dtutor.xaf b/tutorial/3dtutor.xaf
new file mode 100644
index 0000000..8c7d795
--- /dev/null
+++ b/tutorial/3dtutor.xaf
@@ -0,0 +1,255 @@
+;Position file automatically generated by XaoS pre-3.1
+; - an realtime interactive fractal zoomer
+;Use xaos -load <filename> to display it
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 51)
+(outcoloring 1)
+(view -1.237 -0.02608 1.515 1.515)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 360)
+(view 0.3887273 0.1968478 0.002032969 0.002032969)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 51)
+(outcoloring 1)
+(view -0.12364 0.71622 0.69741 0.69741)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(outcoloring 5)
+(view 0.306879 -0.0287989 0.0118667 0.0118667)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -0.80857449265495002924 0.66696820835337075704)
+(view 0.58202 1.3391 0.65616 0.65616)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(juliaseed -0.012005987660777653705 -0.74114138638056927184)
+(maxiter 51)
+(outcoloring 1)
+(julia #t)
+(view 0.03984 0.02255 2.062 2.062)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed 1.0554564823390124545 0.090525427031847784283)
+(maxiter 70)
+(outcoloring 6)
+(view 0.4914 -0.029882 0.44832 0.44832)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -1.1034769359676834024 0.097828372846225401197)
+(maxiter 60)
+(outcoloring 5)
+(view 0.1531 -0.5733 4.062 4.062)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed 0.71096311368481519008 1.2894272914547220518)
+(maxiter 51)
+(outcoloring 1)
+(view 0.21293 0.43984 0.22778 0.22778)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 91)
+(formula 'barnsley)
+(juliaseed -1.0336492290611611882 -0.11492371202731229457)
+(angle 250.59)
+(maxiter 65)
+(outcoloring 5)
+(incoloring 1)
+(view -0.1431 0.00927 1.663 1.663)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'phoenix)
+(angle -50.166)
+(view 0.48387 0.74198 0.20413 0.20413)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'phoenix)
+(angle 7.1785)
+(outcoloring 5)
+(view 0.37418 0.30903 0.20075 0.20075)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'octal)
+(plane 1)
+(view -0.3248 -1.488 8.813 8.813)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(palette 2 909385182 0)
+(formula 'phoenix)
+(maxiter 360)
+(outcoloring 5)
+(view 0.49982982 -1.0535759 0.0002203857 0.0002203857)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'phoenix)
+(juliaseed 0.10537790697674418599 0.37499999999999999989)
+(angle 91.511)
+(maxiter 280)
+(outcoloring 9)
+(view -0.1907 0.1347 3.549 3.549)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'octal)
+(angle 89.97)
+(plane 2)
+(view 3.56 0.0213 24.6 24.6)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -1.064316860465116279 -0.037500000000000000022)
+(outcoloring 5)
+(plane 5)
+(view -0.2298 -0.9671 4.087 4.087)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -1.064316860465116279 -0.037500000000000000022)
+(angle 171.37)
+(outcoloring 5)
+(plane 6)
+(view -2.24 0.348 30.7 30.7)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed -1.0254311388601783912 -0.043232444528173452863)
+(maxiter 320)
+(outcoloring 5)
+(plane 3)
+(view 0.8763 -0.5159 3.25 3.25)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel3)
+(juliaseed 0.42742377656962010423 -0.0095079491380823082557)
+(outcoloring 5)
+(julia #t)
+(plane 1)
+(view 2.38739 1.96112 0.0326849 0.0326849)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(juliaseed -0.049236902526869000176 0.70312499999999999978)
+(maxiter 110)
+(outcoloring 1)
+(julia #t)
+(view -0.1675 0.68876 0.89324 0.89324)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 140)
+(outcoloring 5)
+(plane 1)
+(view -1.18691 -0.26428 0.0151632 0.0151632)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'newton)
+(outcoloring 8)
+(view 0.23672 0.27244 0.99213 0.99213)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(outcoloring 3)
+(view -0.764063 0.109375 0.0988709 0.0988709)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(juliaseed -0.10192585722409689504 -0.93229166666666666652)
+(maxiter 30)
+(outcoloring 1)
+(julia #t)
+(plane 1)
+(view -0.8057 -1.58 9.354 9.354)
+(usleep 3000000)
+
+(initstate)
+(filter 'threed #t)
+(defaultpalette 0)
+(formula 'mandel)
+(angle 90.237)
+(maxiter 70)
+(outcoloring 1)
+(plane 1)
+(view -0.3973 0.08706 4.01 4.01)
+
diff --git a/tutorial/Bclosing.xaf b/tutorial/Bclosing.xaf
new file mode 100644
index 0000000..6dccefa
--- /dev/null
+++ b/tutorial/Bclosing.xaf
@@ -0,0 +1,70 @@
+; part for Bolyai.xaf
+
+(initstate)
+(formula 'carpet)
+(plane 1)
+(view 0.32622 -0.49166 0.21305 0.21305)
+(palette 3 1511036653 0)
+;(view 3456.7177667684657059 -2522.4799751508215933 4683.1080715734200037 4683.1080715734200353)
+
+(unzoom)
+
+(usleep 10000000)
+(zoomcenter 0.18669458707165150385 -0.38868516453635421515)
+
+(text "Kedves Vendégeink!")
+(textsleep)
+(text "Önök most a
+
+Bevezetés a fraktálok világába
+
+címû fraktálbemutatóból
+láttak részleteket.")
+(textsleep)
+(usleep 1000000)
+(text "A program ingyenesen letölthetõ
+a Bolyai Intézet weboldaláról.")
+(textsleep)
+(usleep 10000000)
+
+(textsleep)
+(color 'black)
+(text "Szeretettel köszöntjük
+kedves vendégeinket az
+
+EGYETEMI TAVASZ
+a Bolyai Intézetben
+
+rendezvényünkön!")
+(usleep 50000000)
+
+(color 'black)
+(text "A háttérben jelenleg
+a Sierpinski-szõnyeg
+geometriai inverzióval
+transzformált változatát láthatjuk.")
+(textsleep)
+(usleep 5000000)
+(text "Jól megfigyelhetõ, ahogyan
+az egyenes szakaszok körívekké
+válnak az inverzív síkon.")
+(textsleep)
+(text "Az is jól látszik, hogy
+a véges területû Sierpinski-szõnyeg
+az inverzió után
+végtelen területûvé változik,
+mivel az alapkör középpontját
+a Sierpinski-szõnyeg
+belsejében vettük fel.")
+(textsleep)
+(color 'white)
+(text "Szeretettel köszöntjük
+kedves vendégeinket az
+
+EGYETEMI TAVASZ
+a Bolyai Intézetben
+
+rendezvényünkön!")
+
+
+(usleep 300000000)
diff --git a/tutorial/Bintro.xaf b/tutorial/Bintro.xaf
new file mode 100644
index 0000000..46cc4e8
--- /dev/null
+++ b/tutorial/Bintro.xaf
@@ -0,0 +1,1635 @@
+; part for Bolyai.xaf
+
+(initstate)
+(palette 1 777280519 0)
+(formula 'magnet)
+(angle 88.336)
+(outcoloring 6)
+(view -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(text "EGYETEMI TAVASZ
+a Bolyai Intézetben
+
+2006")
+
+
+(usleep 2544353)
+
+(usleep 517082)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 500036)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 500002)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 520027)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 443883)
+
+(usleep 59190)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 500054)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 519990)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 516021)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 500022)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 500021)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 500024)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 500019)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 2055495)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+
+
+(usleep 517939)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 500074)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 520002)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 419991)
+(speedup 0.0018900000000000000282)
+(maxstep 0.025200000000000001589)
+
+(usleep 60004)
+(speedup 0.0019845000000000001134)
+(maxstep 0.026460000000000002786)
+
+(usleep 20043)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 39958)
+(speedup 0.0020837250000000002071)
+(maxstep 0.0277830000000000041)
+
+(usleep 56005)
+(speedup 0.0021879112500000003099)
+(maxstep 0.029172150000000005539)
+
+(usleep 60234)
+(speedup 0.0022973068125000004225)
+(maxstep 0.030630757500000007111)
+
+(usleep 59769)
+(speedup 0.0024121721531250005455)
+(maxstep 0.032162295375000008824)
+
+(usleep 60059)
+(speedup 0.0025327807607812506797)
+(maxstep 0.033770410143750010692)
+
+(usleep 60165)
+(speedup 0.0026594197988203133261)
+(maxstep 0.035458930650937512726)
+
+(usleep 59783)
+(speedup 0.0027923907887613291104)
+(maxstep 0.037231877183484389934)
+
+(usleep 60038)
+(speedup 0.0029320103281993956899)
+(maxstep 0.039093471042658611082)
+
+(usleep 60195)
+(speedup 0.0030786108446093656045)
+(maxstep 0.041048144594791543371)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 59777)
+(speedup 0.0032325413868398340213)
+(maxstep 0.043100551824531122362)
+
+(usleep 460015)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 500021)
+(animateview -0.3369840037 -0.3762948312 3.907769588E-06 5.73139605E-06)
+
+(usleep 400021)
+(zoomcenter -0.33698684382506478835 -0.37629136558411988191)
+(unzoom)
+
+(usleep 15992)
+(zoomcenter -0.33698426945484469524 -0.37629509551542317773)
+
+(usleep 88564)
+(animateview -0.3369839969 -0.3762948245 4.007209523E-06 5.877241305E-06)
+
+(usleep 335921)
+(zoomcenter -0.33698425887659436747 -0.37629509520812027897)
+
+(usleep 45501)
+(zoomcenter -0.33698424788601331282 -0.37629509488883898885)
+
+(usleep 91091)
+(zoomcenter -0.33698423601995480356 -0.3762950945441246875)
+
+(usleep 45506)
+(animateview -0.3369838701 -0.3762946942 5.934888513E-06 8.704504145E-06)
+
+(usleep 103152)
+(zoomcenter -0.33698423640803626264 -0.37629508118524376695)
+
+(usleep 35607)
+(zoomcenter -0.33698422269093341347 -0.37629508078675580058)
+
+(usleep 386424)
+(zoomcenter -0.33698420422251692136 -0.37629506123354350115)
+(animateview -0.3369836723 -0.3762944779 9.244948113E-06 1.355925878E-05)
+
+(usleep 107614)
+(zoomcenter -0.33698418341739177232 -0.37629506062914532013)
+
+(usleep 70340)
+(zoomcenter -0.33698416131562576288 -0.3762950599870791428)
+
+(usleep 34765)
+(zoomcenter -0.33698416197612606285 -0.37629503725075756743)
+
+(usleep 34722)
+(zoomcenter -0.33698413853852333919 -0.37629503656988473671)
+
+(usleep 69503)
+(zoomcenter -0.33698411367977244092 -0.37629503584772691665)
+
+(usleep 68524)
+(zoomcenter -0.3369841144443004044 -0.37629500953047371713)
+
+(usleep 69183)
+(zoomcenter -0.33698408653051470951 -0.3762950087195657712)
+
+(usleep 69071)
+(animateview -0.33698341 -0.376294166 1.43833782E-05 2.10956238E-05)
+
+(usleep 445900)
+(zoomcenter -0.33698404339988525695 -0.3762950074666017152)
+
+(usleep 70151)
+(animateview -0.336983044 -0.376293707 2.22333918E-05 3.26089783E-05)
+
+(usleep 363075)
+(zoomcenter -0.33698398142950180867 -0.37629500566633438828)
+
+(usleep 153581)
+(animateview -0.336982509 -0.376292996 3.4385258E-05 5.04317175E-05)
+
+(usleep 38800)
+(zoomcenter -0.33698390858202986322 -0.37629500355008278106)
+
+(usleep 157332)
+(zoomcenter -0.3369838255294403345 -0.37629500113736794856)
+
+(usleep 81281)
+(zoomcenter -0.33698373662640329482 -0.37629499855469500209)
+
+(usleep 40246)
+(zoomcenter -0.33698364456176114093 -0.37629499588017601449)
+
+(usleep 205598)
+(animateview -0.336981807 -0.376291884 5.34759214E-05 7.84313603E-05)
+
+(usleep 526100)
+(animateview -0.33698078 -0.376290145 8.33654869E-05 0.000122269395)
+
+(usleep 531693)
+(animateview -0.33697916 -0.3762874 0.00013057627 0.00019151189)
+
+(usleep 538475)
+(animateview -0.33697658 -0.37628303 0.00020569703 0.00030168901)
+
+(usleep 517194)
+(animateview -0.33697271 -0.37627648 0.00031826712 0.00046679183)
+
+(usleep 246113)
+(zoomcenter -0.33698206550416861431 -0.37629414900993578768)
+
+(usleep 42082)
+(zoomcenter -0.33697874579406925173 -0.37629405257087420811)
+
+(usleep 41317)
+(zoomcenter -0.33697705088517028899 -0.37629314356798969178)
+
+(usleep 42551)
+(zoomcenter -0.336974379545480938 -0.37629306596437820458)
+
+(usleep 43004)
+(zoomcenter -0.33697345654101241554 -0.37629303915068601041)
+
+(usleep 42720)
+(zoomcenter -0.33697058518505241479 -0.37629295573651249678)
+
+(usleep 42582)
+(zoomcenter -0.33696760841752768326 -0.37629286926008593151)
+(animateview -0.33696938 -0.37626721 0.00048549948 0.00071206599)
+
+(usleep 43366)
+(zoomcenter -0.33696555129119346137 -0.37629280949964683141)
+
+(usleep 43246)
+(zoomcenter -0.33696341748180289714 -0.37629274751153068379)
+
+(usleep 44013)
+(zoomcenter -0.33696120435500214252 -0.37629268321920833243)
+
+(usleep 37195)
+(zoomcenter -0.33695890747611145839 -0.37629261649385034949)
+
+(usleep 35806)
+(zoomcenter -0.33695653735282027761 -0.37629254764070980776)
+
+(usleep 35562)
+(zoomcenter -0.33695531593378780843 -0.37629251215794120414)
+
+(usleep 35745)
+(zoomcenter -0.33695405730114275254 -0.37629247559410052844)
+
+(usleep 250383)
+(animateview -0.33697605 -0.37625306 0.00075636153 0.0011093304)
+
+(usleep 520149)
+(animateview -0.3369882 -0.3762313 0.001173211 0.00172071)
+
+(usleep 516537)
+(animateview -0.3370068 -0.3761979 0.001814259 0.002660913)
+
+(usleep 535887)
+(animateview -0.337037 -0.3761439 0.002851769 0.004182596)
+
+(usleep 527776)
+(animateview -0.3370835 -0.3760605 0.004452016 0.006529624)
+
+(usleep 500706)
+(animateview -0.3371516 -0.3759385 0.006793244 0.009963426)
+
+(usleep 521974)
+(animateview -0.337261 -0.375743 0.0105534 0.0154783)
+
+(usleep 515834)
+(animateview -0.337428 -0.375443 0.0163102 0.0239216)
+
+(usleep 518263)
+(animateview -0.337689 -0.374976 0.0252589 0.0370463)
+
+(usleep 530621)
+(animateview -0.338103 -0.374233 0.0395275 0.0579736)
+
+(usleep 535200)
+(zoomcenter -0.33669901882413111701 -0.37628506661239618725)
+(animateview -0.338768 -0.373057 0.0620958 0.0910739)
+
+(usleep 36404)
+(zoomcenter -0.33617280233708092486 -0.37626977978834232457)
+
+(usleep 38191)
+(zoomcenter -0.33576582648982068055 -0.37625795695814915801)
+
+(usleep 72679)
+(zoomcenter -0.3356212915220945754 -0.37625375815276081796)
+
+(usleep 35477)
+(zoomcenter -0.33547232665891993681 -0.3762494306569304921)
+
+(usleep 35354)
+(zoomcenter -0.33501630373007816764 -0.37608272038440807662)
+
+(usleep 35098)
+(zoomcenter -0.33485816251612321857 -0.37607812631148773694)
+
+(usleep 35211)
+(zoomcenter -0.33453709862876960187 -0.37590593534600454166)
+
+(usleep 36765)
+(zoomcenter -0.33403367195346049038 -0.37589131057616387833)
+
+(usleep 35781)
+(zoomcenter -0.33369250075948155625 -0.37570833578640938869)
+
+(usleep 35732)
+(zoomcenter -0.3335140966790276708 -0.37570315306816413236)
+
+(usleep 73042)
+(zoomcenter -0.33332437241333636889 -0.37569764149348005257)
+
+(usleep 36560)
+(zoomcenter -0.33312881557335340766 -0.37569196047990689974)
+(animateview -0.340922 -0.371482 0.0951987 0.139625)
+
+(usleep 37654)
+(zoomcenter -0.33292713080059606795 -0.37568610144714878956)
+
+(usleep 38149)
+(zoomcenter -0.33271893393538754514 -0.37568005323519547449)
+
+(usleep 38263)
+(zoomcenter -0.33250392490967960144 -0.37567380712693608757)
+
+(usleep 40451)
+(zoomcenter -0.33228830387451265018 -0.37544552096723271642)
+
+(usleep 37725)
+(zoomcenter -0.33205852652144433895 -0.37543884583246525991)
+
+(usleep 76257)
+(zoomcenter -0.33156795028899409267 -0.3754245943737310176)
+
+(usleep 37683)
+(zoomcenter -0.33132231291218571816 -0.37516452877582784703)
+
+(usleep 37020)
+(zoomcenter -0.33106115931676076468 -0.37515694214720153016)
+
+(usleep 37934)
+(zoomcenter -0.33079171767911510617 -0.37514911474724573794)
+
+(usleep 124297)
+(zoomcenter -0.33050186029349726431 -0.37484223175054218451)
+(animateview -0.34581 -0.36942 0.14584 0.2139)
+
+(usleep 38372)
+(zoomcenter -0.33019288327089315314 -0.37483325582998957578)
+
+(usleep 40569)
+(zoomcenter -0.32987373652270415641 -0.37482398447436505643)
+
+(usleep 82406)
+(zoomcenter -0.32988366285451462567 -0.37448229156050700034)
+
+(usleep 77864)
+(zoomcenter -0.32951757068133039533 -0.37447165641931190935)
+
+(usleep 38253)
+(zoomcenter -0.32913947419839015461 -0.37446067254755507396)
+
+(usleep 38844)
+(zoomcenter -0.32796796820210270002 -0.37442663977495290495)
+
+(usleep 38794)
+(zoomcenter -0.32675742092606056789 -0.37439147283573084727)
+
+(usleep 38648)
+(zoomcenter -0.32634047530902047984 -0.37437936037927124357)
+
+(usleep 116479)
+(animateview -0.3551 -0.36666 0.22433 0.32902)
+
+(usleep 157640)
+(zoomcenter -0.32581533916469443643 -0.37436410493965619696)
+
+(usleep 347788)
+(animateview -0.37061 -0.36256 0.34367 0.50405)
+
+(usleep 76424)
+(zoomcenter -0.32579352955841981511 -0.37511485436657061187)
+
+(usleep 74718)
+(zoomcenter -0.32577026244081781412 -0.37591577552881914976)
+
+(usleep 36875)
+(zoomcenter -0.32572225401600969464 -0.37756836370294407691)
+
+(usleep 324970)
+(animateview -0.39492 -0.35489 0.52987 0.77714)
+
+(usleep 530607)
+(animateview -0.434 -0.34207 0.82918 1.2161)
+
+(usleep 510910)
+(animateview -0.4924 -0.3229 1.276 1.872)
+
+(usleep 214075)
+(zoomcenter -0.32892325975095715478 -0.37766135434970212704)
+
+(usleep 38826)
+(zoomcenter -0.33223479305497841913 -0.37775755587172371092)
+
+(usleep 13525)
+(zoomcenter -0.33548458010872552433 -0.38119822855831588435)
+
+(usleep 27640)
+(zoomcenter -0.34233264061809230076 -0.3813971677757161742)
+
+(usleep 77301)
+(zoomcenter -0.34222668517896859887 -0.38504445898303838047)
+
+(usleep 139146)
+(animateview -0.5781 -0.2921 1.963 2.88)
+
+(usleep 78739)
+(zoomcenter -0.34662972690166073237 -0.38517236931229074113)
+
+(usleep 242185)
+(zoomcenter -0.34647280369758239404 -0.3905741177000402367)
+
+(usleep 184771)
+(animateview -0.7017 -0.2416 3.009 4.413)
+
+(usleep 47464)
+(zoomcenter -0.35943626297595170435 -0.39752659867678111821)
+
+(usleep 14104)
+(zoomcenter -0.46404874860278503662 -0.45363170925199076952)
+
+(usleep 10297)
+(zoomcenter -0.54383728647808903634 -0.48280034980070399414)
+
+(usleep 13198)
+(zoomcenter -0.56415506301265945467 -0.48339059028668871399)
+
+(usleep 10075)
+(zoomcenter -0.57080476907495759415 -0.49043088604884792255)
+
+(usleep 169945)
+(zoomcenter -0.55502034765028856426 -0.48997234155423591477)
+
+(usleep 12093)
+(zoomcenter -0.55478899425196826216 -0.4979361914750748682)
+
+(usleep 12020)
+(zoomcenter -0.53868119430059553432 -0.49746825268978180047)
+
+(usleep 21817)
+(zoomcenter -0.53045841416483379609 -0.49722937725303213924)
+
+(usleep 10545)
+(zoomcenter -0.52217120524673036236 -0.49698863013136971038)
+
+(usleep 11517)
+(zoomcenter -0.5054486255875339777 -0.49650283172089068918)
+
+(usleep 12011)
+(zoomcenter -0.47987474022771449861 -0.50420121363659302919)
+
+(usleep 12027)
+(zoomcenter -0.47134576520170412566 -0.50395344310147869904)
+
+(usleep 9216)
+(zoomcenter -0.4541137917614031224 -0.50345284657406964824)
+
+(usleep 130754)
+(zoomcenter -0.44451500455326176708 -0.50317399751708955272)
+
+(usleep 12031)
+(animateview -0.8088 -0.1122 4.624 6.781)
+
+(usleep 23969)
+(stop)
+
+(usleep 118092)
+(zoomcenter -0.45538149295795307865 -0.50348967386021790932)
+
+(usleep 13913)
+(morphview -0.8441 -0.06208 5.213 7.645)
+
+(usleep 32363)
+(zoomcenter -0.45545610267126003436 -0.5034918413057238955)
+
+(usleep 15651)
+(zoomcenter -0.45551541212155710221 -0.50349356427175353244)
+(morphview -0.8449 -0.0479 5.376 7.885)
+
+(usleep 8402)
+(zoomcenter -0.455956781103357884 -0.49211847581468281317)
+(morphview -0.8356 -0.04531 5.404 7.925)
+
+(usleep 15647)
+(zoomcenter -0.46713247075418473178 -0.50383104501534613353)
+(morphview -0.8272 -0.05217 5.454 8)
+
+(usleep 8516)
+(zoomcenter -0.45579128994473475025 -0.50350157864577461345)
+(morphview -0.806 -0.04929 5.481 8.039)
+
+(usleep 15679)
+(zoomcenter -0.45618498199165509552 -0.49190338307051232792)
+(morphview -0.7975 -0.04502 5.53 8.11)
+
+(usleep 8172)
+(zoomcenter -0.45595117706524058063 -0.50350622343806029918)
+(morphview -0.787 -0.05429 5.554 8.146)
+
+(usleep 11809)
+(zoomcenter -0.45600341946603923287 -0.50350774110314456362)
+(morphview -0.7773 -0.0511 5.59 8.198)
+
+(usleep 11767)
+(morphview -0.7674 -0.04798 5.624 8.248)
+
+(usleep 20003)
+(zoomcenter -0.45607865608871330944 -0.50350992676064775726)
+
+(usleep 8285)
+(morphview -0.7598 -0.04124 5.703 8.364)
+
+(usleep 11759)
+(zoomcenter -0.46823005085162582164 -0.5038629302075579142)
+
+(usleep 8202)
+(morphview -0.7382 -0.03624 5.756 8.442)
+
+(usleep 7791)
+(zoomcenter -0.45617041368637268554 -0.50351259235985557951)
+
+(usleep 12200)
+(zoomcenter -0.45656771617449085277 -0.49129059577359021537)
+(morphview -0.7285 -0.03185 5.806 8.516)
+
+(usleep 8037)
+(zoomcenter -0.45627754157100661509 -0.50351570447276720887)
+(morphview -0.7167 -0.04217 5.826 8.544)
+
+(usleep 12017)
+(zoomcenter -0.4563189621368964099 -0.5035169077587123494)
+(morphview -0.7057 -0.03954 5.854 8.586)
+
+(usleep 8418)
+(zoomcenter -0.45637963758844822732 -0.50351867040768874507)
+(morphview -0.6941 -0.03764 5.874 8.615)
+
+(usleep 11570)
+(zoomcenter -0.45642072326255507577 -0.50351986396487796716)
+(morphview -0.6827 -0.03522 5.9 8.653)
+
+(usleep 7785)
+(zoomcenter -0.45647587108300423763 -0.50352146603370117321)
+(morphview -0.6709 -0.03351 5.917 8.678)
+
+(usleep 12198)
+(zoomcenter -0.45651168250989351293 -0.50352250637165227521)
+(morphview -0.6592 -0.03109 5.943 8.716)
+
+(usleep 7979)
+(zoomcenter -0.45656648224400361836 -0.50352409832841181318)
+(morphview -0.6472 -0.02944 5.959 8.74)
+
+(usleep 11997)
+(morphview -0.6353 -0.02718 5.983 8.774)
+
+(usleep 8066)
+(zoomcenter -0.45660103366541305366 -0.50352510206264077609)
+
+(usleep 11999)
+(zoomcenter -0.45663345343788169775 -0.50352604387151562217)
+(morphview -0.6237 -0.02383 6.02 8.829)
+
+(usleep 7740)
+(zoomcenter -0.45668026318825225221 -0.50352740371567773005)
+(morphview -0.6114 -0.02238 6.034 8.849)
+
+(usleep 12250)
+(zoomcenter -0.46949160647314029294 -0.50389957896200565087)
+(morphview -0.5991 -0.02034 6.054 8.88)
+
+(usleep 7503)
+(zoomcenter -0.45675315971885435947 -0.50352952139246071712)
+(morphview -0.5737 -0.01864 6.066 8.898)
+
+(usleep 12488)
+(zoomcenter -0.46963103780444355226 -0.50390362950447568414)
+(morphview -0.5612 -0.01671 6.086 8.926)
+
+(usleep 8217)
+(zoomcenter -0.45681992126075830752 -0.50353146084508100934)
+(morphview -0.5357 -0.015 6.098 8.944)
+
+(usleep 15505)
+(zoomcenter -0.46976430944415797507 -0.50390750110515301115)
+(morphview -0.523 -0.01288 6.12 8.976)
+
+(usleep 7567)
+(zoomcenter -0.45689147004780418935 -0.50353353936931153788)
+(morphview -0.4972 -0.01135 6.129 8.99)
+
+(usleep 12466)
+(zoomcenter -0.45691207050436271849 -0.50353413782177851505)
+(morphview -0.4843 -0.00974 6.145 9.012)
+
+(usleep 8015)
+(morphview -0.4713 -0.008633 6.154 9.026)
+
+(usleep 11954)
+(zoomcenter -0.46998182552682835254 -0.50391382004453726898)
+(animateview -0.4713 -0.007602 6.167 9.044)
+
+(usleep 7540)
+(zoomcenter -0.45697168481741730039 -0.50353586964420746555)
+(morphview -0.4452 -0.006251 6.174 9.055)
+
+(usleep 12462)
+(zoomcenter -0.47006734175412709877 -0.50391630432914757119)
+(morphview -0.4321 -0.004946 6.185 9.072)
+
+(usleep 7766)
+(morphview -0.4059 -0.00367 6.192 9.081)
+
+(usleep 12292)
+(zoomcenter -0.47011597637698820021 -0.50391771718667085226)
+
+(usleep 7256)
+(zoomcenter -0.45701795916289625793 -0.50353721393461826184)
+(morphview -0.3795 -0.001762 6.206 9.102)
+
+(usleep 12720)
+(zoomcenter -0.4566466175286491196 -0.51667176999050933462)
+(morphview -0.3662 -0.0007388 6.214 9.114)
+
+(usleep 7171)
+(zoomcenter -0.47020879804771582408 -0.50392041369767671824)
+(morphview -0.3534 0.01308 6.217 9.119)
+
+(usleep 12796)
+(zoomcenter -0.45705222268670686489 -0.50353820930529335121)
+(morphview -0.3269 0.01432 6.223 9.127)
+
+(usleep 7232)
+(zoomcenter -0.45706439169891817652 -0.503538562820535009)
+(morphview -0.3137 0.01491 6.226 9.131)
+
+(usleep 12779)
+(zoomcenter -0.46987636693673450248 -0.51709761947016949512)
+(morphview -0.3004 0.01561 6.229 9.136)
+
+(usleep 7067)
+(zoomcenter -0.45707751483078526547 -0.50353894405337895108)
+(morphview -0.2744 0.02967 6.231 9.138)
+
+(usleep 12924)
+(zoomcenter -0.45708029942852000869 -0.50353902494718725885)
+(morphview -0.2612 0.03019 6.232 9.141)
+
+(usleep 7491)
+(zoomcenter -0.47028739798751139972 -0.50392269706104496693)
+(morphview -0.2479 0.03059 6.232 9.141)
+
+(usleep 12570)
+(morphview -0.2215 0.03136 6.232 9.141)
+
+(usleep 6763)
+(morphview -0.2083 0.03174 6.232 9.141)
+
+(usleep 13202)
+(morphview -0.1951 0.03213 6.232 9.141)
+
+(usleep 6620)
+(morphview -0.1819 0.03251 6.232 9.141)
+
+(usleep 13361)
+(morphview -0.1555 0.03328 6.232 9.141)
+
+(usleep 6624)
+(morphview -0.1423 0.03366 6.232 9.141)
+
+(usleep 13377)
+(morphview -0.1291 0.03404 6.232 9.141)
+
+(usleep 6584)
+(morphview -0.1159 0.03443 6.232 9.141)
+
+(usleep 13445)
+(morphview -0.1027 0.03481 6.232 9.141)
+
+(usleep 6704)
+(morphview -0.0895 0.0352 6.232 9.141)
+
+(usleep 13326)
+(morphview -0.07629 0.03558 6.232 9.141)
+
+(usleep 14655)
+(morphview -0.06309 0.03596 6.232 9.141)
+
+(usleep 159743)
+(morphview -0.04988 0.03635 6.232 9.141)
+
+(usleep 71238)
+(morphview -0.03668 0.03673 6.232 9.141)
+
+(usleep 95035)
+(animateview -0.03668 0.03673 6.232 9.141)
+
+(usleep 6614)
+(morphview -0.02386 0.0503 6.232 9.141)
+
+(usleep 19247)
+(morphview -0.01066 0.05069 6.232 9.141)
+
+(usleep 13423)
+(morphview 0.002548 0.05107 6.232 9.141)
+
+(usleep 6488)
+(morphview 0.002165 0.06426 6.232 9.141)
+
+(usleep 13576)
+(morphview 0.01537 0.06464 6.232 9.141)
+
+(usleep 14383)
+(morphview 0.02857 0.06503 6.232 9.141)
+
+(usleep 20597)
+(morphview 0.04139 0.0786 6.232 9.141)
+
+(usleep 13008)
+(morphview 0.0546 0.07899 6.232 9.141)
+
+(usleep 6716)
+(morphview 0.06742 0.09256 6.232 9.141)
+
+(usleep 13281)
+(morphview 0.08024 0.1061 6.232 9.141)
+
+(usleep 6599)
+(morphview 0.09344 0.1065 6.232 9.141)
+
+(usleep 13362)
+(morphview 0.1063 0.1201 6.232 9.141)
+
+(usleep 8195)
+(morphview 0.1323 0.134 6.232 9.141)
+
+(usleep 18594)
+(morphview 0.1583 0.148 6.232 9.141)
+
+(usleep 13212)
+(morphview 0.1579 0.1612 6.232 9.141)
+
+(usleep 6894)
+(morphview 0.184 0.1752 6.232 9.141)
+
+(usleep 13149)
+(morphview 0.1968 0.1887 6.232 9.141)
+
+(usleep 6637)
+(morphview 0.21 0.1891 6.232 9.141)
+
+(usleep 13322)
+(morphview 0.2613 0.2434 6.232 9.141)
+
+(usleep 8309)
+(morphview 0.2745 0.2438 6.232 9.141)
+
+(usleep 7805)
+(morphview 0.2873 0.2574 6.232 9.141)
+
+(usleep 19235)
+(morphview 0.3261 0.2849 6.232 9.141)
+
+(usleep 21091)
+(morphview 0.4174 0.3272 6.232 9.141)
+
+(usleep 22889)
+(morphview 0.4563 0.3547 6.232 9.141)
+
+(usleep 12674)
+(morphview 0.4687 0.3814 6.232 9.141)
+
+(usleep 8131)
+(morphview 0.4947 0.3954 6.232 9.141)
+
+(usleep 11870)
+(morphview 0.5075 0.409 6.232 9.141)
+
+(usleep 8039)
+(morphview 0.5336 0.4229 6.232 9.141)
+
+(usleep 12110)
+(morphview 0.5464 0.4365 6.232 9.141)
+
+(usleep 8209)
+(morphview 0.5592 0.4501 6.232 9.141)
+
+(usleep 11671)
+(morphview 0.572 0.4637 6.232 9.141)
+
+(usleep 8026)
+(morphview 0.5981 0.4776 6.232 9.141)
+
+(usleep 12035)
+(morphview 0.6113 0.478 6.232 9.141)
+
+(usleep 8061)
+(morphview 0.6241 0.4916 6.232 9.141)
+
+(usleep 11852)
+(morphview 0.6369 0.5051 6.232 9.141)
+
+(usleep 8003)
+(morphview 0.6497 0.5187 6.232 9.141)
+
+(usleep 11998)
+(morphview 0.701 0.573 6.232 9.141)
+
+(usleep 8035)
+(morphview 0.7142 0.5734 6.232 9.141)
+
+(usleep 12055)
+(morphview 0.727 0.587 6.232 9.141)
+
+(usleep 7922)
+(morphview 0.7398 0.6005 6.232 9.141)
+
+(usleep 19193)
+(morphview 0.8043 0.6552 6.232 9.141)
+
+(usleep 20083)
+(morphview 0.8688 0.7099 6.232 9.141)
+
+(usleep 12740)
+(animateview 0.8688 0.7099 6.232 9.141)
+
+(usleep 6557)
+(morphview 0.8945 0.7371 6.232 9.141)
+
+(usleep 20328)
+(morphview 0.9333 0.7646 6.232 9.141)
+
+(usleep 19828)
+(morphview 0.9589 0.7917 6.232 9.141)
+
+(usleep 20313)
+(morphview 0.9718 0.8053 6.232 9.141)
+
+(usleep 12950)
+(morphview 0.9978 0.8193 6.232 9.141)
+
+(usleep 6546)
+(morphview 1.011 0.8196 6.232 9.141)
+
+(usleep 13454)
+(morphview 1.037 0.8336 6.232 9.141)
+
+(usleep 6879)
+(morphview 1.05 0.8472 6.232 9.141)
+
+(usleep 13149)
+(morphview 1.076 0.8611 6.232 9.141)
+
+(usleep 6930)
+(morphview 1.089 0.8747 6.232 9.141)
+
+(usleep 13126)
+(morphview 1.102 0.8883 6.232 9.141)
+
+(usleep 7018)
+(morphview 1.114 0.9019 6.232 9.141)
+
+(usleep 12900)
+(morphview 1.127 0.9154 6.232 9.141)
+
+(usleep 6863)
+(morphview 1.14 0.929 6.232 9.141)
+
+(usleep 13139)
+(morphview 1.153 0.9426 6.232 9.141)
+
+(usleep 7106)
+(morphview 1.179 0.9565 6.232 9.141)
+
+(usleep 12894)
+(morphview 1.205 0.9705 6.232 9.141)
+
+(usleep 6900)
+(morphview 1.218 0.9841 6.232 9.141)
+
+(usleep 13101)
+(morphview 1.269 1.038 6.232 9.141)
+
+(usleep 7021)
+(morphview 1.282 1.039 6.232 9.141)
+
+(usleep 13043)
+(morphview 1.333 1.093 6.232 9.141)
+
+(usleep 7976)
+(morphview 1.347 1.093 6.232 9.141)
+
+(usleep 11961)
+(morphview 1.359 1.107 6.232 9.141)
+
+(usleep 8003)
+(morphview 1.411 1.161 6.232 9.141)
+
+(usleep 11999)
+(morphview 1.424 1.162 6.232 9.141)
+
+(usleep 6929)
+(morphview 1.437 1.175 6.232 9.141)
+
+(usleep 13102)
+(morphview 1.45 1.189 6.232 9.141)
+
+(usleep 6892)
+(morphview 1.462 1.202 6.232 9.141)
+
+(usleep 13082)
+(morphview 1.475 1.216 6.232 9.141)
+
+(usleep 6604)
+(morphview 1.502 1.217 6.232 9.141)
+
+(usleep 13461)
+(morphview 1.514 1.23 6.232 9.141)
+
+(usleep 6868)
+(morphview 1.527 1.244 6.232 9.141)
+
+(usleep 13070)
+(morphview 1.54 1.257 6.232 9.141)
+
+(usleep 6789)
+(morphview 1.566 1.271 6.232 9.141)
+
+(usleep 13211)
+(morphview 1.579 1.285 6.232 9.141)
+
+(usleep 6897)
+(morphview 1.592 1.299 6.232 9.141)
+
+(usleep 13104)
+(morphview 1.618 1.313 6.232 9.141)
+
+(usleep 7087)
+(morphview 1.669 1.367 6.232 9.141)
+
+(usleep 12913)
+(morphview 1.682 1.38 6.232 9.141)
+
+(usleep 7376)
+(morphview 1.708 1.394 6.232 9.141)
+
+(usleep 12685)
+(morphview 1.721 1.408 6.232 9.141)
+
+(usleep 6936)
+(morphview 1.734 1.421 6.232 9.141)
+
+(usleep 13004)
+(morphview 1.76 1.435 6.232 9.141)
+
+(usleep 7099)
+(morphview 1.772 1.449 6.232 9.141)
+
+(usleep 12904)
+(morphview 1.785 1.463 6.232 9.141)
+
+(usleep 6674)
+(morphview 1.811 1.477 6.232 9.141)
+
+(usleep 19990)
+(morphview 1.837 1.504 6.232 9.141)
+
+(usleep 13361)
+(animateview 1.837 1.504 6.232 9.141)
+
+(usleep 6842)
+(morphview 1.876 1.531 6.232 9.141)
+
+(usleep 19631)
+(morphview 1.915 1.559 6.232 9.141)
+
+(usleep 20131)
+(morphview 1.941 1.573 6.232 9.141)
+
+(usleep 19836)
+(morphview 1.966 1.6 6.232 9.141)
+
+(usleep 20035)
+(morphview 2.005 1.627 6.232 9.141)
+
+(usleep 20012)
+(morphview 2.044 1.655 6.232 9.141)
+
+(usleep 20135)
+(morphview 2.083 1.682 6.232 9.141)
+
+(usleep 19780)
+(morphview 2.108 1.71 6.232 9.141)
+
+(usleep 20429)
+(morphview 2.121 1.723 6.232 9.141)
+
+(usleep 13149)
+(morphview 2.134 1.737 6.232 9.141)
+
+(usleep 6884)
+(morphview 2.147 1.75 6.232 9.141)
+
+(usleep 13148)
+(morphview 2.173 1.764 6.232 9.141)
+
+(usleep 6914)
+(morphview 2.186 1.778 6.232 9.141)
+
+(usleep 13119)
+(morphview 2.199 1.791 6.232 9.141)
+
+(usleep 6816)
+(morphview 2.225 1.805 6.232 9.141)
+
+(usleep 13121)
+(morphview 2.251 1.819 6.232 9.141)
+
+(usleep 6843)
+(morphview 2.263 1.833 6.232 9.141)
+
+(usleep 13159)
+(morphview 2.315 1.887 6.232 9.141)
+
+(usleep 6942)
+(morphview 2.328 1.901 6.232 9.141)
+
+(usleep 13058)
+(morphview 2.354 1.915 6.232 9.141)
+
+(usleep 7133)
+(morphview 2.366 1.942 6.232 9.141)
+
+(usleep 12867)
+(morphview 2.379 1.955 6.232 9.141)
+
+(usleep 7112)
+(morphview 2.391 1.982 6.232 9.141)
+
+(usleep 12960)
+(morphview 2.404 1.995 6.232 9.141)
+
+(usleep 7199)
+(morphview 2.455 2.05 6.232 9.141)
+
+(usleep 12732)
+(morphview 2.468 2.063 6.232 9.141)
+
+(usleep 7270)
+(morphview 2.519 2.118 6.232 9.141)
+
+(usleep 12730)
+(morphview 2.532 2.131 6.232 9.141)
+
+(usleep 7180)
+(morphview 2.584 2.185 6.232 9.141)
+
+(usleep 12853)
+(morphview 2.597 2.186 6.232 9.141)
+
+(usleep 7211)
+(morphview 2.609 2.213 6.232 9.141)
+
+(usleep 12769)
+(morphview 2.635 2.227 6.232 9.141)
+
+(usleep 7127)
+(morphview 2.648 2.253 6.232 9.141)
+
+(usleep 12925)
+(morphview 2.647 2.267 6.232 9.141)
+
+(usleep 7130)
+(morphview 2.699 2.321 6.232 9.141)
+
+(usleep 12828)
+(morphview 2.711 2.348 6.232 9.141)
+
+(usleep 7975)
+(morphview 2.762 2.402 6.232 9.141)
+
+(usleep 12013)
+(morphview 2.775 2.429 6.232 9.141)
+
+(usleep 8043)
+(morphview 2.788 2.442 6.232 9.141)
+
+(usleep 11956)
+(morphview 2.838 2.523 6.232 9.141)
+
+(usleep 8040)
+(morphview 2.851 2.536 6.232 9.141)
+
+(usleep 11987)
+(morphview 2.901 2.617 6.232 9.141)
+
+(usleep 7973)
+(morphview 2.914 2.631 6.232 9.141)
+
+(usleep 12061)
+(morphview 2.966 2.685 6.232 9.141)
+
+(usleep 7992)
+(morphview 2.978 2.699 6.232 9.141)
+
+(usleep 11944)
+(morphview 2.991 2.712 6.232 9.141)
+
+(usleep 8003)
+(animateview 2.991 2.712 6.232 9.141)
+
+(usleep 7048)
+(morphview 3.004 2.739 6.232 9.141)
+
+(usleep 19848)
+(morphview 3.016 2.766 6.232 9.141)
+
+(usleep 20533)
+(morphview 3.08 2.834 6.232 9.141)
+
+(usleep 19696)
+(morphview 3.13 2.927 6.232 9.141)
+
+(usleep 20195)
+(morphview 3.156 2.968 6.232 9.141)
+
+(usleep 19519)
+(morphview 3.168 2.981 6.232 9.141)
+
+(usleep 13209)
+(morphview 3.181 2.995 6.232 9.141)
+
+(usleep 7005)
+(morphview 3.194 3.022 6.232 9.141)
+
+(usleep 13015)
+(morphview 3.206 3.035 6.232 9.141)
+
+(usleep 8183)
+(morphview 3.232 3.049 6.232 9.141)
+
+(usleep 7857)
+(morphview 3.245 3.076 6.232 9.141)
+
+(usleep 12157)
+(morphview 3.257 3.103 6.232 9.141)
+
+(usleep 7398)
+(morphview 3.27 3.129 6.232 9.141)
+
+(usleep 12580)
+(morphview 3.321 3.184 6.232 9.141)
+
+(usleep 7595)
+(morphview 3.333 3.211 6.232 9.141)
+
+(usleep 12440)
+(morphview 3.359 3.225 6.232 9.141)
+
+(usleep 7419)
+(morphview 3.372 3.251 6.232 9.141)
+
+(usleep 12600)
+(morphview 3.384 3.278 6.232 9.141)
+
+(usleep 7218)
+(morphview 3.397 3.292 6.232 9.141)
+
+(usleep 12727)
+(morphview 3.448 3.346 6.232 9.141)
+
+(usleep 7366)
+(morphview 3.461 3.373 6.232 9.141)
+
+(usleep 12597)
+(morphview 3.512 3.427 6.232 9.141)
+
+(usleep 7552)
+(morphview 3.525 3.454 6.232 9.141)
+
+(usleep 12508)
+(morphview 3.537 3.467 6.232 9.141)
+
+(usleep 7300)
+(morphview 3.55 3.494 6.232 9.141)
+
+(usleep 12699)
+(morphview 3.563 3.508 6.232 9.141)
+
+(usleep 7478)
+(morphview 3.575 3.534 6.232 9.141)
+
+(usleep 12550)
+(morphview 3.588 3.548 6.232 9.141)
+
+(usleep 7128)
+(morphview 3.601 3.562 6.232 9.141)
+
+(usleep 12829)
+(morphview 3.613 3.588 6.232 9.141)
+
+(usleep 7238)
+(morphview 3.626 3.602 6.232 9.141)
+
+(usleep 12821)
+(morphview 3.638 3.629 6.232 9.141)
+
+(usleep 7274)
+(morphview 3.651 3.642 6.232 9.141)
+
+(usleep 12681)
+(morphview 3.664 3.656 6.232 9.141)
+
+(usleep 7097)
+(morphview 3.677 3.669 6.232 9.141)
+
+(usleep 12906)
+(morphview 3.69 3.683 6.232 9.141)
+
+(usleep 7263)
+(morphview 3.703 3.697 6.232 9.141)
+
+(usleep 12757)
+(morphview 3.702 3.71 6.232 9.141)
+
+(usleep 7121)
+(morphview 3.715 3.723 6.232 9.141)
+
+(usleep 19725)
+(morphview 3.728 3.737 6.232 9.141)
+
+(usleep 20538)
+(morphview 3.74 3.764 6.232 9.141)
+
+(usleep 19642)
+(morphview 3.753 3.79 6.232 9.141)
+
+(usleep 12936)
+(animateview 3.753 3.79 6.232 9.141)
+
+(usleep 7338)
+(morphview 3.765 3.83 6.232 9.141)
+
+(usleep 19757)
+(morphview 3.777 3.857 6.232 9.141)
+
+(usleep 20396)
+(morphview 3.789 3.91 6.232 9.141)
+
+(usleep 19616)
+(morphview 3.801 3.937 6.232 9.141)
+
+(usleep 19559)
+(morphview 3.801 3.95 6.232 9.141)
+
+(usleep 13343)
+(morphview 3.814 3.951 6.232 9.141)
+
+(usleep 6819)
+(morphview 3.814 3.964 6.232 9.141)
+
+(usleep 13214)
+(morphview 3.813 3.977 6.232 9.141)
+
+(usleep 7429)
+(morphview 3.826 4.004 6.232 9.141)
+
+(usleep 19381)
+(morphview 3.825 4.03 6.232 9.141)
+
+(usleep 13217)
+(morphview 3.838 4.044 6.232 9.141)
+
+(usleep 6617)
+(morphview 3.837 4.057 6.232 9.141)
+
+(usleep 20042)
+(morphview 3.837 4.07 6.232 9.141)
+
+(usleep 13289)
+(morphview 3.85 4.084 6.232 9.141)
+
+(usleep 14406)
+(morphview 3.849 4.11 6.232 9.141)
+
+(usleep 13363)
+(morphview 3.849 4.123 6.232 9.141)
+
+(usleep 6970)
+(morphview 3.862 4.137 6.232 9.141)
+
+(usleep 13060)
+(morphview 3.861 4.15 6.232 9.141)
+
+(usleep 7074)
+(morphview 3.861 4.163 6.232 9.141)
+
+(usleep 12929)
+(morphview 3.873 4.19 6.232 9.141)
+
+(usleep 6800)
+(morphview 3.873 4.203 6.232 9.141)
+
+(usleep 19732)
+(morphview 3.886 4.217 6.232 9.141)
+
+(usleep 26228)
+(morphview 3.885 4.23 6.232 9.141)
+
+(usleep 30382)
+(morphview 3.885 4.243 6.232 9.141)
+
+(usleep 20166)
+(morphview 3.885 4.256 6.232 9.141)
+
+(usleep 18970)
+(morphview 3.884 4.269 6.232 9.141)
+
+(usleep 32092)
+(morphview 3.884 4.283 6.232 9.141)
+
+(usleep 20802)
+(morphview 3.883 4.296 6.232 9.141)
+
+(usleep 19158)
+(morphview 3.883 4.309 6.232 9.141)
+
+(usleep 20246)
+(morphview 3.883 4.322 6.232 9.141)
+
+(usleep 20591)
+(morphview 3.882 4.335 6.232 9.141)
+
+(usleep 12834)
+(morphview 3.895 4.336 6.232 9.141)
+
+(usleep 92861)
+(animateview 3.895 4.336 6.232 9.141)
+
+(usleep 6504)
+(morphview 3.895 4.349 6.232 9.141)
+
+(usleep 30917)
+(morphview 3.895 4.362 6.232 9.141)
+
+(usleep 531932)
+(animateview 3.895 4.362 6.232 9.141)
+
+(usleep 6772)
+(morphview 3.895 4.349 6.232 9.141)
+
+(usleep 552452)
+(animateview 3.895 4.349 6.232 9.141)
+
+(usleep 508258)
+(animateview 3.895 4.349 6.232 9.141)
+
+(usleep 508303)
+(animateview 3.895 4.349 6.232 9.141)
+
+(usleep 508339)
+(animateview 3.895 4.349 6.232 9.141)
+
+(usleep 538959)
+(animateview 3.895 4.349 6.232 9.141)
+
+(usleep 528639)
+(animateview 3.895 4.349 6.232 9.141)
+
+
+
+(textsleep)
+
+(range 50)
+(formula 'barnsley)
+(angle 0)
+(maxiter 7)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view 0.63179 0.75369 0.41932 0.41932)
+
+(initstate)
+
+(clearscreen)
+(message "fractal")
+(usleep 5000000)
+(text " Fraktálok....")
+(usleep 5000000)
+(text " Fraktálok.....")
+(usleep 5000000)
+(text " Fraktálok......")
+(usleep 5000000)
+(text " Fraktálok.......")
+(usleep 5000000)
+(text " Fraktálok........")
+(usleep 5000000)
+
+(clearscreen)
+(message "fractal1")
+(textsleep)
+(clearscreen)
+(message "fractal2")
+(textsleep)
+(clearscreen)
+(message "fractal3")
+(textsleep)
+(clearscreen)
+(text "Semmi baj!
+
+Ez csupán számunkra,
+matematikusok számára fontos.")
+(textsleep)
+(text "Van azonban rövidebb,
+közérthetõbb, szemléletesebb
+definíció is.")
+(textsleep)
+(clearscreen)
+
+
+(defaultpalette 0)
+
+(range 50)
+(formula 'barnsley)
+(angle 0)
+(maxiter 7)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view 0.63179 0.75369 0.41932 0.41932)
+
+
+
+(message "fractal5")
+(textsleep)
+(maxiter 9)
+(display)
+(message "fractal6")
+(textsleep)
+(maxiter 11)
+(message "fractal7")
+(textsleep)
+(maxiter 12)
+(message "fractal8")
+(textsleep)
+(display)
+(maxiter 13)
+(usleep 1000000)
+(maxiter 14)
+(usleep 500000)
+(maxiter 15)
+(usleep 200000)
+(maxiter 17)
+(usleep 200000)
+(maxiter 20)
+(usleep 200000)
+(maxiter 25)
+(textposition 'center 'bottom)
+(message "fractal9")
+(textsleep)
+(display)
+(message "facts")
+(textsleep)
+(display)
+(usleep 1000000)
+(message "fact1")
+(textsleep)
+(display)
+(morphview 0.0 0.0 2.5 2.5)
+(usleep 6000000)
+(wait)
+(display)
+(message "fact2")
+(textsleep)
+(display)
+(message "fact3")
+(textsleep)
+(display)
+;(message "fact4")
+;(textsleep)
+(display)
+(message "fact5")
+(textsleep)
+(display)
+(message "fact6")
+(textsleep)
+(display)
+(usleep 1000000)
+(clearscreen)
+(usleep 1000000)
+;(textposition 'center 'middle)
+(message "fmath4")
+(textsleep)
+;(clearscreen)
+;(usleep 1000000)
+(message "fmath5")
+(textsleep)
+(clearscreen)
+(textposition 'center 'bottom)
+(message "fmath6")
+(linekey 0)
+(line 'scaled 0.05 0.5 0.05 0.5)
+(morphlastline 'scaled 0.05 0.5 0.95 0.5)
+(usleep 1000000)
+(textsleep)
+(clearscreen)
+(load "flake1.xhf")
+(message "fmath7")
+(usleep 1000000)
+(textsleep)
+(message "fmath8")
+(textsleep)
+(message "fmath9")
+(textsleep)
+(clearscreen)
+(load "flake2.xhf")
+(message "fmath10")
+(usleep 1000000)
+(textsleep)
+(clearscreen)
+(load "flake3.xhf")
+(message "fmath11")
+(usleep 500000)
+(clearscreen)
+(load "flake4.xhf")
+(message "fmath12")
+(usleep 500000)
+(textsleep)
+(message "fmath13")
+(textsleep)
+(message "fmath14")
+(textsleep)
+
+(load "flake5.xhf")
+(usleep 2000000)
+(text "")
+(usleep 2000000)
+
+(clearscreen)
+(display)
+(formula 'koch)
+(view 0.00316 0.0009989 3.0 3.0)
+(usleep 2000000)
+(zoomcenter 0.0 0.0)
+(zoom)
+
+(filter 'palette #t)
+(palette 1 1675067824 138)
+(cycling #t)
+(cyclingspeed -30)
+
+(usleep 3500000)
+(stop)
+(cycling #f)
+(clearscreen)
+
+
+(message "tree1")
+(textsleep)
+(clearscreen)
+(textposition 'center 'bottom)
+(message "tree2")
+(line 'scaled 0.500 0.800 0.500 0.500)
+(line 'scaled 0.500 0.500 0.500 0.200)
+(line 'scaled 0.500 0.500 0.500 0.200)
+(textsleep)
+(linekey 0)
+(morphline 'scaled 0.500 0.800 0.500 0.500)
+(morphline 'scaled 0.500 0.500 0.650 0.240)
+(morphline 'scaled 0.500 0.500 0.350 0.240)
+(usleep 1000000)
+(usleep 1000000)
+(clearscreen)
+(load "tree.xhf")
+(message "tree3")
+(usleep 3000000)
+
+(text "")
+(usleep 2000000)
+(message "nstr")
+(textsleep)
+
+(clearscreen)
+(message "nstr2")
+(line 'scaled 0 0.5 0.5 0.5)
+(line 'scaled 0.5 0.5 1 0.5)
+(textsleep)
+(message "nstr3")
+(linekey 0)
+(morphline 'scaled 0.000 0.500 0.665 0.680)
+(morphline 'scaled 0.665 0.680 1.000 0.500)
+(message "nstr3")
+(usleep 1000000)
+(textsleep)
+(load "coast.xhf")
+(message "nstr4")
+(linekey 0)
+(morphline 'scaled 0 0.5 0 0.5)
+(morphline 'scaled 1 0.5 1 0.5)
+(usleep 1000000)
+(textsleep)
+(text "")
+(usleep 1000000)
+(message "nstr5")
+(textsleep)
diff --git a/tutorial/Bolyai.xaf b/tutorial/Bolyai.xaf
new file mode 100644
index 0000000..91ca74f
--- /dev/null
+++ b/tutorial/Bolyai.xaf
@@ -0,0 +1,67 @@
+; Based on "An introduction to fractals" by Jan Hubicka
+; Modifications by Zoltan Kovacs for the "University Spring
+; in the Bolyai Institute, 2006", 2006-04-26
+
+(letterspersec 9)
+
+(load "Bintro.xaf")
+(load "mset.xaf")
+
+(clearscreen)
+(initstate)
+(formula 'carpet)
+(view 0.959 0.19 47.6 47.6)
+(zoomcenter 0.63 0.33)
+(zoom)
+(text "Kedves Vendégeink!")
+(textsleep)
+(text "Önök most a
+
+Bevezetés a fraktálok világába
+
+címû fraktálbemutatóból
+látnak részleteket.")
+(textsleep)
+; (formula 'sier)
+; (zoomcenter 0.37 0.21)
+; (zoom)
+(text "Ezt a bemutatót
+Jan Hubièka
+cseh matematikus diák készítette
+1997-ben, 19 évesen.")
+(textsleep)
+(text "A Bolyai Intézet 2002 óta
+maga is részt a program
+továbbfejlesztésében.")
+(textsleep)
+(text "A program, mely
+
+XaoS ('kháosz')
+névre hallgat,
+
+akár felhasználóként,
+akár fejlesztõként, bárki
+számára nyitva áll...")
+(textsleep)
+; (formula 'koch)
+; (zoomcenter 0.288 0.512)
+(text "...és ingyenesen letölthetõ a
+Bolyai Intézet weboldaláról.")
+(textsleep)
+(usleep 3000000)
+(stop)
+(initstate)
+(load "julia.xaf")
+(load "power.xaf")
+(load "newton.xaf")
+(load "barnsley.xaf")
+(load "phoenix.xaf")
+(load "octo.xaf")
+(load "magnet.xaf")
+
+;(clearscreen)
+(textposition 'center 'middle)
+;(message "end")
+;(usleep 4000000)
+
+(load "Bclosing.xaf")
diff --git a/tutorial/anim.xaf b/tutorial/anim.xaf
new file mode 100644
index 0000000..1c8ff5d
--- /dev/null
+++ b/tutorial/anim.xaf
@@ -0,0 +1,9 @@
+; XaoS features overview by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(message "anim")
+(usleep 4000000)
+
+(load "anim.xhf")
diff --git a/tutorial/anim.xhf b/tutorial/anim.xhf
new file mode 100644
index 0000000..a556b1d
--- /dev/null
+++ b/tutorial/anim.xhf
@@ -0,0 +1,382 @@
+(textposition 'center 'middle)
+(clearscreen)
+(message "anim2")
+(textsleep)
+(clearscreen)
+(message "anim3")
+(textsleep)
+(display)
+(defaultpalette 0)
+(formula 'mandel)
+(speedup 0.0017999999999999999507)
+(maxstep 0.0240000000000000005)
+(fastmode 'animation)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(range 3)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+
+
+(usleep 3276026)
+(zoomcenter 0 0)
+(zoom)
+
+(usleep 254)
+(zoomcenter -0.096656976744186004404 -0.97500000000000006274)
+
+(usleep 23135)
+(zoomcenter -0.086134620573665520533 -0.97499999999999993725)
+
+(usleep 2254526)
+(zoomcenter -0.089856066542531838528 -0.97499999999999999113)
+
+(usleep 985127)
+(zoomcenter -0.092167141284922289601 -0.97499999999999998327)
+
+(usleep 22132)
+(zoomcenter -0.092167141284922307653 -0.97229372799475250247)
+
+(usleep 32640)
+(zoomcenter -0.092167141284922306623 -0.96962982461643588755)
+
+(usleep 17783)
+(zoomcenter -0.092167141284922299792 -0.96435152768104922291)
+
+(usleep 21815)
+(zoomcenter -0.092167141284922294154 -0.9591243989587320997)
+
+(usleep 32335)
+(zoomcenter -0.094335493813460100142 -0.94626382534119757165)
+
+(usleep 13217)
+(zoomcenter -0.094335493813460103828 -0.94114713963894691391)
+
+(usleep 21595)
+(zoomcenter -0.096466554388078681182 -0.9335635033872007665)
+
+(usleep 37721)
+(zoomcenter -0.098562610435358206397 -0.93107714724835884601)
+
+(usleep 10529)
+(zoomcenter -0.098562610435358203253 -0.92613763560711356192)
+
+(usleep 20340)
+(zoomcenter -0.10062554650639343569 -0.92369056661250625162)
+
+(usleep 23466)
+(zoomcenter -0.10266539480322424887 -0.92127088449488625288)
+
+(usleep 33919)
+(zoomcenter -0.10266539480322425424 -0.91888997743035477574)
+
+(usleep 31997)
+(zoomcenter -0.10464107274629004226 -0.91888997743035478381)
+
+(usleep 23365)
+(zoomcenter -0.10464107274629005386 -0.91657169828426876871)
+
+(usleep 23221)
+(zoomcenter -0.10464107274629004724 -0.91428161439910777283)
+
+(usleep 90918)
+(zoomcenter -0.1046410727462900531 -0.91647412801416771949)
+
+(usleep 33926)
+(zoomcenter -0.10464107274629005516 -0.91863010911138155267)
+
+(usleep 33589)
+(zoomcenter -0.10464107274629004575 -0.9207497667927464609)
+
+(usleep 23880)
+(zoomcenter -0.10464107274629004117 -0.92284810140001263118)
+
+(usleep 1372895)
+(zoomcenter -0.10464107274629004193 -0.92392426289888777421)
+
+(usleep 5187230)
+(zoomcenter -0.1045680896809204386 -0.92392426289888777356)
+
+(usleep 18909)
+(zoomcenter -0.10456808968092043846 -0.9240103170444490013)
+
+(usleep 113669)
+(zoomcenter -0.10456808968092043848 -0.92392904529252773208)
+
+(usleep 13082)
+(zoomcenter -0.10463610972525641385 -0.92392904529252773202)
+
+(usleep 36041)
+(zoomcenter -0.10456928574754863987 -0.92392904529252773213)
+
+(usleep 31789)
+(zoomcenter -0.10456928574754864001 -0.92400722638623318316)
+
+(usleep 23587)
+(zoomcenter -0.10450430093776641816 -0.92423848267483750307)
+
+(usleep 15246)
+(zoomcenter -0.10437499536681364745 -0.92454524899489097306)
+
+(usleep 31401)
+(zoomcenter -0.10437499536681364778 -0.92477188729965671324)
+
+(usleep 14570)
+(zoomcenter -0.10431179136840154066 -0.92507177937488105482)
+
+(usleep 23372)
+(zoomcenter -0.10424933980518617013 -0.92544218174981359739)
+
+(usleep 25442)
+(zoomcenter -0.1041260402053012239 -0.92588095825699037169)
+
+(usleep 16773)
+(zoomcenter -0.10418732747839525763 -0.92631715457308032345)
+
+(usleep 29299)
+(zoomcenter -0.10430797588070833511 -0.92674649647372548165)
+
+(usleep 28287)
+(zoomcenter -0.104427019668399243 -0.92695831231665137183)
+
+(usleep 12918)
+(zoomcenter -0.10454524492732944229 -0.92695831231665137216)
+
+(usleep 30776)
+(zoomcenter -0.10460361479346170456 -0.92695831231665137205)
+
+(usleep 39577)
+(zoomcenter -0.10466072234405435345 -0.92695831231665137189)
+
+(usleep 13742)
+(zoomcenter -0.104717491154444327 -0.92695831231665137199)
+
+(usleep 1435613)
+(stop)
+
+(usleep 46771)
+(zoomcenter -0.104717491154444327 -0.92692540461524138907)
+
+(usleep 310773)
+(zoomcenter -0.10474235329242240593 -0.92692540461524138901)
+
+(usleep 12222)
+(morphview -0.1060043 -0.9240195 0.005870556 0.005870556)
+
+(usleep 26711)
+(zoomcenter -0.10471762603288151407 -0.92689613643037024545)
+
+(usleep 19228)
+(zoomcenter -0.10474224241252057209 -0.9268962044959454031)
+(morphview -0.1059933 -0.9240736 0.005819776 0.005819776)
+
+(usleep 25913)
+(morphview -0.1059634 -0.9241149 0.005794696 0.005794696)
+
+(usleep 12935)
+(zoomcenter -0.10471773211537884042 -0.92689630529909075053)
+
+(usleep 23453)
+(zoomcenter -0.10474211076316318821 -0.92689636065932105852)
+(morphview -0.1059571 -0.924158 0.005764871 0.005764871)
+
+(usleep 27198)
+(zoomcenter -0.10474203171628931061 -0.92689645442526800301)
+(morphview -0.1059288 -0.9241959 0.005745855 0.005745855)
+
+(usleep 19094)
+(morphview -0.1059022 -0.9242299 0.005734698 0.005734698)
+
+(usleep 12724)
+(zoomcenter -0.1047419517168699003 -0.92689654932113102768)
+
+(usleep 19657)
+(morphview -0.105875 -0.9242656 0.005719419 0.005719419)
+
+(usleep 10671)
+(zoomcenter -0.10474192472430625939 -0.92683940720794162816)
+
+(usleep 31531)
+(zoomcenter -0.10474191706643314056 -0.92686801244156271414)
+(morphview -0.1058482 -0.9243577 0.005705357 0.005705357)
+
+(usleep 29020)
+(zoomcenter -0.1047418739066415781 -0.92686811483444752436)
+(morphview -0.105823 -0.9244172 0.005699712 0.005699712)
+
+(usleep 26744)
+(zoomcenter -0.10474185011120396613 -0.92683967272767116838)
+(morphview -0.1057986 -0.9244751 0.005697701 0.005697701)
+
+(usleep 30044)
+(morphview -0.1057745 -0.9245606 0.005697701 0.005697701)
+
+(usleep 18012)
+(morphview -0.1057745 -0.9246176 0.005697701 0.005697701)
+
+(usleep 30145)
+(morphview -0.1057505 -0.9246461 0.005697701 0.005697701)
+
+(usleep 33400)
+(morphview -0.1057265 -0.9247031 0.005697701 0.005697701)
+
+(usleep 37185)
+(morphview -0.1057025 -0.92476 0.005697701 0.005697701)
+
+(usleep 19178)
+(morphview -0.1056785 -0.9247885 0.005697701 0.005697701)
+
+(usleep 29916)
+(morphview -0.1056545 -0.924817 0.005697701 0.005697701)
+
+(usleep 33617)
+(morphview -0.1056305 -0.924874 0.005697701 0.005697701)
+
+(usleep 26267)
+(morphview -0.1056064 -0.9249025 0.005697701 0.005697701)
+
+(usleep 63127)
+(morphview -0.1055824 -0.9249025 0.005697701 0.005697701)
+
+(usleep 238803)
+(morphview -0.1055824 -0.924931 0.005697701 0.005697701)
+(usleep 1000000)
+(clearscreen)
+(message "languag1")
+(textsleep)
+(clearscreen)
+(message "languag2")
+(textsleep)
+(clearscreen)
+(message "languag3")
+(textsleep)
+(clearscreen)
+(message "languag4")
+(textsleep)
+
+(clearscreen)
+(textposition 'left 'top)
+(text "
+(palette 3 1758367448 0)
+(formula 'mandel)
+(maxiter 170)
+(view -0.79272158 0.16090545
+ 0.00034821498 0.00034821498)
+")
+(wait)
+(textposition 'center 'bottom)
+(message "modif1")
+(textsleep)
+
+(clearscreen)
+(textposition 'left 'top)
+(text "
+(palette 3 1758367448 0)
+(formula 'mandel)
+(maxiter 170)
+(view -0.79272158 0.16090545 0.00034821498 0.00034821498)
+(wait)
+(morphview 0 0 2 2)
+(usleep 10000000)
+")
+(wait)
+(textposition 'center 'bottom)
+(message "modif2")
+(textsleep)
+(display)
+(palette 3 1758367448 0)
+(formula 'mandel)
+(maxiter 170)
+(view -0.79272158 0.16090545
+ 0.00034821498 0.00034821498)
+(wait)
+(morphview 0 0 2 2)
+(usleep 10000000)
+(wait)
+(usleep 1000000)
+
+(clearscreen)
+(textposition 'left 'top)
+(text "
+(palette 3 1758367448 0)
+(formula 'mandel)
+(maxiter 170)
+(wait)
+(morphview -0.79272158 0.16090545
+ 0.00034821498 0.00034821498)
+(usleep 10000000)
+")
+(wait)
+(textposition 'center 'bottom)
+(message "modif3")
+(textsleep)
+(display)
+(palette 3 1758367448 0)
+(formula 'mandel)
+(maxiter 170)
+(wait)
+(morphview -0.79272158 0.16090545 0.00034821498 0.00034821498)
+(usleep 10000000)
+(wait)
+(clearscreen)
+(textposition 'center 'middle)
+(message "newanim")
+(textsleep)
+(display)
+
+(defaultpalette 0)
+(filter 'stereogram #f)
+(filter 'interlace #f)
+(filter 'edge #t)
+(filter 'edge2 #f)
+(filter 'blur #t)
+(formula 'mandel)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(maxiter 1)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view -0.75 0 .1 .1)
+(usleep 1000000)
+(view -0.75 0 2.5 2.5)
+(wait)
+(maxiter 2)
+(wait)
+(maxiter 3)
+(wait)
+(maxiter 4)
+(wait)
+(maxiter 5)
+(wait)
+(maxiter 6)
+(wait)
+(maxiter 8)
+(wait)
+(maxiter 10)
+(wait)
+(maxiter 12)
+(wait)
+(maxiter 14)
+(wait)
+(maxiter 20)
+(wait)
+(maxiter 30)
+(wait)
+(maxiter 100)
+(wait)
+(filter 'edge #f)
+(wait)
+(usleep 1000000)
+(clearscreen)
+(message "examples")
+(textsleep)
+(clearscreen)
+(message "examples2")
+(textsleep)
+(clearscreen)
+(message "examples3")
+(textsleep)
+(display)
diff --git a/tutorial/barnsley.xaf b/tutorial/barnsley.xaf
new file mode 100644
index 0000000..eabdff2
--- /dev/null
+++ b/tutorial/barnsley.xaf
@@ -0,0 +1,204 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(textposition 'center 'middle)
+(message "intro4")
+(usleep 5000000)
+
+(palette 1 1686618586 0)
+(formula 'barnsley)
+(cycling #f)
+(periodicity #t)
+(juliaseed 1.0010901162790698318 -0.62500000000000004022)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(julia #f)
+(plane 0)
+(view 0 0 2.5 2.5)
+(display)
+(textposition 'center 'bottom)
+
+(message "barnsley1")
+(textsleep)
+
+(display)
+(message "barnsley2")
+(textsleep)
+
+(display)
+(message "barnsley3")
+(textsleep)
+
+(display)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(fastjulia #t)
+(linekey 0)
+(morphline 'fractal 0.97109 -0.655 1.03109 -0.655)
+(morphline 'fractal 1.03109 -0.655 1.03109 -0.595)
+(morphline 'fractal 0.97109 -0.595 1.03109 -0.595)
+(morphline 'fractal 0.97109 -0.655 0.97109 -0.595)
+(usleep 1000000)
+(message "barnsley4")
+(textsleep)
+(display)
+(line 'fractal 0.97109 -0.655 1.03109 -0.655)
+(line 'fractal 1.03109 -0.655 1.03109 -0.595)
+(line 'fractal 0.97109 -0.595 1.03109 -0.595)
+(line 'fractal 0.97109 -0.655 0.97109 -0.595)
+(linekey 0)
+(morphline 'fractal 1.0027 0.47 1.0627 0.47)
+(morphline 'fractal 1.0627 0.47 1.0627 0.53)
+(morphline 'fractal 1.0027 0.53 1.0627 0.53)
+(morphline 'fractal 1.0027 0.47 1.0027 0.53)
+(morphjulia 1.0327 0.5)
+(usleep 2000000)
+(linekey 0)
+(morphline 'fractal 0.3282 1.207 0.3882 1.207)
+(morphline 'fractal 0.3882 1.207 0.3882 1.267)
+(morphline 'fractal 0.3282 1.267 0.3882 1.267)
+(morphline 'fractal 0.3282 1.207 0.3282 1.267)
+(morphjulia 0.3582 1.237)
+(linekey 0)
+(morphline 'fractal 0.3282 1.207 0.3882 1.207)
+(morphline 'fractal 0.3882 1.207 0.3882 1.267)
+(morphline 'fractal 0.3282 1.267 0.3882 1.267)
+(morphline 'fractal 0.3282 1.207 0.3282 1.267)
+(usleep 2000000)
+(morphjulia -0.3582 1.237)
+(linekey 0)
+(morphline 'fractal -0.3882 1.207 -0.3282 1.207)
+(morphline 'fractal -0.3282 1.207 -0.3282 1.267)
+(morphline 'fractal -0.3882 1.267 -0.3282 1.267)
+(morphline 'fractal -0.3882 1.207 -0.3882 1.267)
+(usleep 2000000)
+(morphjulia -1.0327 0.65)
+(linekey 0)
+(morphline 'fractal -1.0627 0.62 -1.0027 0.62)
+(morphline 'fractal -1.0027 0.62 -1.0027 0.68)
+(morphline 'fractal -1.0627 0.68 -1.0027 0.68)
+(morphline 'fractal -1.0627 0.62 -1.0627 0.68)
+(usleep 2000000)
+(morphjulia -1.1591 -0.6125)
+(linekey 0)
+(morphline 'fractal -1.1891 -0.6425 -1.1291 -0.6425)
+(morphline 'fractal -1.1291 -0.6425 -1.1291 -0.5825)
+(morphline 'fractal -1.1891 -0.5825 -1.1291 -0.5825)
+(morphline 'fractal -1.1891 -0.6425 -1.1891 -0.5825)
+(usleep 2000000)
+(linekey 0)
+(morphline 'fractal -1.1591 -0.6125 -1.1591 -0.6125)
+(morphline 'fractal -1.1591 -0.6125 -1.1591 -0.6125)
+(morphline 'fractal -1.1591 -0.6125 -1.1591 -0.6125)
+(morphline 'fractal -1.1591 -0.6125 -1.1591 -0.6125)
+(usleep 1000000)
+(display)
+
+(message "barnsley5")
+(textsleep)
+(display)
+(message "barnsley6")
+(textsleep)
+
+(display)
+(fastjulia #f)
+(julia #t)
+(palette 1 1183407127 0)
+(juliaseed 1.0485101744186047187 -0.04166666666666666934)
+(maxiter 311)
+(outcoloring 1)
+(incoloring 0)
+(plane 1)
+(view -0.1884 -0.202 7.146 7.146)
+(usleep 2000000)
+
+
+;(palette 1 1779436629 0)
+;(juliaseed 0.031613372093023257869 -1.0500000000000000676)
+;(maxiter 170)
+;(outcoloring 0)
+;(incoloring 1)
+;(plane 1)
+;(view 0.1308 0.04816 4.578 4.578)
+;(usleep 2000000)
+
+
+(palette 1 25997414 0)
+(filter 'edge2 #t)
+(juliaseed -1.0472928330130634481 -0.087398343635324930658)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(plane 1)
+(view -0.1851 -0.09928 7.507 7.507)
+(usleep 2000000)
+(filter 'edge2 #f)
+
+(palette 3 558734359 0)
+(juliaseed 0.82617606890462195329 -0.59250450310750061547)
+(maxiter 54)
+(outcoloring 0)
+(incoloring 1)
+(plane 0)
+(view -0.5141 0.2394 1.84 1.84)
+(usleep 2000000)
+
+(palette 2 1355057888 0)
+(juliaseed -1.0221656976744186704 -0.062500000000000004012)
+(angle -310)
+(autorotate #f)
+(maxiter 33)
+(plane 1)
+(view -0.78537 0.20149 0.43535 0.43535)
+(usleep 2000000)
+
+(palette 2 1808462409 0)
+(juliaseed 0.58205451272674395567 0.83592626580482287831)
+(angle -405)
+(maxiter 50)
+(outcoloring 0)
+(incoloring 1)
+(plane 3)
+(view 1.009 0.04757 2.973 2.973)
+(usleep 2000000)
+
+(palette 3 2052922397 0)
+(formula 'barnsley)
+(juliaseed 0.0054390291189111917214 -1.0091451435058578867)
+(maxiter 38)
+(outcoloring 0)
+(incoloring 2)
+(plane 1)
+(view 1.0166 -0.015562 0.55972 0.55972)
+(usleep 2000000)
+
+
+(palette 1 1686618586 0)
+(formula 'barnsley2)
+(cycling #f)
+(periodicity #t)
+(juliaseed 1.0010901162790698318 -0.62500000000000004022)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(julia #f)
+(plane 0)
+(view 0 0 2.5 2.5)
+(display)
+(textposition 'center 'bottom)
+
+(message "barnsley7")
+(textsleep)
+
+(display)
+(message "barnsley8")
+(textsleep)
diff --git a/tutorial/classic.xaf b/tutorial/classic.xaf
new file mode 100644
index 0000000..9278d5d
--- /dev/null
+++ b/tutorial/classic.xaf
@@ -0,0 +1,80 @@
+;Other fractal types in Xaos - part 3
+;Animation file is made by Arpad Fekete
+;This file was made in January 2006
+(initstate)
+(clearscreen)
+(textposition 'center 'middle)
+(message "classic1")
+(usleep 5000000)
+
+(initstate)
+(filter 'edge2 #t)
+(palette 2 504284649 0)
+(formula 'sier)
+(angle 60.043)
+(view 0.40571 0.25007 1.3406 0.89436)
+(textposition 'center 'bottom)
+(message "classic2")
+(usleep 3500000)
+
+(initstate)
+(palette 2 504284649 0)
+(formula 'sier)
+(angle 60.043)
+(view 0.40571 0.25007 1.3406 0.89436)
+(textposition 'center 'bottom)
+(message "classic3")
+(usleep 3500000)
+
+(initstate)
+(palette 2 504284649 0)
+(formula 'sier)
+(juliaseed 0 1)
+(view 0.5 0.5 1.5 1)
+(textposition 'center 'bottom)
+(message "classic4")
+(usleep 3500000)
+
+(morphview 0.5496221675 0.316543832601 4.30048337789E-08 2.86698891854E-08)
+(textposition 'center 'bottom)
+(message "classic5")
+(usleep 8000000)
+(usleep 2000000)
+
+(initstate)
+(filter 'edge2 #t)
+(palette 1 946083610 0)
+(formula 'carpet)
+(view 0.5262 0.5583 1.16 1.16)
+(textposition 'center 'bottom)
+(message "classic6")
+(usleep 3500000)
+
+(initstate)
+(palette 1 946083610 0)
+(formula 'carpet)
+(view 0.5262 0.5583 1.16 1.16)
+(textposition 'center 'bottom)
+(message "classic7")
+(usleep 3500000)
+
+(morphview 0.7429239596791351 0.357662405256179 7.783970137290736E-12 7.728315519007004E-12)
+(textposition 'center 'bottom)
+(message "classic8")
+(usleep 8000000)
+(usleep 2000000)
+
+(initstate)
+(filter 'blur #t)
+(palette 2 921212061 0)
+(formula 'koch)
+(view -0.1026 0.04512 2.437 2.437)
+(textposition 'center 'bottom)
+(message "classic9")
+(usleep 3500000)
+
+(morphview 0.3920822 0.5506665 0.002344007 0.002344007)
+(textposition 'center 'bottom)
+(message "classic10")
+(usleep 7000000)
+(usleep 2000000)
diff --git a/tutorial/coast.xhf b/tutorial/coast.xhf
new file mode 100644
index 0000000..b4280eb
--- /dev/null
+++ b/tutorial/coast.xhf
@@ -0,0 +1,128 @@
+(line 'scaled 0.000 0.500 0.041 0.494)
+(line 'scaled 0.041 0.494 0.058 0.483)
+(line 'scaled 0.058 0.483 0.083 0.481)
+(line 'scaled 0.083 0.481 0.103 0.490)
+(line 'scaled 0.103 0.490 0.131 0.492)
+(line 'scaled 0.131 0.492 0.149 0.501)
+(line 'scaled 0.149 0.501 0.165 0.528)
+(line 'scaled 0.165 0.528 0.208 0.541)
+(line 'scaled 0.208 0.541 0.233 0.515)
+(line 'scaled 0.233 0.515 0.251 0.504)
+(line 'scaled 0.251 0.504 0.261 0.491)
+(line 'scaled 0.261 0.491 0.267 0.483)
+(line 'scaled 0.267 0.483 0.270 0.471)
+(line 'scaled 0.270 0.471 0.281 0.456)
+(line 'scaled 0.281 0.456 0.295 0.457)
+(line 'scaled 0.295 0.457 0.304 0.453)
+(line 'scaled 0.304 0.453 0.308 0.453)
+(line 'scaled 0.308 0.453 0.315 0.457)
+(line 'scaled 0.315 0.457 0.326 0.455)
+(line 'scaled 0.326 0.455 0.331 0.455)
+(line 'scaled 0.331 0.455 0.345 0.458)
+(line 'scaled 0.345 0.458 0.376 0.452)
+(line 'scaled 0.376 0.452 0.380 0.456)
+(line 'scaled 0.380 0.456 0.391 0.465)
+(line 'scaled 0.391 0.465 0.399 0.470)
+(line 'scaled 0.399 0.470 0.404 0.471)
+(line 'scaled 0.404 0.471 0.412 0.474)
+(line 'scaled 0.412 0.474 0.415 0.472)
+(line 'scaled 0.415 0.472 0.417 0.470)
+(line 'scaled 0.417 0.470 0.418 0.470)
+(line 'scaled 0.418 0.470 0.421 0.468)
+(line 'scaled 0.421 0.468 0.426 0.469)
+(line 'scaled 0.426 0.469 0.427 0.479)
+(line 'scaled 0.427 0.479 0.435 0.485)
+(line 'scaled 0.435 0.485 0.434 0.494)
+(line 'scaled 0.434 0.494 0.435 0.501)
+(line 'scaled 0.435 0.501 0.442 0.501)
+(line 'scaled 0.442 0.501 0.445 0.506)
+(line 'scaled 0.445 0.506 0.453 0.510)
+(line 'scaled 0.453 0.510 0.457 0.510)
+(line 'scaled 0.457 0.510 0.464 0.523)
+(line 'scaled 0.464 0.523 0.471 0.526)
+(line 'scaled 0.471 0.526 0.489 0.535)
+(line 'scaled 0.489 0.535 0.515 0.540)
+(line 'scaled 0.515 0.540 0.521 0.539)
+(line 'scaled 0.521 0.539 0.530 0.543)
+(line 'scaled 0.530 0.543 0.533 0.544)
+(line 'scaled 0.533 0.544 0.539 0.541)
+(line 'scaled 0.539 0.541 0.559 0.546)
+(line 'scaled 0.559 0.546 0.571 0.575)
+(line 'scaled 0.571 0.575 0.606 0.567)
+(line 'scaled 0.606 0.567 0.618 0.583)
+(line 'scaled 0.618 0.583 0.622 0.591)
+(line 'scaled 0.622 0.591 0.626 0.598)
+(line 'scaled 0.626 0.598 0.630 0.602)
+(line 'scaled 0.630 0.602 0.643 0.600)
+(line 'scaled 0.643 0.600 0.650 0.609)
+(line 'scaled 0.650 0.609 0.659 0.627)
+(line 'scaled 0.659 0.627 0.664 0.630)
+(line 'scaled 0.664 0.630 0.669 0.636)
+(line 'scaled 0.669 0.636 0.670 0.645)
+(line 'scaled 0.670 0.645 0.663 0.651)
+(line 'scaled 0.663 0.651 0.668 0.669)
+(line 'scaled 0.668 0.669 0.665 0.680)
+(line 'scaled 0.665 0.680 0.668 0.679)
+(line 'scaled 0.668 0.679 0.674 0.681)
+(line 'scaled 0.674 0.681 0.684 0.678)
+(line 'scaled 0.684 0.678 0.700 0.669)
+(line 'scaled 0.700 0.669 0.699 0.661)
+(line 'scaled 0.699 0.661 0.705 0.657)
+(line 'scaled 0.705 0.657 0.711 0.655)
+(line 'scaled 0.711 0.655 0.714 0.650)
+(line 'scaled 0.714 0.650 0.716 0.643)
+(line 'scaled 0.716 0.643 0.712 0.639)
+(line 'scaled 0.712 0.639 0.710 0.633)
+(line 'scaled 0.710 0.633 0.712 0.628)
+(line 'scaled 0.712 0.628 0.713 0.626)
+(line 'scaled 0.713 0.626 0.717 0.623)
+(line 'scaled 0.717 0.623 0.722 0.622)
+(line 'scaled 0.722 0.622 0.723 0.618)
+(line 'scaled 0.723 0.618 0.727 0.611)
+(line 'scaled 0.727 0.611 0.733 0.601)
+(line 'scaled 0.733 0.601 0.732 0.597)
+(line 'scaled 0.732 0.597 0.732 0.596)
+(line 'scaled 0.732 0.596 0.737 0.594)
+(line 'scaled 0.737 0.594 0.743 0.585)
+(line 'scaled 0.743 0.585 0.742 0.580)
+(line 'scaled 0.742 0.580 0.744 0.574)
+(line 'scaled 0.744 0.574 0.745 0.569)
+(line 'scaled 0.745 0.569 0.746 0.566)
+(line 'scaled 0.746 0.566 0.750 0.560)
+(line 'scaled 0.750 0.560 0.751 0.558)
+(line 'scaled 0.751 0.558 0.753 0.556)
+(line 'scaled 0.753 0.556 0.754 0.550)
+(line 'scaled 0.754 0.550 0.754 0.548)
+(line 'scaled 0.754 0.548 0.755 0.546)
+(line 'scaled 0.755 0.546 0.759 0.542)
+(line 'scaled 0.759 0.542 0.761 0.542)
+(line 'scaled 0.761 0.542 0.765 0.542)
+(line 'scaled 0.765 0.542 0.771 0.541)
+(line 'scaled 0.771 0.541 0.772 0.542)
+(line 'scaled 0.772 0.542 0.776 0.544)
+(line 'scaled 0.776 0.544 0.779 0.545)
+(line 'scaled 0.779 0.545 0.789 0.550)
+(line 'scaled 0.789 0.550 0.795 0.558)
+(line 'scaled 0.795 0.558 0.806 0.557)
+(line 'scaled 0.806 0.557 0.808 0.566)
+(line 'scaled 0.808 0.566 0.816 0.577)
+(line 'scaled 0.816 0.577 0.834 0.587)
+(line 'scaled 0.834 0.587 0.841 0.584)
+(line 'scaled 0.841 0.584 0.852 0.578)
+(line 'scaled 0.852 0.578 0.859 0.577)
+(line 'scaled 0.859 0.577 0.864 0.578)
+(line 'scaled 0.864 0.578 0.868 0.577)
+(line 'scaled 0.868 0.577 0.872 0.574)
+(line 'scaled 0.872 0.574 0.877 0.570)
+(line 'scaled 0.877 0.570 0.895 0.557)
+(line 'scaled 0.895 0.557 0.912 0.560)
+(line 'scaled 0.912 0.560 0.918 0.562)
+(line 'scaled 0.918 0.562 0.924 0.571)
+(line 'scaled 0.924 0.571 0.936 0.561)
+(line 'scaled 0.936 0.561 0.949 0.545)
+(line 'scaled 0.949 0.545 0.947 0.532)
+(line 'scaled 0.947 0.532 0.948 0.524)
+(line 'scaled 0.948 0.524 0.949 0.505)
+(line 'scaled 0.949 0.505 0.963 0.500)
+(line 'scaled 0.963 0.500 0.983 0.497)
+(line 'scaled 0.983 0.497 1.000 0.500)
diff --git a/tutorial/dimension.xaf b/tutorial/dimension.xaf
new file mode 100644
index 0000000..cc1de2e
--- /dev/null
+++ b/tutorial/dimension.xaf
@@ -0,0 +1,195 @@
+(load "head.xhf")
+(load "keys.xhf")
+(clearscreen)
+
+(textposition 'center 'middle)
+(message "fmath")
+(textsleep)
+(message "fmath1")
+(textsleep)
+(message "fmath2")
+(textsleep)
+(message "fmath3")
+(textsleep)
+
+(message "def1")
+(textsleep)
+(clearscreen)
+(message "fractal2")
+(textsleep)
+(clearscreen)
+(textposition 'center 'top)
+(message "fractal2")
+(textposition 'center 'bottom)
+(message "def2")
+(textsleep)
+(message "def3")
+(textsleep)
+(text "")
+(usleep 2000000)
+
+(message "topo1")
+(textsleep)
+(color 'red)
+(linekey 0)
+(line 'scaled 0.5 0.5 0.5 0.5)
+(color 'white)
+(message "topo2")
+(textsleep)
+(morphlastline 'scaled 0.3 0.5 0.7 0.5)
+(message "topo3")
+(usleep 1000000)
+(textsleep)
+(clearscreen)
+(message "topo4")
+(color 'red)
+(line 'scaled 0.3 0.5 0.7 0.5)
+
+(line 'scaled 0.3 0.5 0.7 0.5)
+(line 'scaled 0.3 0.5 0.3 0.5)
+(line 'scaled 0.7 0.5 0.7 0.5)
+(color 'white)
+(linekey 0)
+(morphline 'scaled 0.3 0.3 0.7 0.3)
+(morphline 'scaled 0.3 0.7 0.7 0.7)
+(morphline 'scaled 0.3 0.3 0.3 0.7)
+(morphline 'scaled 0.7 0.3 0.7 0.7)
+(usleep 1000000)
+(textsleep)
+(text "")
+(usleep 2000000)
+
+(message "hb1")
+(textsleep)
+(message "hb2")
+(load "line1.xhf")
+(message "hb3")
+(load "square.xhf")
+(message "hb4")
+(textsleep)
+(color 'red)
+(line 'scaled 0.3 0.3 0.3 0.3)
+(morphlastline 'scaled 0.3 0.3 0.4 0.2)
+(line 'scaled 0.7 0.3 0.7 0.3)
+(morphlastline 'scaled 0.7 0.3 0.8 0.2)
+(line 'scaled 0.7 0.7 0.7 0.7)
+(morphlastline 'scaled 0.7 0.7 0.8 0.6)
+(line 'scaled 0.3 0.3 0.7 0.3)
+(morphlastline 'scaled 0.4 0.2 0.8 0.2)
+(line 'scaled 0.7 0.3 0.7 0.7)
+(morphlastline 'scaled 0.8 0.2 0.8 0.6)
+(color 'white)
+(usleep 1000000)
+(line 'scaled 0.5 0.3 0.5 0.3)
+(morphlastline 'scaled 0.5 0.3 0.6 0.2)
+(line 'scaled 0.7 0.5 0.7 0.5)
+(morphlastline 'scaled 0.7 0.5 0.8 0.4)
+(line 'scaled 0.35 0.25 0.35 0.25)
+(morphlastline 'scaled 0.35 0.25 0.75 0.25)
+(line 'scaled 0.75 0.25 0.75 0.25)
+(morphlastline 'scaled 0.75 0.25 0.75 0.65)
+(usleep 1000000)
+
+(message "hb5")
+(textsleep)
+
+(clearscreen)
+(message "hb6")
+(clearlines)
+(textsleep)
+(textposition 'center 'top)
+(message "hb6")
+(textposition 'center 'bottom)
+(message "hb7")
+(load "line1.xhf")
+(message "hb8")
+(clearlines)
+(load "square.xhf")
+
+(text "")
+(usleep 1000000)
+(message "hb9")
+(textsleep)
+(message "hb10")
+(textsleep)
+
+(message "hb11")
+(clearlines)
+(color 'red)
+(load "flake4.xhf")
+(load "flake5.xhf")
+(color 'white)
+(usleep 0)
+(textsleep)
+(usleep 2000000)
+(message "hb12")
+(textsleep)
+(clearlines)
+(color 'red)
+(line 'scaled 0.05 0.5 0.05 0.5)
+(morphlastline 'scaled 0.05 0.5 0.95 0.5)
+(usleep 1000000)
+(clearlines)
+(load "flake1.xhf")
+(usleep 2000000)
+(clearlines)
+(load "flake2.xhf")
+(usleep 1000000)
+(clearlines)
+(load "flake3.xhf")
+(usleep 500000)
+(clearlines)
+(load "flake4.xhf")
+(usleep 200000)
+(usleep 1000000)
+
+(clearlines)
+(load "flake1.xhf")
+(color 'white)
+(message "hb13")
+(usleep 0)
+(textsleep)
+(message "hb14")
+(textsleep)
+(color 'red)
+(clearlines)
+(load "flake4.xhf")
+(usleep 0)
+(color 'white)
+(message "hb15")
+(textsleep)
+(message "hb15b")
+(textsleep)
+(load "flaketh.xhf")
+(usleep 2000000)
+
+(message "hb16")
+(textsleep)
+(text "")
+(usleep 2000000)
+(message "hb17")
+(textsleep)
+(message "hb18")
+(textsleep)
+(clearscreen)
+(message "hb19")
+(color 'red)
+(load "flake4.xhf")
+(load "flake5.xhf")
+(color 'white)
+(usleep 0)
+(textsleep)
+(message "hb20")
+(textsleep)
+
+(clearscreen)
+(usleep 1000000)
+(textposition 'center 'middle)
+(message "defe1")
+(textsleep)
+(message "defe2")
+(textsleep)
+(message "defe3")
+(textsleep)
+(message "defe4")
+(textsleep)
diff --git a/tutorial/escape.xaf b/tutorial/escape.xaf
new file mode 100644
index 0000000..1a0dda0
--- /dev/null
+++ b/tutorial/escape.xaf
@@ -0,0 +1,275 @@
+(load "head.xhf")
+(clearscreen)
+
+(textposition 'center 'middle)
+(message "escape")
+(textsleep)
+(textposition 'center 'bottom)
+
+
+(clearscreen)
+(message "escape1")
+(color 'red)
+(load "flake1.xhf")
+(usleep 2000000)
+(clearlines)
+(load "flake2.xhf")
+(usleep 1000000)
+(clearlines)
+(load "flake3.xhf")
+(usleep 500000)
+(clearlines)
+(load "flake4.xhf")
+(usleep 200000)
+(textsleep)
+(color 'white)
+
+(display)
+(message "escape2")
+(textsleep)
+(message "escape3")
+(textsleep)
+(message "escape4")
+(textsleep)
+(message "escape5")
+(textsleep)
+
+(color 'red)
+(line 'fractal -3 0 -3 0)
+(morphlastline 'fractal -3 0 2 0)
+(usleep 1000000)
+(color 'white)
+(usleep 1000000)
+(message "escape6")
+(textsleep)
+(color 'red)
+(line 'fractal 0 -2 0 -2)
+(morphlastline 'fractal 0 -2 0 2)
+(usleep 1000000)
+(color 'white)
+(text "")
+(usleep 1000000)
+(display)
+
+(message "escape7")
+(textsleep)
+(message "escape8")
+(textsleep)
+(display)
+(usleep 1000000)
+(message "escape9")
+(textsleep)
+(message "orbit1")
+(textsleep)
+(message "orbit2")
+(line 'fractal -0.03 -0.63 0.03 -0.57)
+(line 'fractal 0.03 -0.63 -0.03 -0.57)
+(textsleep)
+(message "orbit3")
+(textsleep)
+(message "orbit3b")
+(textsleep)
+
+(line 'fractal 0.000 -0.600 0.000 -1.200)
+(text "z=z^2+c
+z=0, c=0-0.6i
+z=(0+0i)^2-0.6i=-0.6i")
+(textsleep)
+(usleep 2000000)
+(line 'fractal 0.000 -1.200 -0.360 -1.200)
+(text "z=z^2+c
+z=0-0.6i, c=0-0.6i
+z=(0-0.6i)^2-0.6i=-0.36-0.6i")
+(textsleep)
+(usleep 1000000)
+(line 'fractal -0.360 -1.200 -0.230 -0.768)
+(text "z=z^2+c
+z=-0.36-0.6i, c=0-0.6i
+z=(-0.36-0.6i)^2-0.6i=-0.23-0.16i")
+(textsleep)
+(usleep 1000000)
+(line 'fractal -0.230 -0.768 0.025 -1.123)
+(message "orbit4")
+(textsleep)
+(usleep 100000)
+(line 'fractal 0.025 -1.123 -0.272 -1.226)
+(usleep 100000)
+(line 'fractal -0.272 -1.226 -0.318 -0.859)
+(usleep 100000)
+(line 'fractal -0.318 -0.859 0.034 -1.036)
+(usleep 100000)
+(line 'fractal 0.034 -1.036 -0.189 -1.230)
+(usleep 100000)
+(line 'fractal -0.189 -1.230 -0.361 -0.963)
+(usleep 100000)
+(line 'fractal -0.361 -0.963 -0.001 -0.938)
+(usleep 100000)
+(line 'fractal -0.001 -0.938 -0.115 -1.199)
+(usleep 100000)
+(line 'fractal -0.115 -1.199 -0.346 -1.063)
+(usleep 100000)
+(line 'fractal -0.346 -1.063 -0.095 -0.880)
+(usleep 100000)
+(line 'fractal -0.095 -0.880 -0.069 -1.147)
+(usleep 100000)
+(line 'fractal -0.069 -1.147 -0.294 -1.124)
+(usleep 100000)
+(line 'fractal -0.294 -1.124 -0.188 -0.891)
+(usleep 100000)
+(line 'fractal -0.188 -0.891 -0.050 -1.090)
+(usleep 100000)
+(line 'fractal -0.050 -1.090 -0.238 -1.151)
+(usleep 100000)
+(line 'fractal -0.238 -1.151 -0.247 -0.937)
+(usleep 100000)
+(line 'fractal -0.247 -0.937 -0.053 -1.033)
+(usleep 100000)
+(line 'fractal -0.053 -1.033 -0.185 -1.154)
+(usleep 100000)
+(line 'fractal -0.185 -1.154 -0.273 -0.995)
+(usleep 100000)
+(line 'fractal -0.273 -0.995 -0.082 -0.984)
+(usleep 100000)
+(line 'fractal -0.082 -0.984 -0.141 -1.137)
+(usleep 100000)
+(line 'fractal -0.141 -1.137 -0.269 -1.049)
+(usleep 100000)
+(line 'fractal -0.269 -1.049 -0.129 -0.959)
+(usleep 100000)
+(line 'fractal -0.129 -0.959 -0.112 -1.108)
+(usleep 100000)
+(line 'fractal -0.112 -1.108 -0.245 -1.086)
+(usleep 100000)
+(line 'fractal -0.245 -1.086 -0.176 -0.962)
+(usleep 100000)
+(line 'fractal -0.176 -0.962 -0.100 -1.072)
+(usleep 100000)
+(line 'fractal -0.100 -1.072 -0.213 -1.106)
+(usleep 100000)
+(line 'fractal -0.213 -1.106 -0.210 -0.984)
+(usleep 100000)
+(line 'fractal -0.210 -0.984 -0.103 -1.038)
+(usleep 100000)
+(line 'fractal -0.103 -1.038 -0.181 -1.109)
+(usleep 100000)
+(line 'fractal -0.181 -1.109 -0.226 -1.015)
+(usleep 100000)
+(line 'fractal -0.226 -1.015 -0.121 -1.012)
+(usleep 100000)
+(line 'fractal -0.121 -1.012 -0.155 -1.100)
+(usleep 100000)
+(line 'fractal -0.155 -1.100 -0.226 -1.045)
+(usleep 100000)
+(line 'fractal -0.226 -1.045 -0.147 -0.999)
+(usleep 100000)
+(line 'fractal -0.147 -0.999 -0.137 -1.083)
+(usleep 100000)
+(line 'fractal -0.137 -1.083 -0.214 -1.067)
+(usleep 100000)
+(line 'fractal -0.214 -1.067 -0.172 -1.000)
+(usleep 100000)
+(line 'fractal -0.172 -1.000 -0.130 -1.062)
+(usleep 100000)
+(line 'fractal -0.130 -1.062 -0.197 -1.080)
+(usleep 100000)
+(line 'fractal -0.197 -1.080 -0.191 -1.011)
+(usleep 100000)
+(line 'fractal -0.191 -1.011 -0.132 -1.043)
+(usleep 100000)
+(line 'fractal -0.132 -1.043 -0.178 -1.083)
+(usleep 100000)
+(line 'fractal -0.178 -1.083 -0.201 -1.028)
+(usleep 100000)
+(line 'fractal -0.201 -1.028 -0.143 -1.028)
+(usleep 100000)
+(line 'fractal -0.143 -1.028 -0.163 -1.078)
+(usleep 100000)
+(message "orbit5")
+(textsleep)
+(message "orbit6")
+(textsleep)
+(message "orbit7")
+(textsleep)
+(message "orbit8")
+(textsleep)
+(message "orbit9")
+(textsleep)
+(display)
+(usleep 1000000)
+(message "bail1")
+(textsleep)
+(message "bail2")
+(textsleep)
+(message "bail3")
+(textsleep)
+(message "bail4")
+(textsleep)
+(message "bail5")
+(textsleep)
+(message "bail6")
+(textsleep)
+(message "bail7")
+(textsleep)
+(display)
+(usleep 1000000)
+(message "iter1")
+(textsleep)
+(message "iter2")
+(textsleep)
+(message "iter3")
+(textsleep)
+(palette 1 156627207 0)
+(view 0 0 4 4)
+(color 'black)
+(maxiter 0)
+(message "iter4")
+(textsleep)
+(message "iter5")
+(textsleep)
+(maxiter 1)
+(usleep 100000)
+(maxiter 2)
+(usleep 100000)
+(maxiter 3)
+(usleep 100000)
+(maxiter 4)
+(usleep 100000)
+(maxiter 5)
+(usleep 100000)
+(maxiter 8)
+(usleep 100000)
+(maxiter 12)
+(usleep 100000)
+(maxiter 18)
+(usleep 100000)
+(maxiter 30)
+(usleep 100000)
+(maxiter 170)
+(usleep 1000000)
+(initstate)
+(textposition 'center 'bottom)
+(message "limit1")
+(textsleep)
+(message "limit2")
+(textsleep)
+(morphview -1.9999999999999676 1.2552775948625695E-14 1.5237388174133004E-13 1.5237582502655772E-13)
+(usleep 10000000)
+(wait)
+(initstate)
+(textposition 'center 'bottom)
+(message "limit3")
+(textsleep)
+(morphview -1.26634765 -0.0442400569 1.68040637E-05 1.68040637E-05)
+(usleep 5000000)
+(message "limit4")
+(textsleep)
+(wait)
+(message "limit5")
+(maxiter 400)
+(textsleep)
+(initstate)
+(clearscreen)
+(message "ofracts1")
+(textsleep)
+(message "ofracts2")
+(textsleep)
diff --git a/tutorial/features.xaf b/tutorial/features.xaf
new file mode 100644
index 0000000..93a191c
--- /dev/null
+++ b/tutorial/features.xaf
@@ -0,0 +1,9 @@
+(load "outcolor.xaf")
+(load "incolor.xaf")
+(load "truecol.xaf")
+(load "filter.xaf")
+(load "plane.xaf")
+(load "anim.xaf")
+(load "pert.xaf")
+(load "palette.xaf")
+(load "other.xaf")
diff --git a/tutorial/filter.xaf b/tutorial/filter.xaf
new file mode 100644
index 0000000..ba7ad1a
--- /dev/null
+++ b/tutorial/filter.xaf
@@ -0,0 +1,8 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(message "filter")
+(usleep 4000000)
+(load "filter.xhf")
diff --git a/tutorial/filter.xhf b/tutorial/filter.xhf
new file mode 100644
index 0000000..b2fc939
--- /dev/null
+++ b/tutorial/filter.xhf
@@ -0,0 +1,189 @@
+(clearscreen)
+(message "filter1")
+(textsleep)
+(clearscreen)
+(message "filter2")
+(textsleep)
+(maxiter 170)
+(defaultpalette 0)
+(formula 'mandel)
+(filter 'blur #t)
+(wait)
+(message "motblur")
+(textsleep)
+(display)
+(morphview 0.317788886723 -0.0325911744001 2.54218525225E-08 2.54218525226E-08)
+(usleep 15000000)
+(filter 'blur #f)
+(clearscreen)
+(message "edge")
+(textsleep)
+(clearscreen)
+(message "edge2")
+(textsleep)
+
+(filter 'edge #t)
+(formula 'newton)
+(view 0 0 2.5 2.5)
+(display)
+(usleep 3000000)
+(filter 'edge #f)
+(filter 'edge2 #t)
+(display)
+(message "edge3")
+(textsleep)
+(display)
+
+
+(palette 1 1134442210 0)
+(formula 'phoenix)
+(juliaseed 0.29505813953488373993 0)
+(angle -270)
+(outcoloring 8)
+(plane 0)
+(view 0.54252 0.0036861 0.519 0.519)
+(usleep 3000000)
+
+
+(palette 1 2134834367 0)
+(formula 'mandel)
+(angle 89.9)
+(plane 6)
+(view -2.041 0.02202 5.6 5.6)
+(usleep 3000000)
+
+(palette 1 1217907078 0)
+(formula 'barnsley)
+(juliaseed 1.096607601828901654 0.0041731272555902670893)
+(outcoloring 1)
+(plane 3)
+(view 0.8508 0.001555 3.978 3.978)
+(usleep 4000000)
+
+(defaultpalette 0)
+(filter 'edge2 #f)
+(filter 'starfield #t)
+(formula 'mandel)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view 0.3115022 -0.027162 0.001338865 0.001338865)
+(message "star")
+(textsleep)
+
+(filter 'starfield #f)
+(filter 'interlace #t)
+(formula 'mandel)
+(clearscreen)
+(message "interlace")
+(textsleep)
+(display)
+(morphview -1.929321701117092285 -2.414219978211539841E-07 1.543578632967612663E-15 1.543564574490265047E-15)
+(usleep 15000000)
+(clearscreen)
+(message "stereo")
+(textsleep)
+(message "stereo2")
+(textsleep)
+(display)
+
+
+(defaultpalette 0)
+(filter 'edge #f)
+(filter 'edge2 #f)
+(filter 'starfield #f)
+(filter 'stereogram #t)
+(filter 'interlace #f)
+(filter 'blur #f)
+(formula 'phoenix)
+(plane 0)
+(view 0.199087 -0.562119 0.0343251 0.0343251)
+
+(usleep 6000000)
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view -1.76739 -0.00103757 0.0374694 0.0374694)
+(usleep 6000000)
+
+(defaultpalette 0)
+(formula 'mandel)
+(plane 0)
+(view -0.8399398 0.2245206 0.005903873 0.005903873)
+
+
+(usleep 6000000)
+
+(formula 'mandel)
+(usleep 1000000)
+
+(morphview -0.020414 -0.83211 0.10564 0.10564)
+(usleep 10000000)
+(wait)
+(usleep 1000000)
+(filter 'stereogram #f)
+(wait)
+(usleep 1000000)
+
+(initstate)
+(clearscreen)
+(message "emboss1")
+(textsleep)
+
+(display)
+(filter 'emboss #t)
+(formula 'mandel)
+(outcoloring 9)
+(view -1.2419331 0.32407933 0.00053065715 0.00053065715)
+(usleep 2000000)
+
+(formula 'phoenix)
+(julia #f)
+(view 0.21077 0.67294 0.10309 0.10309)
+(usleep 2000000)
+
+(formula 'octal)
+(angle -269.59)
+(outcoloring 8)
+(plane 6)
+(view 0.756 -0.629 12 12)
+(usleep 2000000)
+
+(formula 'mandel5)
+(maxiter 1)
+(outcoloring 8)
+(incoloring 2)
+(plane 1)
+(view -0.0125 -0.03543 2.617 2.617)
+(usleep 2000000)
+
+(formula 'magnet)
+(angle -89.02)
+(maxiter 3)
+(outcoloring 8)
+(incoloring 2)
+(plane 1)
+(view 0.7352 0.003314 1.118 1.64)
+(usleep 2000000)
+
+(formula 'barnsley)
+(juliaseed -0.023569826835954252408 -0)
+(maxiter 2)
+(outcoloring 8)
+(incoloring 3)
+(plane 5)
+(view -1.158 -1.071 1.341 1.341)
+(usleep 2000000)
+
+(clearscreen)
+(message "palettef1")
+(filter 'emboss #f)
+(textsleep)
+
+(clearscreen)
+(message "truecolorf")
+(textsleep)
+(initstate)
diff --git a/tutorial/flake1.xhf b/tutorial/flake1.xhf
new file mode 100644
index 0000000..23dccad
--- /dev/null
+++ b/tutorial/flake1.xhf
@@ -0,0 +1,8 @@
+(line 'scaled 0.050 0.500 0.350 0.500)
+(morphlastline 'scaled 0.050 0.500 0.350 0.500)
+(line 'scaled 0.350 0.500 0.500 0.500)
+(morphlastline 'scaled 0.350 0.500 0.500 0.240)
+(line 'scaled 0.500 0.500 0.650 0.500)
+(morphlastline 'scaled 0.500 0.240 0.650 0.500)
+(line 'scaled 0.650 0.500 0.950 0.500)
+(morphlastline 'scaled 0.650 0.500 0.950 0.500)
diff --git a/tutorial/flake2.xhf b/tutorial/flake2.xhf
new file mode 100644
index 0000000..f496488
--- /dev/null
+++ b/tutorial/flake2.xhf
@@ -0,0 +1,32 @@
+(line 'scaled 0.050 0.500 0.150 0.500)
+(morphlastline 'scaled 0.050 0.500 0.150 0.500)
+(line 'scaled 0.150 0.500 0.200 0.500)
+(morphlastline 'scaled 0.150 0.500 0.200 0.413)
+(line 'scaled 0.200 0.500 0.250 0.500)
+(morphlastline 'scaled 0.200 0.413 0.250 0.500)
+(line 'scaled 0.250 0.500 0.350 0.500)
+(morphlastline 'scaled 0.250 0.500 0.350 0.500)
+(line 'scaled 0.350 0.500 0.400 0.413)
+(morphlastline 'scaled 0.350 0.500 0.400 0.413)
+(line 'scaled 0.400 0.413 0.425 0.370)
+(morphlastline 'scaled 0.400 0.413 0.350 0.327)
+(line 'scaled 0.425 0.370 0.450 0.327)
+(morphlastline 'scaled 0.350 0.327 0.450 0.327)
+(line 'scaled 0.450 0.327 0.500 0.240)
+(morphlastline 'scaled 0.450 0.327 0.500 0.240)
+(line 'scaled 0.500 0.240 0.550 0.327)
+(morphlastline 'scaled 0.500 0.240 0.550 0.327)
+(line 'scaled 0.550 0.327 0.575 0.370)
+(morphlastline 'scaled 0.550 0.327 0.650 0.327)
+(line 'scaled 0.575 0.370 0.600 0.413)
+(morphlastline 'scaled 0.650 0.327 0.600 0.413)
+(line 'scaled 0.600 0.413 0.650 0.500)
+(morphlastline 'scaled 0.600 0.413 0.650 0.500)
+(line 'scaled 0.650 0.500 0.750 0.500)
+(morphlastline 'scaled 0.650 0.500 0.750 0.500)
+(line 'scaled 0.750 0.500 0.800 0.500)
+(morphlastline 'scaled 0.750 0.500 0.800 0.413)
+(line 'scaled 0.800 0.500 0.850 0.500)
+(morphlastline 'scaled 0.800 0.413 0.850 0.500)
+(line 'scaled 0.850 0.500 0.950 0.500)
+(morphlastline 'scaled 0.850 0.500 0.950 0.500)
diff --git a/tutorial/flake3.xhf b/tutorial/flake3.xhf
new file mode 100644
index 0000000..8983c62
--- /dev/null
+++ b/tutorial/flake3.xhf
@@ -0,0 +1,129 @@
+
+(line 'scaled 0.050 0.500 0.083 0.500)
+(morphlastline 'scaled 0.050 0.500 0.083 0.500)
+(line 'scaled 0.083 0.500 0.100 0.500)
+(morphlastline 'scaled 0.083 0.500 0.100 0.471)
+(line 'scaled 0.100 0.500 0.117 0.500)
+(morphlastline 'scaled 0.100 0.471 0.117 0.500)
+(line 'scaled 0.117 0.500 0.150 0.500)
+(morphlastline 'scaled 0.117 0.500 0.150 0.500)
+(line 'scaled 0.150 0.500 0.167 0.471)
+(morphlastline 'scaled 0.150 0.500 0.167 0.471)
+(line 'scaled 0.167 0.471 0.175 0.457)
+(morphlastline 'scaled 0.167 0.471 0.150 0.442)
+(line 'scaled 0.175 0.457 0.183 0.442)
+(morphlastline 'scaled 0.150 0.442 0.183 0.442)
+(line 'scaled 0.183 0.442 0.200 0.413)
+(morphlastline 'scaled 0.183 0.442 0.200 0.413)
+(line 'scaled 0.200 0.413 0.217 0.442)
+(morphlastline 'scaled 0.200 0.413 0.217 0.442)
+(line 'scaled 0.217 0.442 0.225 0.457)
+(morphlastline 'scaled 0.217 0.442 0.250 0.442)
+(line 'scaled 0.225 0.457 0.233 0.471)
+(morphlastline 'scaled 0.250 0.442 0.233 0.471)
+(line 'scaled 0.233 0.471 0.250 0.500)
+(morphlastline 'scaled 0.233 0.471 0.250 0.500)
+(line 'scaled 0.250 0.500 0.283 0.500)
+(morphlastline 'scaled 0.250 0.500 0.283 0.500)
+(line 'scaled 0.283 0.500 0.300 0.500)
+(morphlastline 'scaled 0.283 0.500 0.300 0.471)
+(line 'scaled 0.300 0.500 0.317 0.500)
+(morphlastline 'scaled 0.300 0.471 0.317 0.500)
+(line 'scaled 0.317 0.500 0.350 0.500)
+(morphlastline 'scaled 0.317 0.500 0.350 0.500)
+(line 'scaled 0.350 0.500 0.367 0.471)
+(morphlastline 'scaled 0.350 0.500 0.367 0.471)
+(line 'scaled 0.367 0.471 0.375 0.457)
+(morphlastline 'scaled 0.367 0.471 0.350 0.442)
+(line 'scaled 0.375 0.457 0.383 0.442)
+(morphlastline 'scaled 0.350 0.442 0.383 0.442)
+(line 'scaled 0.383 0.442 0.400 0.413)
+(morphlastline 'scaled 0.383 0.442 0.400 0.413)
+(line 'scaled 0.400 0.413 0.383 0.385)
+(morphlastline 'scaled 0.400 0.413 0.383 0.385)
+(line 'scaled 0.383 0.385 0.375 0.370)
+(morphlastline 'scaled 0.383 0.385 0.350 0.385)
+(line 'scaled 0.375 0.370 0.367 0.356)
+(morphlastline 'scaled 0.350 0.385 0.367 0.356)
+(line 'scaled 0.367 0.356 0.350 0.327)
+(morphlastline 'scaled 0.367 0.356 0.350 0.327)
+(line 'scaled 0.350 0.327 0.383 0.327)
+(morphlastline 'scaled 0.350 0.327 0.383 0.327)
+(line 'scaled 0.383 0.327 0.400 0.327)
+(morphlastline 'scaled 0.383 0.327 0.400 0.298)
+(line 'scaled 0.400 0.327 0.417 0.327)
+(morphlastline 'scaled 0.400 0.298 0.417 0.327)
+(line 'scaled 0.417 0.327 0.450 0.327)
+(morphlastline 'scaled 0.417 0.327 0.450 0.327)
+(line 'scaled 0.450 0.327 0.467 0.298)
+(morphlastline 'scaled 0.450 0.327 0.467 0.298)
+(line 'scaled 0.467 0.298 0.475 0.283)
+(morphlastline 'scaled 0.467 0.298 0.450 0.269)
+(line 'scaled 0.475 0.283 0.483 0.269)
+(morphlastline 'scaled 0.450 0.269 0.483 0.269)
+(line 'scaled 0.483 0.269 0.500 0.240)
+(morphlastline 'scaled 0.483 0.269 0.500 0.240)
+(line 'scaled 0.500 0.240 0.517 0.269)
+(morphlastline 'scaled 0.500 0.240 0.517 0.269)
+(line 'scaled 0.517 0.269 0.525 0.283)
+(morphlastline 'scaled 0.517 0.269 0.550 0.269)
+(line 'scaled 0.525 0.283 0.533 0.298)
+(morphlastline 'scaled 0.550 0.269 0.533 0.298)
+(line 'scaled 0.533 0.298 0.550 0.327)
+(morphlastline 'scaled 0.533 0.298 0.550 0.327)
+(line 'scaled 0.550 0.327 0.583 0.327)
+(morphlastline 'scaled 0.550 0.327 0.583 0.327)
+(line 'scaled 0.583 0.327 0.600 0.327)
+(morphlastline 'scaled 0.583 0.327 0.600 0.298)
+(line 'scaled 0.600 0.327 0.617 0.327)
+(morphlastline 'scaled 0.600 0.298 0.617 0.327)
+(line 'scaled 0.617 0.327 0.650 0.327)
+(morphlastline 'scaled 0.617 0.327 0.650 0.327)
+(line 'scaled 0.650 0.327 0.633 0.356)
+(morphlastline 'scaled 0.650 0.327 0.633 0.356)
+(line 'scaled 0.633 0.356 0.625 0.370)
+(morphlastline 'scaled 0.633 0.356 0.650 0.385)
+(line 'scaled 0.625 0.370 0.617 0.385)
+(morphlastline 'scaled 0.650 0.385 0.617 0.385)
+(line 'scaled 0.617 0.385 0.600 0.413)
+(morphlastline 'scaled 0.617 0.385 0.600 0.413)
+(line 'scaled 0.600 0.413 0.617 0.442)
+(morphlastline 'scaled 0.600 0.413 0.617 0.442)
+(line 'scaled 0.617 0.442 0.625 0.457)
+(morphlastline 'scaled 0.617 0.442 0.650 0.442)
+(line 'scaled 0.625 0.457 0.633 0.471)
+(morphlastline 'scaled 0.650 0.442 0.633 0.471)
+(line 'scaled 0.633 0.471 0.650 0.500)
+(morphlastline 'scaled 0.633 0.471 0.650 0.500)
+(line 'scaled 0.650 0.500 0.683 0.500)
+(morphlastline 'scaled 0.650 0.500 0.683 0.500)
+(line 'scaled 0.683 0.500 0.700 0.500)
+(morphlastline 'scaled 0.683 0.500 0.700 0.471)
+(line 'scaled 0.700 0.500 0.717 0.500)
+(morphlastline 'scaled 0.700 0.471 0.717 0.500)
+(line 'scaled 0.717 0.500 0.750 0.500)
+(morphlastline 'scaled 0.717 0.500 0.750 0.500)
+(line 'scaled 0.750 0.500 0.767 0.471)
+(morphlastline 'scaled 0.750 0.500 0.767 0.471)
+(line 'scaled 0.767 0.471 0.775 0.457)
+(morphlastline 'scaled 0.767 0.471 0.750 0.442)
+(line 'scaled 0.775 0.457 0.783 0.442)
+(morphlastline 'scaled 0.750 0.442 0.783 0.442)
+(line 'scaled 0.783 0.442 0.800 0.413)
+(morphlastline 'scaled 0.783 0.442 0.800 0.413)
+(line 'scaled 0.800 0.413 0.817 0.442)
+(morphlastline 'scaled 0.800 0.413 0.817 0.442)
+(line 'scaled 0.817 0.442 0.825 0.457)
+(morphlastline 'scaled 0.817 0.442 0.850 0.442)
+(line 'scaled 0.825 0.457 0.833 0.471)
+(morphlastline 'scaled 0.850 0.442 0.833 0.471)
+(line 'scaled 0.833 0.471 0.850 0.500)
+(morphlastline 'scaled 0.833 0.471 0.850 0.500)
+(line 'scaled 0.850 0.500 0.883 0.500)
+(morphlastline 'scaled 0.850 0.500 0.883 0.500)
+(line 'scaled 0.883 0.500 0.900 0.500)
+(morphlastline 'scaled 0.883 0.500 0.900 0.471)
+(line 'scaled 0.900 0.500 0.917 0.500)
+(morphlastline 'scaled 0.900 0.471 0.917 0.500)
+(line 'scaled 0.917 0.500 0.950 0.500)
+(morphlastline 'scaled 0.917 0.500 0.950 0.500)
diff --git a/tutorial/flake4.xhf b/tutorial/flake4.xhf
new file mode 100644
index 0000000..06d2694
--- /dev/null
+++ b/tutorial/flake4.xhf
@@ -0,0 +1,513 @@
+
+(line 'scaled 0.050 0.500 0.061 0.500)
+(morphlastline 'scaled 0.050 0.500 0.061 0.500)
+(line 'scaled 0.061 0.500 0.067 0.500)
+(morphlastline 'scaled 0.061 0.500 0.067 0.490)
+(line 'scaled 0.067 0.500 0.072 0.500)
+(morphlastline 'scaled 0.067 0.490 0.072 0.500)
+(line 'scaled 0.072 0.500 0.083 0.500)
+(morphlastline 'scaled 0.072 0.500 0.083 0.500)
+(line 'scaled 0.083 0.500 0.089 0.490)
+(morphlastline 'scaled 0.083 0.500 0.089 0.490)
+(line 'scaled 0.089 0.490 0.092 0.486)
+(morphlastline 'scaled 0.089 0.490 0.083 0.481)
+(line 'scaled 0.092 0.486 0.094 0.481)
+(morphlastline 'scaled 0.083 0.481 0.094 0.481)
+(line 'scaled 0.094 0.481 0.100 0.471)
+(morphlastline 'scaled 0.094 0.481 0.100 0.471)
+(line 'scaled 0.100 0.471 0.106 0.481)
+(morphlastline 'scaled 0.100 0.471 0.106 0.481)
+(line 'scaled 0.106 0.481 0.108 0.486)
+(morphlastline 'scaled 0.106 0.481 0.117 0.481)
+(line 'scaled 0.108 0.486 0.111 0.490)
+(morphlastline 'scaled 0.117 0.481 0.111 0.490)
+(line 'scaled 0.111 0.490 0.117 0.500)
+(morphlastline 'scaled 0.111 0.490 0.117 0.500)
+(line 'scaled 0.117 0.500 0.128 0.500)
+(morphlastline 'scaled 0.117 0.500 0.128 0.500)
+(line 'scaled 0.128 0.500 0.133 0.500)
+(morphlastline 'scaled 0.128 0.500 0.133 0.490)
+(line 'scaled 0.133 0.500 0.139 0.500)
+(morphlastline 'scaled 0.133 0.490 0.139 0.500)
+(line 'scaled 0.139 0.500 0.150 0.500)
+(morphlastline 'scaled 0.139 0.500 0.150 0.500)
+(line 'scaled 0.150 0.500 0.156 0.490)
+(morphlastline 'scaled 0.150 0.500 0.156 0.490)
+(line 'scaled 0.156 0.490 0.158 0.486)
+(morphlastline 'scaled 0.156 0.490 0.150 0.481)
+(line 'scaled 0.158 0.486 0.161 0.481)
+(morphlastline 'scaled 0.150 0.481 0.161 0.481)
+(line 'scaled 0.161 0.481 0.167 0.471)
+(morphlastline 'scaled 0.161 0.481 0.167 0.471)
+(line 'scaled 0.167 0.471 0.161 0.462)
+(morphlastline 'scaled 0.167 0.471 0.161 0.462)
+(line 'scaled 0.161 0.462 0.158 0.457)
+(morphlastline 'scaled 0.161 0.462 0.150 0.462)
+(line 'scaled 0.158 0.457 0.156 0.452)
+(morphlastline 'scaled 0.150 0.462 0.156 0.452)
+(line 'scaled 0.156 0.452 0.150 0.442)
+(morphlastline 'scaled 0.156 0.452 0.150 0.442)
+(line 'scaled 0.150 0.442 0.161 0.442)
+(morphlastline 'scaled 0.150 0.442 0.161 0.442)
+(line 'scaled 0.161 0.442 0.167 0.442)
+(morphlastline 'scaled 0.161 0.442 0.167 0.433)
+(line 'scaled 0.167 0.442 0.172 0.442)
+(morphlastline 'scaled 0.167 0.433 0.172 0.442)
+(line 'scaled 0.172 0.442 0.183 0.442)
+(morphlastline 'scaled 0.172 0.442 0.183 0.442)
+(line 'scaled 0.183 0.442 0.189 0.433)
+(morphlastline 'scaled 0.183 0.442 0.189 0.433)
+(line 'scaled 0.189 0.433 0.192 0.428)
+(morphlastline 'scaled 0.189 0.433 0.183 0.423)
+(line 'scaled 0.192 0.428 0.194 0.423)
+(morphlastline 'scaled 0.183 0.423 0.194 0.423)
+(line 'scaled 0.194 0.423 0.200 0.413)
+(morphlastline 'scaled 0.194 0.423 0.200 0.413)
+(line 'scaled 0.200 0.413 0.206 0.423)
+(morphlastline 'scaled 0.200 0.413 0.206 0.423)
+(line 'scaled 0.206 0.423 0.208 0.428)
+(morphlastline 'scaled 0.206 0.423 0.217 0.423)
+(line 'scaled 0.208 0.428 0.211 0.433)
+(morphlastline 'scaled 0.217 0.423 0.211 0.433)
+(line 'scaled 0.211 0.433 0.217 0.442)
+(morphlastline 'scaled 0.211 0.433 0.217 0.442)
+(line 'scaled 0.217 0.442 0.228 0.442)
+(morphlastline 'scaled 0.217 0.442 0.228 0.442)
+(line 'scaled 0.228 0.442 0.233 0.442)
+(morphlastline 'scaled 0.228 0.442 0.233 0.433)
+(line 'scaled 0.233 0.442 0.239 0.442)
+(morphlastline 'scaled 0.233 0.433 0.239 0.442)
+(line 'scaled 0.239 0.442 0.250 0.442)
+(morphlastline 'scaled 0.239 0.442 0.250 0.442)
+(line 'scaled 0.250 0.442 0.244 0.452)
+(morphlastline 'scaled 0.250 0.442 0.244 0.452)
+(line 'scaled 0.244 0.452 0.242 0.457)
+(morphlastline 'scaled 0.244 0.452 0.250 0.462)
+(line 'scaled 0.242 0.457 0.239 0.462)
+(morphlastline 'scaled 0.250 0.462 0.239 0.462)
+(line 'scaled 0.239 0.462 0.233 0.471)
+(morphlastline 'scaled 0.239 0.462 0.233 0.471)
+(line 'scaled 0.233 0.471 0.239 0.481)
+(morphlastline 'scaled 0.233 0.471 0.239 0.481)
+(line 'scaled 0.239 0.481 0.242 0.486)
+(morphlastline 'scaled 0.239 0.481 0.250 0.481)
+(line 'scaled 0.242 0.486 0.244 0.490)
+(morphlastline 'scaled 0.250 0.481 0.244 0.490)
+(line 'scaled 0.244 0.490 0.250 0.500)
+(morphlastline 'scaled 0.244 0.490 0.250 0.500)
+(line 'scaled 0.250 0.500 0.261 0.500)
+(morphlastline 'scaled 0.250 0.500 0.261 0.500)
+(line 'scaled 0.261 0.500 0.267 0.500)
+(morphlastline 'scaled 0.261 0.500 0.267 0.490)
+(line 'scaled 0.267 0.500 0.272 0.500)
+(morphlastline 'scaled 0.267 0.490 0.272 0.500)
+(line 'scaled 0.272 0.500 0.283 0.500)
+(morphlastline 'scaled 0.272 0.500 0.283 0.500)
+(line 'scaled 0.283 0.500 0.289 0.490)
+(morphlastline 'scaled 0.283 0.500 0.289 0.490)
+(line 'scaled 0.289 0.490 0.292 0.486)
+(morphlastline 'scaled 0.289 0.490 0.283 0.481)
+(line 'scaled 0.292 0.486 0.294 0.481)
+(morphlastline 'scaled 0.283 0.481 0.294 0.481)
+(line 'scaled 0.294 0.481 0.300 0.471)
+(morphlastline 'scaled 0.294 0.481 0.300 0.471)
+(line 'scaled 0.300 0.471 0.306 0.481)
+(morphlastline 'scaled 0.300 0.471 0.306 0.481)
+(line 'scaled 0.306 0.481 0.308 0.486)
+(morphlastline 'scaled 0.306 0.481 0.317 0.481)
+(line 'scaled 0.308 0.486 0.311 0.490)
+(morphlastline 'scaled 0.317 0.481 0.311 0.490)
+(line 'scaled 0.311 0.490 0.317 0.500)
+(morphlastline 'scaled 0.311 0.490 0.317 0.500)
+(line 'scaled 0.317 0.500 0.328 0.500)
+(morphlastline 'scaled 0.317 0.500 0.328 0.500)
+(line 'scaled 0.328 0.500 0.333 0.500)
+(morphlastline 'scaled 0.328 0.500 0.333 0.490)
+(line 'scaled 0.333 0.500 0.339 0.500)
+(morphlastline 'scaled 0.333 0.490 0.339 0.500)
+(line 'scaled 0.339 0.500 0.350 0.500)
+(morphlastline 'scaled 0.339 0.500 0.350 0.500)
+(line 'scaled 0.350 0.500 0.356 0.490)
+(morphlastline 'scaled 0.350 0.500 0.356 0.490)
+(line 'scaled 0.356 0.490 0.358 0.486)
+(morphlastline 'scaled 0.356 0.490 0.350 0.481)
+(line 'scaled 0.358 0.486 0.361 0.481)
+(morphlastline 'scaled 0.350 0.481 0.361 0.481)
+(line 'scaled 0.361 0.481 0.367 0.471)
+(morphlastline 'scaled 0.361 0.481 0.367 0.471)
+(line 'scaled 0.367 0.471 0.361 0.462)
+(morphlastline 'scaled 0.367 0.471 0.361 0.462)
+(line 'scaled 0.361 0.462 0.358 0.457)
+(morphlastline 'scaled 0.361 0.462 0.350 0.462)
+(line 'scaled 0.358 0.457 0.356 0.452)
+(morphlastline 'scaled 0.350 0.462 0.356 0.452)
+(line 'scaled 0.356 0.452 0.350 0.442)
+(morphlastline 'scaled 0.356 0.452 0.350 0.442)
+(line 'scaled 0.350 0.442 0.361 0.442)
+(morphlastline 'scaled 0.350 0.442 0.361 0.442)
+(line 'scaled 0.361 0.442 0.367 0.442)
+(morphlastline 'scaled 0.361 0.442 0.367 0.433)
+(line 'scaled 0.367 0.442 0.372 0.442)
+(morphlastline 'scaled 0.367 0.433 0.372 0.442)
+(line 'scaled 0.372 0.442 0.383 0.442)
+(morphlastline 'scaled 0.372 0.442 0.383 0.442)
+(line 'scaled 0.383 0.442 0.389 0.433)
+(morphlastline 'scaled 0.383 0.442 0.389 0.433)
+(line 'scaled 0.389 0.433 0.392 0.428)
+(morphlastline 'scaled 0.389 0.433 0.383 0.423)
+(line 'scaled 0.392 0.428 0.394 0.423)
+(morphlastline 'scaled 0.383 0.423 0.394 0.423)
+(line 'scaled 0.394 0.423 0.400 0.413)
+(morphlastline 'scaled 0.394 0.423 0.400 0.413)
+(line 'scaled 0.400 0.413 0.394 0.404)
+(morphlastline 'scaled 0.400 0.413 0.394 0.404)
+(line 'scaled 0.394 0.404 0.392 0.399)
+(morphlastline 'scaled 0.394 0.404 0.383 0.404)
+(line 'scaled 0.392 0.399 0.389 0.394)
+(morphlastline 'scaled 0.383 0.404 0.389 0.394)
+(line 'scaled 0.389 0.394 0.383 0.385)
+(morphlastline 'scaled 0.389 0.394 0.383 0.385)
+(line 'scaled 0.383 0.385 0.372 0.385)
+(morphlastline 'scaled 0.383 0.385 0.372 0.385)
+(line 'scaled 0.372 0.385 0.367 0.385)
+(morphlastline 'scaled 0.372 0.385 0.367 0.394)
+(line 'scaled 0.367 0.385 0.361 0.385)
+(morphlastline 'scaled 0.367 0.394 0.361 0.385)
+(line 'scaled 0.361 0.385 0.350 0.385)
+(morphlastline 'scaled 0.361 0.385 0.350 0.385)
+(line 'scaled 0.350 0.385 0.356 0.375)
+(morphlastline 'scaled 0.350 0.385 0.356 0.375)
+(line 'scaled 0.356 0.375 0.358 0.370)
+(morphlastline 'scaled 0.356 0.375 0.350 0.365)
+(line 'scaled 0.358 0.370 0.361 0.365)
+(morphlastline 'scaled 0.350 0.365 0.361 0.365)
+(line 'scaled 0.361 0.365 0.367 0.356)
+(morphlastline 'scaled 0.361 0.365 0.367 0.356)
+(line 'scaled 0.367 0.356 0.361 0.346)
+(morphlastline 'scaled 0.367 0.356 0.361 0.346)
+(line 'scaled 0.361 0.346 0.358 0.341)
+(morphlastline 'scaled 0.361 0.346 0.350 0.346)
+(line 'scaled 0.358 0.341 0.356 0.336)
+(morphlastline 'scaled 0.350 0.346 0.356 0.336)
+(line 'scaled 0.356 0.336 0.350 0.327)
+(morphlastline 'scaled 0.356 0.336 0.350 0.327)
+(line 'scaled 0.350 0.327 0.361 0.327)
+(morphlastline 'scaled 0.350 0.327 0.361 0.327)
+(line 'scaled 0.361 0.327 0.367 0.327)
+(morphlastline 'scaled 0.361 0.327 0.367 0.317)
+(line 'scaled 0.367 0.327 0.372 0.327)
+(morphlastline 'scaled 0.367 0.317 0.372 0.327)
+(line 'scaled 0.372 0.327 0.383 0.327)
+(morphlastline 'scaled 0.372 0.327 0.383 0.327)
+(line 'scaled 0.383 0.327 0.389 0.317)
+(morphlastline 'scaled 0.383 0.327 0.389 0.317)
+(line 'scaled 0.389 0.317 0.392 0.312)
+(morphlastline 'scaled 0.389 0.317 0.383 0.308)
+(line 'scaled 0.392 0.312 0.394 0.308)
+(morphlastline 'scaled 0.383 0.308 0.394 0.308)
+(line 'scaled 0.394 0.308 0.400 0.298)
+(morphlastline 'scaled 0.394 0.308 0.400 0.298)
+(line 'scaled 0.400 0.298 0.406 0.308)
+(morphlastline 'scaled 0.400 0.298 0.406 0.308)
+(line 'scaled 0.406 0.308 0.408 0.312)
+(morphlastline 'scaled 0.406 0.308 0.417 0.308)
+(line 'scaled 0.408 0.312 0.411 0.317)
+(morphlastline 'scaled 0.417 0.308 0.411 0.317)
+(line 'scaled 0.411 0.317 0.417 0.327)
+(morphlastline 'scaled 0.411 0.317 0.417 0.327)
+(line 'scaled 0.417 0.327 0.428 0.327)
+(morphlastline 'scaled 0.417 0.327 0.428 0.327)
+(line 'scaled 0.428 0.327 0.433 0.327)
+(morphlastline 'scaled 0.428 0.327 0.433 0.317)
+(line 'scaled 0.433 0.327 0.439 0.327)
+(morphlastline 'scaled 0.433 0.317 0.439 0.327)
+(line 'scaled 0.439 0.327 0.450 0.327)
+(morphlastline 'scaled 0.439 0.327 0.450 0.327)
+(line 'scaled 0.450 0.327 0.456 0.317)
+(morphlastline 'scaled 0.450 0.327 0.456 0.317)
+(line 'scaled 0.456 0.317 0.458 0.312)
+(morphlastline 'scaled 0.456 0.317 0.450 0.308)
+(line 'scaled 0.458 0.312 0.461 0.308)
+(morphlastline 'scaled 0.450 0.308 0.461 0.308)
+(line 'scaled 0.461 0.308 0.467 0.298)
+(morphlastline 'scaled 0.461 0.308 0.467 0.298)
+(line 'scaled 0.467 0.298 0.461 0.288)
+(morphlastline 'scaled 0.467 0.298 0.461 0.288)
+(line 'scaled 0.461 0.288 0.458 0.283)
+(morphlastline 'scaled 0.461 0.288 0.450 0.288)
+(line 'scaled 0.458 0.283 0.456 0.279)
+(morphlastline 'scaled 0.450 0.288 0.456 0.279)
+(line 'scaled 0.456 0.279 0.450 0.269)
+(morphlastline 'scaled 0.456 0.279 0.450 0.269)
+(line 'scaled 0.450 0.269 0.461 0.269)
+(morphlastline 'scaled 0.450 0.269 0.461 0.269)
+(line 'scaled 0.461 0.269 0.467 0.269)
+(morphlastline 'scaled 0.461 0.269 0.467 0.259)
+(line 'scaled 0.467 0.269 0.472 0.269)
+(morphlastline 'scaled 0.467 0.259 0.472 0.269)
+(line 'scaled 0.472 0.269 0.483 0.269)
+(morphlastline 'scaled 0.472 0.269 0.483 0.269)
+(line 'scaled 0.483 0.269 0.489 0.259)
+(morphlastline 'scaled 0.483 0.269 0.489 0.259)
+(line 'scaled 0.489 0.259 0.492 0.255)
+(morphlastline 'scaled 0.489 0.259 0.483 0.250)
+(line 'scaled 0.492 0.255 0.494 0.250)
+(morphlastline 'scaled 0.483 0.250 0.494 0.250)
+(line 'scaled 0.494 0.250 0.500 0.240)
+(morphlastline 'scaled 0.494 0.250 0.500 0.240)
+(line 'scaled 0.500 0.240 0.506 0.250)
+(morphlastline 'scaled 0.500 0.240 0.506 0.250)
+(line 'scaled 0.506 0.250 0.508 0.255)
+(morphlastline 'scaled 0.506 0.250 0.517 0.250)
+(line 'scaled 0.508 0.255 0.511 0.259)
+(morphlastline 'scaled 0.517 0.250 0.511 0.259)
+(line 'scaled 0.511 0.259 0.517 0.269)
+(morphlastline 'scaled 0.511 0.259 0.517 0.269)
+(line 'scaled 0.517 0.269 0.528 0.269)
+(morphlastline 'scaled 0.517 0.269 0.528 0.269)
+(line 'scaled 0.528 0.269 0.533 0.269)
+(morphlastline 'scaled 0.528 0.269 0.533 0.259)
+(line 'scaled 0.533 0.269 0.539 0.269)
+(morphlastline 'scaled 0.533 0.259 0.539 0.269)
+(line 'scaled 0.539 0.269 0.550 0.269)
+(morphlastline 'scaled 0.539 0.269 0.550 0.269)
+(line 'scaled 0.550 0.269 0.544 0.279)
+(morphlastline 'scaled 0.550 0.269 0.544 0.279)
+(line 'scaled 0.544 0.279 0.542 0.283)
+(morphlastline 'scaled 0.544 0.279 0.550 0.288)
+(line 'scaled 0.542 0.283 0.539 0.288)
+(morphlastline 'scaled 0.550 0.288 0.539 0.288)
+(line 'scaled 0.539 0.288 0.533 0.298)
+(morphlastline 'scaled 0.539 0.288 0.533 0.298)
+(line 'scaled 0.533 0.298 0.539 0.308)
+(morphlastline 'scaled 0.533 0.298 0.539 0.308)
+(line 'scaled 0.539 0.308 0.542 0.312)
+(morphlastline 'scaled 0.539 0.308 0.550 0.308)
+(line 'scaled 0.542 0.312 0.544 0.317)
+(morphlastline 'scaled 0.550 0.308 0.544 0.317)
+(line 'scaled 0.544 0.317 0.550 0.327)
+(morphlastline 'scaled 0.544 0.317 0.550 0.327)
+(line 'scaled 0.550 0.327 0.561 0.327)
+(morphlastline 'scaled 0.550 0.327 0.561 0.327)
+(line 'scaled 0.561 0.327 0.567 0.327)
+(morphlastline 'scaled 0.561 0.327 0.567 0.317)
+(line 'scaled 0.567 0.327 0.572 0.327)
+(morphlastline 'scaled 0.567 0.317 0.572 0.327)
+(line 'scaled 0.572 0.327 0.583 0.327)
+(morphlastline 'scaled 0.572 0.327 0.583 0.327)
+(line 'scaled 0.583 0.327 0.589 0.317)
+(morphlastline 'scaled 0.583 0.327 0.589 0.317)
+(line 'scaled 0.589 0.317 0.592 0.312)
+(morphlastline 'scaled 0.589 0.317 0.583 0.308)
+(line 'scaled 0.592 0.312 0.594 0.308)
+(morphlastline 'scaled 0.583 0.308 0.594 0.308)
+(line 'scaled 0.594 0.308 0.600 0.298)
+(morphlastline 'scaled 0.594 0.308 0.600 0.298)
+(line 'scaled 0.600 0.298 0.606 0.308)
+(morphlastline 'scaled 0.600 0.298 0.606 0.308)
+(line 'scaled 0.606 0.308 0.608 0.312)
+(morphlastline 'scaled 0.606 0.308 0.617 0.308)
+(line 'scaled 0.608 0.312 0.611 0.317)
+(morphlastline 'scaled 0.617 0.308 0.611 0.317)
+(line 'scaled 0.611 0.317 0.617 0.327)
+(morphlastline 'scaled 0.611 0.317 0.617 0.327)
+(line 'scaled 0.617 0.327 0.628 0.327)
+(morphlastline 'scaled 0.617 0.327 0.628 0.327)
+(line 'scaled 0.628 0.327 0.633 0.327)
+(morphlastline 'scaled 0.628 0.327 0.633 0.317)
+(line 'scaled 0.633 0.327 0.639 0.327)
+(morphlastline 'scaled 0.633 0.317 0.639 0.327)
+(line 'scaled 0.639 0.327 0.650 0.327)
+(morphlastline 'scaled 0.639 0.327 0.650 0.327)
+(line 'scaled 0.650 0.327 0.644 0.336)
+(morphlastline 'scaled 0.650 0.327 0.644 0.336)
+(line 'scaled 0.644 0.336 0.642 0.341)
+(morphlastline 'scaled 0.644 0.336 0.650 0.346)
+(line 'scaled 0.642 0.341 0.639 0.346)
+(morphlastline 'scaled 0.650 0.346 0.639 0.346)
+(line 'scaled 0.639 0.346 0.633 0.356)
+(morphlastline 'scaled 0.639 0.346 0.633 0.356)
+(line 'scaled 0.633 0.356 0.639 0.365)
+(morphlastline 'scaled 0.633 0.356 0.639 0.365)
+(line 'scaled 0.639 0.365 0.642 0.370)
+(morphlastline 'scaled 0.639 0.365 0.650 0.365)
+(line 'scaled 0.642 0.370 0.644 0.375)
+(morphlastline 'scaled 0.650 0.365 0.644 0.375)
+(line 'scaled 0.644 0.375 0.650 0.385)
+(morphlastline 'scaled 0.644 0.375 0.650 0.385)
+(line 'scaled 0.650 0.385 0.639 0.385)
+(morphlastline 'scaled 0.650 0.385 0.639 0.385)
+(line 'scaled 0.639 0.385 0.633 0.385)
+(morphlastline 'scaled 0.639 0.385 0.633 0.394)
+(line 'scaled 0.633 0.385 0.628 0.385)
+(morphlastline 'scaled 0.633 0.394 0.628 0.385)
+(line 'scaled 0.628 0.385 0.617 0.385)
+(morphlastline 'scaled 0.628 0.385 0.617 0.385)
+(line 'scaled 0.617 0.385 0.611 0.394)
+(morphlastline 'scaled 0.617 0.385 0.611 0.394)
+(line 'scaled 0.611 0.394 0.608 0.399)
+(morphlastline 'scaled 0.611 0.394 0.617 0.404)
+(line 'scaled 0.608 0.399 0.606 0.404)
+(morphlastline 'scaled 0.617 0.404 0.606 0.404)
+(line 'scaled 0.606 0.404 0.600 0.413)
+(morphlastline 'scaled 0.606 0.404 0.600 0.413)
+(line 'scaled 0.600 0.413 0.606 0.423)
+(morphlastline 'scaled 0.600 0.413 0.606 0.423)
+(line 'scaled 0.606 0.423 0.608 0.428)
+(morphlastline 'scaled 0.606 0.423 0.617 0.423)
+(line 'scaled 0.608 0.428 0.611 0.433)
+(morphlastline 'scaled 0.617 0.423 0.611 0.433)
+(line 'scaled 0.611 0.433 0.617 0.442)
+(morphlastline 'scaled 0.611 0.433 0.617 0.442)
+(line 'scaled 0.617 0.442 0.628 0.442)
+(morphlastline 'scaled 0.617 0.442 0.628 0.442)
+(line 'scaled 0.628 0.442 0.633 0.442)
+(morphlastline 'scaled 0.628 0.442 0.633 0.433)
+(line 'scaled 0.633 0.442 0.639 0.442)
+(morphlastline 'scaled 0.633 0.433 0.639 0.442)
+(line 'scaled 0.639 0.442 0.650 0.442)
+(morphlastline 'scaled 0.639 0.442 0.650 0.442)
+(line 'scaled 0.650 0.442 0.644 0.452)
+(morphlastline 'scaled 0.650 0.442 0.644 0.452)
+(line 'scaled 0.644 0.452 0.642 0.457)
+(morphlastline 'scaled 0.644 0.452 0.650 0.462)
+(line 'scaled 0.642 0.457 0.639 0.462)
+(morphlastline 'scaled 0.650 0.462 0.639 0.462)
+(line 'scaled 0.639 0.462 0.633 0.471)
+(morphlastline 'scaled 0.639 0.462 0.633 0.471)
+(line 'scaled 0.633 0.471 0.639 0.481)
+(morphlastline 'scaled 0.633 0.471 0.639 0.481)
+(line 'scaled 0.639 0.481 0.642 0.486)
+(morphlastline 'scaled 0.639 0.481 0.650 0.481)
+(line 'scaled 0.642 0.486 0.644 0.490)
+(morphlastline 'scaled 0.650 0.481 0.644 0.490)
+(line 'scaled 0.644 0.490 0.650 0.500)
+(morphlastline 'scaled 0.644 0.490 0.650 0.500)
+(line 'scaled 0.650 0.500 0.661 0.500)
+(morphlastline 'scaled 0.650 0.500 0.661 0.500)
+(line 'scaled 0.661 0.500 0.667 0.500)
+(morphlastline 'scaled 0.661 0.500 0.667 0.490)
+(line 'scaled 0.667 0.500 0.672 0.500)
+(morphlastline 'scaled 0.667 0.490 0.672 0.500)
+(line 'scaled 0.672 0.500 0.683 0.500)
+(morphlastline 'scaled 0.672 0.500 0.683 0.500)
+(line 'scaled 0.683 0.500 0.689 0.490)
+(morphlastline 'scaled 0.683 0.500 0.689 0.490)
+(line 'scaled 0.689 0.490 0.692 0.486)
+(morphlastline 'scaled 0.689 0.490 0.683 0.481)
+(line 'scaled 0.692 0.486 0.694 0.481)
+(morphlastline 'scaled 0.683 0.481 0.694 0.481)
+(line 'scaled 0.694 0.481 0.700 0.471)
+(morphlastline 'scaled 0.694 0.481 0.700 0.471)
+(line 'scaled 0.700 0.471 0.706 0.481)
+(morphlastline 'scaled 0.700 0.471 0.706 0.481)
+(line 'scaled 0.706 0.481 0.708 0.486)
+(morphlastline 'scaled 0.706 0.481 0.717 0.481)
+(line 'scaled 0.708 0.486 0.711 0.490)
+(morphlastline 'scaled 0.717 0.481 0.711 0.490)
+(line 'scaled 0.711 0.490 0.717 0.500)
+(morphlastline 'scaled 0.711 0.490 0.717 0.500)
+(line 'scaled 0.717 0.500 0.728 0.500)
+(morphlastline 'scaled 0.717 0.500 0.728 0.500)
+(line 'scaled 0.728 0.500 0.733 0.500)
+(morphlastline 'scaled 0.728 0.500 0.733 0.490)
+(line 'scaled 0.733 0.500 0.739 0.500)
+(morphlastline 'scaled 0.733 0.490 0.739 0.500)
+(line 'scaled 0.739 0.500 0.750 0.500)
+(morphlastline 'scaled 0.739 0.500 0.750 0.500)
+(line 'scaled 0.750 0.500 0.756 0.490)
+(morphlastline 'scaled 0.750 0.500 0.756 0.490)
+(line 'scaled 0.756 0.490 0.758 0.486)
+(morphlastline 'scaled 0.756 0.490 0.750 0.481)
+(line 'scaled 0.758 0.486 0.761 0.481)
+(morphlastline 'scaled 0.750 0.481 0.761 0.481)
+(line 'scaled 0.761 0.481 0.767 0.471)
+(morphlastline 'scaled 0.761 0.481 0.767 0.471)
+(line 'scaled 0.767 0.471 0.761 0.462)
+(morphlastline 'scaled 0.767 0.471 0.761 0.462)
+(line 'scaled 0.761 0.462 0.758 0.457)
+(morphlastline 'scaled 0.761 0.462 0.750 0.462)
+(line 'scaled 0.758 0.457 0.756 0.452)
+(morphlastline 'scaled 0.750 0.462 0.756 0.452)
+(line 'scaled 0.756 0.452 0.750 0.442)
+(morphlastline 'scaled 0.756 0.452 0.750 0.442)
+(line 'scaled 0.750 0.442 0.761 0.442)
+(morphlastline 'scaled 0.750 0.442 0.761 0.442)
+(line 'scaled 0.761 0.442 0.767 0.442)
+(morphlastline 'scaled 0.761 0.442 0.767 0.433)
+(line 'scaled 0.767 0.442 0.772 0.442)
+(morphlastline 'scaled 0.767 0.433 0.772 0.442)
+(line 'scaled 0.772 0.442 0.783 0.442)
+(morphlastline 'scaled 0.772 0.442 0.783 0.442)
+(line 'scaled 0.783 0.442 0.789 0.433)
+(morphlastline 'scaled 0.783 0.442 0.789 0.433)
+(line 'scaled 0.789 0.433 0.792 0.428)
+(morphlastline 'scaled 0.789 0.433 0.783 0.423)
+(line 'scaled 0.792 0.428 0.794 0.423)
+(morphlastline 'scaled 0.783 0.423 0.794 0.423)
+(line 'scaled 0.794 0.423 0.800 0.413)
+(morphlastline 'scaled 0.794 0.423 0.800 0.413)
+(line 'scaled 0.800 0.413 0.806 0.423)
+(morphlastline 'scaled 0.800 0.413 0.806 0.423)
+(line 'scaled 0.806 0.423 0.808 0.428)
+(morphlastline 'scaled 0.806 0.423 0.817 0.423)
+(line 'scaled 0.808 0.428 0.811 0.433)
+(morphlastline 'scaled 0.817 0.423 0.811 0.433)
+(line 'scaled 0.811 0.433 0.817 0.442)
+(morphlastline 'scaled 0.811 0.433 0.817 0.442)
+(line 'scaled 0.817 0.442 0.828 0.442)
+(morphlastline 'scaled 0.817 0.442 0.828 0.442)
+(line 'scaled 0.828 0.442 0.833 0.442)
+(morphlastline 'scaled 0.828 0.442 0.833 0.433)
+(line 'scaled 0.833 0.442 0.839 0.442)
+(morphlastline 'scaled 0.833 0.433 0.839 0.442)
+(line 'scaled 0.839 0.442 0.850 0.442)
+(morphlastline 'scaled 0.839 0.442 0.850 0.442)
+(line 'scaled 0.850 0.442 0.844 0.452)
+(morphlastline 'scaled 0.850 0.442 0.844 0.452)
+(line 'scaled 0.844 0.452 0.842 0.457)
+(morphlastline 'scaled 0.844 0.452 0.850 0.462)
+(line 'scaled 0.842 0.457 0.839 0.462)
+(morphlastline 'scaled 0.850 0.462 0.839 0.462)
+(line 'scaled 0.839 0.462 0.833 0.471)
+(morphlastline 'scaled 0.839 0.462 0.833 0.471)
+(line 'scaled 0.833 0.471 0.839 0.481)
+(morphlastline 'scaled 0.833 0.471 0.839 0.481)
+(line 'scaled 0.839 0.481 0.842 0.486)
+(morphlastline 'scaled 0.839 0.481 0.850 0.481)
+(line 'scaled 0.842 0.486 0.844 0.490)
+(morphlastline 'scaled 0.850 0.481 0.844 0.490)
+(line 'scaled 0.844 0.490 0.850 0.500)
+(morphlastline 'scaled 0.844 0.490 0.850 0.500)
+(line 'scaled 0.850 0.500 0.861 0.500)
+(morphlastline 'scaled 0.850 0.500 0.861 0.500)
+(line 'scaled 0.861 0.500 0.867 0.500)
+(morphlastline 'scaled 0.861 0.500 0.867 0.490)
+(line 'scaled 0.867 0.500 0.872 0.500)
+(morphlastline 'scaled 0.867 0.490 0.872 0.500)
+(line 'scaled 0.872 0.500 0.883 0.500)
+(morphlastline 'scaled 0.872 0.500 0.883 0.500)
+(line 'scaled 0.883 0.500 0.889 0.490)
+(morphlastline 'scaled 0.883 0.500 0.889 0.490)
+(line 'scaled 0.889 0.490 0.892 0.486)
+(morphlastline 'scaled 0.889 0.490 0.883 0.481)
+(line 'scaled 0.892 0.486 0.894 0.481)
+(morphlastline 'scaled 0.883 0.481 0.894 0.481)
+(line 'scaled 0.894 0.481 0.900 0.471)
+(morphlastline 'scaled 0.894 0.481 0.900 0.471)
+(line 'scaled 0.900 0.471 0.906 0.481)
+(morphlastline 'scaled 0.900 0.471 0.906 0.481)
+(line 'scaled 0.906 0.481 0.908 0.486)
+(morphlastline 'scaled 0.906 0.481 0.917 0.481)
+(line 'scaled 0.908 0.486 0.911 0.490)
+(morphlastline 'scaled 0.917 0.481 0.911 0.490)
+(line 'scaled 0.911 0.490 0.917 0.500)
+(morphlastline 'scaled 0.911 0.490 0.917 0.500)
+(line 'scaled 0.917 0.500 0.928 0.500)
+(morphlastline 'scaled 0.917 0.500 0.928 0.500)
+(line 'scaled 0.928 0.500 0.933 0.500)
+(morphlastline 'scaled 0.928 0.500 0.933 0.490)
+(line 'scaled 0.933 0.500 0.939 0.500)
+(morphlastline 'scaled 0.933 0.490 0.939 0.500)
+(line 'scaled 0.939 0.500 0.950 0.500)
+(morphlastline 'scaled 0.939 0.500 0.950 0.500)
diff --git a/tutorial/flake5.xhf b/tutorial/flake5.xhf
new file mode 100644
index 0000000..2279449
--- /dev/null
+++ b/tutorial/flake5.xhf
@@ -0,0 +1,1281 @@
+(linekey 0)
+(morphline 'scaled 0.200 0.300 0.207 0.300)
+(morphline 'scaled 0.207 0.300 0.211 0.294)
+(morphline 'scaled 0.211 0.294 0.215 0.300)
+(morphline 'scaled 0.215 0.300 0.222 0.300)
+(morphline 'scaled 0.222 0.300 0.226 0.294)
+(morphline 'scaled 0.226 0.294 0.222 0.287)
+(morphline 'scaled 0.222 0.287 0.230 0.287)
+(morphline 'scaled 0.230 0.287 0.233 0.281)
+(morphline 'scaled 0.233 0.281 0.237 0.287)
+(morphline 'scaled 0.237 0.287 0.244 0.287)
+(morphline 'scaled 0.244 0.287 0.241 0.294)
+(morphline 'scaled 0.241 0.294 0.244 0.300)
+(morphline 'scaled 0.244 0.300 0.252 0.300)
+(morphline 'scaled 0.252 0.300 0.256 0.294)
+(morphline 'scaled 0.256 0.294 0.259 0.300)
+(morphline 'scaled 0.259 0.300 0.267 0.300)
+(morphline 'scaled 0.267 0.300 0.270 0.294)
+(morphline 'scaled 0.270 0.294 0.267 0.287)
+(morphline 'scaled 0.267 0.287 0.274 0.287)
+(morphline 'scaled 0.274 0.287 0.278 0.281)
+(morphline 'scaled 0.278 0.281 0.274 0.274)
+(morphline 'scaled 0.274 0.274 0.267 0.274)
+(morphline 'scaled 0.267 0.274 0.270 0.268)
+(morphline 'scaled 0.270 0.268 0.267 0.262)
+(morphline 'scaled 0.267 0.262 0.274 0.262)
+(morphline 'scaled 0.274 0.262 0.278 0.255)
+(morphline 'scaled 0.278 0.255 0.281 0.262)
+(morphline 'scaled 0.281 0.262 0.289 0.262)
+(morphline 'scaled 0.289 0.262 0.293 0.255)
+(morphline 'scaled 0.293 0.255 0.289 0.249)
+(morphline 'scaled 0.289 0.249 0.296 0.249)
+(morphline 'scaled 0.296 0.249 0.300 0.242)
+(morphline 'scaled 0.300 0.242 0.304 0.249)
+(morphline 'scaled 0.304 0.249 0.311 0.249)
+(morphline 'scaled 0.311 0.249 0.307 0.255)
+(morphline 'scaled 0.307 0.255 0.311 0.262)
+(morphline 'scaled 0.311 0.262 0.319 0.262)
+(morphline 'scaled 0.319 0.262 0.322 0.255)
+(morphline 'scaled 0.322 0.255 0.326 0.262)
+(morphline 'scaled 0.326 0.262 0.333 0.262)
+(morphline 'scaled 0.333 0.262 0.330 0.268)
+(morphline 'scaled 0.330 0.268 0.333 0.274)
+(morphline 'scaled 0.333 0.274 0.326 0.274)
+(morphline 'scaled 0.326 0.274 0.322 0.281)
+(morphline 'scaled 0.322 0.281 0.326 0.287)
+(morphline 'scaled 0.326 0.287 0.333 0.287)
+(morphline 'scaled 0.333 0.287 0.330 0.294)
+(morphline 'scaled 0.330 0.294 0.333 0.300)
+(morphline 'scaled 0.333 0.300 0.341 0.300)
+(morphline 'scaled 0.341 0.300 0.344 0.294)
+(morphline 'scaled 0.344 0.294 0.348 0.300)
+(morphline 'scaled 0.348 0.300 0.356 0.300)
+(morphline 'scaled 0.356 0.300 0.359 0.294)
+(morphline 'scaled 0.359 0.294 0.356 0.287)
+(morphline 'scaled 0.356 0.287 0.363 0.287)
+(morphline 'scaled 0.363 0.287 0.367 0.281)
+(morphline 'scaled 0.367 0.281 0.370 0.287)
+(morphline 'scaled 0.370 0.287 0.378 0.287)
+(morphline 'scaled 0.378 0.287 0.374 0.294)
+(morphline 'scaled 0.374 0.294 0.378 0.300)
+(morphline 'scaled 0.378 0.300 0.385 0.300)
+(morphline 'scaled 0.385 0.300 0.389 0.294)
+(morphline 'scaled 0.389 0.294 0.393 0.300)
+(morphline 'scaled 0.393 0.300 0.400 0.300)
+(morphline 'scaled 0.400 0.300 0.404 0.294)
+(morphline 'scaled 0.404 0.294 0.400 0.287)
+(morphline 'scaled 0.400 0.287 0.407 0.287)
+(morphline 'scaled 0.407 0.287 0.411 0.281)
+(morphline 'scaled 0.411 0.281 0.407 0.274)
+(morphline 'scaled 0.407 0.274 0.400 0.274)
+(morphline 'scaled 0.400 0.274 0.404 0.268)
+(morphline 'scaled 0.404 0.268 0.400 0.262)
+(morphline 'scaled 0.400 0.262 0.407 0.262)
+(morphline 'scaled 0.407 0.262 0.411 0.255)
+(morphline 'scaled 0.411 0.255 0.415 0.262)
+(morphline 'scaled 0.415 0.262 0.422 0.262)
+(morphline 'scaled 0.422 0.262 0.426 0.255)
+(morphline 'scaled 0.426 0.255 0.422 0.249)
+(morphline 'scaled 0.422 0.249 0.430 0.249)
+(morphline 'scaled 0.430 0.249 0.433 0.242)
+(morphline 'scaled 0.433 0.242 0.430 0.236)
+(morphline 'scaled 0.430 0.236 0.422 0.236)
+(morphline 'scaled 0.422 0.236 0.426 0.229)
+(morphline 'scaled 0.426 0.229 0.422 0.223)
+(morphline 'scaled 0.422 0.223 0.415 0.223)
+(morphline 'scaled 0.415 0.223 0.411 0.229)
+(morphline 'scaled 0.411 0.229 0.407 0.223)
+(morphline 'scaled 0.407 0.223 0.400 0.223)
+(morphline 'scaled 0.400 0.223 0.404 0.217)
+(morphline 'scaled 0.404 0.217 0.400 0.210)
+(morphline 'scaled 0.400 0.210 0.407 0.210)
+(morphline 'scaled 0.407 0.210 0.411 0.204)
+(morphline 'scaled 0.411 0.204 0.407 0.197)
+(morphline 'scaled 0.407 0.197 0.400 0.197)
+(morphline 'scaled 0.400 0.197 0.404 0.191)
+(morphline 'scaled 0.404 0.191 0.400 0.185)
+(morphline 'scaled 0.400 0.185 0.407 0.185)
+(morphline 'scaled 0.407 0.185 0.411 0.178)
+(morphline 'scaled 0.411 0.178 0.415 0.185)
+(morphline 'scaled 0.415 0.185 0.422 0.185)
+(morphline 'scaled 0.422 0.185 0.426 0.178)
+(morphline 'scaled 0.426 0.178 0.422 0.172)
+(morphline 'scaled 0.422 0.172 0.430 0.172)
+(morphline 'scaled 0.430 0.172 0.433 0.165)
+(morphline 'scaled 0.433 0.165 0.437 0.172)
+(morphline 'scaled 0.437 0.172 0.444 0.172)
+(morphline 'scaled 0.444 0.172 0.441 0.178)
+(morphline 'scaled 0.441 0.178 0.444 0.185)
+(morphline 'scaled 0.444 0.185 0.452 0.185)
+(morphline 'scaled 0.452 0.185 0.456 0.178)
+(morphline 'scaled 0.456 0.178 0.459 0.185)
+(morphline 'scaled 0.459 0.185 0.467 0.185)
+(morphline 'scaled 0.467 0.185 0.470 0.178)
+(morphline 'scaled 0.470 0.178 0.467 0.172)
+(morphline 'scaled 0.467 0.172 0.474 0.172)
+(morphline 'scaled 0.474 0.172 0.478 0.165)
+(morphline 'scaled 0.478 0.165 0.474 0.159)
+(morphline 'scaled 0.474 0.159 0.467 0.159)
+(morphline 'scaled 0.467 0.159 0.470 0.152)
+(morphline 'scaled 0.470 0.152 0.467 0.146)
+(morphline 'scaled 0.467 0.146 0.474 0.146)
+(morphline 'scaled 0.474 0.146 0.478 0.140)
+(morphline 'scaled 0.478 0.140 0.481 0.146)
+(morphline 'scaled 0.481 0.146 0.489 0.146)
+(morphline 'scaled 0.489 0.146 0.493 0.140)
+(morphline 'scaled 0.493 0.140 0.489 0.133)
+(morphline 'scaled 0.489 0.133 0.496 0.133)
+(morphline 'scaled 0.496 0.133 0.500 0.127)
+(morphline 'scaled 0.500 0.127 0.504 0.133)
+(morphline 'scaled 0.504 0.133 0.511 0.133)
+(morphline 'scaled 0.511 0.133 0.507 0.140)
+(morphline 'scaled 0.507 0.140 0.511 0.146)
+(morphline 'scaled 0.511 0.146 0.519 0.146)
+(morphline 'scaled 0.519 0.146 0.522 0.140)
+(morphline 'scaled 0.522 0.140 0.526 0.146)
+(morphline 'scaled 0.526 0.146 0.533 0.146)
+(morphline 'scaled 0.533 0.146 0.530 0.152)
+(morphline 'scaled 0.530 0.152 0.533 0.159)
+(morphline 'scaled 0.533 0.159 0.526 0.159)
+(morphline 'scaled 0.526 0.159 0.522 0.165)
+(morphline 'scaled 0.522 0.165 0.526 0.172)
+(morphline 'scaled 0.526 0.172 0.533 0.172)
+(morphline 'scaled 0.533 0.172 0.530 0.178)
+(morphline 'scaled 0.530 0.178 0.533 0.185)
+(morphline 'scaled 0.533 0.185 0.541 0.185)
+(morphline 'scaled 0.541 0.185 0.544 0.178)
+(morphline 'scaled 0.544 0.178 0.548 0.185)
+(morphline 'scaled 0.548 0.185 0.556 0.185)
+(morphline 'scaled 0.556 0.185 0.559 0.178)
+(morphline 'scaled 0.559 0.178 0.556 0.172)
+(morphline 'scaled 0.556 0.172 0.563 0.172)
+(morphline 'scaled 0.563 0.172 0.567 0.165)
+(morphline 'scaled 0.567 0.165 0.570 0.172)
+(morphline 'scaled 0.570 0.172 0.578 0.172)
+(morphline 'scaled 0.578 0.172 0.574 0.178)
+(morphline 'scaled 0.574 0.178 0.578 0.185)
+(morphline 'scaled 0.578 0.185 0.585 0.185)
+(morphline 'scaled 0.585 0.185 0.589 0.178)
+(morphline 'scaled 0.589 0.178 0.593 0.185)
+(morphline 'scaled 0.593 0.185 0.600 0.185)
+(morphline 'scaled 0.600 0.185 0.596 0.191)
+(morphline 'scaled 0.596 0.191 0.600 0.197)
+(morphline 'scaled 0.600 0.197 0.593 0.197)
+(morphline 'scaled 0.593 0.197 0.589 0.204)
+(morphline 'scaled 0.589 0.204 0.593 0.210)
+(morphline 'scaled 0.593 0.210 0.600 0.210)
+(morphline 'scaled 0.600 0.210 0.596 0.217)
+(morphline 'scaled 0.596 0.217 0.600 0.223)
+(morphline 'scaled 0.600 0.223 0.593 0.223)
+(morphline 'scaled 0.593 0.223 0.589 0.229)
+(morphline 'scaled 0.589 0.229 0.585 0.223)
+(morphline 'scaled 0.585 0.223 0.578 0.223)
+(morphline 'scaled 0.578 0.223 0.574 0.229)
+(morphline 'scaled 0.574 0.229 0.578 0.236)
+(morphline 'scaled 0.578 0.236 0.570 0.236)
+(morphline 'scaled 0.570 0.236 0.567 0.242)
+(morphline 'scaled 0.567 0.242 0.570 0.249)
+(morphline 'scaled 0.570 0.249 0.578 0.249)
+(morphline 'scaled 0.578 0.249 0.574 0.255)
+(morphline 'scaled 0.574 0.255 0.578 0.262)
+(morphline 'scaled 0.578 0.262 0.585 0.262)
+(morphline 'scaled 0.585 0.262 0.589 0.255)
+(morphline 'scaled 0.589 0.255 0.593 0.262)
+(morphline 'scaled 0.593 0.262 0.600 0.262)
+(morphline 'scaled 0.600 0.262 0.596 0.268)
+(morphline 'scaled 0.596 0.268 0.600 0.274)
+(morphline 'scaled 0.600 0.274 0.593 0.274)
+(morphline 'scaled 0.593 0.274 0.589 0.281)
+(morphline 'scaled 0.589 0.281 0.593 0.287)
+(morphline 'scaled 0.593 0.287 0.600 0.287)
+(morphline 'scaled 0.600 0.287 0.596 0.294)
+(morphline 'scaled 0.596 0.294 0.600 0.300)
+(morphline 'scaled 0.600 0.300 0.607 0.300)
+(morphline 'scaled 0.607 0.300 0.611 0.294)
+(morphline 'scaled 0.611 0.294 0.615 0.300)
+(morphline 'scaled 0.615 0.300 0.622 0.300)
+(morphline 'scaled 0.622 0.300 0.626 0.294)
+(morphline 'scaled 0.626 0.294 0.622 0.287)
+(morphline 'scaled 0.622 0.287 0.630 0.287)
+(morphline 'scaled 0.630 0.287 0.633 0.281)
+(morphline 'scaled 0.633 0.281 0.637 0.287)
+(morphline 'scaled 0.637 0.287 0.644 0.287)
+(morphline 'scaled 0.644 0.287 0.641 0.294)
+(morphline 'scaled 0.641 0.294 0.644 0.300)
+(morphline 'scaled 0.644 0.300 0.652 0.300)
+(morphline 'scaled 0.652 0.300 0.656 0.294)
+(morphline 'scaled 0.656 0.294 0.659 0.300)
+(morphline 'scaled 0.659 0.300 0.667 0.300)
+(morphline 'scaled 0.667 0.300 0.670 0.294)
+(morphline 'scaled 0.670 0.294 0.667 0.287)
+(morphline 'scaled 0.667 0.287 0.674 0.287)
+(morphline 'scaled 0.674 0.287 0.678 0.281)
+(morphline 'scaled 0.678 0.281 0.674 0.274)
+(morphline 'scaled 0.674 0.274 0.667 0.274)
+(morphline 'scaled 0.667 0.274 0.670 0.268)
+(morphline 'scaled 0.670 0.268 0.667 0.262)
+(morphline 'scaled 0.667 0.262 0.674 0.262)
+(morphline 'scaled 0.674 0.262 0.678 0.255)
+(morphline 'scaled 0.678 0.255 0.681 0.262)
+(morphline 'scaled 0.681 0.262 0.689 0.262)
+(morphline 'scaled 0.689 0.262 0.693 0.255)
+(morphline 'scaled 0.693 0.255 0.689 0.249)
+(morphline 'scaled 0.689 0.249 0.696 0.249)
+(morphline 'scaled 0.696 0.249 0.700 0.242)
+(morphline 'scaled 0.700 0.242 0.704 0.249)
+(morphline 'scaled 0.704 0.249 0.711 0.249)
+(morphline 'scaled 0.711 0.249 0.707 0.255)
+(morphline 'scaled 0.707 0.255 0.711 0.262)
+(morphline 'scaled 0.711 0.262 0.719 0.262)
+(morphline 'scaled 0.719 0.262 0.722 0.255)
+(morphline 'scaled 0.722 0.255 0.726 0.262)
+(morphline 'scaled 0.726 0.262 0.733 0.262)
+(morphline 'scaled 0.733 0.262 0.730 0.268)
+(morphline 'scaled 0.730 0.268 0.733 0.274)
+(morphline 'scaled 0.733 0.274 0.726 0.274)
+(morphline 'scaled 0.726 0.274 0.722 0.281)
+(morphline 'scaled 0.722 0.281 0.726 0.287)
+(morphline 'scaled 0.726 0.287 0.733 0.287)
+(morphline 'scaled 0.733 0.287 0.730 0.294)
+(morphline 'scaled 0.730 0.294 0.733 0.300)
+(morphline 'scaled 0.733 0.300 0.741 0.300)
+(morphline 'scaled 0.741 0.300 0.744 0.294)
+(morphline 'scaled 0.744 0.294 0.748 0.300)
+(morphline 'scaled 0.748 0.300 0.756 0.300)
+(morphline 'scaled 0.756 0.300 0.759 0.294)
+(morphline 'scaled 0.759 0.294 0.756 0.287)
+(morphline 'scaled 0.756 0.287 0.763 0.287)
+(morphline 'scaled 0.763 0.287 0.767 0.281)
+(morphline 'scaled 0.767 0.281 0.770 0.287)
+(morphline 'scaled 0.770 0.287 0.778 0.287)
+(morphline 'scaled 0.778 0.287 0.774 0.294)
+(morphline 'scaled 0.774 0.294 0.778 0.300)
+(morphline 'scaled 0.778 0.300 0.785 0.300)
+(morphline 'scaled 0.785 0.300 0.789 0.294)
+(morphline 'scaled 0.789 0.294 0.793 0.300)
+(morphline 'scaled 0.793 0.300 0.800 0.300)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.300 0.796 0.306)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.796 0.306 0.800 0.313)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.313 0.793 0.313)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.313 0.789 0.319)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.319 0.793 0.326)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.326 0.800 0.326)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.326 0.796 0.332)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.796 0.332 0.800 0.338)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.338 0.793 0.338)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.338 0.789 0.345)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.345 0.785 0.338)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.785 0.338 0.778 0.338)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.338 0.774 0.345)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.774 0.345 0.778 0.351)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.351 0.770 0.351)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.770 0.351 0.767 0.358)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.767 0.358 0.770 0.364)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.770 0.364 0.778 0.364)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.364 0.774 0.371)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.774 0.371 0.778 0.377)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.377 0.785 0.377)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.785 0.377 0.789 0.371)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.371 0.793 0.377)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.377 0.800 0.377)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.377 0.796 0.383)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.796 0.383 0.800 0.390)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.390 0.793 0.390)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.390 0.789 0.396)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.396 0.793 0.403)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.403 0.800 0.403)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.403 0.796 0.409)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.796 0.409 0.800 0.415)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.415 0.793 0.415)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.415 0.789 0.422)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.422 0.785 0.415)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.785 0.415 0.778 0.415)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.415 0.774 0.422)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.774 0.422 0.778 0.428)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.428 0.770 0.428)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.770 0.428 0.767 0.435)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.767 0.435 0.763 0.428)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.763 0.428 0.756 0.428)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.756 0.428 0.759 0.422)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.759 0.422 0.756 0.415)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.756 0.415 0.748 0.415)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.748 0.415 0.744 0.422)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.744 0.422 0.741 0.415)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.741 0.415 0.733 0.415)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.415 0.730 0.422)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.730 0.422 0.733 0.428)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.428 0.726 0.428)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.726 0.428 0.722 0.435)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.722 0.435 0.726 0.441)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.726 0.441 0.733 0.441)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.441 0.730 0.448)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.730 0.448 0.733 0.454)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.454 0.726 0.454)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.726 0.454 0.722 0.460)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.722 0.460 0.719 0.454)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.719 0.454 0.711 0.454)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.711 0.454 0.707 0.460)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.707 0.460 0.711 0.467)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.711 0.467 0.704 0.467)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.704 0.467 0.700 0.473)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.700 0.473 0.704 0.480)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.704 0.480 0.711 0.480)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.711 0.480 0.707 0.486)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.707 0.486 0.711 0.492)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.711 0.492 0.719 0.492)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.719 0.492 0.722 0.486)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.722 0.486 0.726 0.492)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.726 0.492 0.733 0.492)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.492 0.730 0.499)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.730 0.499 0.733 0.505)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.505 0.726 0.505)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.726 0.505 0.722 0.512)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.722 0.512 0.726 0.518)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.726 0.518 0.733 0.518)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.518 0.730 0.525)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.730 0.525 0.733 0.531)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.531 0.741 0.531)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.741 0.531 0.744 0.525)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.744 0.525 0.748 0.531)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.748 0.531 0.756 0.531)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.756 0.531 0.759 0.525)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.759 0.525 0.756 0.518)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.756 0.518 0.763 0.518)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.763 0.518 0.767 0.512)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.767 0.512 0.770 0.518)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.770 0.518 0.778 0.518)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.518 0.774 0.525)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.774 0.525 0.778 0.531)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.531 0.785 0.531)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.785 0.531 0.789 0.525)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.525 0.793 0.531)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.531 0.800 0.531)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.531 0.796 0.537)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.796 0.537 0.800 0.544)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.544 0.793 0.544)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.544 0.789 0.550)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.550 0.793 0.557)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.557 0.800 0.557)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.557 0.796 0.563)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.796 0.563 0.800 0.569)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.569 0.793 0.569)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.569 0.789 0.576)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.576 0.785 0.569)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.785 0.569 0.778 0.569)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.569 0.774 0.576)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.774 0.576 0.778 0.582)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.582 0.770 0.582)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.770 0.582 0.767 0.589)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.767 0.589 0.770 0.595)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.770 0.595 0.778 0.595)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.595 0.774 0.602)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.774 0.602 0.778 0.608)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.608 0.785 0.608)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.785 0.608 0.789 0.602)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.602 0.793 0.608)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.608 0.800 0.608)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.608 0.796 0.614)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.796 0.614 0.800 0.621)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.621 0.793 0.621)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.621 0.789 0.627)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.627 0.793 0.634)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.634 0.800 0.634)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.634 0.796 0.640)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.796 0.640 0.800 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.800 0.646 0.793 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.793 0.646 0.789 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.789 0.653 0.785 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.785 0.646 0.778 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.646 0.774 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.774 0.653 0.778 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.778 0.659 0.770 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.770 0.659 0.767 0.666)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.767 0.666 0.763 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.763 0.659 0.756 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.756 0.659 0.759 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.759 0.653 0.756 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.756 0.646 0.748 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.748 0.646 0.744 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.744 0.653 0.741 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.741 0.646 0.733 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.646 0.730 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.730 0.653 0.733 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.659 0.726 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.726 0.659 0.722 0.666)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.722 0.666 0.726 0.672)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.726 0.672 0.733 0.672)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.672 0.730 0.678)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.730 0.678 0.733 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.733 0.685 0.726 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.726 0.685 0.722 0.691)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.722 0.691 0.719 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.719 0.685 0.711 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.711 0.685 0.707 0.691)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.707 0.691 0.711 0.698)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.711 0.698 0.704 0.698)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.704 0.698 0.700 0.704)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.700 0.704 0.696 0.698)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.696 0.698 0.689 0.698)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.689 0.698 0.693 0.691)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.693 0.691 0.689 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.689 0.685 0.681 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.681 0.685 0.678 0.691)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.678 0.691 0.674 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.674 0.685 0.667 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.667 0.685 0.670 0.678)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.670 0.678 0.667 0.672)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.667 0.672 0.674 0.672)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.674 0.672 0.678 0.666)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.678 0.666 0.674 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.674 0.659 0.667 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.667 0.659 0.670 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.670 0.653 0.667 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.667 0.646 0.659 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.659 0.646 0.656 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.656 0.653 0.652 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.652 0.646 0.644 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.644 0.646 0.641 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.641 0.653 0.644 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.644 0.659 0.637 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.637 0.659 0.633 0.666)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.633 0.666 0.630 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.630 0.659 0.622 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.622 0.659 0.626 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.626 0.653 0.622 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.622 0.646 0.615 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.615 0.646 0.611 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.611 0.653 0.607 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.607 0.646 0.600 0.646)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.600 0.646 0.596 0.653)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.596 0.653 0.600 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.600 0.659 0.593 0.659)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.593 0.659 0.589 0.666)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.589 0.666 0.593 0.672)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.593 0.672 0.600 0.672)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.600 0.672 0.596 0.678)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.596 0.678 0.600 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.600 0.685 0.593 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.593 0.685 0.589 0.691)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.589 0.691 0.585 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.585 0.685 0.578 0.685)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.578 0.685 0.574 0.691)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.574 0.691 0.578 0.698)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.578 0.698 0.570 0.698)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.570 0.698 0.567 0.704)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.567 0.704 0.570 0.711)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.570 0.711 0.578 0.711)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.578 0.711 0.574 0.717)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.574 0.717 0.578 0.723)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.578 0.723 0.585 0.723)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.585 0.723 0.589 0.717)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.589 0.717 0.593 0.723)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.593 0.723 0.600 0.723)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.600 0.723 0.596 0.730)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.596 0.730 0.600 0.736)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.600 0.736 0.593 0.736)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.593 0.736 0.589 0.743)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.589 0.743 0.593 0.749)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.593 0.749 0.600 0.749)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.600 0.749 0.596 0.755)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.596 0.755 0.600 0.762)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.600 0.762 0.593 0.762)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.593 0.762 0.589 0.768)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.589 0.768 0.585 0.762)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.585 0.762 0.578 0.762)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.578 0.762 0.574 0.768)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.574 0.768 0.578 0.775)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.578 0.775 0.570 0.775)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.570 0.775 0.567 0.781)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.567 0.781 0.563 0.775)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.563 0.775 0.556 0.775)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.556 0.775 0.559 0.768)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.559 0.768 0.556 0.762)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.556 0.762 0.548 0.762)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.548 0.762 0.544 0.768)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.544 0.768 0.541 0.762)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.541 0.762 0.533 0.762)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.533 0.762 0.530 0.768)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.530 0.768 0.533 0.775)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.533 0.775 0.526 0.775)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.526 0.775 0.522 0.781)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.522 0.781 0.526 0.788)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.526 0.788 0.533 0.788)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.533 0.788 0.530 0.794)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.530 0.794 0.533 0.800)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.533 0.800 0.526 0.800)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.526 0.800 0.522 0.807)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.522 0.807 0.519 0.800)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.519 0.800 0.511 0.800)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.511 0.800 0.507 0.807)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.507 0.807 0.511 0.813)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.511 0.813 0.504 0.813)
+(line 'scaled 0.950 0.500 0.950 0.500)
+(morphlastline 'scaled 0.504 0.813 0.500 0.820)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.500 0.820 0.496 0.813)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.496 0.813 0.489 0.813)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.489 0.813 0.493 0.807)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.493 0.807 0.489 0.800)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.489 0.800 0.481 0.800)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.481 0.800 0.478 0.807)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.478 0.807 0.474 0.800)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.474 0.800 0.467 0.800)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.467 0.800 0.470 0.794)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.470 0.794 0.467 0.788)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.467 0.788 0.474 0.788)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.474 0.788 0.478 0.781)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.478 0.781 0.474 0.775)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.474 0.775 0.467 0.775)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.467 0.775 0.470 0.768)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.470 0.768 0.467 0.762)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.467 0.762 0.459 0.762)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.459 0.762 0.456 0.768)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.456 0.768 0.452 0.762)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.452 0.762 0.444 0.762)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.444 0.762 0.441 0.768)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.441 0.768 0.444 0.775)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.444 0.775 0.437 0.775)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.437 0.775 0.433 0.781)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.433 0.781 0.430 0.775)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.430 0.775 0.422 0.775)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.422 0.775 0.426 0.768)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.426 0.768 0.422 0.762)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.422 0.762 0.415 0.762)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.415 0.762 0.411 0.768)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.411 0.768 0.407 0.762)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.407 0.762 0.400 0.762)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.400 0.762 0.404 0.755)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.404 0.755 0.400 0.749)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.400 0.749 0.407 0.749)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.407 0.749 0.411 0.743)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.411 0.743 0.407 0.736)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.407 0.736 0.400 0.736)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.400 0.736 0.404 0.730)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.404 0.730 0.400 0.723)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.400 0.723 0.407 0.723)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.407 0.723 0.411 0.717)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.411 0.717 0.415 0.723)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.415 0.723 0.422 0.723)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.422 0.723 0.426 0.717)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.426 0.717 0.422 0.711)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.422 0.711 0.430 0.711)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.430 0.711 0.433 0.704)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.433 0.704 0.430 0.698)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.430 0.698 0.422 0.698)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.422 0.698 0.426 0.691)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.426 0.691 0.422 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.422 0.685 0.415 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.415 0.685 0.411 0.691)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.411 0.691 0.407 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.407 0.685 0.400 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.400 0.685 0.404 0.678)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.404 0.678 0.400 0.672)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.400 0.672 0.407 0.672)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.407 0.672 0.411 0.666)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.411 0.666 0.407 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.407 0.659 0.400 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.400 0.659 0.404 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.404 0.653 0.400 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.400 0.646 0.393 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.393 0.646 0.389 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.389 0.653 0.385 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.385 0.646 0.378 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.378 0.646 0.374 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.374 0.653 0.378 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.378 0.659 0.370 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.370 0.659 0.367 0.666)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.367 0.666 0.363 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.363 0.659 0.356 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.356 0.659 0.359 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.359 0.653 0.356 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.356 0.646 0.348 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.348 0.646 0.344 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.344 0.653 0.341 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.341 0.646 0.333 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.333 0.646 0.330 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.330 0.653 0.333 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.333 0.659 0.326 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.326 0.659 0.322 0.666)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.322 0.666 0.326 0.672)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.326 0.672 0.333 0.672)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.333 0.672 0.330 0.678)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.330 0.678 0.333 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.333 0.685 0.326 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.326 0.685 0.322 0.691)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.322 0.691 0.319 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.319 0.685 0.311 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.311 0.685 0.307 0.691)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.307 0.691 0.311 0.698)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.311 0.698 0.304 0.698)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.304 0.698 0.300 0.704)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.300 0.704 0.296 0.698)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.296 0.698 0.289 0.698)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.289 0.698 0.293 0.691)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.293 0.691 0.289 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.289 0.685 0.281 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.281 0.685 0.278 0.691)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.278 0.691 0.274 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.274 0.685 0.267 0.685)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.685 0.270 0.678)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.270 0.678 0.267 0.672)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.672 0.274 0.672)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.274 0.672 0.278 0.666)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.278 0.666 0.274 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.274 0.659 0.267 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.659 0.270 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.270 0.653 0.267 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.646 0.259 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.259 0.646 0.256 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.256 0.653 0.252 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.252 0.646 0.244 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.244 0.646 0.241 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.241 0.653 0.244 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.244 0.659 0.237 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.237 0.659 0.233 0.666)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.233 0.666 0.230 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.230 0.659 0.222 0.659)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.659 0.226 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.226 0.653 0.222 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.646 0.215 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.215 0.646 0.211 0.653)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.653 0.207 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.646 0.200 0.646)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.646 0.204 0.640)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.204 0.640 0.200 0.634)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.634 0.207 0.634)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.634 0.211 0.627)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.627 0.207 0.621)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.621 0.200 0.621)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.621 0.204 0.614)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.204 0.614 0.200 0.608)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.608 0.207 0.608)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.608 0.211 0.602)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.602 0.215 0.608)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.215 0.608 0.222 0.608)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.608 0.226 0.602)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.226 0.602 0.222 0.595)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.595 0.230 0.595)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.230 0.595 0.233 0.589)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.233 0.589 0.230 0.582)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.230 0.582 0.222 0.582)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.582 0.226 0.576)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.226 0.576 0.222 0.569)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.569 0.215 0.569)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.215 0.569 0.211 0.576)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.576 0.207 0.569)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.569 0.200 0.569)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.569 0.204 0.563)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.204 0.563 0.200 0.557)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.557 0.207 0.557)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.557 0.211 0.550)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.550 0.207 0.544)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.544 0.200 0.544)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.544 0.204 0.537)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.204 0.537 0.200 0.531)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.531 0.207 0.531)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.531 0.211 0.525)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.525 0.215 0.531)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.215 0.531 0.222 0.531)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.531 0.226 0.525)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.226 0.525 0.222 0.518)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.518 0.230 0.518)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.230 0.518 0.233 0.512)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.233 0.512 0.237 0.518)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.237 0.518 0.244 0.518)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.244 0.518 0.241 0.525)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.241 0.525 0.244 0.531)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.244 0.531 0.252 0.531)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.252 0.531 0.256 0.525)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.256 0.525 0.259 0.531)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.259 0.531 0.267 0.531)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.531 0.270 0.525)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.270 0.525 0.267 0.518)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.518 0.274 0.518)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.274 0.518 0.278 0.512)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.278 0.512 0.274 0.505)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.274 0.505 0.267 0.505)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.505 0.270 0.499)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.270 0.499 0.267 0.492)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.492 0.274 0.492)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.274 0.492 0.278 0.486)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.278 0.486 0.281 0.492)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.281 0.492 0.289 0.492)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.289 0.492 0.293 0.486)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.293 0.486 0.289 0.480)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.289 0.480 0.296 0.480)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.296 0.480 0.300 0.473)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.300 0.473 0.296 0.467)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.296 0.467 0.289 0.467)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.289 0.467 0.293 0.460)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.293 0.460 0.289 0.454)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.289 0.454 0.281 0.454)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.281 0.454 0.278 0.460)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.278 0.460 0.274 0.454)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.274 0.454 0.267 0.454)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.454 0.270 0.448)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.270 0.448 0.267 0.441)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.441 0.274 0.441)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.274 0.441 0.278 0.435)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.278 0.435 0.274 0.428)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.274 0.428 0.267 0.428)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.428 0.270 0.422)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.270 0.422 0.267 0.415)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.267 0.415 0.259 0.415)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.259 0.415 0.256 0.422)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.256 0.422 0.252 0.415)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.252 0.415 0.244 0.415)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.244 0.415 0.241 0.422)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.241 0.422 0.244 0.428)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.244 0.428 0.237 0.428)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.237 0.428 0.233 0.435)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.233 0.435 0.230 0.428)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.230 0.428 0.222 0.428)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.428 0.226 0.422)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.226 0.422 0.222 0.415)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.415 0.215 0.415)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.215 0.415 0.211 0.422)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.422 0.207 0.415)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.415 0.200 0.415)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.415 0.204 0.409)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.204 0.409 0.200 0.403)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.403 0.207 0.403)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.403 0.211 0.396)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.396 0.207 0.390)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.390 0.200 0.390)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.390 0.204 0.383)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.204 0.383 0.200 0.377)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.377 0.207 0.377)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.377 0.211 0.371)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.371 0.215 0.377)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.215 0.377 0.222 0.377)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.377 0.226 0.371)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.226 0.371 0.222 0.364)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.364 0.230 0.364)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.230 0.364 0.233 0.358)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.233 0.358 0.230 0.351)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.230 0.351 0.222 0.351)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.351 0.226 0.345)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.226 0.345 0.222 0.338)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.222 0.338 0.215 0.338)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.215 0.338 0.211 0.345)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.345 0.207 0.338)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.338 0.200 0.338)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.338 0.204 0.332)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.204 0.332 0.200 0.326)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.326 0.207 0.326)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.326 0.211 0.319)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.211 0.319 0.207 0.313)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.207 0.313 0.200 0.313)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.200 0.313 0.204 0.306)
+(line 'scaled 0.050 0.500 0.050 0.500)
+(morphlastline 'scaled 0.204 0.306 0.200 0.300)
diff --git a/tutorial/flaketh.xhf b/tutorial/flaketh.xhf
new file mode 100644
index 0000000..be5839e
--- /dev/null
+++ b/tutorial/flaketh.xhf
@@ -0,0 +1,64 @@
+(line 'scaled 0.050 0.500 0.061 0.500)
+(line 'scaled 0.061 0.500 0.067 0.490)
+(line 'scaled 0.067 0.490 0.072 0.500)
+(line 'scaled 0.072 0.500 0.083 0.500)
+(line 'scaled 0.083 0.500 0.089 0.490)
+(line 'scaled 0.089 0.490 0.083 0.481)
+(line 'scaled 0.083 0.481 0.094 0.481)
+(line 'scaled 0.094 0.481 0.100 0.471)
+(line 'scaled 0.100 0.471 0.106 0.481)
+(line 'scaled 0.106 0.481 0.117 0.481)
+(line 'scaled 0.117 0.481 0.111 0.490)
+(line 'scaled 0.111 0.490 0.117 0.500)
+(line 'scaled 0.117 0.500 0.128 0.500)
+(line 'scaled 0.128 0.500 0.133 0.490)
+(line 'scaled 0.133 0.490 0.139 0.500)
+(line 'scaled 0.139 0.500 0.150 0.500)
+(line 'scaled 0.150 0.500 0.156 0.490)
+(line 'scaled 0.156 0.490 0.150 0.481)
+(line 'scaled 0.150 0.481 0.161 0.481)
+(line 'scaled 0.161 0.481 0.167 0.471)
+(line 'scaled 0.167 0.471 0.161 0.462)
+(line 'scaled 0.161 0.462 0.150 0.462)
+(line 'scaled 0.150 0.462 0.156 0.452)
+(line 'scaled 0.156 0.452 0.150 0.442)
+(line 'scaled 0.150 0.442 0.161 0.442)
+(line 'scaled 0.161 0.442 0.167 0.433)
+(line 'scaled 0.167 0.433 0.172 0.442)
+(line 'scaled 0.172 0.442 0.183 0.442)
+(line 'scaled 0.183 0.442 0.189 0.433)
+(line 'scaled 0.189 0.433 0.183 0.423)
+(line 'scaled 0.183 0.423 0.194 0.423)
+(line 'scaled 0.194 0.423 0.200 0.413)
+(line 'scaled 0.200 0.413 0.206 0.423)
+(line 'scaled 0.206 0.423 0.217 0.423)
+(line 'scaled 0.217 0.423 0.211 0.433)
+(line 'scaled 0.211 0.433 0.217 0.442)
+(line 'scaled 0.217 0.442 0.228 0.442)
+(line 'scaled 0.228 0.442 0.233 0.433)
+(line 'scaled 0.233 0.433 0.239 0.442)
+(line 'scaled 0.239 0.442 0.250 0.442)
+(line 'scaled 0.250 0.442 0.244 0.452)
+(line 'scaled 0.244 0.452 0.250 0.462)
+(line 'scaled 0.250 0.462 0.239 0.462)
+(line 'scaled 0.239 0.462 0.233 0.471)
+(line 'scaled 0.233 0.471 0.239 0.481)
+(line 'scaled 0.239 0.481 0.250 0.481)
+(line 'scaled 0.250 0.481 0.244 0.490)
+(line 'scaled 0.244 0.490 0.250 0.500)
+(line 'scaled 0.250 0.500 0.261 0.500)
+(line 'scaled 0.261 0.500 0.267 0.490)
+(line 'scaled 0.267 0.490 0.272 0.500)
+(line 'scaled 0.272 0.500 0.283 0.500)
+(line 'scaled 0.283 0.500 0.289 0.490)
+(line 'scaled 0.289 0.490 0.283 0.481)
+(line 'scaled 0.283 0.481 0.294 0.481)
+(line 'scaled 0.294 0.481 0.300 0.471)
+(line 'scaled 0.300 0.471 0.306 0.481)
+(line 'scaled 0.306 0.481 0.317 0.481)
+(line 'scaled 0.317 0.481 0.311 0.490)
+(line 'scaled 0.311 0.490 0.317 0.500)
+(line 'scaled 0.317 0.500 0.328 0.500)
+(line 'scaled 0.328 0.500 0.333 0.490)
+(line 'scaled 0.333 0.490 0.339 0.500)
+(line 'scaled 0.339 0.500 0.350 0.500)
diff --git a/tutorial/fmath.xaf b/tutorial/fmath.xaf
new file mode 100644
index 0000000..e1331b5
--- /dev/null
+++ b/tutorial/fmath.xaf
@@ -0,0 +1,2 @@
+(load "dimension.xaf")
+(load "escape.xaf")
diff --git a/tutorial/fourfr.xaf b/tutorial/fourfr.xaf
new file mode 100644
index 0000000..8ebc4e7
--- /dev/null
+++ b/tutorial/fourfr.xaf
@@ -0,0 +1,131 @@
+;Other fractal types in Xaos - part 2
+;Animation file is made by Arpad Fekete
+;This file was made in January 2006
+(initstate)
+(clearscreen)
+(textposition 'center 'middle)
+(message "fourfr1")
+(usleep 5000000)
+
+(initstate)
+(formula 'mbar)
+(view -0.008173 -0.0008828 2.521 3.529)
+(textposition 'center 'bottom)
+(message "fourfr2")
+(usleep 3500000)
+
+(maxiter 600)
+(morphview 0.7403532753 -1.278489744 4.16355183E-06 5.828972562E-06)
+(textposition 'center 'bottom)
+(message "fourfr3")
+(usleep 7000000)
+(usleep 2000000)
+
+(outcoloring 9)
+(juliaseed 0.1802021025485444686 -0.44307513109390114856)
+(julia #t)
+(view 0.05842 -0.05412 1.992 2.789)
+(textposition 'center 'bottom)
+(message "fourfr4")
+(usleep 3500000)
+
+(juliaseed 0.26887131923227432749 0.60098372000587916913)
+(view 0.1005 0.005699 2.299 3.219)
+(textposition 'center 'bottom)
+(message "fourfr5")
+(usleep 3500000)
+
+(initstate)
+(defaultpalette 0)
+(formula 'mlambda)
+(maxiter 300)
+(view 0.5 0 2.5 5.5)
+(textposition 'center 'bottom)
+(message "fourfr6")
+(usleep 4000000)
+
+(morphview 2.8552699225 -0.56941678268 1.9237422042E-07 4.2322328492E-07)
+(textposition 'center 'bottom)
+(message "fourfr7")
+(usleep 7000000)
+(usleep 2000000)
+
+(initstate)
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 300)
+(plane 3)
+(view 1.154 -0.006172 5.417 5.417)
+(textposition 'center 'bottom)
+(message "fourfr8")
+(usleep 3500000)
+
+(initstate)
+(defaultpalette 0)
+(formula 'mlambda)
+(maxiter 300)
+(julia #f)
+(view 0.5 0 2.5 5.5)
+(textposition 'center 'bottom)
+(message "fourfr9")
+(usleep 3500000)
+
+(fastjulia #t)
+(juliaseed 0.5 0.0)
+(morphjulia 1.0 0.1)
+(textposition 'center 'bottom)
+(message "fourfr10")
+(usleep 7000000)
+(usleep 3000000)
+
+(initstate)
+(defaultpalette 0)
+(formula 'manowar)
+(maxiter 500)
+(view -0.0008188 0.009274 1.13 1.13)
+(textposition 'center 'bottom)
+(message "fourfr11")
+(usleep 4500000)
+
+(morphview -0.10867742 -0.012469446 0.00013476001 0.00013476001)
+(textposition 'center 'bottom)
+(message "fourfr12")
+(usleep 7000000)
+(usleep 2500000)
+
+(initstate)
+(defaultpalette 0)
+(formula 'manowar)
+(juliaseed -0.0023217465439582729087 -0.033693018764877235869)
+(maxiter 500)
+(julia #t)
+(view 0.1991 -0.0862 2.648 2.648)
+(textposition 'center 'bottom)
+(message "fourfr13")
+(usleep 5000000)
+
+(initstate)
+(defaultpalette 0)
+(formula 'spider)
+(maxiter 500)
+(view 0 0 2.5 4.5)
+(textposition 'center 'bottom)
+(message "fourfr14")
+(usleep 5000000)
+
+(morphview -0.302249620182 -0.324228671386 2.66220615653E-08 4.79197108175E-08)
+(textposition 'center 'bottom)
+(message "fourfr15")
+(usleep 7000000)
+(usleep 2000000)
+
+(initstate)
+(defaultpalette 0)
+(formula 'spider)
+(juliaseed 0.017075814143026497253 0.10954690170039975937)
+(maxiter 500)
+(julia #t)
+(view -0.3892 0.08496 2.459 4.426)
+(textposition 'center 'bottom)
+(message "fourfr16")
+(usleep 4000000)
diff --git a/tutorial/fractal.xaf b/tutorial/fractal.xaf
new file mode 100644
index 0000000..75ff7c5
--- /dev/null
+++ b/tutorial/fractal.xaf
@@ -0,0 +1,27 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+
+(load "intro.xaf")
+(load "mset.xaf")
+(load "julia.xaf")
+(load "power.xaf")
+(load "newton.xaf")
+(load "barnsley.xaf")
+(load "phoenix.xaf")
+(load "octo.xaf")
+(load "magnet.xaf")
+
+(clearscreen)
+(textposition 'center 'middle)
+(message "end")
+(usleep 4000000)
+
+(clearscreen)
+(message "fcopyright")
+(textsleep)
+
+(clearscreen)
+(message "suggestions")
+(textsleep)
+(initstate)
diff --git a/tutorial/head.xhf b/tutorial/head.xhf
new file mode 100644
index 0000000..5e8b02b
--- /dev/null
+++ b/tutorial/head.xhf
@@ -0,0 +1 @@
+(initstate)
diff --git a/tutorial/incolor.xaf b/tutorial/incolor.xaf
new file mode 100644
index 0000000..ed49046
--- /dev/null
+++ b/tutorial/incolor.xaf
@@ -0,0 +1,139 @@
+; XaoS features overview by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(textposition 'center 'middle)
+(clearscreen)
+(message "incolor1")
+(textsleep)
+(clearscreen)
+(message "incolor2")
+(textsleep)
+(clearscreen)
+(message "incolor3")
+(textsleep)
+(clearscreen)
+(message "incolor4")
+(textsleep)
+(display)
+(clearscreen)
+(message "zmag")
+(textsleep)
+(display)
+
+(defaultpalette 0)
+(formula 'mandel)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 1)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+(usleep 2000000)
+
+
+(palette 1 908613446 0)
+(formula 'octal)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 1)
+(plane 0)
+(view 0.0055066 0.0073919 0.53036 0.53036)
+(usleep 2000000)
+
+(palette 1 1374335931 0)
+(formula 'mandel3)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(juliaseed 0.51635174418604654479 -0.47500000000000003054)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 7)
+(incoloring 1)
+(julia #t)
+(plane 0)
+(view 0.29424 -0.50094 0.2024 0.2024)
+(usleep 2000000)
+
+(palette 1 1296014835 0)
+(formula 'mandel)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(angle 206)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 1)
+(plane 0)
+(view 0.11921 0.61908 0.12714 0.12714)
+(usleep 2000000)
+
+(palette 1 1296014835 0)
+(formula 'barnsley)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(juliaseed 0.99818082191979386436 0.0070950445135695779271)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 1)
+(plane 3)
+(view 1.122 0.01506 5.317 5.317)
+(usleep 2000000)
+
+(palette 1 1296014835 0)
+(formula 'barnsley)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(juliaseed 0.99818082191979386436 0.0070950445135695779271)
+(angle -278)
+(autorotate #f)
+(maxiter 51)
+(outcoloring 0)
+(incoloring 1)
+(plane 2)
+(view -1.669 -0.2679 5.317 5.317)
+(usleep 2000000)
+
+(palette 1 2075544141 0)
+(formula 'barnsley)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(juliaseed 1.0193608855903043253 -0.12168203319766217848)
+(angle -91.6)
+(autorotate #f)
+(maxiter 33)
+(outcoloring 0)
+(incoloring 1)
+(plane 0)
+(view 0.49 -0.1048 1.093 1.093)
+(usleep 2000000)
+
+(palette 1 178743984 0)
+(formula 'barnsley)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(juliaseed 0.0033200691478789011099 1.1344324381483784749)
+(autorotate #f)
+(maxiter 14)
+(outcoloring 0)
+(incoloring 1)
+(plane 1)
+(view 0.1426 -0.07279 4.545 4.545)
+(usleep 2000000)
+
+(load "head.xhf")
+(load "innew.xhf")
diff --git a/tutorial/innew.xhf b/tutorial/innew.xhf
new file mode 100644
index 0000000..6c5bf97
--- /dev/null
+++ b/tutorial/innew.xhf
@@ -0,0 +1,376 @@
+(clearscreen)
+(message "innew1")
+(textsleep)
+(display)
+
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 2)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+(usleep 2000000)
+
+
+(palette 1 2092457178 0)
+(formula 'barnsley)
+(juliaseed -1.0116279069767442512 0)
+(maxiter 69)
+(outcoloring 0)
+(incoloring 2)
+(plane 1)
+(view -0.07681 -0.03293 5.373 5.373)
+(usleep 2000000)
+
+(palette 1 2050013617 0)
+(formula 'barnsley)
+(juliaseed 1.0320331828899885792 0.0011529625858033702327)
+(maxiter 109)
+(outcoloring 0)
+(incoloring 2)
+(plane 1)
+(view 0.315 1.49 37.9 37.9)
+(usleep 2000000)
+
+(palette 1 1635547336 0)
+(formula 'mandel3)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 1)
+(plane 0)
+(view 0.010765 -1.0423 0.53774 0.53774)
+(usleep 2000000)
+
+(palette 1 440291327 0)
+(formula 'barnsley)
+(juliaseed -1.0116279069767442512 0)
+(maxiter 69)
+(outcoloring 0)
+(incoloring 2)
+(plane 3)
+(view 0.9819 -0.01391 2.869 2.869)
+(usleep 2000000)
+
+(palette 1 2046286303 0)
+(formula 'magnet)
+(angle 92.6)
+(maxiter 3)
+(outcoloring 0)
+(incoloring 2)
+(plane 0)
+(view 1.5222 0.0039414 0.58324 0.85541)
+(usleep 2000000)
+
+(defaultpalette 0)
+(formula 'newton)
+(angle -89)
+(maxiter 3)
+(outcoloring 0)
+(incoloring 2)
+(plane 4)
+(view -0.3512 -0.06769 2.5 2.5)
+(usleep 2000000)
+; PAUSE
+(usleep 2000000)
+(clearscreen)
+(usleep 1000000)
+(textposition 'center 'middle)
+(clearscreen)
+(filter 'truecolor #t)
+(message "innew2")
+(textsleep)
+(display)
+
+(palette 1 316179017 0)
+(formula 'mandel)
+(angle -269)
+(maxiter 23)
+(outcoloring 7)
+(incoloring 3)
+(plane 0)
+(view -1.1191 0.018307 0.73169 0.73169)
+(usleep 2000000)
+
+(palette 1 1803744779 0)
+(formula 'barnsley)
+(juliaseed 0.91678779069767447766 0)
+(maxiter 23)
+(outcoloring 7)
+(incoloring 3)
+(plane 3)
+(view 1.004 0.0282 3.964 3.964)
+(usleep 2000000)
+
+
+
+(palette 1 1859447053 0)
+(formula 'barnsley)
+(juliaseed -0.001876576933332209287 -0.98171852920553827619)
+(maxiter 23)
+(outcoloring 7)
+(incoloring 3)
+(plane 5)
+(view 0.01817 -0.02144 1.726 1.726)
+(usleep 2000000)
+
+(palette 1 1682767831 0)
+(formula 'barnsley)
+(juliaseed 0.00091118775333588145765 1.1002594413894568254)
+(angle 269)
+(maxiter 29)
+(outcoloring 0)
+(incoloring 3)
+(plane 2)
+(view 1.016 -0.01369 4.394 4.394)
+(usleep 2000000)
+
+
+
+(palette 1 1119368436 0)
+(formula 'barnsley)
+(juliaseed -0.015201007401092396162 1.0175332998187412144)
+(angle 53.3)
+(maxiter 23)
+(outcoloring 7)
+(incoloring 3)
+(plane 0)
+(view -0.02133 -0.02183 1.838 1.838)
+(usleep 2000000)
+
+
+(palette 1 80287465 0)
+(filter 'edge #f)
+(filter 'edge2 #f)
+(filter 'starfield #f)
+(filter 'stereogram #f)
+(filter 'interlace #f)
+(filter 'blur #f)
+(formula 'barnsley)
+(juliaseed 0.010537790697674419326 -1.0000000000000000644)
+(maxiter 29)
+(outcoloring 0)
+(incoloring 3)
+(plane 0)
+(view 0.99367 0.0082224 0.18176 0.18176)
+(usleep 2000000)
+
+(palette 1 968576081 0)
+(formula 'barnsley)
+(angle 269)
+(maxiter 4)
+(outcoloring 0)
+(incoloring 3)
+(julia #f)
+(plane 6)
+(view 0.673 -0.08436 4.728 4.728)
+(usleep 2000000)
+
+(palette 1 1643640198 0)
+(formula 'barnsley)
+(juliaseed -0.041208426610812590712 0.99591053493170438997)
+(angle 269)
+(maxiter 31)
+(outcoloring 0)
+(incoloring 3)
+(plane 1)
+(view 0.001472 0.0498 1.796 1.796)
+(usleep 2000000)
+
+(palette 1 138178840 0)
+(formula 'barnsley)
+(juliaseed 0.56081884115315299691 -0.89205234389379667564)
+(angle 269)
+(maxiter 31)
+(outcoloring 0)
+(incoloring 3)
+(plane 0)
+(view -0.03214 0.1208 2.07 2.07)
+(usleep 2000000)
+
+(palette 1 1481811987 0)
+(formula 'barnsley)
+(juliaseed -1.0245174137601370517 -0.022967925537881418383)
+(angle -55.2)
+(maxiter 31)
+(outcoloring 0)
+(incoloring 3)
+(plane 6)
+(view 0.194 2.18 17.8 17.8)
+(usleep 2000000)
+
+(palette 1 518577061 0)
+(formula 'barnsley)
+(juliaseed -0.99582122093023262217 -0.010416666666666667389)
+(maxiter 31)
+(outcoloring 0)
+(incoloring 3)
+(plane 0)
+(view 0.01581 -0.01563 2.5 2.5)
+(usleep 2000000)
+
+(palette 1 518577061 0)
+(formula 'barnsley)
+(angle -33.3)
+(maxiter 31)
+(outcoloring 0)
+(incoloring 3)
+(julia #f)
+(plane 0)
+(view 0.607805 -1.06162 0.0167152 0.0167152)
+(usleep 2000000)
+
+(palette 1 2038512389 0)
+(formula 'barnsley)
+(juliaseed 0.99846306178704001907 0.57668952404741158693)
+(maxiter 23)
+(outcoloring 0)
+(incoloring 3)
+(plane 3)
+(view 0.6589 0.2169 1.823 1.823)
+(usleep 4000000)
+
+(filter 'truecolor #f)
+; PAUSE
+(usleep 2000000)
+(clearscreen)
+(usleep 1000000)
+(textposition 'center 'middle)
+(clearscreen)
+(filter 'truecolor #t)
+(message "innew3")
+(textsleep)
+(display)
+
+(palette 3 468582392 0)
+(formula 'barnsley)
+(juliaseed -0.010537790697674419217 -1.212500000000000078)
+(angle 271)
+(maxiter 9)
+(outcoloring 0)
+(incoloring 4)
+(plane 6)
+(view 0.9442 -0.01611 1.387 1.387)
+(usleep 3000000)
+(palette 3 1742583910 0)
+(formula 'barnsley)
+(juliaseed 0.010537790697674419326 -1.0375000000000000668)
+(angle -216)
+(maxiter 9)
+(outcoloring 0)
+(incoloring 4)
+(plane 6)
+(view -0.743 0.164 12.5 12.5)
+
+(usleep 3000000)
+(palette 3 1922881361 0)
+(formula 'mandel9)
+(juliaseed 0.0052688957935183619152 -0.91151897227867659647)
+(angle 67.7)
+(maxiter 4)
+(outcoloring 0)
+(incoloring 8)
+(julia #t)
+(plane 6)
+(view 2.3932 -0.56 0.2259 0.2259)
+
+(usleep 3000000)
+(palette 2 1535806032 0)
+(formula 'barnsley)
+(juliaseed -0.67135237886336130721 0.92851329576250411335)
+(angle -128)
+(maxiter 8)
+(outcoloring 0)
+(incoloring 9)
+(plane 0)
+(view -0.04962 0.03751 1.198 1.198)
+
+(usleep 3000000)
+(palette 1 846255931 0)
+(formula 'barnsley)
+(juliaseed 0.074439009100257388105 0.88620092354082617898)
+(angle 123)
+(maxiter 3)
+(outcoloring 0)
+(incoloring 5)
+(plane 6)
+(view 0.3535 0.5206 7.212 7.212)
+
+(usleep 3000000)
+(palette 2 6684175 0)
+(formula 'barnsley)
+(juliaseed 0.074439009100257388105 0.88620092354082617898)
+(angle 310)
+(maxiter 3)
+(outcoloring 0)
+(incoloring 5)
+(plane 6)
+(view 0.9466 0.09311 5.669 5.669)
+
+(usleep 3000000)
+(palette 2 1422922994 0)
+(formula 'barnsley)
+(juliaseed 0.047900685112174212223 -1.1176182980173389645)
+(angle 228)
+(maxiter 5)
+(outcoloring 0)
+(incoloring 5)
+(plane 1)
+(view -0.1973 0.1771 4.156 4.156)
+
+(usleep 3000000)
+(palette 3 253325190 0)
+(formula 'octal)
+(angle -89.5)
+(maxiter 16)
+(outcoloring 0)
+(incoloring 6)
+(plane 6)
+(view 0.80469 0.0042014 0.8064 0.8064)
+
+(usleep 3000000)
+(palette 3 613694942 0)
+(formula 'barnsley)
+(angle -268)
+(maxiter 11)
+(outcoloring 0)
+(incoloring 6)
+(julia #f)
+(plane 6)
+(view 6.5 -0.688 15.2 15.2)
+
+(usleep 3000000)
+(palette 2 1521309623 0)
+(formula 'barnsley)
+(juliaseed 0.40294328013732376469 -0.45674577975254680885)
+(angle -270)
+(maxiter 1)
+(outcoloring 0)
+(incoloring 6)
+(plane 2)
+(view -1.776 -0.0682 4.625 4.625)
+
+(usleep 3000000)
+(palette 2 839761076 0)
+(formula 'barnsley)
+(juliaseed -0.93786337209302331614 0.41250000000000002658)
+(angle -135)
+(maxiter 1)
+(outcoloring 0)
+(incoloring 6)
+(plane 5)
+(view 0.01039 0.1092 2.344 2.344)
+
+(usleep 3000000)
+(palette 3 891744458 0)
+(formula 'barnsley)
+(juliaseed -0.0049611145721308544951 0.99265333408822306973)
+(angle -271)
+(maxiter 6)
+(outcoloring 0)
+(incoloring 7)
+(plane 2)
+(view -1.868 0.01462 5.271 5.271)
+(usleep 4000000)
+(filter 'truecolor #f)
+
diff --git a/tutorial/intro.xaf b/tutorial/intro.xaf
new file mode 100644
index 0000000..81a8448
--- /dev/null
+++ b/tutorial/intro.xaf
@@ -0,0 +1,186 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(defaultpalette 0)
+(load "head.xhf")
+(load "keys.xhf")
+
+(range 50)
+(formula 'barnsley)
+(angle 0)
+(maxiter 7)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view 0.63179 0.75369 0.41932 0.41932)
+
+(clearscreen)
+(message "fractal")
+(usleep 5000000)
+(clearscreen)
+(message "fractal1")
+(textsleep)
+(clearscreen)
+(message "fractal2")
+(textsleep)
+(clearscreen)
+(message "fractal3")
+(textsleep)
+(clearscreen)
+(message "fractal4")
+(textsleep)
+(clearscreen)
+
+
+(message "fractal5")
+(textsleep)
+(maxiter 9)
+(display)
+(message "fractal6")
+(textsleep)
+(maxiter 11)
+(message "fractal7")
+(textsleep)
+(maxiter 12)
+(message "fractal8")
+(textsleep)
+(display)
+(maxiter 13)
+(usleep 1000000)
+(maxiter 14)
+(usleep 500000)
+(maxiter 15)
+(usleep 200000)
+(maxiter 17)
+(usleep 200000)
+(maxiter 20)
+(usleep 200000)
+(maxiter 25)
+(textposition 'center 'bottom)
+(message "fractal9")
+(textsleep)
+(display)
+(message "facts")
+(textsleep)
+(display)
+(usleep 1000000)
+(message "fact1")
+(textsleep)
+(display)
+(morphview 0.0 0.0 2.5 2.5)
+(usleep 6000000)
+(wait)
+(display)
+(message "fact2")
+(textsleep)
+(display)
+(message "fact3")
+(textsleep)
+(display)
+;(message "fact4")
+;(textsleep)
+(display)
+(message "fact5")
+(textsleep)
+(display)
+(message "fact6")
+(textsleep)
+(display)
+(usleep 1000000)
+(clearscreen)
+(usleep 1000000)
+;(textposition 'center 'middle)
+(message "fmath4")
+(textsleep)
+;(clearscreen)
+;(usleep 1000000)
+(message "fmath5")
+(textsleep)
+(clearscreen)
+(textposition 'center 'bottom)
+(message "fmath6")
+(linekey 0)
+(line 'scaled 0.05 0.5 0.05 0.5)
+(morphlastline 'scaled 0.05 0.5 0.95 0.5)
+(usleep 1000000)
+(textsleep)
+(clearscreen)
+(load "flake1.xhf")
+(message "fmath7")
+(usleep 1000000)
+(textsleep)
+(message "fmath8")
+(textsleep)
+(message "fmath9")
+(textsleep)
+(clearscreen)
+(load "flake2.xhf")
+(message "fmath10")
+(usleep 1000000)
+(textsleep)
+(clearscreen)
+(load "flake3.xhf")
+(message "fmath11")
+(usleep 500000)
+(clearscreen)
+(load "flake4.xhf")
+(message "fmath12")
+(usleep 500000)
+(textsleep)
+(message "fmath13")
+(textsleep)
+(message "fmath14")
+(textsleep)
+(load "flake5.xhf")
+(usleep 2000000)
+(text "")
+(usleep 2000000)
+
+(message "tree1")
+(textsleep)
+(clearscreen)
+(textposition 'center 'bottom)
+(message "tree2")
+(line 'scaled 0.500 0.800 0.500 0.500)
+(line 'scaled 0.500 0.500 0.500 0.200)
+(line 'scaled 0.500 0.500 0.500 0.200)
+(textsleep)
+(linekey 0)
+(morphline 'scaled 0.500 0.800 0.500 0.500)
+(morphline 'scaled 0.500 0.500 0.650 0.240)
+(morphline 'scaled 0.500 0.500 0.350 0.240)
+(usleep 1000000)
+(usleep 1000000)
+(clearscreen)
+(load "tree.xhf")
+(message "tree3")
+(usleep 3000000)
+
+(text "")
+(usleep 2000000)
+(message "nstr")
+(textsleep)
+
+(clearscreen)
+(message "nstr2")
+(line 'scaled 0 0.5 0.5 0.5)
+(line 'scaled 0.5 0.5 1 0.5)
+(textsleep)
+(message "nstr3")
+(linekey 0)
+(morphline 'scaled 0.000 0.500 0.665 0.680)
+(morphline 'scaled 0.665 0.680 1.000 0.500)
+(message "nstr3")
+(usleep 1000000)
+(textsleep)
+(load "coast.xhf")
+(message "nstr4")
+(linekey 0)
+(morphline 'scaled 0 0.5 0 0.5)
+(morphline 'scaled 1 0.5 1 0.5)
+(usleep 1000000)
+(textsleep)
+(text "")
+(usleep 1000000)
+(message "nstr5")
+(textsleep)
diff --git a/tutorial/julia.xaf b/tutorial/julia.xaf
new file mode 100644
index 0000000..f0744b0
--- /dev/null
+++ b/tutorial/julia.xaf
@@ -0,0 +1,328 @@
+(load "head.xhf")
+
+(range 65536) ; optimize speed - images here are hard to missguess
+;(palette 1 780175578 0)
+(palette 2 1449951317 0)
+(view -0.22311 -0.018983 0.54779 0.54779)
+(textposition 'center 'middle)
+(message "juliach")
+(usleep 5000000)
+(display)
+(smoothmorph 'view 0 3000000)
+(morphview -0.75 0.0 2.5 2.5)
+(usleep 2000000)
+
+(textposition 'center 'bottom)
+(message "julia")
+(textsleep)
+(display)
+(message "julia1")
+(textsleep)
+
+(display)
+(fastjulia #t)
+(juliaseed -0.75470740436081123169 0.27208353381654335628)
+(display)
+(message "julia2")
+(usleep 3000000)
+
+(display)
+(message "julia3")
+(textsleep)
+
+(display)
+(message "julia4")
+(textsleep)
+
+(display)
+(message "julia5")
+(textsleep)
+
+(display)
+(message "julia6")
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(linekey 0)
+(smoothmorph 'line 0 200000)
+(morphline 'fractal -0.788041 0.23875 -0.788041 0.305417)
+(morphline 'fractal -0.788041 0.305417 -0.721374 0.305417)
+(morphline 'fractal -0.788041 0.23875 -0.721374 0.23875)
+(morphline 'fractal -0.721374 0.305417 -0.721374 0.23875)
+(usleep 500000)
+(color 'white)
+(textsleep)
+
+(message "julia7")
+(textsleep)
+
+(smoothmorph 'line 500000 500000)
+(smoothmorph 'julia 500000 500000)
+(morphjulia 0 0)
+(linekey 0)
+(morphline 'fractal -0.0333333 -0.0333333 -0.0333333 0.0333333)
+(morphline 'fractal -0.0333333 0.0333333 0.0333333 0.0333333)
+(morphline 'fractal -0.0333333 -0.0333333 0.0333333 -0.0333333)
+(morphline 'fractal 0.0333333 0.0333333 0.0333333 -0.0333333)
+(message "julia8")
+(usleep 1000000)
+(textsleep)
+
+(smoothmorph 'line 500000 500000)
+(smoothmorph 'julia 500000 500000)
+(morphjulia -0.76053779069767441922 -0.16250000000000001043)
+(linekey 0)
+(morphline 'fractal -0.793871 -0.195833 -0.793871 -0.129167)
+(morphline 'fractal -0.793871 -0.129167 -0.727204 -0.129167)
+(morphline 'fractal -0.793871 -0.195833 -0.727204 -0.195833)
+(morphline 'fractal -0.727204 -0.129167 -0.727204 -0.195833)
+(message "julia9")
+(usleep 1000000)
+(textsleep)
+
+(message "julia10")
+(textsleep)
+
+
+(display)
+(juliaseed 0.36700581395348844398 0.025)
+(smoothmorph 'line 500000 0)
+(smoothmorph 'julia 500000 0)
+(linekey 0)
+(line 'fractal 0.333672 -0.00833333 0.333672 0.0583333)
+(line 'fractal 0.333672 0.0583333 0.400339 0.0583333)
+(line 'fractal 0.333672 -0.00833333 0.400339 -0.00833333)
+(line 'fractal 0.400339 0.0583333 0.400339 -0.00833333)
+(morphjulia 0.33539244186046518622 -0.0125)
+(linekey 0)
+(morphline 'fractal 0.302059 -0.0458333 0.302059 0.0208333)
+(morphline 'fractal 0.302059 0.0208333 0.368726 0.0208333)
+(morphline 'fractal 0.302059 -0.0458333 0.368726 -0.0458333)
+(morphline 'fractal 0.368726 0.0208333 0.368726 -0.0458333)
+(usleep 1000000)
+(smoothmorph 'line 0 0)
+(smoothmorph 'julia 0 0)
+(morphjulia 0.3775436046511628633 -0.6125)
+(linekey 0)
+(morphline 'fractal 0.34421 -0.645833 0.34421 -0.579167)
+(morphline 'fractal 0.34421 -0.579167 0.410877 -0.579167)
+(morphline 'fractal 0.34421 -0.645833 0.410877 -0.645833)
+(morphline 'fractal 0.410877 -0.579167 0.410877 -0.645833)
+(usleep 1000000)
+(morphjulia -0.086119186046511585078 -0.975)
+(linekey 0)
+(morphline 'fractal -0.119453 -1.00833 -0.119453 -0.941667)
+(morphline 'fractal -0.119453 -0.941667 -0.0527859 -0.941667)
+(morphline 'fractal -0.119453 -1.00833 -0.0527859 -1.00833)
+(morphline 'fractal -0.0527859 -0.941667 -0.0527859 -1.00833)
+(usleep 1000000)
+(morphjulia -0.59193313953488371076 -0.65)
+(linekey 0)
+(morphline 'fractal -0.625266 -0.683333 -0.625266 -0.616667)
+(morphline 'fractal -0.625266 -0.616667 -0.5586 -0.616667)
+(morphline 'fractal -0.625266 -0.683333 -0.5586 -0.683333)
+(morphline 'fractal -0.5586 -0.616667 -0.5586 -0.683333)
+(usleep 1000000)
+(morphjulia -0.76053779069767441922 -0.1375)
+(linekey 0)
+(morphline 'fractal -0.793871 -0.170833 -0.793871 -0.104167)
+(morphline 'fractal -0.793871 -0.104167 -0.727204 -0.104167)
+(morphline 'fractal -0.793871 -0.170833 -0.727204 -0.170833)
+(morphline 'fractal -0.727204 -0.104167 -0.727204 -0.170833)
+(usleep 1000000)
+(morphjulia -0.77107558139534883854 0.175)
+(linekey 0)
+(morphline 'fractal -0.804409 0.141667 -0.804409 0.208333)
+(morphline 'fractal -0.804409 0.208333 -0.737742 0.208333)
+(morphline 'fractal -0.804409 0.141667 -0.737742 0.141667)
+(morphline 'fractal -0.737742 0.208333 -0.737742 0.141667)
+(usleep 1000000)
+(morphjulia -0.57085755813953487222 0.6625)
+(linekey 0)
+(morphline 'fractal -0.604191 0.629167 -0.604191 0.695833)
+(morphline 'fractal -0.604191 0.695833 -0.537524 0.695833)
+(morphline 'fractal -0.604191 0.629167 -0.537524 0.629167)
+(morphline 'fractal -0.537524 0.695833 -0.537524 0.629167)
+(usleep 1000000)
+(morphjulia -0.10719476744186042373 0.925)
+(linekey 0)
+(morphline 'fractal -0.140528 0.891667 -0.140528 0.958333)
+(morphline 'fractal -0.140528 0.958333 -0.0738614 0.958333)
+(morphline 'fractal -0.140528 0.891667 -0.0738614 0.891667)
+(morphline 'fractal -0.0738614 0.958333 -0.0738614 0.891667)
+(usleep 1000000)
+(morphjulia 0.34593023255813960533 0.625)
+(linekey 0)
+(morphline 'fractal 0.312597 0.591667 0.312597 0.658333)
+(morphline 'fractal 0.312597 0.658333 0.379264 0.658333)
+(morphline 'fractal 0.312597 0.591667 0.379264 0.591667)
+(morphline 'fractal 0.379264 0.658333 0.379264 0.591667)
+(usleep 1000000)
+(morphjulia 0.28270348837209308981 0)
+(linekey 0)
+(morphline 'fractal 0.24937 -0.0333333 0.24937 0.0333333)
+(morphline 'fractal 0.24937 0.0333333 0.316037 0.0333333)
+(morphline 'fractal 0.24937 -0.0333333 0.316037 -0.0333333)
+(morphline 'fractal 0.316037 0.0333333 0.316037 -0.0333333)
+(usleep 1000000)
+(morphjulia 0.36700581395348844398 0.025)
+(linekey 0)
+(morphline 'fractal 0.333672 -0.00833333 0.333672 0.0583333)
+(morphline 'fractal 0.333672 0.0583333 0.400339 0.0583333)
+(morphline 'fractal 0.333672 -0.00833333 0.400339 -0.00833333)
+(morphline 'fractal 0.400339 0.0583333 0.400339 -0.00833333)
+(usleep 1000000)
+(morphjulia 0.36700581395348844398 0.025)
+(linekey 0)
+(morphline 'fractal 0.333672 -0.00833333 0.333672 0.0583333)
+(morphline 'fractal 0.333672 0.0583333 0.400339 0.0583333)
+(morphline 'fractal 0.333672 -0.00833333 0.400339 -0.00833333)
+(morphline 'fractal 0.400339 0.0583333 0.400339 -0.00833333)
+(smoothmorph 'line 0 500000)
+(smoothmorph 'julia 0 500000)
+(usleep 1000000)
+;(display)
+(fastjulia #f)
+(wait)
+(message "theme")
+(linekey 0)
+(smoothmorph 'line 500000 0)
+(morphline 'screen 1 0 1 0)
+(morphline 'screen 1 0 1 0)
+(morphline 'screen 1 0 1 0)
+(morphline 'screen 1 0 1 0)
+(usleep 500000)
+(textsleep)
+(display)
+(message "theme1")
+(usleep 500000)
+
+;(palette 1 662060676 0)
+;(palette 1 598022471 0)
+;(palette 3 2053063861 0)
+;(palette 3 389600437 0)
+
+(palette 2 179327363 0)
+
+
+
+(smoothmorph 'view 1000000 1000000)
+(morphview -0.563733 -0.642253 0.0193372 0.0193372)
+(usleep 5000000)
+(display)
+(wait)
+
+(display)
+(message "theme2")
+(textsleep)
+
+(julia #t)
+(juliaseed -0.56373290058361424286 -0.64225330414353426158)
+(message "theme3")
+(usleep 1000000)
+
+(morphview 0 0 2.5 2.5)
+(usleep 4000000)
+(display)
+(wait)
+(message "theme4")
+
+(textsleep)
+(display)
+(message "theme5")
+(textsleep)
+(display)
+(message "theme6")
+
+(morphview -0.0075841 0.00025775 0.12745 0.12745)
+(usleep 6000000)
+(wait)
+(message "theme7")
+(textsleep)
+
+(display)
+(message "theme8")
+(textsleep)
+(display)
+(palette 1 155652149 0)
+(periodicity #t)
+(juliaseed 0.29449576229535342093 -0.016332967445424519366)
+(maxiter 127)
+(outcoloring 1)
+(incoloring 0)
+(julia #t)
+(view 0.000765158 -0.000268691 0.0186372 0.0186372)
+(usleep 1000000)
+(morphview 0 0 2.5 2.5)
+(usleep 10000000)
+(display)
+(wait)
+(usleep 1000000)
+
+(palette 1 1843312520 0)
+(juliaseed -0.72892441860465116144 -0.17500000000000001123)
+(maxiter 170)
+(outcoloring 1)
+(incoloring 0)
+(julia #t)
+(plane 1)
+(view 0.462 1.25 56.2 56.2)
+(usleep 3000000)
+
+
+(palette 1 1191063399 0)
+(juliaseed 0.30305461922625852807 0.4504536191559173757)
+(angle 0)
+(maxiter 388)
+(outcoloring 0)
+(incoloring 0)
+(julia #t)
+(plane 0)
+(view -0.052981 -0.50406 0.13039 0.13039)
+
+(palette 1 1112927008 0)
+(juliaseed -0.08085029069767437552 0.68229166666666671054)
+(maxiter 170)
+(outcoloring 1)
+(incoloring 1)
+(julia #t)
+(plane 0)
+(view 0 0 2.5 2.5)
+(usleep 1000000)
+
+(morphview 0.239593 -0.462394 0.0574963 0.0574963)
+(usleep 4000000)
+(wait)
+(usleep 1000000)
+
+(palette 2 1442034059 0)
+(juliaseed 0.093023255813953431353 -0.64999999999999995623)
+(outcoloring 2)
+(julia #t)
+(view 0.141299 0.507061 0.0383528 0.0383528)
+(usleep 2000000)
+
+(palette 1 1231368671 0)
+(juliaseed -0.76746965570853886306 0.067526146212247640361)
+(angle -31.099)
+(maxiter 290)
+(outcoloring 2)
+(incoloring 1)
+(view -0.49868 0.045671 0.28353 0.28353)
+(usleep 2000000)
+
+(palette 1 1034201341 0)
+(juliaseed 0.27541729708396692038 -0.0067143955333554104651)
+(angle -30.559)
+(maxiter 227)
+(julia #t)
+(plane 4)
+(incoloring 0)
+(range 65536)
+(view 3.3489798 1.1601067 0.00095219583 0.00095219583)
+(smoothmorph 'view 3000000 3000000)
+(morphview 0.396 0.209 19.1 19.1)
+(usleep 25000000)
+(wait)
+(usleep 1000000)
diff --git a/tutorial/keys.xhf b/tutorial/keys.xhf
new file mode 100644
index 0000000..109dfad
--- /dev/null
+++ b/tutorial/keys.xhf
@@ -0,0 +1,5 @@
+(textposition 'center 'middle)
+(clearscreen)
+(message "keys")
+(textsleep)
+(display)
diff --git a/tutorial/line1.xhf b/tutorial/line1.xhf
new file mode 100644
index 0000000..82addc4
--- /dev/null
+++ b/tutorial/line1.xhf
@@ -0,0 +1,17 @@
+(clearlines)
+(linekey 0)
+(color 'red)
+(line 'scaled 0.4 0.5 0.6 0.5)
+(line 'scaled 0.4 0.49 0.4 0.51)
+(line 'scaled 0.6 0.49 0.6 0.51)
+(color 'white)
+(textsleep)
+(linekey 0)
+(morphline 'scaled 0.3 0.5 0.7 0.5)
+(morphline 'scaled 0.3 0.49 0.3 0.51)
+(morphline 'scaled 0.7 0.49 0.7 0.51)
+(usleep 1000000)
+(line 'scaled 0.5 0.49 0.5 0.49)
+(morphlastline 'scaled 0.5 0.49 0.5 0.51)
+(usleep 500000)
+(usleep 1000000)
diff --git a/tutorial/magnet.xaf b/tutorial/magnet.xaf
new file mode 100644
index 0000000..9a4bf25
--- /dev/null
+++ b/tutorial/magnet.xaf
@@ -0,0 +1,233 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(textposition 'center 'middle)
+(message "intro7")
+(usleep 5000000)
+
+(display)
+(defaultpalette 0)
+(textposition 'center 'bottom)
+(formula 'magnet)
+(angle 0)
+(outcoloring 0)
+(plane 0)
+(view 2.0193 -1.6338 0.17812 0.26124)
+(message "magnet")
+(textsleep)
+(display)
+(morphview 1.5 0 3 4.4)
+(usleep 6000000)
+(wait)
+(message "magnet1")
+(textsleep)
+(display)
+(message "magnet2")
+(textsleep)
+(display)
+(palette 1 2104064959 0)
+(formula 'magnet)
+(angle -361)
+(maxiter 170)
+(outcoloring 0)
+(plane 0)
+(view 1.847209822 -1.339254931 7.031666521E-06 1.03131109E-05)
+(message "similiar")
+(textsleep)
+
+(display)
+(palette 1 1979730731 0)
+(formula 'magnet)
+(angle 26.7)
+(outcoloring 6)
+(plane 0)
+(view -0.33728908 -0.37438809 0.00018856268 0.0002765586)
+(usleep 2000000)
+
+(palette 1 765726463 0)
+(formula 'magnet)
+(angle 88.3)
+(outcoloring 6)
+(plane 0)
+(view -0.3371366 -0.37663387 0.00069439878 0.0010184515)
+(usleep 2000000)
+
+
+(palette 1 1510803482 0)
+(formula 'magnet)
+(angle -269)
+(outcoloring 1)
+(plane 0)
+(view 1.275 0.006127 0.14027 0.20573)
+
+(usleep 2000000)
+
+
+
+
+(palette 1 1734551171 0)
+(formula 'magnet)
+(angle -88.8)
+(outcoloring 8)
+(incoloring 0)
+(plane 0)
+(view 2.095 -0.01928 1.292 1.895)
+(usleep 3000000)
+
+
+(palette 1 258644272 0)
+(formula 'magnet)
+(angle -540)
+(outcoloring 0)
+(plane 0)
+(view 1.2689826 -2.0404879 0.000258881 0.00037969213)
+(usleep 1000000)
+
+(morphview 1.5 0 3 4.4)
+(usleep 10000000)
+(wait)
+(juliaseed 1.5404263026792413359 1.2313365559633509793)
+(fastjulia #t)
+(message "magjulia")
+(textsleep)
+(display)
+(line 'fractal 1.5404263026792413359 1.2313365559633509793 1.5404263026792413359 1.2313365559633509793)
+(line 'fractal 1.5404263026792413359 1.2313365559633509793 1.5404263026792413359 1.2313365559633509793)
+(line 'fractal 1.5404263026792413359 1.2313365559633509793 1.5404263026792413359 1.2313365559633509793)
+(line 'fractal 1.5404263026792413359 1.2313365559633509793 1.5404263026792413359 1.2313365559633509793)
+(linekey 0)
+(morphline 'fractal 1.51043 1.20134 1.57043 1.20134)
+(morphline 'fractal 1.57043 1.20134 1.57043 1.26134)
+(morphline 'fractal 1.51043 1.26134 1.57043 1.26134)
+(morphline 'fractal 1.51043 1.20134 1.51043 1.26134)
+(usleep 1000000)
+
+
+(morphjulia 1.4602 -1.209)
+(linekey 0)
+(morphline 'fractal 1.4302 -1.239 1.4902 -1.239)
+(morphline 'fractal 1.4902 -1.239 1.4902 -1.179)
+(morphline 'fractal 1.4302 -1.179 1.4902 -1.179)
+(morphline 'fractal 1.4302 -1.239 1.4302 -1.179)
+(usleep 3000000)
+
+(morphjulia -0.3184 -1.1289)
+(linekey 0)
+(morphline 'fractal -0.3484 -1.1589 -0.2884 -1.1589)
+(morphline 'fractal -0.2884 -1.1589 -0.2884 -1.0989)
+(morphline 'fractal -0.3484 -1.0989 -0.2884 -1.0989)
+(morphline 'fractal -0.3484 -1.1589 -0.3484 -1.0989)
+(usleep 3000000)
+
+(morphjulia -0.273 1.378)
+(linekey 0)
+(morphline 'fractal -0.303 1.348 -0.243 1.348)
+(morphline 'fractal -0.243 1.348 -0.243 1.408)
+(morphline 'fractal -0.303 1.408 -0.243 1.408)
+(morphline 'fractal -0.303 1.348 -0.303 1.408)
+(usleep 3000000)
+(morphjulia 1.5404 1.2313)
+(linekey 0)
+(morphline 'fractal 1.5104 1.2013 1.5704 1.2013)
+(morphline 'fractal 1.5704 1.2013 1.5704 1.2613)
+(morphline 'fractal 1.5104 1.2613 1.5704 1.2613)
+(morphline 'fractal 1.5104 1.2013 1.5104 1.2613)
+(usleep 3000000)
+(linekey 0)
+(morphline 'fractal 1.5404 1.2313 1.5404 1.2313)
+(morphline 'fractal 1.5404 1.2313 1.5404 1.2313)
+(morphline 'fractal 1.5404 1.2313 1.5404 1.2313)
+(morphline 'fractal 1.5404 1.2313 1.5404 1.2313)
+(usleep 1000000)
+(display)
+(fastjulia #f)
+
+(palette 1 999460631 0)
+(formula 'magnet)
+(juliaseed 2.0193023255813953853 -0.022000000000000001542)
+(angle -268)
+(maxiter 251)
+(outcoloring 1)
+(julia #t)
+(plane 0)
+(view -0.02084 0.04831 4.953 7.265)
+(usleep 3000000)
+
+(palette 1 523407644 0)
+(formula 'magnet)
+(juliaseed -0.057906976744186156036 0)
+(angle 89.6)
+(maxiter 170)
+(outcoloring 1)
+(julia #t)
+(plane 0)
+(view 0.88499 0.039171 0.7298 1.0704)
+
+
+(palette 1 1982820186 0)
+(formula 'magnet)
+(juliaseed 1.2774418604651162634 -0.92400000000000006488)
+(outcoloring 0)
+(julia #t)
+(plane 1)
+(view 157 380 94.4 138)
+(usleep 2000000)
+
+(palette 1 1716597759 0)
+(formula 'magnet)
+(juliaseed 3.0208139534883721999 -0.022000000000000001542)
+(angle -88.9)
+(outcoloring 1)
+(julia #t)
+(plane 0)
+(view -0.9297 -0.02747 1.683 2.468)
+
+(usleep 3000000)
+(palette 1 98634059 0)
+(formula 'magnet)
+(juliaseed -0.26191860465116291456 -0.022000000000000001542)
+(angle -274)
+(maxiter 170)
+(outcoloring 7)
+(julia #t)
+(plane 0)
+(view 0.9202 0.05028 1.371 2.01)
+(usleep 3000000)
+
+(palette 1 952140389 0)
+(formula 'magnet)
+(juliaseed 1.3330813953488371976 0)
+(outcoloring 9)
+(julia #t)
+(plane 5)
+(view -0.01039 0.008669 1.341 1.966)
+(usleep 3000000)
+
+(palette 1 2094414250 0)
+(formula 'magnet)
+(juliaseed 1.6483720930232558244 0)
+(angle -91.6)
+(outcoloring 7)
+(julia #t)
+(plane 0)
+(view -0.011859 0.016696 0.8126 1.1918)
+(usleep 3000000)
+
+
+(display)
+(palette 3 1083366997 0)
+(textposition 'center 'bottom)
+(formula 'magnet2)
+(angle 0)
+(outcoloring 0)
+(plane 0)
+(view 1 0 3 3.2)
+(message "magnet3")
+(textsleep)
+(display)
+(morphview 1.94584 -0.90656 0.0534806 0.057046)
+(usleep 6000000)
+(wait)
+
diff --git a/tutorial/mset.xaf b/tutorial/mset.xaf
new file mode 100644
index 0000000..b206b4f
--- /dev/null
+++ b/tutorial/mset.xaf
@@ -0,0 +1,284 @@
+(load "head.xhf")
+(range 65536)
+(textposition 'center 'bottom)
+; Mandelbrot set part
+(defaultpalette 0)
+(filter 'stereogram #f)
+(filter 'interlace #f)
+(filter 'edge #t)
+(filter 'edge2 #f)
+(filter 'blur #t)
+(formula 'mandel)
+(display)
+(maxiter 1)
+(message "fact7")
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view -0.75 0 .1 .1)
+;(usleep 1000000)
+(wait)
+(view -0.75 0 2.5 2.5)
+(wait)
+(maxiter 2)
+(wait)
+(maxiter 3)
+(wait)
+(maxiter 4)
+(wait)
+(maxiter 5)
+(wait)
+(maxiter 6)
+(wait)
+(display)
+(maxiter 8)
+(wait)
+(maxiter 10)
+(wait)
+(maxiter 12)
+(wait)
+(maxiter 14)
+(wait)
+(maxiter 20)
+(wait)
+(maxiter 30)
+(wait)
+(maxiter 200)
+(wait)
+(filter 'edge #f)
+(wait)
+(message "mset")
+(usleep 3000000)
+(display)
+(usleep 1000000)
+(display)
+(message "mset1")
+(textsleep)
+(display)
+(text "z=z^2+c")
+(usleep 3000000)
+(display)
+(message "mset2")
+(textsleep)
+(view -0 0 .3 .3)
+(wait)
+
+(display)
+(textposition 'center 'bottom)
+(view 0.0 0.0 0.3 0.3)
+(message "mset3")
+(filter 'blur #f)
+(smoothmorph 'view 1000000 1000000)
+(morphview -0.75 0 2.5 2.5)
+(usleep 5000000)
+(display)
+(wait)
+(message "mset4")
+(textsleep)
+(display)
+(message "mset5")
+
+(periodicity #f) ;FIXME periodicity makes problems here
+(morphview -1.76329 -0.00180622 0.0480762 0.0480762)
+(usleep 4000000)
+(display)
+
+(wait)
+(message "mset6")
+(textsleep)
+(periodicity #t)
+(display)
+(usleep 1000000)
+(message "mset7")
+(textsleep)
+(display)
+(message "mset8")
+(textsleep)
+
+(display)
+(morphview -1.78384796 -0.0156186314 3.28608553E-05 3.28608553E-05)
+(usleep 5000000)
+(wait)
+(message "mset9")
+(textsleep)
+(display)
+(message "mset10")
+(textsleep)
+
+;An gray mandelbrot
+(display)
+(palette 1 344773041 0)
+(periodicity #t)
+(maxiter 600)
+(angle 206)
+(view -0.69697092226 -0.44313598753 2.1102342597E-07 2.1102342597E-07)
+(usleep 3000000)
+
+;A yellow mandelbrot
+(palette 1 1322755214 0)
+(angle 276)
+(view -0.1797721 -0.8418266 0.001259123 0.001259123)
+
+(usleep 3000000)
+
+; Blue mandelbrot
+(palette 3 420905417 0)
+(angle 0)
+(formula 'mandel)
+(maxiter 520)
+(view -0.76938957 -0.11612439 0.0003879837 0.0003879837)
+(usleep 3000000)
+
+
+;(palette 2 31632178 0)
+;(angle 0)
+;(outcoloring 1)
+;(view -1.9854567 -1.351727E-05 0.00029196024 0.00029196024)
+
+;(usleep 3000000)
+
+;A strange purple mandelbrot
+
+(outcoloring 0)
+(palette 1 2003101440 0)
+(angle 220)
+(autorotate #f)
+(maxiter 204)
+(view 0.3146669 -0.02931828 0.001555872 0.001555872)
+(usleep 3000000)
+(angle 0)
+(palette 1 739115845 0)
+(formula 'mandel)
+(maxiter 170)
+(display)
+(color 'black)
+(textposition 'center 'bottom)
+(message "nat")
+(textsleep)
+(display)
+(message "nat1")
+(textsleep)
+(display)
+(message "nat2")
+(textsleep)
+(display)
+(message "nat3")
+(morphview -0.354983 0.638129 0.0145266 0.0145266)
+(color 'white)
+(usleep 7000000)
+(display)
+(wait)
+(usleep 1000000)
+
+;(palette 1 650671357 0)
+;(angle 0)
+;(maxiter 170)
+;(outcoloring 9)
+;(view -0.205806 -1.10686 0.0239451 0.0239451)
+;(display)
+;(message "nat4")
+;(textsleep)
+(palette 1 650671357 0)
+(angle 0)
+(outcoloring 9)
+(view -0.209751 -1.10856 0.0278041 0.0278041)
+(message "nat4")
+(usleep 1000000)
+(smoothmorph 'view 5000000 0)
+(morphview -0.075401 -0.89142 0.21501 0.21501)
+(usleep 10000000)
+(morphview -0.08732 -0.0515 2.866 2.866)
+(smoothmorph 'view 0 3000000)
+(usleep 5000000)
+(display)
+(wait)
+
+
+
+(defaultpalette 0)
+(filter 'starfield #t)
+(maxiter 139)
+(outcoloring 0)
+(incoloring 0)
+(view 0.23616578 -0.56339523 0.00054982648 0.00054982648)
+(display)
+(message "nat5")
+(textsleep)
+
+
+(filter 'starfield #f)
+(filter 'palette #t)
+(palette 1 477945530 0)
+(periodicity #t)
+(cyclingspeed -17)
+(angle 0)
+(maxiter 46)
+(outcoloring 0)
+(incoloring 1)
+(range 3)
+(plane 0)
+(view -1.780499 -0.002199366 0.004793186 0.004793186)
+(wait)
+(message "nat6")
+(cycling #t)
+(usleep 6000000)
+(display)
+
+(filter 'palette #f)
+(cycling #f)
+(palette 1 155652149 0)
+(maxiter 127)
+(incoloring 0)
+(view 0.19232992 0.59284158 0.00015478901 0.00015478901)
+(message "nat7")
+(textsleep)
+
+(display)
+(maxiter 144)
+(outcoloring 1)
+(incoloring 0)
+(view 0.294490997 -0.0163372737 1.38726242E-05 1.38726242E-05)
+(usleep 2000000)
+
+(smoothmorph 'view 1000000 1000000)
+(morphview 0.2944910925 -0.01633561217 1.083571743E-06 1.083571743E-06)
+(usleep 3000000)
+(wait)
+(usleep 3000000)
+
+(palette 1 1750754674 0)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(view -0.56159435 0.64187615 0.00043670151 0.00043670151)
+(usleep 3000000)
+
+
+(palette 1 1499405657 0)
+(angle 7.24)
+(maxiter 170)
+(outcoloring 1)
+(incoloring 1)
+(plane 0)
+(view -1.94257718066647 -1.77233397601984E-05 2.49864032459204E-11 2.49864033478705E-11)
+(usleep 2000000)
+
+(morphview -1.9425771806688 -1.7723339490488E-05 1.4771196375427E-10 1.4771196554556E-10)
+(usleep 4000000)
+(wait)
+
+(palette 1 780175578 0)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(view 0.2989409252714 -0.01731148436377 1.153372743612E-09 1.153372744112E-09)
+(usleep 3000000)
+(usleep 1000000)
+(wait)
+
+(smoothmorph 'view 8000000 4000000)
+(morphview -0.75 0 2.5 2.5)
+(usleep 25000000)
+(wait)
diff --git a/tutorial/msetren.xaf b/tutorial/msetren.xaf
new file mode 100644
index 0000000..c371141
--- /dev/null
+++ b/tutorial/msetren.xaf
@@ -0,0 +1,286 @@
+(load "head.xhf")
+(range 65536)
+(textposition 'center 'bottom)
+; Mandelbrot set part
+(defaultpalette 0)
+(filter 'stereogram #f)
+(filter 'interlace #f)
+(filter 'edge #t)
+(filter 'edge2 #f)
+(filter 'blur #t)
+(formula 'mandel)
+(display)
+(maxiter 1)
+(message "fact7")
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view -0.75 0 .1 .1)
+;(usleep 1000000)
+(wait)
+(view -0.75 0 2.5 2.5)
+(wait)
+(maxiter 2)
+(wait)
+(maxiter 3)
+(wait)
+(maxiter 4)
+(wait)
+(maxiter 5)
+(wait)
+(maxiter 6)
+(wait)
+(display)
+(maxiter 8)
+(wait)
+(maxiter 10)
+(wait)
+(maxiter 12)
+(wait)
+(maxiter 14)
+(wait)
+(maxiter 20)
+(wait)
+(maxiter 30)
+(wait)
+(maxiter 200)
+(wait)
+(filter 'edge #f)
+(wait)
+(message "mset")
+(usleep 3000000)
+(display)
+(usleep 1000000)
+(display)
+(message "mset1")
+(textsleep)
+(display)
+(text "z=z^2+c")
+(usleep 3000000)
+(display)
+(message "mset2")
+(textsleep)
+;(view -0 0 .3 .3)
+;(wait)
+
+(display)
+(usleep 500000)
+(textposition 'center 'bottom)
+;(view 0.0 0.0 0.3 0.3)
+(message "mset3")
+(filter 'blur #f)
+;(smoothmorph 'view 1000000 1000000)
+;(morphview -0.75 0 2.5 2.5)
+;(usleep 5000000)
+(textsleep)
+(display)
+(wait)
+(message "mset4")
+(textsleep)
+(display)
+(message "mset5")
+
+(periodicity #f) ;FIXME periodicity makes problems here
+(morphview -1.76329 -0.00180622 0.0480762 0.0480762)
+(usleep 4000000)
+(display)
+
+(wait)
+(message "mset6")
+(textsleep)
+(periodicity #t)
+(display)
+(usleep 1000000)
+(message "mset7")
+(textsleep)
+(display)
+(message "mset8")
+(textsleep)
+
+(display)
+(morphview -1.78384796 -0.0156186314 3.28608553E-05 3.28608553E-05)
+(usleep 5000000)
+(wait)
+(message "mset9")
+(textsleep)
+(display)
+(message "mset10")
+(textsleep)
+
+;An gray mandelbrot
+(display)
+(palette 1 344773041 0)
+(periodicity #t)
+(maxiter 600)
+(angle 206)
+(view -0.69697092226 -0.44313598753 2.1102342597E-07 2.1102342597E-07)
+(usleep 3000000)
+
+;An yellow mandelbrot
+(palette 1 1322755214 0)
+(angle 276)
+(view -0.1797721 -0.8418266 0.001259123 0.001259123)
+
+(usleep 3000000)
+
+; Blue mandelbrot
+(palette 3 420905417 0)
+(angle 0)
+(formula 'mandel)
+(maxiter 520)
+(view -0.76938957 -0.11612439 0.0003879837 0.0003879837)
+(usleep 3000000)
+
+
+;(palette 2 31632178 0)
+;(angle 0)
+;(outcoloring 1)
+;(view -1.9854567 -1.351727E-05 0.00029196024 0.00029196024)
+
+;(usleep 3000000)
+
+;An strange purple mandelrbto
+
+(outcoloring 0)
+(palette 1 2003101440 0)
+(angle 220)
+(autorotate #f)
+(maxiter 204)
+(view 0.3146669 -0.02931828 0.001555872 0.001555872)
+(usleep 3000000)
+(angle 0)
+(palette 1 739115845 0)
+(formula 'mandel)
+(maxiter 170)
+(display)
+(color 'black)
+(textposition 'center 'bottom)
+(message "nat")
+(textsleep)
+(display)
+(message "nat1")
+(textsleep)
+(display)
+(message "nat2")
+(textsleep)
+(display)
+(message "nat3")
+(morphview -0.354983 0.638129 0.0145266 0.0145266)
+(color 'white)
+(usleep 7000000)
+(display)
+(wait)
+(usleep 1000000)
+
+;(palette 1 650671357 0)
+;(angle 0)
+;(maxiter 170)
+;(outcoloring 9)
+;(view -0.205806 -1.10686 0.0239451 0.0239451)
+;(display)
+;(message "nat4")
+;(textsleep)
+(palette 1 650671357 0)
+(angle 0)
+(outcoloring 9)
+(view -0.209751 -1.10856 0.0278041 0.0278041)
+(message "nat4")
+(usleep 1000000)
+(smoothmorph 'view 5000000 0)
+(morphview -0.075401 -0.89142 0.21501 0.21501)
+(usleep 10000000)
+(morphview -0.08732 -0.0515 2.866 2.866)
+(smoothmorph 'view 0 3000000)
+(usleep 5000000)
+(display)
+(wait)
+
+
+
+(defaultpalette 0)
+(filter 'starfield #t)
+(maxiter 139)
+(outcoloring 0)
+(incoloring 0)
+(view 0.23616578 -0.56339523 0.00054982648 0.00054982648)
+(display)
+(message "nat5")
+(textsleep)
+
+
+(filter 'starfield #f)
+(filter 'palette #t)
+(palette 1 477945530 0)
+(periodicity #t)
+(cyclingspeed -17)
+(angle 0)
+(maxiter 46)
+(outcoloring 0)
+(incoloring 1)
+(range 3)
+(plane 0)
+(view -1.780499 -0.002199366 0.004793186 0.004793186)
+(wait)
+(message "nat6")
+(cycling #t)
+(usleep 6000000)
+(display)
+
+(filter 'palette #f)
+(cycling #f)
+(palette 1 155652149 0)
+(maxiter 127)
+(incoloring 0)
+(view 0.19232992 0.59284158 0.00015478901 0.00015478901)
+(message "nat7")
+(textsleep)
+
+(display)
+(maxiter 144)
+(outcoloring 1)
+(incoloring 0)
+(view 0.294490997 -0.0163372737 1.38726242E-05 1.38726242E-05)
+(usleep 2000000)
+
+(smoothmorph 'view 1000000 1000000)
+(morphview 0.2944910925 -0.01633561217 1.083571743E-06 1.083571743E-06)
+(usleep 3000000)
+(wait)
+(usleep 3000000)
+
+(palette 1 1750754674 0)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(view -0.56159435 0.64187615 0.00043670151 0.00043670151)
+(usleep 3000000)
+
+
+(palette 1 1499405657 0)
+(angle 7.24)
+(maxiter 170)
+(outcoloring 1)
+(incoloring 1)
+(plane 0)
+(view -1.94257718066647 -1.77233397601984E-05 2.49864032459204E-11 2.49864033478705E-11)
+(usleep 2000000)
+
+(morphview -1.9425771806688 -1.7723339490488E-05 1.4771196375427E-10 1.4771196554556E-10)
+(usleep 4000000)
+(wait)
+
+(palette 1 780175578 0)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(view 0.2989409252714 -0.01731148436377 1.153372743612E-09 1.153372744112E-09)
+(usleep 3000000)
+(usleep 1000000)
+(wait)
+
+(smoothmorph 'view 8000000 4000000)
+(morphview -0.75 0 2.5 2.5)
+(usleep 25000000)
+(wait)
diff --git a/tutorial/new30.xaf b/tutorial/new30.xaf
new file mode 100644
index 0000000..4a51edf
--- /dev/null
+++ b/tutorial/new30.xaf
@@ -0,0 +1,86 @@
+; Whats new in versuib 3.0 by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+
+(clearscreen)
+(textposition 'center 'middle)
+(message "new")
+(textsleep)
+(clearscreen)
+(message "speed")
+(usleep 5000000)
+(clearscreen)
+(message "speed1")
+(textsleep)
+(clearscreen)
+(message "speed2")
+(textsleep)
+(clearscreen)
+(message "speed3")
+(textsleep)
+(clearscreen)
+(message "speed4")
+(textsleep)
+(clearscreen)
+(message "speed5")
+(wait)
+(display)
+(maxiter 1000000)
+(message "speed6")
+(textsleep)
+(clearscreen)
+(message "speed7")
+(textsleep)
+(clearscreen)
+(message "speed8")
+(textsleep)
+(clearscreen)
+(maxiter 170)
+(message "speed9")
+(textsleep)
+(clearscreen)
+
+(load "pause.xhf")
+
+(clearscreen)
+(message "new2")
+(usleep 5000000)
+
+(load "filter.xhf")
+
+(load "pause.xhf")
+
+(clearscreen)
+(message "new3")
+(usleep 5000000)
+
+(load "outnew.xhf")
+
+(load "pause.xhf")
+
+(clearscreen)
+(message "new4")
+(usleep 5000000)
+
+(load "innew.xhf")
+
+(load "pause.xhf")
+
+(clearscreen)
+(message "new5")
+(usleep 5000000)
+
+(load "truecol.xhf")
+
+(load "pause.xhf")
+
+(clearscreen)
+(message "new6")
+(usleep 5000000)
+
+(load "anim.xhf")
+
+(message "newend")
+(textsleep)
+(display)
diff --git a/tutorial/newton.xaf b/tutorial/newton.xaf
new file mode 100644
index 0000000..2335cc6
--- /dev/null
+++ b/tutorial/newton.xaf
@@ -0,0 +1,254 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(textposition 'center 'middle)
+(message "intro3")
+(usleep 5000000)
+
+(defaultpalette 0)
+(textposition 'center 'bottom)
+(formula 'newton)
+(periodicity #t)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(display)
+(message "newton")
+(textsleep)
+
+
+(display)
+(message "newton1")
+(textsleep)
+
+(display)
+(message "newton2")
+(textsleep)
+
+(display)
+(message "newton3")
+(color 'red)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(color 'white)
+
+(linekey 0)
+(morphline 'fractal 0.966667 -0.0333333 0.966667 0.0333333)
+(morphline 'fractal 0.966667 0.0333333 1.03333 0.0333333)
+(morphline 'fractal 0.966667 -0.0333333 1.03333 -0.0333333)
+(morphline 'fractal 1.03333 0.0333333 1.03333 -0.0333333)
+
+(morphline 'fractal -0.533415 0.83323 -0.533415 0.899896)
+(morphline 'fractal -0.533415 0.899896 -0.466749 0.899896)
+(morphline 'fractal -0.533415 0.83323 -0.466749 0.83323)
+(morphline 'fractal -0.466749 0.899896 -0.466749 0.83323)
+
+(morphline 'fractal -0.533415 -0.83323 -0.533415 -0.899896)
+(morphline 'fractal -0.533415 -0.899896 -0.466749 -0.899896)
+(morphline 'fractal -0.533415 -0.83323 -0.466749 -0.83323)
+(morphline 'fractal -0.466749 -0.899896 -0.466749 -0.83323)
+
+(usleep 1000000)
+(textsleep)
+(display)
+
+(message "newton4")
+(textsleep)
+(display)
+
+(morphview -0.486472951 -0.239423987 3.40052781E-05 3.40052781E-05)
+(usleep 5000000)
+(wait)
+(message "newton5")
+(textsleep)
+
+(display)
+(message "newton6")
+(textsleep)
+(display)
+
+
+(message "newton7")
+(textsleep)
+
+(display)
+(message "newton8")
+(textsleep)
+
+
+(display)
+(defaultpalette 0)
+(formula 'newton)
+(juliaseed 1.0010901162790698318 0)
+(angle 90)
+(julia #t)
+(plane 0)
+(view -0.5467 -0.02844 1.927 1.927)
+(usleep 3000000)
+
+
+(palette 1 959136425 0)
+(wait)
+(morphview -0.603817 0.000543598 0.0629232 0.0629232)
+(usleep 10000000)
+(wait)
+
+(palette 1 871883963 0)
+(formula 'newton)
+(juliaseed -0.80087209302325586545 0)
+(angle -90.9)
+(maxiter 256)
+(julia #t)
+(plane 1)
+(view -2.254 0.006638 1.532 1.532)
+(usleep 2000000)
+
+(palette 1 1233017465 0)
+(formula 'newton)
+(juliaseed -1.1275436046511628632 0)
+(angle 92)
+(maxiter 256)
+(julia #t)
+(plane 0)
+(view -0.33483 0.0033715 0.22029 0.22029)
+
+
+
+(palette 1 1357086155 0)
+(juliaseed -1.1275436046511628632 0)
+(angle 90)
+(autorotate #f)
+(maxiter 256)
+(julia #t)
+(plane 2)
+(view 0.5762 0.1221 8.249 8.249)
+(usleep 2000000)
+
+(palette 1 1810645372 0)
+(formula 'newton)
+(juliaseed -1.1275436046511628632 0)
+(angle 92)
+(autorotate #f)
+(maxiter 256)
+(julia #t)
+(plane 0)
+(view -0.6110601 -2.484229E-05 0.006533619 0.006533619)
+(usleep 2000000)
+
+(palette 1 1281050362 0)
+(juliaseed 1.0010901162790698318 0)
+(angle 98)
+(maxiter 170)
+(julia #t)
+(plane 0)
+(view 0.252905 -0.5152498 0.004158874 0.004158874)
+(usleep 2000000)
+
+(palette 2 448045853 0)
+(juliaseed -0.57957848837209298431 -1.084202172485504434E-19)
+(angle 90)
+(view -0.45641 -0.0079525 0.48766 0.48766)
+(usleep 2000000)
+
+
+(palette 1 985867394 0)
+(juliaseed 0.0058931089247213081752 0.0044899066259199158438)
+(angle 98)
+(autorotate #f)
+(maxiter 170)
+(julia #t)
+(plane 0)
+(view 0.04955468 0.3812751 0.004336217 0.004336217)
+(usleep 2000000)
+
+(palette 1 1233017465 0)
+(juliaseed -1.1275436046511628632 0)
+(angle 92.6)
+(autorotate #f)
+(maxiter 246)
+(julia #t)
+(plane 0)
+(view -0.33483 0.0033715 0.22029 0.22029)
+(usleep 2000000)
+
+
+
+(defaultpalette 0)
+(textposition 'center 'bottom)
+(formula 'newton4)
+(periodicity #t)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(display)
+(message "newton9")
+(textsleep)
+
+(display)
+(message "newton10")
+(textsleep)
+
+(display)
+(message "newton11")
+(color 'red)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(line 'fractal 0 0 0 0)
+(color 'white)
+
+(linekey 0)
+(morphline 'fractal 0.966667 -0.0333333 0.966667 0.0333333)
+(morphline 'fractal 0.966667 0.0333333 1.03333 0.0333333)
+(morphline 'fractal 0.966667 -0.0333333 1.03333 -0.0333333)
+(morphline 'fractal 1.03333 0.0333333 1.03333 -0.0333333)
+
+(morphline 'fractal -0.966667 -0.0333333 -0.966667 0.0333333)
+(morphline 'fractal -0.966667 0.0333333 -1.03333 0.0333333)
+(morphline 'fractal -0.966667 -0.0333333 -1.03333 -0.0333333)
+(morphline 'fractal -1.03333 0.0333333 -1.03333 -0.0333333)
+
+(morphline 'fractal -0.0333333 0.966667 0.0333333 0.966667)
+(morphline 'fractal 0.0333333 0.966667 0.0333333 1.03333)
+(morphline 'fractal -0.0333333 0.966667 -0.0333333 1.03333)
+(morphline 'fractal 0.0333333 1.03333 -0.0333333 1.03333)
+
+(morphline 'fractal -0.0333333 -0.966667 0.0333333 -0.966667)
+(morphline 'fractal 0.0333333 -0.966667 0.0333333 -1.03333)
+(morphline 'fractal -0.0333333 -0.966667 -0.0333333 -1.03333)
+(morphline 'fractal 0.0333333 -1.03333 -0.0333333 -1.03333)
+
+(usleep 1000000)
+(textsleep)
+(display)
+
diff --git a/tutorial/octo.xaf b/tutorial/octo.xaf
new file mode 100644
index 0000000..773b273
--- /dev/null
+++ b/tutorial/octo.xaf
@@ -0,0 +1,174 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(textposition 'center 'middle)
+(message "intro6")
+(usleep 5000000)
+(display)
+(textposition 'center 'bottom)
+(message "octo")
+(defaultpalette 0)
+(periodicity #f)
+(filter 'edge #f)
+(filter 'edge2 #f)
+(filter 'starfield #f)
+(filter 'stereogram #f)
+(filter 'interlace #f)
+(filter 'blur #t)
+(formula 'octal)
+(fastjulia #f)
+(cycling #f)
+(angle 0)
+(fastrotate #t)
+(autorotate #t)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(angle 1229)
+(rotationspeed 154)
+(view 0 0 .5 .5)
+
+(morphview 0 0 2.5 2.5)
+(usleep 4000000)
+
+(usleep 245670)
+(rotationspeed 154)
+
+(usleep 343560)
+(rotationspeed 144)
+
+(usleep 341700)
+(rotationspeed 132)
+
+(usleep 309510)
+(rotationspeed 121)
+
+(usleep 308660)
+(rotationspeed 111)
+
+(usleep 338590)
+(rotationspeed 101)
+
+(usleep 346700)
+(rotationspeed 89)
+
+(usleep 341430)
+(rotationspeed 78)
+
+(usleep 306660)
+(rotationspeed 58)
+
+(usleep 305970)
+(rotationspeed 48)
+
+(usleep 308020)
+(rotationspeed 37)
+
+(usleep 313580)
+(rotationspeed 27)
+
+(usleep 323000)
+(rotationspeed 17.1)
+
+(usleep 325080)
+(rotationspeed 6.4)
+
+(usleep 324900)
+(rotationspeed 0)
+
+(animateview 0 0 2.5 2.5)
+(autorotate #f)
+
+(display)
+(message "octo1")
+(textsleep)
+(display)
+(filter 'blur #f)
+(fastrotate #f)
+(palette 1 1272174002 0)
+(formula 'octal)
+(fastjulia #f)
+(cycling #f)
+(angle 91.8)
+(autorotate #f)
+(maxiter 120)
+(outcoloring 9)
+(incoloring 1)
+(plane 2)
+(view 0.615 0.734 31 31)
+(usleep 2000000)
+
+
+(palette 1 2020627370 0)
+(angle 268)
+(maxiter 100)
+(outcoloring 0)
+(incoloring 1)
+(plane 4)
+(view 1.933 0.04551 1.146 1.146)
+
+(morphview 1.363 0.01996 3.548 3.548)
+(usleep 3000000)
+(wait)
+(usleep 1000000)
+
+
+(defaultpalette 0)
+(angle 0)
+(maxiter 50)
+(plane 1)
+(angle 24.5)
+(view 0.06508 0.02173 6.011 6.011)
+(wait)
+(morphview 0.1308 -0.1578 9.165 9.165)
+(usleep 2000000)
+(wait)
+
+(palette 1 1581679475 27)
+(maxiter 170)
+(plane 0)
+(view -0.07483202 0.5429194 0.009544335 0.009544335)
+(wait)
+
+(cyclingspeed 47)
+(filter 'palette #t)
+(cycling #t)
+(message "octo2")
+(textsleep)
+(cycling #f)
+(filter 'palette #f)
+(display)
+
+(palette 1 2090959176 0)
+(formula 'octal)
+(juliaseed 0.010537790697674419326 0.86250000000000005547)
+(maxiter 170)
+(outcoloring 7)
+(incoloring 0)
+(julia #t)
+(plane 0)
+(view 0.02298 -0.9176 2.769 2.769)
+(usleep 3000000)
+
+(palette 1 1251438586 0)
+(formula 'octal)
+(juliaseed 0.0013961132576639388808 -0.42931197236250143498)
+(angle 0)
+(maxiter 251)
+(outcoloring 7)
+(incoloring 1)
+(julia #t)
+(plane 1)
+(view 0.05096 -0.2509 3.124 3.124)
+(usleep 2000000)
+(cyclingspeed 10)
+(usleep 1000000)
+(morphview 1.08 1.35 26.8 26.8)
+(usleep 8000000)
+(wait)
+(usleep 1000000)
+
+(periodicity #t)
diff --git a/tutorial/other.xaf b/tutorial/other.xaf
new file mode 100644
index 0000000..95708d7
--- /dev/null
+++ b/tutorial/other.xaf
@@ -0,0 +1,470 @@
+(load "head.xhf")
+(clearscreen)
+(message "auto1")
+(usleep 4000000)
+(clearscreen)
+(message "auto2")
+(textsleep)
+(clearscreen)
+(display)
+(zoomcenter 0.11830570195200643288 -0.63262382466199072246)
+(zoom)
+
+(usleep 267)
+(zoomcenter -0.033430232558139488666 1.2000000000000000772)
+(animateview -0.75 2.311E-05 2.5 2.5)
+
+(usleep 44274)
+(zoomcenter -0.50597332748852788379 -0.63107733520612090101)
+
+(usleep 163210)
+(zoomcenter -0.6272283548927215359 -0.4872437854576980818)
+
+(usleep 399822)
+(zoomcenter -0.55180300863006073731 -0.62641944354236262665)
+(animateview -0.7185 -0.1025 1.977 1.977)
+
+(usleep 153551)
+(zoomcenter -0.55957200243976194332 -0.53426310317901038447)
+
+(usleep 563498)
+(zoomcenter -0.58320407685096552328 -0.63237695694138654868)
+(animateview -0.6714 -0.2347 1.396 1.396)
+
+(usleep 480758)
+(zoomcenter -0.53643474912637531841 -0.67121162630718420007)
+
+(usleep 238181)
+(zoomcenter -0.54478195147021088853 -0.61675332687774657816)
+(animateview -0.64019 -0.35597 0.9841 0.9841)
+
+(usleep 721892)
+(zoomcenter -0.5389090203876405438 -0.62023658255430552883)
+(animateview -0.61193 -0.43314 0.69296 0.69296)
+
+(usleep 155077)
+(zoomcenter -0.53346574817747029559 -0.66866293532064771096)
+
+(usleep 326183)
+(zoomcenter -0.52417062832957606836 -0.66314996768672422275)
+
+(usleep 477540)
+(zoomcenter -0.52970204700481322998 -0.66752423900691178232)
+(animateview -0.58103 -0.51748 0.43491 0.43491)
+
+(usleep 478724)
+(zoomcenter -0.52677784988132239923 -0.67272729319905408876)
+
+(usleep 642966)
+(zoomcenter -0.52677784988132239879 -0.66511495176183804288)
+(animateview -0.55867 -0.58189 0.25221 0.25221)
+
+(usleep 324850)
+(zoomcenter -0.57706454064058434355 -0.62824014705209962135)
+
+(usleep 233330)
+(zoomcenter -0.58930262093696508097 -0.61856221688668589019)
+(animateview -0.55688 -0.59741 0.19229 0.19229)
+
+(usleep 78316)
+(zoomcenter -0.58930262093696508254 -0.62414362384237466013)
+
+(usleep 720616)
+(zoomcenter -0.59040772523228185822 -0.61824465332806304675)
+(animateview -0.56732 -0.60585 0.13043 0.13043)
+
+(usleep 408793)
+(zoomcenter -0.59449543080725952252 -0.62255475514505098969)
+
+(usleep 233673)
+(zoomcenter -0.59449543080725952176 -0.62303456756424900457)
+(animateview -0.573975 -0.609671 0.0954555 0.0954555)
+
+(usleep 720839)
+(zoomcenter -0.59392530580053555565 -0.6223582813493764375)
+(animateview -0.580035 -0.613616 0.06725 0.06725)
+
+(usleep 397125)
+(zoomcenter -0.59416045277480668654 -0.61984788468612326732)
+
+(usleep 321270)
+(zoomcenter -0.59395938307256255801 -0.62008639495361285194)
+(animateview -0.584162 -0.615817 0.0474361 0.0474361)
+
+(usleep 83989)
+(zoomcenter -0.5912589577572650286 -0.62237444004834770601)
+
+(usleep 480337)
+(zoomcenter -0.59278684601691370473 -0.62237444004834770574)
+(animateview -0.585947 -0.617326 0.0360616 0.0360616)
+
+(usleep 157569)
+(zoomcenter -0.59363587892642540663 -0.62203873048412698708)
+
+(usleep 404068)
+(zoomcenter -0.59456685001086576016 -0.62093440616327360166)
+(animateview -0.58774 -0.618464 0.0274492 0.0274492)
+
+(usleep 320249)
+(zoomcenter -0.59037801972761568025 -0.62235406884055244711)
+
+(usleep 555379)
+(zoomcenter -0.59053019667560118969 -0.62199304215015923796)
+(animateview -0.589094 -0.619661 0.0179378 0.0179378)
+
+(usleep 564006)
+(zoomcenter -0.59035634279017973482 -0.62123687766460201323)
+(animateview -0.589437 -0.620214 0.0136386 0.0136386)
+
+(usleep 640808)
+(zoomcenter -0.59099232888604331926 -0.62173981839328493963)
+(animateview -0.589687 -0.6204911 0.009989632 0.009989632)
+
+(usleep 551237)
+(zoomcenter -0.59118737521536688777 -0.6218940619272787501)
+(animateview -0.5899954 -0.6207859 0.0076426 0.0076426)
+
+(usleep 166905)
+(zoomcenter -0.59121734341979726492 -0.62235619230732235866)
+
+(usleep 231008)
+(zoomcenter -0.59119055761232205162 -0.62232441879776555384)
+
+(usleep 723619)
+(zoomcenter -0.59124707275493918856 -0.62221268771121213337)
+(animateview -0.5904998 -0.6214149 0.004432012 0.004432012)
+
+(usleep 651887)
+(zoomcenter -0.59135694631621453201 -0.6223756036813790219)
+(animateview -0.5907037 -0.621633 0.003228778 0.003228778)
+
+(usleep 712867)
+(zoomcenter -0.59123060214062214164 -0.62236407519426926522)
+(animateview -0.5908937 -0.6218503 0.002283592 0.002283592)
+
+(usleep 721917)
+(zoomcenter -0.59127848357459232028 -0.6224127585832911608)
+(animateview -0.5909938 -0.6220027 0.001608014 0.001608014)
+
+(usleep 708984)
+(zoomcenter -0.59135161575971778933 -0.62234914198823029308)
+(animateview -0.5910779 -0.6221213 0.001139446 0.001139446)
+
+(usleep 493467)
+(zoomcenter -0.59138228378363149912 -0.62231276336676023716)
+
+(usleep 147148)
+(zoomcenter -0.59143596245709859337 -0.62226182415662870492)
+(animateview -0.5911545 -0.62217836 0.00083467683 0.00083467683)
+
+(usleep 664492)
+(zoomcenter -0.59147503093488323125 -0.62228654058211452639)
+(animateview -0.59123301 -0.62220193 0.00060438138 0.00060438138)
+
+(usleep 574992)
+(zoomcenter -0.59148487628761120354 -0.6222865405821145265)
+(animateview -0.59129222 -0.62222255 0.000457072 0.000457072)
+
+(usleep 50797)
+(zoomcenter -0.59148294967599173376 -0.62225683090224463359)
+
+(usleep 315021)
+(zoomcenter -0.59146978729818324848 -0.62225487923932820304)
+
+(usleep 657720)
+(zoomcenter -0.5914530315285976825 -0.62226197774269942809)
+(animateview -0.59136281 -0.62223557 0.00027798147 0.00027798147)
+
+(usleep 649751)
+(zoomcenter -0.59144867546981413556 -0.62227644586621774677)
+(animateview -0.59138715 -0.62224299 0.0002027398 0.0002027398)
+
+(usleep 79637)
+(zoomcenter -0.59145035314421140829 -0.62227047565939710711)
+
+(usleep 320490)
+(zoomcenter -0.59144820016748629187 -0.62227728599496896978)
+
+(usleep 379492)
+(zoomcenter -0.59144939457930694056 -0.62227516076566050535)
+(animateview -0.59140668 -0.62225295 0.00013880662 0.00013880662)
+
+(usleep 172942)
+(zoomcenter -0.59144884524764033132 -0.62227320590262622701)
+
+(usleep 390158)
+(zoomcenter -0.59144429863493464038 -0.62226727335694404278)
+(animateview -0.59141671 -0.62225777 0.00010558291 0.00010558291)
+
+(usleep 732385)
+(zoomcenter -0.59144142468828634208 -0.62227068245227857559)
+(animateview -0.5914249 -0.622260696 7.39707502E-05 7.39707502E-05)
+
+(usleep 714714)
+(zoomcenter -0.59139728925507639815 -0.62224771090660505382)
+(animateview -0.591428797 -0.622263131 5.22728252E-05 5.22728252E-05)
+
+(usleep 736275)
+(zoomcenter -0.59139776215558527807 -0.62224621501901834346)
+(animateview -0.591419331 -0.62225846 3.65507653E-05 3.65507653E-05)
+
+(usleep 247931)
+(zoomcenter -0.59139706224783988127 -0.62224820758396523815)
+
+(usleep 156131)
+(zoomcenter -0.59139836226876607643 -0.62225005809651121546)
+
+(usleep 198397)
+(zoomcenter -0.59139812674795921946 -0.6222515946667407782)
+(animateview -0.591413878 -0.622255959 2.72756039E-05 2.72756039E-05)
+
+(usleep 401675)
+(zoomcenter -0.59139783599021713667 -0.62225113480162226571)
+
+(usleep 97965)
+(zoomcenter -0.59139718955308884381 -0.62224992981733977297)
+
+(usleep 409834)
+(zoomcenter -0.59139832505038205914 -0.62224876247391557569)
+(animateview -0.591408081 -0.622254023 1.75335957E-05 1.75335957E-05)
+
+(usleep 636372)
+(zoomcenter -0.59139760190925815312 -0.62224783869469734457)
+(animateview -0.591405468 -0.622252601 1.28704632E-05 1.28704632E-05)
+
+(usleep 553426)
+(zoomcenter -0.59139781412275886624 -0.62224849319040437175)
+(animateview -0.5914036186 -0.6222514932 9.836136498E-06 9.836136498E-06)
+
+(usleep 86419)
+(zoomcenter -0.59139834180083273896 -0.62224791540390862992)
+
+(usleep 91172)
+(zoomcenter -0.59139799224694331368 -0.62224809968979056445)
+
+(usleep 560018)
+(zoomcenter -0.59139814023435080412 -0.62224788903737052306)
+(animateview -0.5914019357 -0.6222504666 6.873546451E-06 6.873546451E-06)
+
+(usleep 128199)
+(zoomcenter -0.59139839006543567162 -0.62224825124458321989)
+
+(usleep 407431)
+(zoomcenter -0.59139809388742486674 -0.62224841339615200009)
+(animateview -0.591401109 -0.62224995 5.298639403E-06 5.298639403E-06)
+
+(usleep 73413)
+(zoomcenter -0.59139789648363192011 -0.62224880366571966463)
+
+(usleep 73380)
+(zoomcenter -0.59139768481878476284 -0.6222491802831718481)
+
+(usleep 403275)
+(zoomcenter -0.59139771928443058568 -0.6222493642584123092)
+(animateview -0.591400318 -0.6222497496 4.056020309E-06 4.056020309E-06)
+
+(usleep 92951)
+(zoomcenter -0.59139770274018801531 -0.62224916800946595478)
+
+(usleep 718350)
+(zoomcenter -0.59139777266766208985 -0.62224897446307794122)
+(animateview -0.5913994672 -0.6222495624 2.734717315E-06 2.734717315E-06)
+
+(usleep 317887)
+(zoomcenter -0.5913976922345006949 -0.62224903409455966519)
+
+(usleep 406677)
+(zoomcenter -0.59139775020005902538 -0.62224907338549969611)
+(animateview -0.59139895 -0.6222494003 1.923187954E-06 1.923187954E-06)
+
+(usleep 573034)
+(zoomcenter -0.59139770007333778562 -0.62224901392483726001)
+(animateview -0.5913986574 -0.6222493196 1.455825276E-06 1.455825276E-06)
+
+(usleep 559046)
+(zoomcenter -0.59139770963711510708 -0.62224901959714656776)
+(animateview -0.5913984299 -0.6222492471 1.109560102E-06 1.109560102E-06)
+
+(usleep 476791)
+(zoomcenter -0.59139770206378414744 -0.62224900163007173962)
+
+(usleep 472816)
+(zoomcenter -0.59139771413829044747 -0.62224901595293438504)
+(animateview -0.59139816231 -0.62224915935 6.9949925285E-07 6.9949925285E-07)
+
+(usleep 493359)
+(zoomcenter -0.59139773074949487659 -0.62224903002745242359)
+
+(usleep 214387)
+(zoomcenter -0.59139772645794069344 -0.62224905039013709911)
+(animateview -0.59139803376 -0.62224911982 4.9595497364E-07 4.9595497364E-07)
+
+(usleep 475684)
+(zoomcenter -0.59139773327363782008 -0.62224904230531016266)
+
+(usleep 107853)
+(zoomcenter -0.59139771228962847787 -0.62224905187891654693)
+(animateview -0.5913979579 -0.6222491023 3.7351887159E-07 3.7351887159E-07)
+
+(usleep 455058)
+(zoomcenter -0.59139772136930585512 -0.62224905034029141489)
+
+(usleep 743005)
+(zoomcenter -0.59139771866220852583 -0.62224905355146893681)
+(animateview -0.59139785238 -0.62224907964 2.0869955789E-07 2.0869955789E-07)
+
+(usleep 110679)
+(animateview -0.59139784876 -0.62224907893 2.0305710042E-07 2.0305710042E-07)
+
+(stop)
+(wait)
+(initstate)
+(clearscreen)
+(message "fastjulia1")
+(textsleep)
+(clearscreen)
+(message "fastjulia2")
+(textsleep)
+(clearscreen)
+(message "fastjulia3")
+(textsleep)
+(display)
+(view -0.75 0 2.5 2.5)
+(wait)
+(fastjulia #t)
+(juliaseed -1.7721656976744186704 0)
+(usleep 1000000)
+(morphjulia 0.53561046511627915254 -0)
+(usleep 3000000)
+(morphjulia -0.28633720930232555162 -1.0750000000000000692)
+(usleep 3000000)
+(morphjulia -1.7721656976744186704 0)
+(usleep 3000000)
+(usleep 1000000)
+(fastjulia #f)
+(clearscreen)
+(message "rotation")
+(textsleep)
+(display)
+(fastrotate #t)
+(usleep 1000000)
+
+(morphview -1.861217 -2.963977E-05 0.004662986 0.004662986)
+(morphangle 720)
+(usleep 10000000)
+(fastrotate #f)
+(cycling #f)
+(message "cycling")
+(textsleep)
+(display)
+(filter 'palette #t)
+(cycling #t)
+(morphview -1.863875649 -4.344248115E-08 4.042594923E-06 4.042594923E-06)
+(usleep 5000000)
+(usleep 1000000)
+(cycling #f)
+(usleep 1000000)
+(filter 'palette #f)
+
+
+(clearscreen)
+(message "bailout")
+(textsleep)
+(display)
+
+(textposition 'center 'bottom)
+(defaultpalette 0)
+(formula 'mandel)
+(bailout 4)
+(outcoloring 9)
+(view -0.75 0 2.5 2.5)
+(message "bailout1")
+(textsleep)
+(display)
+
+(defaultpalette 0)
+(formula 'mandel)
+(bailout 64)
+(outcoloring 9)
+(view -0.75 0 2.5 2.5)
+(message "bailout2")
+(textsleep)
+(display)
+
+(clearscreen)
+(message "bailout3")
+(textsleep)
+(display)
+
+
+(defaultpalette 0)
+(formula 'barnsley)
+(cycling #f)
+(periodicity #t)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(bailout 0)
+(outcoloring 0)
+(incoloring 0)
+(julia #t)
+(juliaseed -0.6 1.1)
+(plane 0)
+(view 0 0 2.5 2.5)
+(textposition 'center 'bottom)
+(message "bailout4")
+(bailout 0.2)
+(wait)
+(bailout 0.4)
+(wait)
+(bailout 0.6)
+(wait)
+(bailout 0.8)
+(wait)
+(bailout 1.0)
+(wait)
+(bailout 1.2)
+(wait)
+(bailout 1.4)
+(wait)
+(bailout 1.6)
+(wait)
+(bailout 1.8)
+(wait)
+(bailout 2.0)
+(wait)
+(bailout 2.2)
+(wait)
+(bailout 2.4)
+(wait)
+(bailout 2.6)
+(wait)
+(bailout 2.8)
+(wait)
+(bailout 3.0)
+(wait)
+(bailout 3.2)
+(wait)
+(bailout 3.4)
+(wait)
+(bailout 3.6)
+(wait)
+(bailout 3.8)
+(wait)
+(bailout 4.0)
+(wait)
+(bailout 4.2)
+(wait)
+(bailout 4.4)
+(wait)
+(bailout 4.6)
+(wait)
+(bailout 4.8)
+(wait)
+(textsleep)
+
+(clearscreen)
+(message "end")
+(usleep 4000000)
+
+
diff --git a/tutorial/otherfr.xaf b/tutorial/otherfr.xaf
new file mode 100644
index 0000000..278b0b2
--- /dev/null
+++ b/tutorial/otherfr.xaf
@@ -0,0 +1,12 @@
+;Other fractal types in Xaos
+;Animation file is made by Arpad Fekete
+;This file was made in January 2006
+(initstate)
+(clearscreen)
+(textposition 'center 'middle)
+(message "otherfr1")
+(usleep 3000000)
+
+(load "trice.xaf")
+(load "fourfr.xaf")
+(load "classic.xaf")
diff --git a/tutorial/outcolor.xaf b/tutorial/outcolor.xaf
new file mode 100644
index 0000000..6e30929
--- /dev/null
+++ b/tutorial/outcolor.xaf
@@ -0,0 +1,342 @@
+; XaoS features overview by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(textposition 'center 'middle)
+(message "outcolor")
+(usleep 3000000)
+(display)
+
+(filter 'palette #t)
+(palette 3 506457029 0)
+(outcoloring 10)
+(incoloring 4)
+(outtcoloring 0)
+
+(textposition 'center 'bottom)
+(message "outcolor1")
+(textsleep)
+(initstate)
+(textposition 'center 'bottom)
+(display)
+(message "outcolor2")
+(textsleep)
+(display)
+(message "outcolor3")
+(textsleep)
+(display)
+(message "outcolor4")
+(textsleep)
+(display)
+(message "outcolor5")
+(textsleep)
+; PAUSE
+(usleep 2000000)
+(clearscreen)
+(usleep 1000000)
+(clearscreen)
+(textposition 'center 'middle)
+(message "iterreal")
+(textsleep)
+(display)
+(textposition 'center 'bottom)
+
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view -1.57696 -0.00116581 0.0500441 0.0500441)
+(message "iterreal1")
+(textsleep)
+(outcoloring 1)
+(usleep 3000000)
+(display)
+
+(palette 1 1245049028 0)
+(formula 'barnsley)
+(juliaseed 1.6755087209302326659 0)
+(maxiter 170)
+(outcoloring 1)
+(incoloring 0)
+(plane 5)
+(view 0.0559 0.139 14.8 14.8)
+(usleep 3000000)
+
+(palette 1 198115837 0)
+(formula 'barnsley)
+(juliaseed 1.8230639619079263791 -0.04306094545671143516)
+(angle 49.2)
+(plane 5)
+(view 0.03302 0.04938 5.449 5.449)
+(usleep 3000000)
+
+(defaultpalette 0)
+(formula 'phoenix)
+(juliaseed 0.47420058139534886771 -0.3250000000000000209)
+(plane 0)
+(view 0.4427808 -0.1555987 0.001142675 0.001142675)
+(usleep 3000000)
+
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 170)
+(outcoloring 1)
+(incoloring 0)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+(message "iterimag")
+(textsleep)
+(outcoloring 2)
+(display)
+(message "iterimag2")
+(textsleep)
+
+(palette 1 1681768548 0)
+(formula 'barnsley)
+(juliaseed 0.02286743796152808828 1.9925366161234112981)
+(maxiter 170)
+(outcoloring 2)
+(incoloring 0)
+(plane 5)
+(view -0.02256 -0.01292 1.588 1.588)
+(display)
+(usleep 3000000)
+
+(palette 1 461113744 0)
+(formula 'magnet)
+(juliaseed 3.0220425832406331557 0.04789220763071800463)
+(julia #t)
+(plane 5)
+(view -0.0024762 0.011078 0.4363 0.63991)
+(usleep 3000000)
+
+(palette 1 1158293466 0)
+(formula 'octal)
+(juliaseed -0.61556665985505426477 0)
+(angle 90.5)
+(julia #t)
+(plane 5)
+(view -0.2206 -0.04937 8.35 8.35)
+(usleep 3000000)
+
+
+; PAUSE
+(usleep 2000000)
+(clearscreen)
+(usleep 1000000)
+(clearscreen)
+(textposition 'center 'middle)
+(message "iprdi")
+(textsleep)
+(display)
+
+(palette 1 1615867634 0)
+(formula 'mandel)
+(maxiter 170)
+(outcoloring 3)
+(incoloring 0)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+(usleep 3000000)
+
+(palette 1 1330071445 0)
+(formula 'phoenix)
+(juliaseed 0.50445040403954712195 -0.38196819024687423759)
+(angle -268)
+(autorotate #f)
+(plane 1)
+(view 1.04 0.17 11 11)
+(usleep 3000000)
+
+(palette 1 1126535193 0)
+(formula 'barnsley)
+(juliaseed -94.896551724137925513 0)
+(plane 5)
+(view -0.002724 -0.01674 8.738 8.738)
+(usleep 3000000)
+
+(palette 1 1126535193 0)
+(formula 'phoenix)
+(plane 0)
+(view -0.161155 -0.537444 0.0916634 0.0916634)
+(usleep 4000000)
+(clearscreen)
+(usleep 1000000)
+(message "sum")
+(textsleep)
+(display)
+
+(palette 1 2130172061 0)
+(formula 'magnet)
+(angle -90.4)
+(maxiter 170)
+(outcoloring 4)
+(incoloring 0)
+(plane 1)
+(view -0.1709 -0.03823 1.482 2.173)
+(usleep 3000000)
+
+(palette 1 1323513393 0)
+(formula 'barnsley)
+(juliaseed -0.00230571110290458286 1.6385322985723904033)
+(plane 1)
+(view -0.002306 -0.04014 3.391 3.391)
+(usleep 3000000)
+
+(palette 1 1851145686 0)
+(formula 'phoenix)
+(juliaseed 0.27864691783831166054 0.01692485553314466791)
+(angle -91.5)
+(plane 2)
+(view 0.00716 -0.356 11.3 11.3)
+(usleep 3000000)
+; PAUSE
+(usleep 2000000)
+(clearscreen)
+(usleep 1000000)
+(clearscreen)
+(message "decomp")
+(textsleep)
+(display)
+
+
+(defaultpalette 0)
+(formula 'mandel)
+(maxiter 59)
+(outcoloring 5)
+(incoloring 0)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+(usleep 3000000)
+
+(palette 1 2088834949 0)
+(formula 'barnsley)
+(juliaseed -1.0748546511627907668 -0.15000000000000000963)
+(angle 67.6)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 5)
+(incoloring 0)
+(plane 5)
+(view 0.01213 -0.04933 2.345 2.345)
+(usleep 3000000)
+
+(palette 1 1783717633 0)
+(formula 'barnsley)
+(juliaseed -1.0732010262763361698 -0.00156225599106755235)
+(plane 3)
+(view 1.115 -0.02274 4.276 4.276)
+(usleep 2000000)
+
+(palette 1 997905221 0)
+(formula 'barnsley)
+(juliaseed 1.0335457219786930816 0.09007071657342203218)
+(plane 3)
+(view 1.115 -0.02274 4.276 4.276)
+(usleep 2000000)
+
+(palette 1 260946575 0)
+(formula 'magnet)
+(juliaseed 1.9902223042457084012 0.00969657718521371465)
+(julia #t)
+(plane 0)
+(view 0.07979 0.04018 1.213 1.779)
+(usleep 3000000)
+
+(palette 1 260946575 0)
+(formula 'mandel9)
+(angle 23.5)
+(plane 1)
+(view 0 0 2.5 2.5)
+(usleep 3000000)
+
+(palette 1 941542766 0)
+(formula 'barnsley)
+(juliaseed -1.2698037790697675236 0.02604166666666666837)
+(plane 3)
+(view 1.018 -0.0588 4.577 4.577)
+(usleep 3000000)
+
+(palette 1 1737172376 0)
+(formula 'barnsley)
+(juliaseed 1.0200197307798127969 -0.02189586455981775694)
+(plane 5)
+(view 0.05335 0.06079 2.747 2.747)
+(usleep 3000000)
+; PAUSE
+(usleep 2000000)
+(clearscreen)
+(usleep 1000000)
+(clearscreen)
+(textposition 'center 'middle)
+(message "bio")
+(textsleep)
+(display)
+
+(palette 1 1872601163 0)
+(formula 'mandel5)
+(juliaseed 0.58607974436293026302 0.00011176997199701769)
+(maxiter 153)
+(outcoloring 6)
+(incoloring 0)
+(julia #t)
+(plane 1)
+(view -0.04105 0.02435 4.935 4.935)
+(usleep 3000000)
+
+
+
+(palette 1 105062163 0)
+(formula 'barnsley)
+(julia #t)
+(juliaseed 2.8236810422098707935 0.05811237065355640669)
+(view 0.005205 -0.002584 1.601 1.601)
+(usleep 3000000)
+
+(palette 1 833849989 0)
+(formula 'mandel5)
+(julia #t)
+(juliaseed 0.76428252944698614841 -0.40658080189405711885)
+(view 0.07452 -0.008817 5.044 5.044)
+(usleep 3000000)
+
+(palette 1 277244305 0)
+(formula 'newton)
+(julia #t)
+(juliaseed -1.7896045256217635593 0.04005360812061721953)
+(plane 3)
+(view 1.24 0.13 11.4 11.4)
+(usleep 3000000)
+
+(palette 1 1938959247 0)
+(formula 'mandel5)
+(julia #t)
+(juliaseed -0.82233882390131325928 0.83264474211181399984)
+(plane 1)
+(view 0.2343 0.001337 5.078 5.078)
+(usleep 3000000)
+
+
+(palette 1 2005948595 0)
+(formula 'barnsley)
+(julia #t)
+(juliaseed 0 -2.1052631578947367066)
+(plane 5)
+(view 0.003888 -0.004145 1.757 1.757)
+(usleep 3000000)
+
+
+(palette 1 446680187 0)
+(formula 'mandel9)
+(julia #t)
+(juliaseed 0.70552939851789381277 -0.00148898531548975377)
+(plane 1)
+(view 0.0256 0.05061 3.175 3.175)
+(usleep 3000000)
+
+(load "pause.xhf")
+
+(load "outnew.xhf")
diff --git a/tutorial/outnew.xhf b/tutorial/outnew.xhf
new file mode 100644
index 0000000..bcb2a95
--- /dev/null
+++ b/tutorial/outnew.xhf
@@ -0,0 +1,208 @@
+(clearscreen)
+(message "potential")
+(textsleep)
+(display)
+(defaultpalette 0)
+(formula 'mandel)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 7)
+(incoloring 0)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+(usleep 2000000)
+
+(palette 1 1827611901 0)
+(formula 'mandel5)
+(juliaseed 0.57610567620503761637 -0.00036830714146752355345)
+(angle 57.4)
+(julia #t)
+(plane 1)
+(view -0.1414 -0.00246 4.176 4.176)
+(usleep 2000000)
+
+
+(palette 1 109680931 0)
+(formula 'phoenix)
+(juliaseed 0.48535441665931129164 -0.34884112172509833922)
+(angle -271)
+(plane 2)
+(view 0.7794 0.08007 7.023 7.023)
+(usleep 2000000)
+
+(palette 1 1244298651 0)
+(formula 'barnsley)
+(juliaseed 1.6807776162790698756 -0.34895833333333335581)
+(angle 127)
+(plane 4)
+(view -0.5691 -0.005598 4.176 4.176)
+(usleep 2000000)
+
+
+
+(palette 1 269758741 0)
+(formula 'barnsley)
+(juliaseed -0.030963345141690833085 1.7180484667357005222)
+(plane 1)
+(view 0.01973 0.02145 3.436 3.436)
+
+(usleep 2000000)
+
+
+(palette 1 992843336 0)
+(filter 'palette #t)
+(formula 'barnsley)
+(juliaseed -1.546548770316740496 0)
+(angle 90)
+(plane 2)
+(view -1.283 -0.07217 3.724 3.724)
+(usleep 2000000)
+(usleep 2000000)
+(clearscreen)
+(usleep 1000000)
+(defaultpalette 0)
+(textposition 'center 'bottom)
+(outcoloring 8)
+(formula 'mandel)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+
+; DECOMPOSITION
+
+(message "cdecom")
+(textsleep)
+(display)
+(message "cdecom2")
+(textsleep)
+(display)
+(cycling #t)
+(cyclingspeed -30)
+(fastrotate #t)
+(autorotate #t)
+(usleep 8000000)
+(clearscreen)
+(cycling #f)
+(filter 'palette #f)
+(textposition 'center 'middle)
+(autorotate #f)
+(message "cdecom3")
+(textsleep)
+(fastrotate #f)
+(defaultpalette 0)
+(formula 'newton)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(autorotate #f)
+(maxiter 170)
+(incoloring 0)
+(plane 0)
+(view 0 0 2.5 2.5)
+(display)
+(textposition 'center 'bottom)
+(message "cdecom4")
+(textsleep)
+
+(palette 1 2076935928 0)
+(formula 'phoenix)
+(cycling #f)
+(maxiter 222)
+(view 0.000736974 -0.498205 0.0233898 0.0233898)
+(display)
+(usleep 3000000)
+
+(palette 1 95361573 0)
+(formula 'mandel)
+(maxiter 481)
+(incoloring 1)
+(view 0.3412215406 -0.04775941323 2.360577158E-06 2.360577158E-06)
+(usleep 3000000)
+
+(palette 1 2020659804 0)
+(formula 'barnsley)
+(juliaseed 1.1447857761691383914 -7.1800986429855469155E-07)
+(plane 1)
+(view 0.04009 0.1683 4.207 4.207)
+(usleep 3000000)
+
+(palette 1 1138140310 0)
+(formula 'mandel3)
+(juliaseed 0.46366279069767444838 -0.03750000000000000241)
+(julia #t)
+(plane 1)
+(view 0.3126 0.1833 5.519 5.519)
+(usleep 3000000)
+
+(defaultpalette 0)
+(formula 'barnsley)
+(juliaseed 1.0200197307798127969 -0.02189586455981775694)
+(plane 3)
+(view 0.8766 -0.1051 3.265 3.265)
+(usleep 3000000)
+
+
+
+(palette 1 1374519064 0)
+(formula 'mandel5)
+(juliaseed 0.72055268011327479071 0.20317223111390699016)
+(julia #t)
+(plane 1)
+(view 0.2435 0.1847 7.324 7.324)
+(usleep 3000000)
+
+
+; SMOOTH
+(usleep 2000000)
+(clearscreen)
+(usleep 1000000)
+(clearscreen)
+(filter 'truecolor #t)
+(textposition 'center 'middle)
+(message "smooth")
+(textsleep)
+(clearscreen)
+(message "smooth1")
+(textsleep)
+(clearscreen)
+(message "smooth2")
+(textsleep)
+
+(display)
+(defaultpalette 0)
+(formula 'mandel)
+(outcoloring 9)
+(incoloring 0)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+(usleep 2000000)
+
+(palette 1 1506744519 0)
+(formula 'phoenix)
+(juliaseed 0.49022288223055247598 -0.39052593130985661457)
+(angle -270)
+(maxiter 329)
+(plane 2)
+(view 0.8575 -0.2268 9.693 9.693)
+(usleep 2000000)
+
+(defaultpalette 0)
+(formula 'phoenix)
+(juliaseed 0.37936046511627909421 -0.22500000000000001444)
+(angle -270)
+(maxiter 170)
+(plane 1)
+(view -1.65 -0.298 10.3 10.3)
+(usleep 2000000)
+
+(palette 1 523392987 0)
+(formula 'mandel4)
+(juliaseed -0.81140988372093028472 -0.10000000000000000642)
+(maxiter 170)
+(julia #t)
+(plane 0)
+(view -0.65025 -0.050542 0.18216 0.18216)
+(usleep 2000000)
+(filter 'truecolor #f)
diff --git a/tutorial/palette.xaf b/tutorial/palette.xaf
new file mode 100644
index 0000000..4edce46
--- /dev/null
+++ b/tutorial/palette.xaf
@@ -0,0 +1,5 @@
+(load "head.xhf")
+(clearscreen)
+(message "pal")
+(usleep 4000000)
+(load "palette.xhf")
diff --git a/tutorial/palette.xhf b/tutorial/palette.xhf
new file mode 100644
index 0000000..4ab95a9
--- /dev/null
+++ b/tutorial/palette.xhf
@@ -0,0 +1,90 @@
+(initstate)
+(clearscreen)
+(message "pal0")
+(textsleep)
+(clearscreen)
+(message "pal1")
+(textsleep)
+(clearscreen)
+(message "pal2")
+(textsleep)
+(display)
+(formula 'barnsley)
+(filter 'palette #t)
+(juliaseed 1.0221656976744186705 -0.037500000000000002407)
+(plane 1)
+(view 0.1341 0.03897 9.02 9.02)
+(textposition 'center 'bottom)
+(wait)
+(message "pal3")
+(textsleep)
+(display)
+(cycling #t)
+(usleep 3000000)
+(palette 1 150949959 0)
+(usleep 3000000)
+(palette 1 1502890526 0)
+(usleep 3000000)
+(palette 1 642437974 0)
+(usleep 3000000)
+(message "pal4")
+(textsleep)
+(display)
+
+(palette 2 999658208 0)
+(usleep 3000000)
+(palette 2 1165738401 0)
+(usleep 3000000)
+(palette 2 1668121821 0)
+(usleep 3000000)
+(palette 2 2140293197 0)
+(usleep 3000000)
+(palette 2 673420460 0)
+(usleep 3000000)
+(palette 2 271319198 0)
+(usleep 3000000)
+(palette 2 1491365278 0)
+(usleep 3000000)
+(palette 2 645592266 0)
+(usleep 3000000)
+(palette 2 1642408713 0)
+(usleep 3000000)
+(palette 2 2043158660 0)
+(usleep 3000000)
+(palette 2 49573586 0)
+(usleep 3000000)
+(palette 2 518313506 0)
+(usleep 3000000)
+(palette 2 2064431961 0)
+(message "pal5")
+(textsleep)
+(display)
+
+(palette 3 2091177578 0)
+(usleep 3000000)
+(palette 3 217046201 0)
+(usleep 3000000)
+(palette 3 1454067645 0)
+(usleep 3000000)
+(palette 3 223337850 0)
+(usleep 3000000)
+(palette 3 1566818791 0)
+(usleep 3000000)
+(palette 3 1875286429 0)
+(usleep 3000000)
+(palette 3 499077340 0)
+(usleep 3000000)
+(palette 3 506263511 0)
+(usleep 3000000)
+(palette 3 218877334 0)
+(usleep 3000000)
+(palette 3 570595679 0)
+(usleep 3000000)
+(palette 3 546033592 0)
+(usleep 3000000)
+(palette 3 640132085 0)
+(usleep 3000000)
+
+
+(cycling #f)
+(filter 'palette #f)
diff --git a/tutorial/pause.xhf b/tutorial/pause.xhf
new file mode 100644
index 0000000..851b786
--- /dev/null
+++ b/tutorial/pause.xhf
@@ -0,0 +1,4 @@
+; PAUSE
+(usleep 2000000)
+(clearscreen)
+(usleep 1000000)
diff --git a/tutorial/pert.xaf b/tutorial/pert.xaf
new file mode 100644
index 0000000..c8c6c33
--- /dev/null
+++ b/tutorial/pert.xaf
@@ -0,0 +1,5 @@
+(load "head.xhf")
+(clearscreen)
+(message "pert0")
+(usleep 4000000)
+(load "pert.xhf")
diff --git a/tutorial/pert.xhf b/tutorial/pert.xhf
new file mode 100644
index 0000000..3926587
--- /dev/null
+++ b/tutorial/pert.xhf
@@ -0,0 +1,74 @@
+(clearscreen)
+(message "pert1")
+(textsleep)
+(clearscreen)
+(message "pert2")
+(textsleep)
+(clearscreen)
+(message "pert3")
+(textsleep)
+(display)
+(usleep 1000000)
+(perturbation -0.012354651162790650232 0.062500000000000004012)
+(wait)
+(perturbation 0.029796511627907026854 0.17500000000000001134)
+(wait)
+(perturbation 0.21947674418604657407 0.37500000000000002418)
+(wait)
+(perturbation 0.59883720930232566828 0.73750000000000004755)
+(usleep 100000)
+(textposition 'center 'bottom)
+(message "pert4")
+(textsleep)
+(display)
+(morphview -0.758669 -0.1510504 0.003136517 0.003136517)
+(usleep 5000000)
+(wait)
+
+(initstate)
+(palette 3 1298613279 0)
+(formula 'newton)
+(perturbation 0.29505813953488373993 -0.012500000000000000802)
+(angle 270.17)
+(plane 2)
+(view -1.877 0.04055 6.545 6.545)
+(usleep 5000000)
+
+(initstate)
+(palette 2 661894305 0)
+(formula 'octal)
+(perturbation 0 -0.025000000000000001605)
+(plane 1)
+(view 0.452 -0.086 14 14)
+(usleep 5000000)
+
+(initstate)
+(palette 2 783556080 0)
+(formula 'newton)
+(perturbation -0.36882267441860467488 -0.012500000000000000802)
+(incoloring 1)
+(view 2.5795 0.027209 0.99831 0.99831)
+(usleep 5000000)
+
+(initstate)
+(filter 'truecolor #t)
+(palette 2 2140656163 0)
+(formula 'barnsley)
+(perturbation 1.6755087209302326659 0)
+(angle -90.103)
+(outcoloring 10)
+(outtcoloring 9)
+(julia #f)
+(view 2.036 0.009591 1.128 1.128)
+(usleep 5000000)
+
+(initstate)
+(palette 2 1570942905 0)
+(formula 'newton)
+(perturbation -0.23183139534883722422 -0.012500000000000000802)
+(outcoloring 9)
+(incoloring 7)
+(plane 5)
+(view -0.0582 -0.01618 2.798 2.798)
+(usleep 5000000)
+
diff --git a/tutorial/phoenix.xaf b/tutorial/phoenix.xaf
new file mode 100644
index 0000000..20d0cb6
--- /dev/null
+++ b/tutorial/phoenix.xaf
@@ -0,0 +1,167 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(textposition 'center 'middle)
+(message "intro5")
+(usleep 5000000)
+
+(palette 1 1792966073 0)
+(formula 'phoenix)
+(julia #f)
+(plane 0)
+(view -0.379 0.2916 3.284 3.284)
+(display)
+(color 'black)
+(textposition 'center 'bottom)
+(message "phoenix")
+(textsleep)
+(color 'white)
+
+(palette 1 1324551901 0)
+(formula 'phoenix)
+(julia #f)
+(plane 0)
+(view 0.188267 0.923587 0.0100905 0.0100905)
+(display)
+(usleep 2000000)
+
+(palette 1 1627920637 0)
+(formula 'phoenix)
+(angle 150)
+(julia #f)
+(view 0.471443 -0.296993 0.0302053 0.0302053)
+(usleep 2000000)
+
+(palette 1 1627920637 0)
+(morphview 0.390047 -0.191011 0.0262958 0.0262958)
+(usleep 6000000)
+(wait)
+
+(palette 1 18031315 0)
+(angle 21.2)
+(julia #f)
+(view -1.7599358 0.014872406 0.00016976324 0.00016976324)
+(usleep 2000000)
+
+(palette 1 257898815 0)
+(formula 'phoenix)
+(outcoloring 8)
+(julia #f)
+(view 0.25574 0.45129 0.19793 0.19793)
+(usleep 2000000)
+
+(palette 1 1729125249 0)
+(formula 'phoenix)
+(angle 177)
+(julia #f)
+(view 0.22169 0.75312 0.17615 0.17615)
+
+(usleep 2000000)
+(palette 1 1090844670 0)
+(formula 'phoenix)
+(angle 21.2)
+(outcoloring 0)
+(julia #f)
+(view -1.6126147398 -0.016209215424 1.5592934165E-07 1.5592934165E-07)
+
+
+(message "phoenix1")
+(textsleep)
+
+(palette 1 1729125249 0)
+(formula 'phoenix)
+(display)
+(angle 159)
+(julia #f)
+(view -1.0903 0.1781 0.12263 0.12263)
+(usleep 3000000)
+
+(palette 1 1792966073 0)
+(angle 0)
+(formula 'phoenix)
+(julia #f)
+(view -0.379 0.2916 3.284 3.284)
+
+(display)
+(color 'black)
+(message "phoenix2")
+(textsleep)
+
+(display)
+(morphview -1.75817 -0.000301212 0.0378343 0.0378343)
+(usleep 4000000)
+(wait)
+(palette 1 326098313 0)
+(formula 'phoenix)
+(juliaseed -1.7666199754006518578 0.00687153883595452393)
+(outcoloring 1)
+(plane 0)
+(view -1.760882 0.01045051 0.003687006 0.003687006)
+(color 'white)
+(message "phoenix3")
+(textsleep)
+(display)
+(message "phoenix4")
+(textsleep)
+
+
+(display)
+(defaultpalette 0)
+(formula 'phoenix)
+(maxiter 271)
+(plane 0)
+(view 0.0068593 -0.489751 0.0485972 0.0485972)
+
+(usleep 3000000)
+
+
+(palette 1 504531543 0)
+(juliaseed 0.14376580817539892084 0.3944496374263076205)
+(angle 271)
+(plane 1)
+(view 0.7831 0.2092 6.044 6.044)
+
+(usleep 3000000)
+
+
+(palette 1 1794703246 0)
+(formula 'phoenix)
+(filter 'edge2 #t)
+(angle 0)
+(outcoloring 2)
+(plane 0)
+(view -0.051043 0.83791 0.13455 0.13455)
+(usleep 3000000)
+(filter 'edge2 #f)
+
+(palette 1 906148114 0)
+(formula 'phoenix)
+(juliaseed 0.43390385732938146351 -0.31608426045400182656)
+(angle -270)
+(outcoloring 0)
+(plane 0)
+(view 0.04333 0.005463 1.846 1.846)
+(usleep 3000000)
+
+(palette 1 1283437285 0)
+(formula 'phoenix)
+(juliaseed 0.1901522684107088305 0.76657698818178892958)
+(angle -156)
+(maxiter 331)
+(outcoloring 1)
+(plane 0)
+(view 0.29204 0.63386 0.16135 0.16135)
+(usleep 3000000)
+
+(palette 1 245241219 0)
+(formula 'phoenix)
+(juliaseed 0.086781190600191699449 0.56503351835647285618)
+(angle 33.7)
+(maxiter 170)
+(outcoloring 4)
+(plane 1)
+(view -0.9381658 0.3498999 0.003672936 0.003672936)
+(usleep 3000000)
+
diff --git a/tutorial/plane.xaf b/tutorial/plane.xaf
new file mode 100644
index 0000000..2bc87df
--- /dev/null
+++ b/tutorial/plane.xaf
@@ -0,0 +1,469 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(textposition 'center 'middle)
+(message "plane1")
+(textsleep)
+(clearscreen)
+(message "plane2")
+(textsleep)
+(message "plane3")
+(textsleep)
+(display)
+(textposition 'center 'bottom)
+(message "plane4")
+(textsleep)
+(plane 1)
+(view 1.104 -0.006179 4.362 4.362)
+(message "plane5")
+(textsleep)
+(display)
+(textsleep)
+(message "plane6")
+(textsleep)
+(display)
+(plane 0)
+(formula 'mandel9)
+(message "plane7")
+(textsleep)
+(plane 1)
+(display)
+(textsleep)
+
+(palette 1 1188637657 0)
+(formula 'mandel9)
+(juliaseed 0.073764534883720934955 0.78750000000000005065)
+(maxiter 170)
+(outcoloring 6)
+(incoloring 0)
+(julia #t)
+(plane 0)
+(view -0.001692 0.0241 2.813 2.813)
+(usleep 2000000)
+(plane 1)
+(view -0.01593 0.03685 6.772 6.772)
+(usleep 3000000)
+
+(palette 1 732864367 0)
+(formula 'mandel5)
+(julia #t)
+(juliaseed -0.57957848837209306053 -0.012500000000000000802)
+(plane 0)
+(view 0.04427 0.00332 2.425 2.425)
+(usleep 2000000)
+
+(plane 1)
+(view 0.02166 0.1158 8.534 8.534)
+(usleep 2000000)
+
+
+(palette 1 1361222802 0)
+(formula 'barnsley)
+(juliaseed 1.0318186784683188817 -0.060273352372932779713)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view 0.01969 0.03833 3.355 3.355)
+(usleep 2000000)
+
+(plane 1)
+(view 0.02601 0.04272 4.853 4.853)
+(usleep 2000000)
+
+
+(palette 1 212885046 0)
+(formula 'octal)
+(plane 0)
+(view 0.05694 -0.02316 1.966 1.966)
+(usleep 2000000)
+
+(plane 1)
+(view 0.174 -0.184 11.3 11.3)
+(usleep 2000000)
+
+(periodicity #t)
+
+(defaultpalette 0)
+(formula 'newton)
+(plane 0)
+(view 0 0 2.5 2.5)
+(usleep 2000000)
+
+(plane 1)
+(view 0.04362 0.0509 5.176 5.176)
+(usleep 2000000)
+
+(palette 1 540836405 0)
+(juliaseed -1.8805768479558366169 -0.001877370200985767042)
+(angle -93.1)
+(julia #t)
+(plane 0)
+(view 0.5411 0.0108 2.81 2.81)
+(usleep 2000000)
+(plane 1)
+(view -5.79 0.118 27.2 27.2)
+(usleep 2000000)
+(clearscreen)
+(textposition 'center 'middle)
+(usleep 1000000)
+(message "plane8")
+(textsleep)
+(clearscreen)
+(message "plane9")
+(textsleep)
+(display)
+
+(defaultpalette 0)
+(formula 'mandel)
+(plane 2)
+(view -0.5779664 -0.0001781381 0.006779166 0.006779166)
+(wait)
+
+(morphview 3.4E+02 8.1 5.4E+02 5.4E+02)
+(usleep 10000000)
+(wait)
+
+(periodicity #t)
+(textposition 'center 'bottom)
+(message "plane10")
+(textsleep)
+(display)
+
+(palette 1 665365024 0)
+(formula 'octal)
+(plane 0)
+(usleep 2000000)
+
+(angle 91.1)
+(plane 2)
+(view -1.426 -0.0505 7.569 7.569)
+(wait)
+
+(morphview -17 17 2.5E+02 2.5E+02)
+(usleep 10000000)
+(wait)
+(periodicity #t)
+
+(palette 1 1857311811 0)
+(formula 'newton)
+(autorotate #f)
+(outcoloring 1)
+(incoloring 0)
+(plane 0)
+(view 0.307 0.04789 2.876 2.876)
+(usleep 2000000)
+
+(plane 2)
+(view 1.5 -0.185 16.3 16.3)
+(usleep 2000000)
+
+
+(palette 1 1722789775 0)
+(formula 'barnsley)
+(julia #t)
+(juliaseed 1.0580842317638900964 0.14354313661511941807)
+(angle 277)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view 0.004665 -0.09511 3.297 3.297)
+(usleep 2000000)
+(plane 2)
+(view 3.658 0.02434 8.924 8.924)
+(usleep 2000000)
+
+
+(clearscreen)
+(textposition 'center 'middle)
+(message "lambda")
+(textsleep)
+(display)
+
+
+(defaultpalette 0)
+(formula 'mandel)
+(plane 3)
+(view 0.9424 0.05905 4.893 4.893)
+(usleep 2000000)
+
+(defaultpalette 0)
+(filter 'edge2 #t)
+(formula 'newton)
+(plane 0)
+(view 0 0 2.5 2.5)
+(usleep 2000000)
+
+
+(plane 3)
+(view 0.9993 0.09856 4.978 4.978)
+(usleep 2000000)
+
+
+(palette 1 2094204211 0)
+(filter 'edge2 #f)
+(formula 'barnsley)
+(juliaseed 1.0490855747152614393 0.057982090780981126467)
+(plane 0)
+(view -0.1129 0.009373 3.93 3.93)
+(usleep 2000000)
+
+(plane 3)
+(view 0.9009 -0.0657 5.412 5.412)
+
+(usleep 2000000)
+
+
+(palette 1 2078692293 0)
+(formula 'mandel3)
+(juliaseed 0.4215116279069767713 0)
+(outcoloring 5)
+(incoloring 0)
+(julia #t)
+(plane 0)
+(view -0.03046 0.04685 2.542 2.542)
+(usleep 2000000)
+
+
+(plane 3)
+(view 0.9033 0.002104 4.207 4.207)
+(usleep 2000000)
+
+(clearscreen)
+(usleep 1000000)
+(textposition 'center 'middle)
+(message "ilambda")
+(textsleep)
+(display)
+
+(defaultpalette 0)
+(formula 'mandel)
+(plane 4)
+(view -0.04515 -0.02451 2.068 2.068)
+(usleep 2000000)
+
+(palette 1 1366212337 0)
+(formula 'mandel9)
+(angle -270)
+(outcoloring 0)
+(incoloring 1)
+(plane 0)
+(view 0.001502 0.0273 2.242 2.242)
+(usleep 2000000)
+
+(plane 4)
+(view -0.3872 0.04514 2.5 2.5)
+
+(usleep 2000000)
+
+
+(palette 1 1930829025 0)
+(formula 'phoenix)
+(juliaseed 0.099603226790762798234 0.47676212210978708464)
+(angle 268)
+(outcoloring 2)
+(incoloring 0)
+(plane 0)
+(view -0.08725 -0.06146 2.051 2.051)
+(usleep 2000000)
+
+(plane 4)
+(view 0.1405 0.001392 3.027 3.027)
+(usleep 2000000)
+
+(palette 1 1389290519 0)
+(formula 'newton)
+(angle 267)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view 0 0 2.5 2.5)
+(usleep 2000000)
+
+(plane 4)
+(view -0.2721 0.04681 2.652 2.652)
+(usleep 2000000)
+
+(palette 1 1756695113 0)
+(formula 'newton)
+(juliaseed 1.0165192138719228486 -0.015320623070085100277)
+(angle -89.1)
+(julia #t)
+(plane 0)
+(view -0.1768 -0.0374 1.351 1.351)
+(usleep 2000000)
+
+(plane 4)
+(view -0.7622 -0.1073 3.375 3.375)
+(usleep 2000000)
+
+;(periodicity #f)
+(palette 1 1623798698 0)
+(formula 'octal)
+(angle -93.6)
+(plane 0)
+(view 0.05057 -0.04221 2.323 2.323)
+(usleep 2000000)
+
+(plane 4)
+(view 0.9905 -0.03988 4.759 4.759)
+(usleep 2000000)
+(periodicity #t)
+
+(clearscreen)
+(textposition 'center 'middle)
+(usleep 1000000)
+(message "imlambda")
+(textsleep)
+(display)
+
+(defaultpalette 0)
+(formula 'mandel)
+(outcoloring 0)
+(incoloring 0)
+(plane 5)
+(view 0.015265 0.0011209 0.77487 0.77487)
+(textposition 'center 'bottom)
+(message "imlambda2")
+(usleep 3000000)
+(display)
+(morphview -1.14 0.928 24.1 24.1)
+(usleep 10000000)
+(wait)
+(usleep 2000000)
+
+(palette 1 21687438 0)
+(formula 'octal)
+(plane 0)
+(view 0.05963 0.01683 2.246 2.246)
+(usleep 2000000)
+
+(plane 5)
+(view 0.02863 0.002291 1.644 1.644)
+(usleep 1000000)
+(wait)
+
+(plane 5)
+(morphview 0.204 0.0603 11.6 11.6)
+(usleep 10000000)
+(wait)
+
+(periodicity #t)
+
+(palette 1 2079102097 0)
+(formula 'newton)
+(outcoloring 8)
+(incoloring 0)
+(plane 0)
+(view 0 0 2.5 2.5)
+(usleep 2000000)
+
+(plane 5)
+(view 0.008223 0.01861 2.028 2.028)
+(usleep 2000000)
+
+(palette 1 442412479 0)
+(formula 'barnsley)
+(juliaseed 1.7326770974776322079 0.0057832737825164998559)
+(outcoloring 1)
+(incoloring 0)
+(plane 0)
+(view 0.03107 0.005783 3.747 3.747)
+(usleep 2000000)
+
+(plane 5)
+(view 0.02936 0.005783 3.545 3.545)
+(wait)
+
+(plane 5)
+(morphview 0.151 0.00578 18 18)
+(usleep 10000000)
+(wait)
+
+(palette 1 1478827629 0)
+(formula 'magnet)
+(juliaseed 2.0756547649234260199 -0.01485114343840790007)
+(maxiter 170)
+(outcoloring 6)
+(incoloring 0)
+(julia #t)
+(plane 0)
+(view -0.353 0.04624 7 10.27)
+(usleep 2000000)
+
+(plane 5)
+(view 0.029534 -0.0050964 0.39172 0.57452)
+(wait)
+
+(plane 5)
+(morphview 0.4815 -0.005096 4.936 7.239)
+(usleep 10000000)
+(wait)
+(usleep 1000000)
+(clearscreen)
+(usleep 1000000)
+(textposition 'center 'middle)
+(message "mick")
+(textsleep)
+(display)
+
+(defaultpalette 0)
+(formula 'mandel)
+(outcoloring 0)
+(incoloring 0)
+(plane 6)
+(view -0.75 0 2.5 2.5)
+(wait)
+
+(morphview -2E+01 1E+02 6E+03 6E+03)
+(usleep 10000000)
+(wait)
+
+(palette 1 13426138 0)
+(formula 'octal)
+(angle 269)
+(plane 0)
+(view -0.01687 -0.03823 1.773 1.773)
+(usleep 2000000)
+
+(plane 6)
+(view 1.101 -0.03384 1.614 1.614)
+(usleep 2000000)
+
+(palette 1 379808765 0)
+(formula 'newton)
+(angle -90)
+(plane 0)
+(view 0 0 2.5 2.5)
+(usleep 2000000)
+
+(plane 6)
+(view -12.4 -1.93 39.4 39.4)
+(usleep 2000000)
+
+(formula 'barnsley)
+(palette 1 874618280 0)
+(filter 'edge2 #t)
+(juliaseed 1.0537790697674419282 0.025000000000000001605)
+(plane 0)
+(view 0.05278 0.03018 3.195 3.195)
+(usleep 2000000)
+
+(plane 6)
+(view 0.213 0.0768 14.6 14.6)
+(usleep 2000000)
+(filter 'edge2 #f)
+
+(palette 1 1022524630 0)
+(formula 'phoenix)
+(julia #f)
+(plane 0)
+(view 0 0 2.5 2.5)
+(usleep 2000000)
+
+(plane 6)
+;(periodicity #f)
+(view -1E+03 2E+01 7E+03 7E+03)
+(usleep 2000000)
+(periodicity #t)
diff --git a/tutorial/power.xaf b/tutorial/power.xaf
new file mode 100644
index 0000000..5039568
--- /dev/null
+++ b/tutorial/power.xaf
@@ -0,0 +1,181 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+(clearscreen)
+(textposition 'center 'middle)
+(message "intro2")
+(usleep 5000000)
+(display)
+(defaultpalette 0)
+(formula 'mandel)
+(angle 0)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view -0.75 0 2.5 2.5)
+(textposition 'center 'bottom)
+(message "power")
+(textsleep)
+(display)
+(formula 'mandel3)
+(message "power2")
+(textsleep)
+(display)
+(message "power3")
+(textsleep)
+(display)
+(smoothmorph 'view 2000000 2000000)
+(morphview 0.266403 -1.26024 0.0388597 0.0388597)
+(usleep 5000000)
+(wait)
+(palette 1 590960451 0)
+(formula 'mandel3)
+(maxiter 311)
+(outcoloring 1)
+(incoloring 0)
+(plane 0)
+(view 0.4441447404 0.0215520724 6.388399051E-06 6.388399051E-06)
+(usleep 2000000)
+
+
+;(palette 1 1633607719 0)
+;(angle -320)
+;(maxiter 105)
+;(outcoloring 0)
+;(incoloring 0)
+;(plane 0)
+;(view 0.117006125 1.13233683 2.87904169E-05 2.87904169E-05)
+;(usleep 2000000)
+
+
+(palette 1 1311787594 0)
+(angle -23.3)
+(maxiter 168)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view -0.584730623 -0.221175898 3.22228192E-05 3.22228192E-05)
+(usleep 3000000)
+
+(palette 1 1307004302 0)
+(angle -23.3)
+(maxiter 168)
+(outcoloring 0)
+(incoloring 0)
+(plane 0)
+(view 0.41330684 -0.64510606 0.0001145949 0.0001145949)
+(usleep 2000000)
+
+(display)
+(palette 1 1307004302 0)
+(angle -23.3)
+(autorotate #f)
+(outcoloring 0)
+(incoloring 0)
+(maxiter 400)
+(view -0.451065423507224 -0.022533000686388 6.95555389543592E-11 6.95555389577474E-11)
+(usleep 2000000)
+(plane 0)
+(smoothmorph 'view 2000000 2000000)
+(morphview -0.4510654227194 -0.02253299961891 7.419813071352E-09 7.419813071496E-09)
+;(maxiter 168)
+(usleep 7000000)
+(wait)
+(usleep 2000000)
+
+
+
+(message "power4")
+(textsleep)
+
+(defaultpalette 0)
+(formula 'mandel4)
+(angle 0)
+(display)
+(text "z^4+c")
+(usleep 2000000)
+
+(formula 'mandel5)
+(display)
+(text "z^5+c")
+(usleep 2000000)
+
+(formula 'mandel6)
+(display)
+(text "z^6+c")
+(usleep 2000000)
+
+
+(palette 1 1158270005 0)
+(display)
+(formula 'mandel5)
+(juliaseed -0.51635174418604654479 0.70000000000000004515)
+(angle 0)
+(julia #t)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(plane 1)
+(view 0.1249 0.1893 5.961 5.961)
+(message "pjulia")
+
+
+(textsleep)
+(display)
+(palette 1 1586552168 0)
+(formula 'mandel3)
+(juliaseed 0.36882267441860467488 -0.66250000000000004263)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(julia #t)
+(plane 1)
+(view -0.02118 0.5241 7.847 7.847)
+
+(usleep 2000000)
+(display)
+(formula 'mandel5)
+(palette 1 2087220895 0)
+(juliaseed 0.33669790083813088669 -0.70478147175782891021)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(julia #t)
+(plane 1)
+(view 0.092 0.164 11.2 11.2)
+
+
+(usleep 2000000)
+
+(palette 1 111980511 0)
+(formula 'mandel5)
+(juliaseed -0.62735732725661988549 -0.50514451660129260405)
+(angle 0)
+(autorotate #f)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(julia #t)
+(plane 1)
+(view 0.3083 0.0967 8.469 8.469)
+(usleep 2000000)
+
+
+(palette 1 1530690807 0)
+(formula 'mandel9)
+(juliaseed 0.51635174418604654479 -0.50000000000000003215)
+(julia #t)
+(angle 0)
+(maxiter 170)
+(outcoloring 0)
+(incoloring 0)
+(plane 1)
+(view 0.07038 0.1477 6.786 6.786)
+(usleep 2000000)
+
diff --git a/tutorial/render.xaf b/tutorial/render.xaf
new file mode 100644
index 0000000..7ffbff0
--- /dev/null
+++ b/tutorial/render.xaf
@@ -0,0 +1,27 @@
+(load "msetren.xaf")
+
+(usleep 500000)
+(clearscreen)
+(textposition 'center 'middle)
+(text "This animation is part of
+animated tutorial
+\"An introduction to fractals\"
+
+See http://xaos.sf.net
+for next 8 chapters.")
+(textsleep)
+(text "Rendered by
+XaoS - a real-time fractal zoomer
+
+XaoS is free software. Download it from:
+http://xaos.sf.net
+to see the whole tutorial calculated in
+realtime at much higher quality.")
+(textsleep)
+(clearscreen)
+(textposition 'center 'top)
+(message "fcopyright")
+(textposition 'center 'bottom)
+(text "You can redistribute this animation
+freely as long as the original MPEG file is untouched.")
+(textsleep)
diff --git a/tutorial/square.xhf b/tutorial/square.xhf
new file mode 100644
index 0000000..16ab327
--- /dev/null
+++ b/tutorial/square.xhf
@@ -0,0 +1,20 @@
+(linekey 0)
+(clearlines)
+(color 'red)
+(line 'scaled 0.4 0.4 0.6 0.4)
+(line 'scaled 0.4 0.6 0.6 0.6)
+(line 'scaled 0.4 0.4 0.4 0.6)
+(line 'scaled 0.6 0.4 0.6 0.6)
+(color 'white)
+(textsleep)
+(linekey 0)
+(morphline 'scaled 0.3 0.3 0.7 0.3)
+(morphline 'scaled 0.3 0.7 0.7 0.7)
+(morphline 'scaled 0.3 0.3 0.3 0.7)
+(morphline 'scaled 0.7 0.3 0.7 0.7)
+(usleep 1000000)
+(line 'scaled 0.3 0.5 0.3 0.5)
+(morphlastline 'scaled 0.3 0.5 0.7 0.5)
+(line 'scaled 0.5 0.3 0.5 0.3)
+(morphlastline 'scaled 0.5 0.3 0.5 0.7)
+(usleep 1000000)
diff --git a/tutorial/tree.xhf b/tutorial/tree.xhf
new file mode 100644
index 0000000..2ddaaf7
--- /dev/null
+++ b/tutorial/tree.xhf
@@ -0,0 +1,63 @@
+(line 'scaled 0.500 0.800 0.500 0.533)
+(line 'scaled 0.500 0.533 0.602 0.388)
+(line 'scaled 0.602 0.388 0.713 0.347)
+(line 'scaled 0.713 0.347 0.790 0.368)
+(line 'scaled 0.790 0.368 0.824 0.408)
+(line 'scaled 0.824 0.408 0.827 0.443)
+(line 'scaled 0.824 0.408 0.857 0.417)
+(line 'scaled 0.790 0.368 0.839 0.350)
+(line 'scaled 0.839 0.350 0.873 0.359)
+(line 'scaled 0.839 0.350 0.859 0.321)
+(line 'scaled 0.713 0.347 0.759 0.282)
+(line 'scaled 0.759 0.282 0.808 0.264)
+(line 'scaled 0.808 0.264 0.842 0.274)
+(line 'scaled 0.808 0.264 0.828 0.236)
+(line 'scaled 0.759 0.282 0.759 0.230)
+(line 'scaled 0.759 0.230 0.779 0.201)
+(line 'scaled 0.759 0.230 0.739 0.201)
+(line 'scaled 0.602 0.388 0.602 0.269)
+(line 'scaled 0.602 0.269 0.647 0.204)
+(line 'scaled 0.647 0.204 0.697 0.186)
+(line 'scaled 0.697 0.186 0.731 0.196)
+(line 'scaled 0.697 0.186 0.717 0.158)
+(line 'scaled 0.647 0.204 0.647 0.152)
+(line 'scaled 0.647 0.152 0.667 0.123)
+(line 'scaled 0.647 0.152 0.627 0.123)
+(line 'scaled 0.602 0.269 0.557 0.204)
+(line 'scaled 0.557 0.204 0.557 0.152)
+(line 'scaled 0.557 0.152 0.577 0.123)
+(line 'scaled 0.557 0.152 0.537 0.123)
+(line 'scaled 0.557 0.204 0.507 0.186)
+(line 'scaled 0.507 0.186 0.487 0.158)
+(line 'scaled 0.507 0.186 0.473 0.196)
+(line 'scaled 0.500 0.533 0.398 0.388)
+(line 'scaled 0.398 0.388 0.398 0.269)
+(line 'scaled 0.398 0.269 0.443 0.204)
+(line 'scaled 0.443 0.204 0.493 0.186)
+(line 'scaled 0.493 0.186 0.527 0.196)
+(line 'scaled 0.493 0.186 0.513 0.158)
+(line 'scaled 0.443 0.204 0.443 0.152)
+(line 'scaled 0.443 0.152 0.463 0.123)
+(line 'scaled 0.443 0.152 0.423 0.123)
+(line 'scaled 0.398 0.269 0.353 0.204)
+(line 'scaled 0.353 0.204 0.353 0.152)
+(line 'scaled 0.353 0.152 0.373 0.123)
+(line 'scaled 0.353 0.152 0.333 0.123)
+(line 'scaled 0.353 0.204 0.303 0.186)
+(line 'scaled 0.303 0.186 0.283 0.158)
+(line 'scaled 0.303 0.186 0.269 0.196)
+(line 'scaled 0.398 0.388 0.287 0.347)
+(line 'scaled 0.287 0.347 0.241 0.282)
+(line 'scaled 0.241 0.282 0.241 0.230)
+(line 'scaled 0.241 0.230 0.261 0.201)
+(line 'scaled 0.241 0.230 0.221 0.201)
+(line 'scaled 0.241 0.282 0.192 0.264)
+(line 'scaled 0.192 0.264 0.172 0.236)
+(line 'scaled 0.192 0.264 0.158 0.274)
+(line 'scaled 0.287 0.347 0.210 0.368)
+(line 'scaled 0.210 0.368 0.161 0.350)
+(line 'scaled 0.161 0.350 0.141 0.321)
+(line 'scaled 0.161 0.350 0.127 0.359)
+(line 'scaled 0.210 0.368 0.176 0.408)
+(line 'scaled 0.176 0.408 0.143 0.417)
+(line 'scaled 0.176 0.408 0.173 0.443)
diff --git a/tutorial/trice.xaf b/tutorial/trice.xaf
new file mode 100644
index 0000000..ed571cd
--- /dev/null
+++ b/tutorial/trice.xaf
@@ -0,0 +1,133 @@
+;Other fractal types in Xaos - part 1
+;Animation file is made by Arpad Fekete
+;This file was made in January 2006
+(initstate)
+(clearscreen)
+(textposition 'center 'middle)
+(message "trice1")
+(usleep 3000000)
+
+(initstate)
+(filter 'palette #t)
+(palette 3 974867599 3)
+(formula 'mandel)
+(view -0.5632 -0.00595 2.428 2.428)
+(textposition 'center 'bottom)
+(message "trice2")
+(usleep 3000000)
+
+(defaultpalette 0)
+(view -0.5632 -0.00595 2.428 2.428)
+(textposition 'center 'bottom)
+(message "trice3")
+(usleep 3000000)
+
+(textposition 'center 'bottom)
+(message "trice4")
+(usleep 3000000)
+
+(bailout 1)
+(view -0.5632 -0.00595 2.428 2.428)
+(textposition 'center 'bottom)
+(message "trice5")
+(usleep 3500000)
+
+(morphview 0.2962971 -0.01739749 0.001622609 0.001622609)
+(textposition 'center 'bottom)
+(message "trice6")
+(usleep 3500000)
+
+(maxiter 1000)
+(textposition 'center 'bottom)
+(message "trice7")
+(usleep 3000000)
+
+(maxiter 800)
+(view -0.5632 -0.00595 2.428 2.428)
+(morphview -0.79852004338 0.16597586052 6.5128239024E-07 6.5128239024E-07)
+(textposition 'center 'bottom)
+(message "trice8")
+(usleep 6000000)
+(usleep 2000000)
+
+(initstate)
+(filter 'palette #t)
+(palette 1 1814919022 0)
+(formula 'trice)
+(view 0.04141 0.0715 2.422 4.36)
+(textposition 'center 'bottom)
+(message "trice9")
+(usleep 3500000)
+
+(morphview 0.295245 0.1022278 0.001364921 0.002457083)
+(textposition 'center 'bottom)
+(message "trice10")
+(usleep 5000000)
+(usleep 2000000)
+
+(maxiter 1000)
+(textposition 'center 'bottom)
+(message "trice11")
+(usleep 3000000)
+
+(morphview 0.29560558256862 0.10265658338044 1.2599702089501E-10 2.2681542614141E-10)
+(textposition 'center 'bottom)
+(message "trice12")
+(usleep 6000000)
+(usleep 3000000)
+
+(initstate)
+(filter 'palette #t)
+(palette 2 1935120149 0)
+(formula 'catseye)
+(angle 450.97)
+(view 0.09452 0.06434 2.747 4.945)
+(textposition 'center 'bottom)
+(message "trice13")
+(usleep 3000000)
+
+(morphview 0.56456577513 -0.832734519159 1.28241119892E-08 2.30852689422E-08)
+(textposition 'center 'bottom)
+(message "trice14")
+(usleep 6000000)
+(usleep 2000000)
+
+(initstate)
+(filter 'palette #t)
+(palette 2 1935120149 0)
+(formula 'catseye)
+(view 0.02017 -0.07466 4.721 8.499)
+(textposition 'center 'bottom)
+(message "trice15")
+(usleep 3500000)
+
+(bailout 16)
+(textposition 'center 'bottom)
+(message "trice16")
+(usleep 3500000)
+
+(maxiter 500)
+(morphview 0.406444922 1.14602861 2.18541626E-05 3.93430476E-05)
+(textposition 'center 'bottom)
+(message "trice17")
+(usleep 6000000)
+(usleep 2000000)
+
+(juliaseed 0.94489594058854675055 -2.7574622589119373924)
+(julia #t)
+(view 1.542 -0.8268 1.328 2.391)
+(textposition 'center 'bottom)
+(message "trice18")
+(usleep 1500000)
+
+(juliaseed 0.98627653568137823746 -2.8328221743028723313)
+(view 0.3128 -0.03694 4.642 8.358)
+(usleep 1500000)
+
+(juliaseed 0.98685964056950791932 0.12558544068705411543)
+(view 0.3128 -0.03694 4.642 8.358)
+(usleep 1500000)
+
+(juliaseed -0.96569613980449897552 2.7259267076790570155)
+(view 1.6043 -0.77232 0.66467 1.1967)
+(usleep 1500000)
diff --git a/tutorial/truecol.xaf b/tutorial/truecol.xaf
new file mode 100644
index 0000000..b7600d1
--- /dev/null
+++ b/tutorial/truecol.xaf
@@ -0,0 +1,10 @@
+; An introduction to fractals by Jan Hubicka
+; Version 1.0 done for XaoS 3.0 in July 1997
+; Use xaos -play to see it :)
+(load "head.xhf")
+
+(clearscreen)
+(textposition 'center 'middle)
+(message "truecolor")
+(textsleep)
+(load "truecol.xhf")
diff --git a/tutorial/truecol.xhf b/tutorial/truecol.xhf
new file mode 100644
index 0000000..3aa13c8
--- /dev/null
+++ b/tutorial/truecol.xhf
@@ -0,0 +1,199 @@
+(clearscreen)
+(message "truecolor1")
+(textsleep)
+(clearscreen)
+(message "truecolor2")
+(textsleep)
+(clearscreen)
+(message "truecolor3")
+(textsleep)
+(clearscreen)
+(message "truecolor4")
+(textsleep)
+(clearscreen)
+(message "truecolor5")
+(textsleep)
+(clearscreen)
+(message "truecolor6")
+(textsleep)
+(display)
+(filter 'truecolor #t)
+
+
+(defaultpalette 0)
+(formula 'newton)
+(fastjulia #f)
+(cycling #f)
+(periodicity #t)
+(juliaseed 1.0010901162790698318 0)
+(angle 270)
+(autorotate #f)
+(maxiter 3)
+(outcoloring 10)
+(incoloring 10)
+(intcoloring 5)
+(outtcoloring 5)
+(julia #t)
+(plane 0)
+(view -1.2122 -0.0061572 0.26936 0.26936)
+(usleep 2000000)
+
+
+(formula 'octal)
+(angle -272)
+(maxiter 25)
+(outcoloring 10)
+(incoloring 10)
+(intcoloring 2)
+(outtcoloring 1)
+(plane 1)
+(view -3.0667 0.0055074 0.31049 0.31049)
+(usleep 2000000)
+
+(formula 'mandel)
+(juliaseed -0.75713699461548487245 -0.15694570011771199221)
+(maxiter 20)
+(intcoloring 1)
+(outtcoloring 2)
+(julia #t)
+(plane 1)
+(view 1.196 -0.11047 0.45714 0.45714)
+(usleep 2000000)
+
+(formula 'barnsley)
+(juliaseed -0.021075581395348838543 1.025000000000000066)
+(angle -45.9)
+(maxiter 28)
+(intcoloring 2)
+(outtcoloring 1)
+(plane 0)
+(view 0.0596364 -1.11538 0.0605633 0.0605633)
+(usleep 2000000)
+
+
+(formula 'mandel5)
+(juliaseed 0.76925872093023260775 0.78750000000000005065)
+(maxiter 4)
+(intcoloring 3)
+(outtcoloring 3)
+(julia #t)
+(plane 1)
+(view 0.08439 -0.003914 5.152 5.152)
+(usleep 2000000)
+
+(formula 'barnsley)
+(juliaseed -0.021075581395348838543 1.025000000000000066)
+(maxiter 28)
+(intcoloring 1)
+(outtcoloring 1)
+(plane 0)
+(view -0.027164 -0.02079 0.98288 0.98288)
+(usleep 2000000)
+
+(formula 'newton)
+(maxiter 4)
+(intcoloring 3)
+(outtcoloring 3)
+(plane 3)
+(view 1.059 0.106 7.56 7.56)
+(usleep 2000000)
+
+(formula 'newton)
+(juliaseed 1.0116279069767442512 0.012500000000000000802)
+(angle 268)
+(maxiter 21)
+(julia #t)
+(plane 4)
+(view -0.6152 -0.05759 2.537 2.537)
+(usleep 2000000)
+
+(formula 'newton)
+(juliaseed 1.0116279069767442512 0.012500000000000000802)
+(angle 268)
+(maxiter 21)
+(julia #t)
+(plane 4)
+(view 0.32435 0.002152 0.35158 0.35158)
+(usleep 2000000)
+
+(formula 'barnsley)
+(juliaseed -0.021075581395348838543 1.025000000000000066)
+(angle -45.9)
+(maxiter 28)
+(intcoloring 1)
+(outtcoloring 3)
+(plane 1)
+(view -0.3134 0.05978 9.413 9.413)
+(usleep 2000000)
+
+(formula 'magnet)
+(angle -91)
+(maxiter 2)
+(intcoloring 1)
+(outtcoloring 1)
+(plane 1)
+(view 0.59578 -0.017137 0.57299 0.84038)
+(usleep 2000000)
+
+(formula 'mandel)
+(angle -268)
+(maxiter 1)
+(intcoloring 2)
+(outtcoloring 2)
+(plane 1)
+(view -0.72954 0.0061678 0.65246 0.65246)
+(usleep 2000000)
+
+(formula 'newton)
+(angle -90.5)
+(plane 2)
+(view -1.595 0.05454 6.763 6.763)
+(usleep 2000000)
+
+(formula 'magnet)
+(angle 89.7)
+(maxiter 4)
+(outtcoloring 1)
+(plane 1)
+(view -0.2292 0.04117 2.16 3.168)
+(usleep 2000000)
+
+(formula 'barnsley)
+(juliaseed -0.009189967915892080768 1.7040566355656396908)
+(maxiter 42)
+(intcoloring 4)
+(outtcoloring 4)
+(plane 1)
+(view -0.03899 -0.04575 3.535 3.535)
+(usleep 2000000)
+
+(formula 'barnsley)
+(maxiter 1)
+(intcoloring 3)
+(outtcoloring 1)
+(plane 3)
+(view 0.9983 -0.05054 2.833 2.833)
+(usleep 2000000)
+
+(formula 'magnet)
+(angle -90.6)
+(maxiter 4)
+(intcoloring 2)
+(outtcoloring 1)
+(plane 1)
+(view 0.79545 -0.015586 0.27913 0.40939)
+(usleep 2000000)
+
+
+
+
+(formula 'magnet)
+(angle 89.7)
+(maxiter 4)
+(intcoloring 2)
+(outtcoloring 1)
+(plane 1)
+(view 0.46754 0.0010797 0.19677 0.28859)
+(usleep 4000000)
+(filter 'truecolor #f)
+(initstate)
diff --git a/tutorial/xaf2cat b/tutorial/xaf2cat
new file mode 100755
index 0000000..e50abd7
--- /dev/null
+++ b/tutorial/xaf2cat
@@ -0,0 +1,83 @@
+#!/bin/sh
+if [ $# != 1 ]; then
+ echo "xaf2cat converts .xaf to .cat file format and reconstructs .xaf"
+ echo "Usage: xaf2cat [ filename.xaf | -h ]"
+ exit 1
+ fi
+
+if [ "$1" = "-h" ]; then
+ echo "This tool helps you create language independent .xaf files."
+ echo "The texts from the .xaf file will be copied into all .cat files."
+ echo "All texts in the .xaf file will be pointered to the .cat files."
+ echo "You have to write your own descriptions for the .xaf tutorial file"
+ echo "into the .cat files for each language."
+ echo ""
+ echo "The usage of this tool is quite straightforward, but unfortunately"
+ echo "it has a serious bug: it cannot handle multiline texts correctly."
+ echo "Keep this bug in mind or write a better script which will solve"
+ echo "this problem."
+ exit 1
+ fi
+
+test -r $1 || {
+ echo "$1 is missing"
+ exit 1
+ }
+export BASENAME=`basename $1 .xaf`
+cp $1 $1.orig
+echo "$1.orig file as backup was created."
+OUTPUTFILE=$BASENAME.cat
+
+echo "
+##############################################
+#for file $1
+" > $OUTPUTFILE
+
+cat $1 | grep "text " | sed s/"(text "/""/g | sed s/"\")"/"\""/g |\
+ sed s/" \"$"/"\""/g | awk '{x++; print ENVIRON["BASENAME"] x " " $0}' \
+ >> $OUTPUTFILE
+
+cat $OUTPUTFILE
+echo -n "^- This is the output. Do you want to append it to ../catalogs/*.cat? [Y/n] "
+read A
+if [ "$A" != "n" ]; then
+ for i in ../catalogs/*.cat; do
+ cat $OUTPUTFILE >> $i
+ echo -n "$i, "
+ done
+ echo "done."
+ fi
+
+echo -n "Shall I create 'message' commands instead of 'text's in $1? [Y/n] "
+read A
+if [ "$A" != "n" ]; then
+ cat $1 | sed s/"(text "/"(message "/g |\
+ sed s/" \"$"/"\""/g | awk '
+ {
+ if (index($0,"(message ")==1)
+ {
+ x++
+ l=length($0)
+ print "(message ~" ENVIRON["BASENAME"] x "~)"
+ }
+ else print $0
+ }' | sed s/"~"/"\""/g \
+ > $1.work
+
+ cat $1.work
+ echo -n "^- This is the new $1 file. Do you want to save it? [Y/n] "
+ read A
+ if [ "$A" != "n" ]; then
+ cp $1.work $1
+ echo "Done."
+ fi
+ fi
+
+echo -n "Cleanup? [Y/n] "
+read A
+if [ "$A" != "n" ]; then
+ rm -f $1.work $1.orig $OUTPUTFILE
+ echo "Cleanup done."
+ fi
+
+echo "Exiting."